A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
OfdmaTestPhyListener Class Reference

PHY listener for OFDMA tests. More...

+ Inheritance diagram for OfdmaTestPhyListener:
+ Collaboration diagram for OfdmaTestPhyListener:

Public Member Functions

 OfdmaTestPhyListener ()=default
 
Time GetLastRxEndNotification () const
 Return the time at which the last RX end notification has been received.
 
Time GetLastRxStartNotification () const
 Return the time at which the last RX start notification has been received.
 
uint32_t GetNumRxEndNotifications () const
 Return the number of RX end notifications that has been received since the last reset.
 
uint32_t GetNumRxStartNotifications () const
 Return the number of RX start notifications that has been received since the last reset.
 
bool IsLastRxSuccess () const
 Return whether last RX has been successful.
 
void NotifyCcaBusyStart (Time duration, WifiChannelListType channelType, const std::vector< Time > &) override
 
void NotifyOff () override
 Notify listeners that we went to switch off.
 
void NotifyOn () override
 Notify listeners that we went to switch on.
 
void NotifyRxEndError () override
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received.
 
void NotifyRxEndOk () override
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received.
 
void NotifyRxStart (Time duration) override
 
void NotifySleep () override
 Notify listeners that we went to sleep.
 
void NotifySwitchingStart (Time duration) override
 
void NotifyTxStart (Time duration, double txPowerDbm) override
 
void NotifyWakeup () override
 Notify listeners that we woke up.
 
void Reset ()
 Reset function.
 
- Public Member Functions inherited from ns3::WifiPhyListener
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.
 

Private Attributes

Time m_lastRxEnd {Seconds(0)}
 last time a RX end notification has been received
 
Time m_lastRxStart {Seconds(0)}
 last time a RX start notification has been received
 
bool m_lastRxSuccess {false}
 flag whether last RX has been successful
 
uint32_t m_notifyRxEnd {0}
 count number of RX end notifications
 
uint32_t m_notifyRxStart {0}
 count number of RX start notifications
 

Detailed Description

PHY listener for OFDMA tests.

Definition at line 2803 of file wifi-phy-ofdma-test.cc.

Constructor & Destructor Documentation

◆ OfdmaTestPhyListener()

OfdmaTestPhyListener::OfdmaTestPhyListener ( )
default

Member Function Documentation

◆ GetLastRxEndNotification()

Time OfdmaTestPhyListener::GetLastRxEndNotification ( ) const
inline

Return the time at which the last RX end notification has been received.

Returns
the time at which the last RX end notification has been received

Definition at line 2907 of file wifi-phy-ofdma-test.cc.

References m_lastRxEnd.

◆ GetLastRxStartNotification()

Time OfdmaTestPhyListener::GetLastRxStartNotification ( ) const
inline

Return the time at which the last RX start notification has been received.

Returns
the time at which the last RX start notification has been received

Definition at line 2898 of file wifi-phy-ofdma-test.cc.

References m_lastRxStart.

◆ GetNumRxEndNotifications()

uint32_t OfdmaTestPhyListener::GetNumRxEndNotifications ( ) const
inline

Return the number of RX end notifications that has been received since the last reset.

Returns
the number of RX end notifications that has been received

Definition at line 2889 of file wifi-phy-ofdma-test.cc.

References m_notifyRxEnd.

◆ GetNumRxStartNotifications()

uint32_t OfdmaTestPhyListener::GetNumRxStartNotifications ( ) const
inline

Return the number of RX start notifications that has been received since the last reset.

Returns
the number of RX start notifications that has been received

Definition at line 2880 of file wifi-phy-ofdma-test.cc.

References m_notifyRxStart.

◆ IsLastRxSuccess()

bool OfdmaTestPhyListener::IsLastRxSuccess ( ) const
inline

Return whether last RX has been successful.

Returns
true if last RX has been successful, false otherwise

Definition at line 2916 of file wifi-phy-ofdma-test.cc.

References m_lastRxSuccess.

◆ NotifyCcaBusyStart()

void OfdmaTestPhyListener::NotifyCcaBusyStart ( Time  duration,
WifiChannelListType  channelType,
const std::vector< Time > &  per20MhzDurations 
)
inlineoverridevirtual
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.

Implements ns3::WifiPhyListener.

Definition at line 2837 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ NotifyOff()

void OfdmaTestPhyListener::NotifyOff ( )
inlineoverridevirtual

Notify listeners that we went to switch off.

Implements ns3::WifiPhyListener.

Definition at line 2852 of file wifi-phy-ofdma-test.cc.

◆ NotifyOn()

void OfdmaTestPhyListener::NotifyOn ( )
inlineoverridevirtual

Notify listeners that we went to switch on.

Implements ns3::WifiPhyListener.

Definition at line 2860 of file wifi-phy-ofdma-test.cc.

◆ NotifyRxEndError()

void OfdmaTestPhyListener::NotifyRxEndError ( )
inlineoverridevirtual

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

Implements ns3::WifiPhyListener.

Definition at line 2824 of file wifi-phy-ofdma-test.cc.

References m_lastRxEnd, m_lastRxSuccess, m_notifyRxEnd, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyRxEndOk()

void OfdmaTestPhyListener::NotifyRxEndOk ( )
inlineoverridevirtual

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

Implements ns3::WifiPhyListener.

Definition at line 2816 of file wifi-phy-ofdma-test.cc.

References m_lastRxEnd, m_lastRxSuccess, m_notifyRxEnd, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyRxStart()

void OfdmaTestPhyListener::NotifyRxStart ( Time  duration)
inlineoverridevirtual
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

Implements ns3::WifiPhyListener.

Definition at line 2808 of file wifi-phy-ofdma-test.cc.

References m_lastRxStart, m_lastRxSuccess, m_notifyRxStart, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifySleep()

void OfdmaTestPhyListener::NotifySleep ( )
inlineoverridevirtual

Notify listeners that we went to sleep.

Implements ns3::WifiPhyListener.

Definition at line 2848 of file wifi-phy-ofdma-test.cc.

◆ NotifySwitchingStart()

void OfdmaTestPhyListener::NotifySwitchingStart ( Time  duration)
inlineoverridevirtual
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.

Implements ns3::WifiPhyListener.

Definition at line 2844 of file wifi-phy-ofdma-test.cc.

◆ NotifyTxStart()

void OfdmaTestPhyListener::NotifyTxStart ( Time  duration,
double  txPowerDbm 
)
inlineoverridevirtual
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.

Implements ns3::WifiPhyListener.

Definition at line 2832 of file wifi-phy-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ NotifyWakeup()

void OfdmaTestPhyListener::NotifyWakeup ( )
inlineoverridevirtual

Notify listeners that we woke up.

Implements ns3::WifiPhyListener.

Definition at line 2856 of file wifi-phy-ofdma-test.cc.

◆ Reset()

void OfdmaTestPhyListener::Reset ( )
inline

Reset function.

Definition at line 2867 of file wifi-phy-ofdma-test.cc.

References m_lastRxEnd, m_lastRxStart, m_lastRxSuccess, m_notifyRxEnd, m_notifyRxStart, and ns3::Seconds().

Referenced by TestUlOfdmaPhyTransmission::ScheduleTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_lastRxEnd

Time OfdmaTestPhyListener::m_lastRxEnd {Seconds(0)}
private

last time a RX end notification has been received

Definition at line 2925 of file wifi-phy-ofdma-test.cc.

Referenced by GetLastRxEndNotification(), NotifyRxEndError(), NotifyRxEndOk(), and Reset().

◆ m_lastRxStart

Time OfdmaTestPhyListener::m_lastRxStart {Seconds(0)}
private

last time a RX start notification has been received

Definition at line 2924 of file wifi-phy-ofdma-test.cc.

Referenced by GetLastRxStartNotification(), NotifyRxStart(), and Reset().

◆ m_lastRxSuccess

bool OfdmaTestPhyListener::m_lastRxSuccess {false}
private

flag whether last RX has been successful

Definition at line 2926 of file wifi-phy-ofdma-test.cc.

Referenced by IsLastRxSuccess(), NotifyRxEndError(), NotifyRxEndOk(), NotifyRxStart(), and Reset().

◆ m_notifyRxEnd

uint32_t OfdmaTestPhyListener::m_notifyRxEnd {0}
private

count number of RX end notifications

Definition at line 2923 of file wifi-phy-ofdma-test.cc.

Referenced by GetNumRxEndNotifications(), NotifyRxEndError(), NotifyRxEndOk(), and Reset().

◆ m_notifyRxStart

uint32_t OfdmaTestPhyListener::m_notifyRxStart {0}
private

count number of RX start notifications

Definition at line 2922 of file wifi-phy-ofdma-test.cc.

Referenced by GetNumRxStartNotifications(), NotifyRxStart(), and Reset().


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