A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::EmlsrPhyListener Class Reference

PHY listener connected to the main PHY while operating on the link of an aux PHY that is not TX capable. More...

+ Inheritance diagram for ns3::EmlsrPhyListener:
+ Collaboration diagram for ns3::EmlsrPhyListener:

Public Member Functions

 EmlsrPhyListener (Ptr< AdvancedEmlsrManager > emlsrManager)
 Constructor.
 
void NotifyCcaBusyStart (Time, WifiChannelListType, 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 (const WifiTxVector &) override
 
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) override
 
void NotifySleep () override
 Notify listeners that we went to sleep.
 
void NotifySwitchingStart (Time) override
 
void NotifyTxStart (Time, dBm_u) override
 
void NotifyWakeup () override
 Notify listeners that we woke up.
 
- Public Member Functions inherited from ns3::WifiPhyListener
virtual ~WifiPhyListener ()
 

Private Attributes

Ptr< AdvancedEmlsrManagerm_emlsrManager
 the EMLSR manager
 

Detailed Description

PHY listener connected to the main PHY while operating on the link of an aux PHY that is not TX capable.

PHY notifications are forwarded to this EMLSR manager one timestep later because this EMLSR manager may then decide to switch the main PHY back to the preferred link. Given that notifying a PHY listener is only one of the actions that are performed when handling events such as RX end or CCA busy start, it is not a good idea to request a main PHY switch while performing other actions. Forwarding notifications a timestep later allows to first complete the handling of the given event and then (possibly) starting a main PHY switch.

Definition at line 40 of file advanced-emlsr-manager.cc.

Constructor & Destructor Documentation

◆ EmlsrPhyListener()

ns3::EmlsrPhyListener::EmlsrPhyListener ( Ptr< AdvancedEmlsrManager > emlsrManager)
inline

Constructor.

Parameters
emlsrManagerthe EMLSR manager

Definition at line 48 of file advanced-emlsr-manager.cc.

Member Function Documentation

◆ NotifyCcaBusyStart()

void ns3::EmlsrPhyListener::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 75 of file advanced-emlsr-manager.cc.

References ns3::AdvancedEmlsrManager::InterruptSwitchMainPhyBackTimerIfNeeded(), m_emlsrManager, and ns3::Simulator::Schedule().

+ Here is the call graph for this function:

◆ NotifyOff()

void ns3::EmlsrPhyListener::NotifyOff ( )
inlineoverridevirtual

Notify listeners that we went to switch off.

Implements ns3::WifiPhyListener.

Definition at line 92 of file advanced-emlsr-manager.cc.

◆ NotifyOn()

void ns3::EmlsrPhyListener::NotifyOn ( )
inlineoverridevirtual

Notify listeners that we went to switch on.

Implements ns3::WifiPhyListener.

Definition at line 100 of file advanced-emlsr-manager.cc.

◆ NotifyRxEndError()

void ns3::EmlsrPhyListener::NotifyRxEndError ( const WifiTxVector & txVector)
inlineoverridevirtual
Parameters
txVectorthe TXVECTOR used for transmission

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 67 of file advanced-emlsr-manager.cc.

◆ NotifyRxEndOk()

void ns3::EmlsrPhyListener::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 60 of file advanced-emlsr-manager.cc.

References ns3::AdvancedEmlsrManager::InterruptSwitchMainPhyBackTimerIfNeeded(), m_emlsrManager, and ns3::Simulator::Schedule().

+ Here is the call graph for this function:

◆ NotifyRxStart()

void ns3::EmlsrPhyListener::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 53 of file advanced-emlsr-manager.cc.

References ns3::AdvancedEmlsrManager::InterruptSwitchMainPhyBackTimerIfNeeded(), m_emlsrManager, and ns3::Simulator::Schedule().

+ Here is the call graph for this function:

◆ NotifySleep()

void ns3::EmlsrPhyListener::NotifySleep ( )
inlineoverridevirtual

Notify listeners that we went to sleep.

Implements ns3::WifiPhyListener.

Definition at line 88 of file advanced-emlsr-manager.cc.

◆ NotifySwitchingStart()

void ns3::EmlsrPhyListener::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 84 of file advanced-emlsr-manager.cc.

◆ NotifyTxStart()

void ns3::EmlsrPhyListener::NotifyTxStart ( Time duration,
dBm_u txPower )
inlineoverridevirtual
Parameters
durationthe expected transmission duration.
txPowerthe nominal TX power

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 71 of file advanced-emlsr-manager.cc.

◆ NotifyWakeup()

void ns3::EmlsrPhyListener::NotifyWakeup ( )
inlineoverridevirtual

Notify listeners that we woke up.

Implements ns3::WifiPhyListener.

Definition at line 96 of file advanced-emlsr-manager.cc.

Member Data Documentation

◆ m_emlsrManager

Ptr<AdvancedEmlsrManager> ns3::EmlsrPhyListener::m_emlsrManager
private

the EMLSR manager

Definition at line 105 of file advanced-emlsr-manager.cc.

Referenced by NotifyCcaBusyStart(), NotifyRxEndOk(), and NotifyRxStart().


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