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