26 #include "ns3/object.h"
27 #include "ns3/uan-mac.h"
28 #include "ns3/uan-tx-mode.h"
29 #include "ns3/uan-prop-model.h"
30 #include "ns3/uan-transducer.h"
31 #include "ns3/device-energy-model.h"
47 static TypeId GetTypeId (
void);
69 virtual void Clear (
void);
78 inline double DbToKp (
double db)
const
80 return std::pow (10, db / 10.0);
87 inline double KpToDb (
double kp)
const
89 return 10 * std::log10 (kp);
101 static TypeId GetTypeId (
void);
115 virtual void Clear (
void);
169 static TypeId GetTypeId (
void);
174 IDLE, CCABUSY, RX, TX, SLEEP
381 virtual void Clear (
void) = 0;
383 virtual void SetSleepMode (
bool sleep) = 0;
virtual Ptr< UanNetDevice > GetDevice(void)=0
virtual bool IsStateBusy(void)=0
TracedCallback< Ptr< const Packet > > m_phyTxBeginTrace
virtual bool IsStateSleep(void)=0
virtual void NotifyTransStartTx(Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)=0
void NotifyRxDrop(Ptr< const Packet > packet)
virtual void SetCcaThresholdDb(double thresh)=0
virtual double GetRxThresholdDb(void)=0
virtual Ptr< UanChannel > GetChannel(void) const =0
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
virtual void SetRxThresholdDb(double thresh)=0
TracedCallback< Ptr< const Packet > > m_phyRxDropTrace
virtual void SetDevice(Ptr< UanNetDevice > device)=0
virtual void Clear(void)=0
TracedCallback< Ptr< const Packet > > m_phyTxDropTrace
virtual void SetReceiveErrorCallback(RxErrCallback cb)=0
virtual void NotifyIntChange(void)=0
virtual void DoDispose(void)
virtual uint32_t GetNModes(void)=0
virtual bool IsStateTx(void)=0
virtual double GetCcaThresholdDb(void)=0
void NotifyTxDrop(Ptr< const Packet > packet)
void NotifyRxEnd(Ptr< const Packet > packet)
virtual void RegisterListener(UanPhyListener *listener)=0
virtual void NotifyRxStart(void)=0
Function called when Phy object begins receiving packet.
TracedCallback< Ptr< const Packet > > m_phyRxEndTrace
virtual bool IsStateCcaBusy(void)=0
double KpToDb(double kp) const
Converts kilopascals to dB re 1 uPa.
virtual void NotifyTxStart(Time duration)=0
Function called when transmission starts from Phy object.
Abstraction of packet modulation information.
std::list< UanPacketArrival > ArrivalList
Arrival list is a standard template library list of UanPacketArrivals objects.
State
Enum defining possible Phy states.
void NotifyTxBegin(Ptr< const Packet > packet)
virtual void NotifyRxEndError(void)=0
Function called when Phy object finishes receiving packet in error.
void NotifyRxBegin(Ptr< const Packet > packet)
virtual void NotifyRxEndOk(void)=0
Function called when Phy object finishes receiving packet without error.
virtual void SetTxPowerDb(double txpwr)=0
Interface for PHY event listener A class which implements this interface may register with Phy object...
virtual void DoDispose(void)
double DbToKp(double db) const
Converts dB re 1 uPa to kilopascals.
virtual int64_t AssignStreams(int64_t stream)=0
virtual double CalcPer(Ptr< Packet > pkt, double sinrDb, UanTxMode mode)=0
Base class for UAN Phy models.
virtual void EnergyDepletionHandler(void)=0
virtual double GetTxPowerDb(void)=0
virtual void NotifyCcaStart(void)=0
Function called when Phy object begins sensing channel is busy.
virtual void SetEnergyModelCallback(DeviceEnergyModel::ChangeStateCallback callback)=0
virtual void SetRxGainDb(double gain)=0
Callback< void, Ptr< Packet >, double, UanTxMode > RxOkCallback
virtual void NotifyCcaEnd(void)=0
Function called when Phy object stops sensing channel is busy.
virtual UanTxMode GetMode(uint32_t n)=0
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
virtual double GetRxGainDb(void)=0
virtual void StartRxPacket(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0
Packet arriving from channel: i.e. leading bit of packet has arrived.
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const =0
virtual Ptr< UanTransducer > GetTransducer(void)=0
a base class which provides memory management and object aggregation
virtual void SetMac(Ptr< UanMac > mac)=0
virtual bool IsStateIdle(void)=0
virtual Ptr< Packet > GetPacketRx(void) const =0
virtual void SetChannel(Ptr< UanChannel > channel)=0
Callback< void, Ptr< Packet >, double > RxErrCallback
virtual void SendPacket(Ptr< Packet > pkt, uint32_t modeNum)=0
virtual void SetTransducer(Ptr< UanTransducer > trans)=0
a unique identifier for an interface.
void NotifyTxEnd(Ptr< const Packet > packet)
virtual bool IsStateRx(void)=0
TracedCallback< Ptr< const Packet > > m_phyRxBeginTrace
virtual void SetReceiveOkCallback(RxOkCallback cb)=0