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

EmlsrManager is an abstract base class defining the API that EHT non-AP MLDs with EMLSR activated can use to handle the operations on the EMLSR links. More...

#include "emlsr-manager.h"

+ Inheritance diagram for ns3::EmlsrManager:
+ Collaboration diagram for ns3::EmlsrManager:

Public Member Functions

 EmlsrManager ()
 
 ~EmlsrManager () override
 
const std::set< uint8_t > & GetEmlsrLinks () const
 
std::optional< TimeGetTransitionTimeout () const
 
void NotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId)
 Notify the reception of a management frame addressed to us.
 
void SetEmlsrLinks (const std::set< uint8_t > &linkIds)
 Take actions to enable EMLSR mode on the given set of links, if non-empty, or disable EMLSR mode, otherwise.
 
void SetTransitionTimeout (Time timeout)
 Set the Transition Timeout advertised by the associated AP with EMLSR activated.
 
void SetWifiMac (Ptr< StaWifiMac > mac)
 Set the wifi MAC.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
Ptr< EhtFrameExchangeManagerGetEhtFem (uint8_t linkId) const
 
virtual uint8_t GetLinkToSendEmlNotification ()=0
 
Ptr< StaWifiMacGetStaMac () const
 
virtual std::optional< uint8_t > ResendNotification (Ptr< const WifiMpdu > mpdu)=0
 A previous EML Operating Mode Notification frame was dropped.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Protected Attributes

Time m_emlsrPaddingDelay
 EMLSR Padding delay.
 
Time m_emlsrTransitionDelay
 EMLSR Transition delay.
 

Private Member Functions

void ChangeEmlsrMode ()
 This method is called to make an EMLSR mode change effective after the transition delay has elapsed or a notification response has been received from the AP.
 
virtual void DoNotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId)=0
 Notify the subclass of the reception of a management frame addressed to us.
 
virtual void NotifyEmlsrModeChanged ()=0
 Notify subclass that EMLSR mode changed.
 
void SendEmlOperatingModeNotification ()
 Send an EML Operating Mode Notification frame.
 
void TxDropped (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
 Notify that the given MPDU has been discarded for the given reason.
 
void TxOk (Ptr< const WifiMpdu > mpdu)
 Notify the acknowledgment of the given MPDU.
 

Private Attributes

std::set< uint8_t > m_emlsrLinks
 ID of the EMLSR links (empty if EMLSR mode is disabled)
 
std::optional< Timem_emlsrTransitionTimeout
 Transition timeout advertised by APs with EMLSR activated.
 
Time m_lastAdvPaddingDelay
 last advertised padding delay
 
Time m_lastAdvTransitionDelay
 last advertised transition delay
 
std::optional< std::set< uint8_t > > m_nextEmlsrLinks
 ID of the links that will become the EMLSR links when the pending notification frame is acknowledged.
 
Ptr< StaWifiMacm_staMac
 the MAC of the managed non-AP MLD
 
EventId m_transitionTimeoutEvent
 Timer started after the successful transmission of an EML Operating Mode Notification frame.
 

Additional Inherited Members

Detailed Description

EmlsrManager is an abstract base class defining the API that EHT non-AP MLDs with EMLSR activated can use to handle the operations on the EMLSR links.

Introspection did not find any typical Config paths.


Attributes

  • EmlsrLinkSet: IDs of the links on which EMLSR mode will be enabled. An empty set indicates to disable EMLSR.
  • EmlsrPaddingDelay: The EMLSR Paddind Delay (not used by AP MLDs). Possible values are 0 us, 32 us, 64 us, 128 us or 256 us.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+256000ns
    • Initial value: +0ns
    • Flags: constructwriteread
  • EmlsrTransitionDelay: The EMLSR Transition Delay (not used by AP MLDs). Possible values are 0 us, 16 us, 32 us, 64 us, 128 us or 256 us.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+256000ns
    • Initial value: +0ns
    • Flags: constructwriteread

No TraceSources are defined for this type.
Size of this type is 216 bytes (on a 64-bit architecture).

Definition at line 43 of file emlsr-manager.h.

Constructor & Destructor Documentation

◆ EmlsrManager()

ns3::EmlsrManager::EmlsrManager ( )

Definition at line 67 of file emlsr-manager.cc.

References NS_LOG_FUNCTION.

◆ ~EmlsrManager()

ns3::EmlsrManager::~EmlsrManager ( )
override

Definition at line 72 of file emlsr-manager.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ ChangeEmlsrMode()

void ns3::EmlsrManager::ChangeEmlsrMode ( )
private

This method is called to make an EMLSR mode change effective after the transition delay has elapsed or a notification response has been received from the AP.

Definition at line 320 of file emlsr-manager.cc.

References m_emlsrLinks, m_nextEmlsrLinks, NotifyEmlsrModeChanged(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by TxOk().

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

◆ DoDispose()

void ns3::EmlsrManager::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 78 of file emlsr-manager.cc.

References ns3::EventId::Cancel(), ns3::Object::DoDispose(), m_staMac, m_transitionTimeoutEvent, ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::ObjectBase::TraceDisconnectWithoutContext(), TxDropped(), and TxOk().

+ Here is the call graph for this function:

◆ DoNotifyMgtFrameReceived()

virtual void ns3::EmlsrManager::DoNotifyMgtFrameReceived ( Ptr< const WifiMpdu mpdu,
uint8_t  linkId 
)
privatepure virtual

Notify the subclass of the reception of a management frame addressed to us.

Parameters
mpduthe received MPDU
linkIdthe ID of the link over which the MPDU was received

Implemented in ns3::DefaultEmlsrManager.

Referenced by NotifyMgtFrameReceived().

+ Here is the caller graph for this function:

◆ GetEhtFem()

Ptr< EhtFrameExchangeManager > ns3::EmlsrManager::GetEhtFem ( uint8_t  linkId) const
protected
Parameters
linkIdthe ID of the given link
Returns
the EHT FrameExchangeManager attached to the non-AP STA operating on the given link

Definition at line 119 of file emlsr-manager.cc.

References ns3::WifiMac::GetFrameExchangeManager(), and m_staMac.

Referenced by SendEmlOperatingModeNotification(), and TxDropped().

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

◆ GetEmlsrLinks()

const std::set< uint8_t > & ns3::EmlsrManager::GetEmlsrLinks ( ) const
Returns
the set of links on which EMLSR mode is enabled

Definition at line 107 of file emlsr-manager.cc.

References m_emlsrLinks.

◆ GetLinkToSendEmlNotification()

virtual uint8_t ns3::EmlsrManager::GetLinkToSendEmlNotification ( )
protectedpure virtual
Returns
the ID of the link on which the EML Operating Mode Notification frame has to be sent

Implemented in ns3::DefaultEmlsrManager.

Referenced by SendEmlOperatingModeNotification().

+ Here is the caller graph for this function:

◆ GetStaMac()

Ptr< StaWifiMac > ns3::EmlsrManager::GetStaMac ( ) const
protected
Returns
the MAC of the non-AP MLD managed by this EMLSR Manager.

Definition at line 113 of file emlsr-manager.cc.

References m_staMac.

Referenced by ns3::DefaultEmlsrManager::DoNotifyMgtFrameReceived(), NotifyMgtFrameReceived(), and SetEmlsrLinks().

+ Here is the caller graph for this function:

◆ GetTransitionTimeout()

std::optional< Time > ns3::EmlsrManager::GetTransitionTimeout ( ) const
Returns
the Transition Timeout, if advertised by the associated AP

Definition at line 132 of file emlsr-manager.cc.

References m_emlsrTransitionTimeout.

Referenced by ns3::DefaultEmlsrManager::DoNotifyMgtFrameReceived(), NotifyMgtFrameReceived(), and SetEmlsrLinks().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::EmlsrManager::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 39 of file emlsr-manager.cc.

References m_emlsrPaddingDelay, m_emlsrTransitionDelay, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MicroSeconds(), SetEmlsrLinks(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ NotifyEmlsrModeChanged()

virtual void ns3::EmlsrManager::NotifyEmlsrModeChanged ( )
privatepure virtual

Notify subclass that EMLSR mode changed.

Implemented in ns3::DefaultEmlsrManager.

Referenced by ChangeEmlsrMode().

+ Here is the caller graph for this function:

◆ NotifyMgtFrameReceived()

void ns3::EmlsrManager::NotifyMgtFrameReceived ( Ptr< const WifiMpdu mpdu,
uint8_t  linkId 
)

◆ ResendNotification()

virtual std::optional< uint8_t > ns3::EmlsrManager::ResendNotification ( Ptr< const WifiMpdu mpdu)
protectedpure virtual

A previous EML Operating Mode Notification frame was dropped.

Ask the subclass whether the frame needs to be re-sent on the given link (if any).

Parameters
mpduthe dropped MPDU that includes the EML Operating Mode Notification frame
Returns
the ID of the link over which to re-send the frame, if needed

Implemented in ns3::DefaultEmlsrManager.

Referenced by TxDropped().

+ Here is the caller graph for this function:

◆ SendEmlOperatingModeNotification()

◆ SetEmlsrLinks()

void ns3::EmlsrManager::SetEmlsrLinks ( const std::set< uint8_t > &  linkIds)

Take actions to enable EMLSR mode on the given set of links, if non-empty, or disable EMLSR mode, otherwise.

Parameters
linkIdsthe IDs of the links on which EMLSR mode should be enabled (empty to disable EMLSR mode)

Definition at line 138 of file emlsr-manager.cc.

References GetStaMac(), GetTransitionTimeout(), m_emlsrLinks, m_nextEmlsrLinks, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and SendEmlOperatingModeNotification().

Referenced by GetTypeId().

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

◆ SetTransitionTimeout()

void ns3::EmlsrManager::SetTransitionTimeout ( Time  timeout)

Set the Transition Timeout advertised by the associated AP with EMLSR activated.

Parameters
timeoutthe advertised Transition Timeout

Definition at line 125 of file emlsr-manager.cc.

References ns3::Time::As(), m_emlsrTransitionTimeout, NS_LOG_FUNCTION, timeout, and ns3::Time::US.

+ Here is the call graph for this function:

◆ SetWifiMac()

void ns3::EmlsrManager::SetWifiMac ( Ptr< StaWifiMac mac)

Set the wifi MAC.

Note that it must be the MAC of an EHT non-AP MLD.

Parameters
macthe wifi MAC

Definition at line 90 of file emlsr-manager.cc.

References ns3::WifiMac::GetEhtConfiguration(), ns3::WifiMac::GetNLinks(), ns3::WifiMac::GetTypeOfStation(), m_staMac, ns3::MakeCallback(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_FUNCTION, ns3::STA, ns3::ObjectBase::TraceConnectWithoutContext(), TxDropped(), and TxOk().

+ Here is the call graph for this function:

◆ TxDropped()

void ns3::EmlsrManager::TxDropped ( WifiMacDropReason  reason,
Ptr< const WifiMpdu mpdu 
)
private

Notify that the given MPDU has been discarded for the given reason.

Parameters
reasonthe reason why the MPDU was dropped
mpduthe dropped MPDU

Definition at line 287 of file emlsr-manager.cc.

References ns3::WifiMac::GetBssid(), GetEhtFem(), m_nextEmlsrLinks, m_staMac, NS_LOG_FUNCTION, ns3::WifiActionHeader::PROTECTED_EHT, ns3::WifiActionHeader::PROTECTED_EHT_EML_OPERATING_MODE_NOTIFICATION, ns3::WifiActionHeader::Remove(), and ResendNotification().

Referenced by DoDispose(), and SetWifiMac().

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

◆ TxOk()

void ns3::EmlsrManager::TxOk ( Ptr< const WifiMpdu mpdu)
private

Notify the acknowledgment of the given MPDU.

Parameters
mpduthe acknowledged MPDU

Definition at line 252 of file emlsr-manager.cc.

References ChangeEmlsrMode(), m_emlsrTransitionTimeout, m_lastAdvPaddingDelay, m_lastAdvTransitionDelay, m_transitionTimeoutEvent, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::WifiActionHeader::Peek(), ns3::WifiActionHeader::PROTECTED_EHT, ns3::WifiActionHeader::PROTECTED_EHT_EML_OPERATING_MODE_NOTIFICATION, and ns3::Simulator::Schedule().

Referenced by DoDispose(), and SetWifiMac().

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

Member Data Documentation

◆ m_emlsrLinks

std::set<uint8_t> ns3::EmlsrManager::m_emlsrLinks
private

ID of the EMLSR links (empty if EMLSR mode is disabled)

Definition at line 169 of file emlsr-manager.h.

Referenced by ChangeEmlsrMode(), GetEmlsrLinks(), and SetEmlsrLinks().

◆ m_emlsrPaddingDelay

Time ns3::EmlsrManager::m_emlsrPaddingDelay
protected

EMLSR Padding delay.

Definition at line 123 of file emlsr-manager.h.

Referenced by GetTypeId(), and SendEmlOperatingModeNotification().

◆ m_emlsrTransitionDelay

Time ns3::EmlsrManager::m_emlsrTransitionDelay
protected

EMLSR Transition delay.

Definition at line 124 of file emlsr-manager.h.

Referenced by GetTypeId(), and SendEmlOperatingModeNotification().

◆ m_emlsrTransitionTimeout

std::optional<Time> ns3::EmlsrManager::m_emlsrTransitionTimeout
private

Transition timeout advertised by APs with EMLSR activated.

Definition at line 167 of file emlsr-manager.h.

Referenced by GetTransitionTimeout(), SendEmlOperatingModeNotification(), SetTransitionTimeout(), and TxOk().

◆ m_lastAdvPaddingDelay

Time ns3::EmlsrManager::m_lastAdvPaddingDelay
private

last advertised padding delay

Definition at line 173 of file emlsr-manager.h.

Referenced by SendEmlOperatingModeNotification(), and TxOk().

◆ m_lastAdvTransitionDelay

Time ns3::EmlsrManager::m_lastAdvTransitionDelay
private

last advertised transition delay

Definition at line 174 of file emlsr-manager.h.

Referenced by SendEmlOperatingModeNotification(), and TxOk().

◆ m_nextEmlsrLinks

std::optional<std::set<uint8_t> > ns3::EmlsrManager::m_nextEmlsrLinks
private

ID of the links that will become the EMLSR links when the pending notification frame is acknowledged.

Definition at line 170 of file emlsr-manager.h.

Referenced by ChangeEmlsrMode(), NotifyMgtFrameReceived(), SendEmlOperatingModeNotification(), SetEmlsrLinks(), and TxDropped().

◆ m_staMac

Ptr<StaWifiMac> ns3::EmlsrManager::m_staMac
private

the MAC of the managed non-AP MLD

Definition at line 166 of file emlsr-manager.h.

Referenced by DoDispose(), GetEhtFem(), GetStaMac(), NotifyMgtFrameReceived(), SendEmlOperatingModeNotification(), SetWifiMac(), and TxDropped().

◆ m_transitionTimeoutEvent

EventId ns3::EmlsrManager::m_transitionTimeoutEvent
private

Timer started after the successful transmission of an EML Operating Mode Notification frame.

Definition at line 175 of file emlsr-manager.h.

Referenced by DoDispose(), NotifyMgtFrameReceived(), and TxOk().


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