22 #ifndef UAN_PHY_DUAL_H
23 #define UAN_PHY_DUAL_H
25 #include "ns3/uan-phy.h"
139 virtual void Clear (
void);
keep track of time values and allow control of global simulation resolution
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual uint32_t GetNModes(void)
Get the number of transmission modes supported by this Phy.
RxOkCallback m_recOkCb
Callback when packet received without errors.
static TypeId GetTypeId(void)
Register this type.
virtual Ptr< UanTransducer > GetTransducer(void)
Get the attached transducer.
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
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.
Ptr< Packet > GetPacketRx(void) const
Get the packet currently being received.
virtual void SetMac(Ptr< UanMac > mac)
Set the MAC forwarding messages to this Phy.
virtual bool IsStateSleep(void)
double GetCcaThresholdPhy2(void) const
Get the CCA threshold signal strength required to detect channel busy.
Container for UanTxModes.
virtual bool IsStateTx(void)
virtual void SetCcaThresholdDb(double thresh)
Set the threshold for detecting channel busy.
virtual void SetDevice(Ptr< UanNetDevice > device)
Set the device hosting this Phy.
virtual Ptr< UanChannel > GetChannel(void) const
Get the attached channel.
virtual ~UanPhyDual()
Dummy destructor.
virtual void SetTxPowerDb(double txpwr)
Set the transmit power.
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 bool IsStateIdle(void)
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.
double GetRxGainDbPhy1(void) const
Get the receiver gain added to signal at receiver in dB.
virtual void NotifyTransStartTx(Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
Called when a transmission is beginning on the attched transducer.
virtual void SendPacket(Ptr< Packet > pkt, uint32_t modeNum)
Send a packet using a specific transmission mode.
Ptr< Packet > GetPhy1PacketRx(void) const
Get the packet currently being received.
The power delay profile returned by propagation models.
Abstraction of packet modulation information.
virtual void SetSleepMode(bool sleep)
Set the Phy SLEEP mode.
virtual void Clear(void)
Clear all pointer references.
std::list< UanPacketArrival > ArrivalList
List of arriving packets overlapping in time.
virtual void NotifyIntChange(void)
Called when there has been a change in the ammount of interference this node is experiencing from oth...
virtual void SetChannel(Ptr< UanChannel > channel)
Attach to a channel.
Ptr< UanPhyPer > GetPerModelPhy2(void) const
Get the error probability model.
UanModesList GetModesPhy1(void) const
Get the list of available modes.
void SetModesPhy1(UanModesList modes)
Set the available modes.
Ptr< UanPhyCalcSinr > GetSinrModelPhy2(void) const
Get the SINR calculator.
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_txLogger
A packet was sent from this Phy.
UanModesList GetModesPhy2(void) const
Get the list of available modes.
virtual void SetRxGainDb(double gain)
Set the receiver gain.
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 SetRxThresholdDb(double thresh) NS_DEPRECATED
Set the minimum SINR threshold to receive a packet without errors.
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.
double GetCcaThresholdPhy1(void) const
Get the CCA threshold signal strength required to detect channel busy.
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.
void SetModesPhy2(UanModesList modes)
Set the available modes.
Base class for UAN Phy models.
void SetSinrModelPhy2(Ptr< UanPhyCalcSinr > calcSinr)
Set the SINR calculator.
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...
double GetTxPowerDbPhy1(void) const
Get the current transmit power, in dB.
virtual void RegisterListener(UanPhyListener *listener)
Register a UanPhyListener to be notified of common UanPhy events.
static TypeId GetTypeId()
Register this type.
Ptr< UanPhyCalcSinr > GetSinrModelPhy1(void) const
Get the SINR calculator.
virtual void SetReceiveErrorCallback(RxErrCallback cb)
Set the callback to be used when a packet is received with errors.
double GetTxPowerDbPhy2(void) const
Get the current transmit power, in dB.
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxErrLogger
A packet was received unsuccessfully.
virtual double GetRxGainDb(void)
Get the receiver gain added to signal at receiver in dB.
virtual bool IsStateCcaBusy(void)
UanPhyCalcSinrDual()
Constructor.
TracedCallback< Ptr< const Packet >, double, UanTxMode > m_rxOkLogger
A packet was received successfully.
virtual Ptr< UanNetDevice > GetDevice(void)
Get the device hosting this Phy.
a unique identifier for an interface.
Ptr< Packet > GetPhy2PacketRx(void) const
Get the packet currently being received.
double GetRxGainDbPhy2(void) const
Get the receiver gain added to signal at receiver in dB.
void SetPerModelPhy2(Ptr< UanPhyPer > per)
Set the error probability model.
virtual double GetCcaThresholdDb(void)
Get the CCA threshold signal strength required to detect channel busy.
void SetRxGainDbPhy2(double gain)
Set the receiver gain.
Default SINR model for UanPhyDual.
void SetRxGainDbPhy1(double gain)
Set the receiver gain.
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.
virtual double GetTxPowerDb(void)
Get the current transmit power, in dB.