A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | List of all members
TestPhyListener Class Reference

Test Phy Listener. More...

+ Inheritance diagram for TestPhyListener:

Public Member Functions

 TestPhyListener (void)
 Create a test PhyListener. More...
 
virtual ~TestPhyListener ()
 
virtual void NotifyMaybeCcaBusyStart (Time duration)
 
virtual void NotifyOff (void)
 Notify listeners that we went to switch off. More...
 
virtual void NotifyOn (void)
 Notify listeners that we went to switch on. More...
 
virtual void NotifyRxEndError (void)
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has not been successfully received. More...
 
virtual void NotifyRxEndOk (void)
 We have received the last bit of a packet for which NotifyRxStart was invoked first and, the packet has been successfully received. More...
 
virtual void NotifyRxStart (Time duration)
 
virtual void NotifySleep (void)
 Notify listeners that we went to sleep. More...
 
virtual void NotifySwitchingStart (Time duration)
 
virtual void NotifyTxStart (Time duration, double txPowerDbm)
 
virtual void NotifyWakeup (void)
 Notify listeners that we woke up. More...
 
- Public Member Functions inherited from ns3::WifiPhyListener
virtual ~WifiPhyListener ()
 

Public Attributes

uint32_t m_notifyMaybeCcaBusyStart
 notify maybe CCA busy start More...
 
uint32_t m_notifyRxEndError
 notify receive end error More...
 
uint32_t m_notifyRxEndOk
 notify receive end OK More...
 
uint32_t m_notifyRxStart
 notify receive start More...
 

Detailed Description

Test Phy Listener.

Definition at line 198 of file spectrum-wifi-phy-test.cc.

Constructor & Destructor Documentation

◆ TestPhyListener()

TestPhyListener::TestPhyListener ( void  )
inline

Create a test PhyListener.

Definition at line 205 of file spectrum-wifi-phy-test.cc.

◆ ~TestPhyListener()

virtual TestPhyListener::~TestPhyListener ( )
inlinevirtual

Definition at line 212 of file spectrum-wifi-phy-test.cc.

Member Function Documentation

◆ NotifyMaybeCcaBusyStart()

virtual void TestPhyListener::NotifyMaybeCcaBusyStart ( Time  duration)
inlinevirtual
Parameters
durationthe expected busy duration.

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 234 of file spectrum-wifi-phy-test.cc.

References m_notifyMaybeCcaBusyStart, and NS_LOG_FUNCTION.

◆ NotifyOff()

virtual void TestPhyListener::NotifyOff ( void  )
inlinevirtual

Notify listeners that we went to switch off.

Implements ns3::WifiPhyListener.

Definition at line 245 of file spectrum-wifi-phy-test.cc.

◆ NotifyOn()

virtual void TestPhyListener::NotifyOn ( void  )
inlinevirtual

Notify listeners that we went to switch on.

Implements ns3::WifiPhyListener.

Definition at line 251 of file spectrum-wifi-phy-test.cc.

◆ NotifyRxEndError()

virtual void TestPhyListener::NotifyRxEndError ( void  )
inlinevirtual

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 225 of file spectrum-wifi-phy-test.cc.

References m_notifyRxEndError, and NS_LOG_FUNCTION.

◆ NotifyRxEndOk()

virtual void TestPhyListener::NotifyRxEndOk ( void  )
inlinevirtual

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 220 of file spectrum-wifi-phy-test.cc.

References m_notifyRxEndOk, and NS_LOG_FUNCTION.

◆ NotifyRxStart()

virtual void TestPhyListener::NotifyRxStart ( Time  duration)
inlinevirtual
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 215 of file spectrum-wifi-phy-test.cc.

References m_notifyRxStart, and NS_LOG_FUNCTION.

◆ NotifySleep()

virtual void TestPhyListener::NotifySleep ( void  )
inlinevirtual

Notify listeners that we went to sleep.

Implements ns3::WifiPhyListener.

Definition at line 242 of file spectrum-wifi-phy-test.cc.

◆ NotifySwitchingStart()

virtual void TestPhyListener::NotifySwitchingStart ( Time  duration)
inlinevirtual
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 239 of file spectrum-wifi-phy-test.cc.

◆ NotifyTxStart()

virtual void TestPhyListener::NotifyTxStart ( Time  duration,
double  txPowerDbm 
)
inlinevirtual
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 230 of file spectrum-wifi-phy-test.cc.

References NS_LOG_FUNCTION.

◆ NotifyWakeup()

virtual void TestPhyListener::NotifyWakeup ( void  )
inlinevirtual

Notify listeners that we woke up.

Implements ns3::WifiPhyListener.

Definition at line 248 of file spectrum-wifi-phy-test.cc.

Member Data Documentation

◆ m_notifyMaybeCcaBusyStart

uint32_t TestPhyListener::m_notifyMaybeCcaBusyStart

notify maybe CCA busy start

Definition at line 257 of file spectrum-wifi-phy-test.cc.

Referenced by SpectrumWifiPhyListenerTest::DoRun(), and NotifyMaybeCcaBusyStart().

◆ m_notifyRxEndError

uint32_t TestPhyListener::m_notifyRxEndError

notify receive end error

Definition at line 256 of file spectrum-wifi-phy-test.cc.

Referenced by NotifyRxEndError().

◆ m_notifyRxEndOk

uint32_t TestPhyListener::m_notifyRxEndOk

notify receive end OK

Definition at line 255 of file spectrum-wifi-phy-test.cc.

Referenced by SpectrumWifiPhyListenerTest::DoRun(), and NotifyRxEndOk().

◆ m_notifyRxStart

uint32_t TestPhyListener::m_notifyRxStart

notify receive start

Definition at line 254 of file spectrum-wifi-phy-test.cc.

Referenced by SpectrumWifiPhyListenerTest::DoRun(), and NotifyRxStart().


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