27 #include "ns3/traced-callback.h"
28 #include "ns3/nstime.h"
29 #include "ns3/device-energy-model.h"
30 #include "ns3/random-variable-stream.h"
83 double NChooseK (uint32_t n, uint32_t k);
205 virtual void Clear (
void);
260 double DbToKp (
double db);
261 double KpToDb (
double kp);
virtual void NotifyTransStartTx(Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
virtual bool IsStateBusy(void)
virtual Ptr< UanTransducer > GetTransducer(void)
virtual double GetRxThresholdDb(void)
keep track of time values and allow control of global simulation resolution
virtual bool IsStateRx(void)
virtual void SetEnergyModelCallback(DeviceEnergyModel::ChangeStateCallback cb)
virtual void SetReceiveErrorCallback(RxErrCallback cb)
double CalculateSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, UanTxMode mode, UanPdp pdp)
virtual void EnergyDepletionHandler(void)
virtual void SetTransducer(Ptr< UanTransducer > trans)
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
Ptr< UniformRandomVariable > m_pg
Provides uniform random variables.
Packet error rate calculation assuming WHOI Micromodem like PHY Calculates PER assuming rate 1/2 conv...
virtual void SetSleepMode(bool sleep)
virtual void StartRxPacket(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
Packet arriving from channel: i.e. leading bit of packet has arrived.
virtual uint32_t GetNModes(void)
Container for UanTxModes.
virtual double GetTxPowerDb(void)
virtual double GetCcaThresholdDb(void)
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_txLogger
static TypeId GetTypeId(void)
double NChooseK(uint32_t n, uint32_t k)
WHOI Micromodem like FH-FSK model.
static TypeId GetTypeId(void)
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const
virtual bool IsStateTx(void)
virtual void SetDevice(Ptr< UanNetDevice > device)
int64_t AssignStreams(int64_t stream)
virtual ~UanPhyPerUmodem()
Ptr< UanNetDevice > m_device
virtual Ptr< Packet > GetPacketRx(void) const
Abstraction of packet modulation information.
DeviceEnergyModel::ChangeStateCallback m_energyCallback
void NotifyListenersRxGood(void)
void NotifyListenersCcaEnd(void)
std::list< UanPacketArrival > ArrivalList
Arrival list is a standard template library list of UanPacketArrivals objects.
State
Enum defining possible Phy states.
virtual void SetCcaThresholdDb(double thresh)
virtual void NotifyIntChange(void)
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const
virtual Ptr< UanChannel > GetChannel(void) const
Ptr< UanPhyCalcSinr > m_sinr
virtual UanTxMode GetMode(uint32_t n)
virtual void SetRxThresholdDb(double thresh)
virtual void SetRxGainDb(double gain)
Interface for PHY event listener A class which implements this interface may register with Phy object...
static TypeId GetTypeId(void)
void UpdatePowerConsumption(const State state)
void NotifyListenersRxStart(void)
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)
virtual ~UanPhyCalcSinrFhFsk()
void RxEndEvent(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode)
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxOkLogger
virtual void SetChannel(Ptr< UanChannel > channel)
Default SINR calculator for UanPhyGen The default ignores mode data and assumes that all rxpower tran...
Base class for UAN Phy models.
std::list< UanPhyListener * > ListenerList
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxErrLogger
virtual ~UanPhyPerGenDefault()
virtual bool IsStateIdle(void)
static TypeId GetTypeId(void)
Ptr< UanChannel > m_channel
void NotifyListenersCcaStart(void)
double GetInterferenceDb(Ptr< Packet > pkt)
void NotifyListenersRxBad(void)
Ptr< UanTransducer > m_transducer
static TypeId GetTypeId(void)
virtual ~UanPhyCalcSinrDefault()
virtual void SendPacket(Ptr< Packet > pkt, uint32_t modeNum)
Default Packet Error Rate calculator for UanPhyGen Considers no error if SINR is > user defined thres...
virtual bool IsStateCcaBusy(void)
virtual void RegisterListener(UanPhyListener *listener)
virtual double GetRxGainDb(void)
virtual bool IsStateSleep(void)
virtual void SetMac(Ptr< UanMac > mac)
virtual void SetReceiveOkCallback(RxOkCallback cb)
static UanModesList GetDefaultModes(void)
a unique identifier for an interface.
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)
virtual Ptr< UanNetDevice > GetDevice(void)
void NotifyListenersTxStart(Time duration)
virtual void SetTxPowerDb(double txpwr)