A Discrete-Event Network Simulator
API
ns3::PhyMacLowListener Class Reference

Listener for PHY events. More...

+ Inheritance diagram for ns3::PhyMacLowListener:
+ Collaboration diagram for ns3::PhyMacLowListener:

Public Member Functions

 PhyMacLowListener (ns3::MacLow *macLow)
 Create a PhyMacLowListener for the given MacLow. More...
 
virtual ~PhyMacLowListener ()
 
void NotifyMaybeCcaBusyStart (Time duration)
 
void NotifyOff (void)
 Notify listeners that we went to switch off. More...
 
void NotifyOn (void)
 Notify listeners that we went to switch on. More...
 
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...
 
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...
 
void NotifyRxStart (Time duration)
 
void NotifySleep (void)
 Notify listeners that we went to sleep. More...
 
void NotifySwitchingStart (Time duration)
 
void NotifyTxStart (Time duration, double txPowerDbm)
 
void NotifyWakeup (void)
 Notify listeners that we woke up. More...
 
- Public Member Functions inherited from ns3::WifiPhyListener
virtual ~WifiPhyListener ()
 

Private Attributes

ns3::MacLowm_macLow
 the MAC More...
 

Detailed Description

Listener for PHY events.

Forwards to MacLow

Definition at line 57 of file mac-low.cc.

Constructor & Destructor Documentation

◆ PhyMacLowListener()

ns3::PhyMacLowListener::PhyMacLowListener ( ns3::MacLow macLow)
inline

Create a PhyMacLowListener for the given MacLow.

Parameters
macLow

Definition at line 65 of file mac-low.cc.

◆ ~PhyMacLowListener()

virtual ns3::PhyMacLowListener::~PhyMacLowListener ( )
inlinevirtual

Definition at line 69 of file mac-low.cc.

Member Function Documentation

◆ NotifyMaybeCcaBusyStart()

void ns3::PhyMacLowListener::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 84 of file mac-low.cc.

◆ NotifyOff()

void ns3::PhyMacLowListener::NotifyOff ( void  )
inlinevirtual

Notify listeners that we went to switch off.

Implements ns3::WifiPhyListener.

Definition at line 95 of file mac-low.cc.

References m_macLow, and ns3::MacLow::NotifyOffNow().

+ Here is the call graph for this function:

◆ NotifyOn()

void ns3::PhyMacLowListener::NotifyOn ( void  )
inlinevirtual

Notify listeners that we went to switch on.

Implements ns3::WifiPhyListener.

Definition at line 102 of file mac-low.cc.

◆ NotifyRxEndError()

void ns3::PhyMacLowListener::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 78 of file mac-low.cc.

◆ NotifyRxEndOk()

void ns3::PhyMacLowListener::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 75 of file mac-low.cc.

◆ NotifyRxStart()

void ns3::PhyMacLowListener::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 72 of file mac-low.cc.

◆ NotifySleep()

void ns3::PhyMacLowListener::NotifySleep ( void  )
inlinevirtual

Notify listeners that we went to sleep.

Implements ns3::WifiPhyListener.

Definition at line 91 of file mac-low.cc.

References m_macLow, and ns3::MacLow::NotifySleepNow().

+ Here is the call graph for this function:

◆ NotifySwitchingStart()

void ns3::PhyMacLowListener::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 87 of file mac-low.cc.

References m_macLow, and ns3::MacLow::NotifySwitchingStartNow().

+ Here is the call graph for this function:

◆ NotifyTxStart()

void ns3::PhyMacLowListener::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 81 of file mac-low.cc.

◆ NotifyWakeup()

void ns3::PhyMacLowListener::NotifyWakeup ( void  )
inlinevirtual

Notify listeners that we woke up.

Implements ns3::WifiPhyListener.

Definition at line 99 of file mac-low.cc.

Member Data Documentation

◆ m_macLow

ns3::MacLow* ns3::PhyMacLowListener::m_macLow
private

the MAC

Definition at line 107 of file mac-low.cc.

Referenced by NotifyOff(), NotifySleep(), and NotifySwitchingStart().


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