A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiPhyListener Class Referenceabstract

receive notifications about PHY events. More...

#include "wifi-phy-listener.h"

+ Inheritance diagram for ns3::WifiPhyListener:

Public Member Functions

virtual ~WifiPhyListener ()
 
virtual void NotifyCcaBusyStart (Time duration, WifiChannelListType channelType, const std::vector< Time > &per20MhzDurations)=0
 
virtual void NotifyOff ()=0
 Notify listeners that we went to switch off.
 
virtual void NotifyOn ()=0
 Notify listeners that we went to switch on.
 
virtual void NotifyRxEndError ()=0
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received.
 
virtual void NotifyRxEndOk ()=0
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received.
 
virtual void NotifyRxStart (Time duration)=0
 
virtual void NotifySleep ()=0
 Notify listeners that we went to sleep.
 
virtual void NotifySwitchingStart (Time duration)=0
 
virtual void NotifyTxStart (Time duration, double txPowerDbm)=0
 
virtual void NotifyWakeup ()=0
 Notify listeners that we woke up.
 

Detailed Description

receive notifications about PHY events.

Definition at line 34 of file wifi-phy-listener.h.

Constructor & Destructor Documentation

◆ ~WifiPhyListener()

virtual ns3::WifiPhyListener::~WifiPhyListener ( )
inlinevirtual

Definition at line 41 of file wifi-phy-listener.h.

Member Function Documentation

◆ NotifyCcaBusyStart()

virtual void ns3::WifiPhyListener::NotifyCcaBusyStart ( Time  duration,
WifiChannelListType  channelType,
const std::vector< Time > &  per20MhzDurations 
)
pure virtual
Parameters
durationthe expected busy duration.
channelTypethe channel type for which the CCA busy state is reported.
per20MhzDurationsvector that indicates for how long each 20 MHz subchannel (corresponding to the index of the element in the vector) is busy and where a zero duration indicates that the subchannel is idle. The vector is non-empty if the PHY supports 802.11ax or later and if the operational channel width is larger than 20 MHz.

This method does not really report a real state change as opposed to the other methods in this class. It merely reports that, unless the medium is reported busy through NotifyTxStart or NotifyRxStart/End, it will be busy as defined by the currently selected CCA mode.

Typical client code which wants to have a clear picture of the CCA state will need to keep track of the time at which the last NotifyCcaBusyStart method is called and what duration it reported.

Implemented in TestPhyListener, OfdmaTestPhyListener, ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, and CcaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchFromRxAbort(), and ns3::WifiPhyStateHelper::SwitchMaybeToCcaBusy().

+ Here is the caller graph for this function:

◆ NotifyOff()

virtual void ns3::WifiPhyListener::NotifyOff ( )
pure virtual

Notify listeners that we went to switch off.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchToOff().

+ Here is the caller graph for this function:

◆ NotifyOn()

virtual void ns3::WifiPhyListener::NotifyOn ( )
pure virtual

Notify listeners that we went to switch on.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchFromOff().

+ Here is the caller graph for this function:

◆ NotifyRxEndError()

virtual void ns3::WifiPhyListener::NotifyRxEndError ( )
pure virtual

We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchFromRxEndError().

+ Here is the caller graph for this function:

◆ NotifyRxEndOk()

virtual void ns3::WifiPhyListener::NotifyRxEndOk ( )
pure virtual

We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchFromRxAbort(), and ns3::WifiPhyStateHelper::SwitchFromRxEndOk().

+ Here is the caller graph for this function:

◆ NotifyRxStart()

virtual void ns3::WifiPhyListener::NotifyRxStart ( Time  duration)
pure virtual
Parameters
durationthe expected duration of the packet reception.

We have received the first bit of a packet. We decided that we could synchronize on this packet. It does not mean we will be able to successfully receive completely the whole packet. It means that we will report a BUSY status until one of the following happens:

  • NotifyRxEndOk
  • NotifyRxEndError
  • NotifyTxStart

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchToRx().

+ Here is the caller graph for this function:

◆ NotifySleep()

virtual void ns3::WifiPhyListener::NotifySleep ( )
pure virtual

Notify listeners that we went to sleep.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchToSleep().

+ Here is the caller graph for this function:

◆ NotifySwitchingStart()

virtual void ns3::WifiPhyListener::NotifySwitchingStart ( Time  duration)
pure virtual
Parameters
durationthe expected channel switching duration.

We do not send any event to notify the end of channel switching. Listeners should assume that the channel implicitly reverts to the idle or busy states.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchToChannelSwitching().

+ Here is the caller graph for this function:

◆ NotifyTxStart()

virtual void ns3::WifiPhyListener::NotifyTxStart ( Time  duration,
double  txPowerDbm 
)
pure virtual
Parameters
durationthe expected transmission duration.
txPowerDbmthe nominal TX power in dBm

We are about to send the first bit of the packet. We do not send any event to notify the end of transmission. Listeners should assume that the channel implicitly reverts to the idle state unless they have received a CCA busy report.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchToTx().

+ Here is the caller graph for this function:

◆ NotifyWakeup()

virtual void ns3::WifiPhyListener::NotifyWakeup ( )
pure virtual

Notify listeners that we woke up.

Implemented in ns3::PhyListener, ns3::WifiRadioEnergyModelPhyListener, TestPhyListener, CcaTestPhyListener, and OfdmaTestPhyListener.

Referenced by ns3::WifiPhyStateHelper::SwitchFromSleep().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: