22 #ifndef UAN_PHY_DUAL_H 23 #define UAN_PHY_DUAL_H 25 #include "ns3/uan-phy.h" 137 virtual void Clear (
void);
Simulation virtual time values and global simulation resolution.
virtual void DoDispose()
Destructor implementation.
virtual uint32_t GetNModes(void)
Get the number of transmission modes supported by this Phy.
RxOkCallback m_recOkCb
Callback when packet received without errors.
Ptr< UanPhyCalcSinr > GetSinrModelPhy2(void) const
Get the SINR calculator.
static TypeId GetTypeId(void)
Register this type.
virtual Ptr< UanTransducer > GetTransducer(void)
Get the attached transducer.
Forward calls to a chain of Callback.
virtual void SetEnergyModelCallback(DeviceEnergyModel::ChangeStateCallback callback)
Set the DeviceEnergyModel callback for UanPhy device.
virtual ~UanPhyCalcSinrDual()
Destructor.
Ptr< UanPhy > m_phy1
First Phy layer.
Ptr< UanPhy > m_phy2
Second Phy layer.
virtual void SetMac(Ptr< UanMac > mac)
Set the MAC forwarding messages to this Phy.
virtual bool IsStateSleep(void)
#define NS_UNUSED(x)
Mark a local variable as unused.
virtual Ptr< UanChannel > GetChannel(void) const
Get the attached channel.
double GetCcaThresholdPhy1(void) const
Get the CCA threshold signal strength required to detect channel busy.
Container for UanTxModes.
UanModesList GetModesPhy1(void) const
Get the list of available modes.
virtual bool IsStateTx(void)
virtual void SetCcaThresholdDb(double thresh)
Set the threshold for detecting channel busy.
double GetCcaThresholdPhy2(void) const
Get the CCA threshold signal strength required to detect channel busy.
Ptr< Packet > GetPacketRx(void) const
Get the packet currently being received.
virtual void SetDevice(Ptr< UanNetDevice > device)
Set the device hosting this Phy.
virtual ~UanPhyDual()
Dummy destructor.
virtual void SetTxPowerDb(double txpwr)
Set the transmit power.
Ptr< Packet > GetPhy1PacketRx(void) const
Get the packet currently being received.
virtual bool IsStateBusy(void)
virtual double GetRxThresholdDb(void)
Get the minimum received signal strength required to receive a packet without errors.
void SetCcaThresholdPhy1(double thresh)
Set the threshold for detecting channel busy.
virtual Ptr< UanNetDevice > GetDevice(void) const
Get the device hosting this Phy.
virtual bool IsStateIdle(void)
virtual void NotifyTransStartTx(Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
Called when a transmission is beginning on the attached transducer.
virtual void SendPacket(Ptr< Packet > pkt, uint32_t modeNum)
Send a packet using a specific transmission mode.
The power delay profile returned by propagation models.
Abstraction of packet modulation information.
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_txLogger
A packet was sent from this Phy.
virtual void SetSleepMode(bool sleep)
Set the Phy SLEEP mode.
Ptr< UanPhyPer > GetPerModelPhy2(void) const
Get the error probability model.
virtual void Clear(void)
Clear all pointer references.
double GetTxPowerDbPhy1(void) const
Get the current transmit power, in dB.
std::list< UanPacketArrival > ArrivalList
List of arriving packets overlapping in time.
virtual void NotifyIntChange(void)
Called when there has been a change in the amount of interference this node is experiencing from othe...
virtual void SetChannel(Ptr< UanChannel > channel)
Attach to a channel.
Ptr< Packet > GetPhy2PacketRx(void) const
Get the packet currently being received.
void SetModesPhy1(UanModesList modes)
Set the available modes.
virtual void EnergyRechargeHandler(void)
Handle the energy recharge event.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
RxErrCallback m_recErrCb
Callback when packet received with errors.
void SetPerModelPhy1(Ptr< UanPhyPer > per)
Set the error probability model.
Interface for PHY event listener.
virtual void StartRxPacket(Ptr< Packet > pkt, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
Packet arriving from channel: i.e.
void RxOkFromSubPhy(Ptr< Packet > pkt, double sinr, UanTxMode mode)
Handle callback and logger for packets received without error.
void SetTxPowerDbPhy1(double txpwr)
Set the transmit power.
virtual bool IsStateRx(void)
void SetTxPowerDbPhy2(double txpwr)
Set the transmit power.
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxErrLogger
A packet was received unsuccessfully.
void RxErrFromSubPhy(Ptr< Packet > pkt, double sinr)
Handle callback and logger for packets received with error.
Class used for calculating SINR of packet in UanPhy.
ns3::TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxOkLogger
A packet was received successfully.
void SetModesPhy2(UanModesList modes)
Set the available modes.
Base class for UAN Phy models.
void SetSinrModelPhy2(Ptr< UanPhyCalcSinr > calcSinr)
Set the SINR calculator.
virtual void SetRxThresholdDb(double thresh)
Set the minimum SINR threshold to receive a packet without errors.
void SetSinrModelPhy1(Ptr< UanPhyCalcSinr > calcSinr)
Set the SINR calculator.
virtual void SetReceiveOkCallback(RxOkCallback cb)
Set the callback to be used when a packet is received without error.
virtual void SetTransducer(Ptr< UanTransducer > trans)
Attach a transducer to this Phy.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
virtual void RegisterListener(UanPhyListener *listener)
Register a UanPhyListener to be notified of common UanPhy events.
static TypeId GetTypeId()
Register this type.
virtual void SetReceiveErrorCallback(RxErrCallback cb)
Set the callback to be used when a packet is received with errors.
virtual bool IsStateCcaBusy(void)
UanPhyCalcSinrDual()
Constructor.
Ptr< UanPhyCalcSinr > GetSinrModelPhy1(void) const
Get the SINR calculator.
a unique identifier for an interface.
virtual double CalcSinrDb(Ptr< Packet > pkt, Time arrTime, double rxPowerDb, double ambNoiseDb, UanTxMode mode, UanPdp pdp, const UanTransducer::ArrivalList &arrivalList) const
Calculate the SINR value for a packet.
void SetPerModelPhy2(Ptr< UanPhyPer > per)
Set the error probability model.
double GetTxPowerDbPhy2(void) const
Get the current transmit power, in dB.
virtual double GetCcaThresholdDb(void)
Get the CCA threshold signal strength required to detect channel busy.
Default SINR model for UanPhyDual.
void SetCcaThresholdPhy2(double thresh)
Set the threshold for detecting channel busy.
Ptr< UanPhyPer > GetPerModelPhy1(void) const
Get the error probability model.
virtual UanTxMode GetMode(uint32_t n)
Get a specific transmission mode.
virtual void EnergyDepletionHandler(void)
Handle the energy depletion event.
UanModesList GetModesPhy2(void) const
Get the list of available modes.
virtual double GetTxPowerDb(void)
Get the current transmit power, in dB.