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"
Public Member Functions | |
EmlsrManager () | |
~EmlsrManager () override | |
const std::set< uint8_t > & | GetEmlsrLinks () const |
std::optional< Time > | GetTransitionTimeout () 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< Object > | GetObject () 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< Object > | GetObject (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. | |
SimpleRefCount & | operator= (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< EhtFrameExchangeManager > | GetEhtFem (uint8_t linkId) const |
virtual uint8_t | GetLinkToSendEmlNotification ()=0 |
Ptr< StaWifiMac > | GetStaMac () 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< Time > | m_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< StaWifiMac > | m_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 | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
ns3::Ptr<N3ns313UintegerValueE>
Time
+0ns:+256000ns Time
+0ns:+256000ns 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.
ns3::EmlsrManager::EmlsrManager | ( | ) |
Definition at line 67 of file emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 72 of file emlsr-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
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().
|
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().
|
privatepure virtual |
Notify the subclass of the reception of a management frame addressed to us.
mpdu | the received MPDU |
linkId | the ID of the link over which the MPDU was received |
Implemented in ns3::DefaultEmlsrManager.
Referenced by NotifyMgtFrameReceived().
|
protected |
linkId | the ID of the given link |
Definition at line 119 of file emlsr-manager.cc.
References ns3::WifiMac::GetFrameExchangeManager(), and m_staMac.
Referenced by SendEmlOperatingModeNotification(), and TxDropped().
const std::set< uint8_t > & ns3::EmlsrManager::GetEmlsrLinks | ( | ) | const |
Definition at line 107 of file emlsr-manager.cc.
References m_emlsrLinks.
|
protectedpure virtual |
Implemented in ns3::DefaultEmlsrManager.
Referenced by SendEmlOperatingModeNotification().
|
protected |
Definition at line 113 of file emlsr-manager.cc.
References m_staMac.
Referenced by ns3::DefaultEmlsrManager::DoNotifyMgtFrameReceived(), NotifyMgtFrameReceived(), and SetEmlsrLinks().
std::optional< Time > ns3::EmlsrManager::GetTransitionTimeout | ( | ) | const |
Definition at line 132 of file emlsr-manager.cc.
References m_emlsrTransitionTimeout.
Referenced by ns3::DefaultEmlsrManager::DoNotifyMgtFrameReceived(), NotifyMgtFrameReceived(), and SetEmlsrLinks().
|
static |
Get the type ID.
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().
|
privatepure virtual |
Notify subclass that EMLSR mode changed.
Implemented in ns3::DefaultEmlsrManager.
Referenced by ChangeEmlsrMode().
Notify the reception of a management frame addressed to us.
mpdu | the received MPDU |
linkId | the ID of the link over which the MPDU was received |
Definition at line 156 of file emlsr-manager.cc.
References ns3::EventId::Cancel(), DoNotifyMgtFrameReceived(), ns3::WifiMac::GetBssid(), GetStaMac(), GetTransitionTimeout(), ns3::EventImpl::Invoke(), ns3::EventId::IsRunning(), m_nextEmlsrLinks, m_staMac, m_transitionTimeoutEvent, NS_LOG_FUNCTION, ns3::WifiActionHeader::Peek(), ns3::EventId::PeekEventImpl(), ns3::WifiActionHeader::PROTECTED_EHT, ns3::WifiActionHeader::PROTECTED_EHT_EML_OPERATING_MODE_NOTIFICATION, and SendEmlOperatingModeNotification().
|
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).
mpdu | the dropped MPDU that includes the EML Operating Mode Notification frame |
Implemented in ns3::DefaultEmlsrManager.
Referenced by TxDropped().
|
private |
Send an EML Operating Mode Notification frame.
Definition at line 191 of file emlsr-manager.cc.
References ns3::MgtEmlOperatingModeNotification::EmlControl::emlsrMode, ns3::MgtEmlOperatingModeNotification::EmlControl::emlsrParamUpdateCtrl, ns3::CommonInfoBasicMle::EncodeEmlsrPaddingDelay(), ns3::CommonInfoBasicMle::EncodeEmlsrTransitionDelay(), ns3::StaWifiMac::GetApLinkId(), ns3::WifiMac::GetBssid(), GetEhtFem(), GetLinkToSendEmlNotification(), ns3::StaWifiMac::GetSetupLinkIds(), ns3::MgtEmlOperatingModeNotification::m_emlControl, m_emlsrPaddingDelay, ns3::MgtEmlOperatingModeNotification::m_emlsrParamUpdate, m_emlsrTransitionDelay, m_emlsrTransitionTimeout, m_lastAdvPaddingDelay, m_lastAdvTransitionDelay, m_nextEmlsrLinks, m_staMac, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::MgtEmlOperatingModeNotification::SetLinkIdInBitmap().
Referenced by NotifyMgtFrameReceived(), and 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.
linkIds | the 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().
void ns3::EmlsrManager::SetTransitionTimeout | ( | Time | timeout | ) |
Set the Transition Timeout advertised by the associated AP with EMLSR activated.
timeout | the 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.
void ns3::EmlsrManager::SetWifiMac | ( | Ptr< StaWifiMac > | mac | ) |
Set the wifi MAC.
Note that it must be the MAC of an EHT non-AP MLD.
mac | the 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().
|
private |
Notify that the given MPDU has been discarded for the given reason.
reason | the reason why the MPDU was dropped |
mpdu | the 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().
Notify the acknowledgment of the given MPDU.
mpdu | the 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().
|
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().
|
protected |
EMLSR Padding delay.
Definition at line 123 of file emlsr-manager.h.
Referenced by GetTypeId(), and SendEmlOperatingModeNotification().
|
protected |
EMLSR Transition delay.
Definition at line 124 of file emlsr-manager.h.
Referenced by GetTypeId(), and SendEmlOperatingModeNotification().
|
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().
|
private |
last advertised padding delay
Definition at line 173 of file emlsr-manager.h.
Referenced by SendEmlOperatingModeNotification(), and TxOk().
|
private |
last advertised transition delay
Definition at line 174 of file emlsr-manager.h.
Referenced by SendEmlOperatingModeNotification(), and TxOk().
|
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().
|
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().
|
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().