DefaultEmlsrManager is the default EMLSR manager. More...
#include "default-emlsr-manager.h"
Public Member Functions | |
DefaultEmlsrManager () | |
~DefaultEmlsrManager () override | |
Public Member Functions inherited from ns3::EmlsrManager | |
EmlsrManager () | |
~EmlsrManager () override | |
void | CancelMediumSyncDelayTimer (uint8_t linkId) |
Cancel the MediumSyncDelay timer associated with the given link and take the appropriate actions. More... | |
void | DecrementMediumSyncDelayNTxops (uint8_t linkId) |
Decrement the counter indicating the number of TXOP attempts left while the MediumSyncDelay timer is running. More... | |
bool | GetAuxPhyTxCapable () const |
bool | GetCamStateReset () const |
std::optional< Time > | GetElapsedMediumSyncDelayTimer (uint8_t linkId) const |
Check whether the MediumSyncDelay timer is running for the STA operating on the given link. More... | |
const std::set< uint8_t > & | GetEmlsrLinks () const |
uint8_t | GetMainPhyId () const |
Time | GetMediumSyncDuration () const |
std::optional< uint8_t > | GetMediumSyncMaxNTxops () const |
int8_t | GetMediumSyncOfdmEdThreshold () const |
std::optional< Time > | GetTransitionTimeout () const |
bool | MediumSyncDelayNTxopsExceeded (uint8_t linkId) |
Return whether no more TXOP attempt is allowed on the given link. More... | |
void | NotifyIcfReceived (uint8_t linkId) |
Notify the reception of an initial Control frame on the given link. More... | |
void | NotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId) |
Notify the reception of a management frame addressed to us. More... | |
void | NotifyTxopEnd (uint8_t linkId) |
Notify the end of a TXOP on the given link. More... | |
void | NotifyUlTxopStart (uint8_t linkId, std::optional< Time > timeToCtsEnd) |
Notify the start of an UL TXOP on the given link. More... | |
void | ResetMediumSyncDelayNTxops (uint8_t linkId) |
Reset the counter indicating the number of TXOP attempts left while the MediumSyncDelay timer is running, so as to remove the limit on the number of attempts that can be made while the MediumSyncDelay timer is running. More... | |
void | SetAuxPhyTxCapable (bool capable) |
Set the member variable indicating whether Aux PHYs are capable of transmitting PPDUs. More... | |
void | SetCamStateReset (bool enable) |
Set the member variable indicating whether the state of the CAM should be reset when the main PHY switches channel and operates on the link associated with the CAM. More... | |
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. More... | |
void | SetMediumSyncDuration (Time duration) |
Set the duration of the MediumSyncDelay timer. More... | |
void | SetMediumSyncMaxNTxops (std::optional< uint8_t > nTxops) |
Set the maximum number of TXOPs a non-AP STA is allowed to attempt to initiate while the MediumSyncDelay timer is running. More... | |
void | SetMediumSyncOfdmEdThreshold (int8_t threshold) |
Set the Medium Synchronization OFDM ED threshold (dBm) to use while the MediumSyncDelay timer is running. More... | |
void | SetTransitionTimeout (Time timeout) |
Set the Transition Timeout advertised by the associated AP with EMLSR activated. More... | |
void | SetWifiMac (Ptr< StaWifiMac > mac) |
Set the wifi MAC. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::EmlsrManager | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Protected Member Functions | |
uint8_t | GetLinkToSendEmlOmn () override |
std::optional< uint8_t > | ResendNotification (Ptr< const WifiMpdu > mpdu) override |
A previous EML Operating Mode Notification frame was dropped. More... | |
Protected Member Functions inherited from ns3::EmlsrManager | |
void | DoDispose () override |
Destructor implementation. More... | |
const WifiPhyOperatingChannel & | GetChannelForAuxPhy (uint8_t linkId) const |
const WifiPhyOperatingChannel & | GetChannelForMainPhy (uint8_t linkId) const |
Ptr< EhtFrameExchangeManager > | GetEhtFem (uint8_t linkId) const |
MgtEmlOmn | GetEmlOmn () |
Ptr< StaWifiMac > | GetStaMac () const |
void | SetCcaEdThresholdOnLinkSwitch (Ptr< WifiPhy > phy, uint8_t linkId) |
Set the CCA ED threshold (if needed) on the given PHY that is switching channel to operate on the given link. More... | |
void | SwitchAuxPhy (uint8_t currLinkId, uint8_t nextLinkId) |
Switch channel on the Aux PHY operating on the given current link so that it operates on the given next link. More... | |
void | SwitchMainPhy (uint8_t linkId, bool noSwitchDelay, bool resetBackoff, bool requestAccess) |
Switch channel on the Main PHY so that it operates on the given link. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Private Member Functions | |
void | DoNotifyIcfReceived (uint8_t linkId) override |
Notify the subclass of the reception of an initial Control frame on the given link. More... | |
void | DoNotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId) override |
Notify the subclass of the reception of a management frame addressed to us. More... | |
void | DoNotifyTxopEnd (uint8_t linkId) override |
Notify the subclass of the end of a TXOP on the given link. More... | |
void | DoNotifyUlTxopStart (uint8_t linkId) override |
Notify the subclass of the start of an UL TXOP on the given link. More... | |
void | NotifyEmlsrModeChanged () override |
Notify subclass that EMLSR mode changed. More... | |
void | NotifyMainPhySwitch (uint8_t currLinkId, uint8_t nextLinkId) override |
Notify subclass that the main PHY is switching channel to operate on another link. More... | |
Private Attributes | |
Ptr< WifiPhy > | m_auxPhyToReconnect |
Aux PHY the ChannelAccessManager of the link on which the main PHY is operating has to connect a listener to when the main PHY is back operating on its previous link. More... | |
bool | m_switchAuxPhy |
whether Aux PHY should switch channel to operate on the link on which the Main PHY was operating before moving to the link of the Aux PHY More... | |
Additional Inherited Members | |
Protected Attributes inherited from ns3::EmlsrManager | |
WifiModulationClass | m_auxPhyMaxModClass |
max modulation class supported by aux PHYs More... | |
uint16_t | m_auxPhyMaxWidth |
max channel width (MHz) supported by aux PHYs More... | |
bool | m_auxPhyTxCapable |
whether Aux PHYs are capable of transmitting PPDUs More... | |
Time | m_emlsrPaddingDelay |
EMLSR Padding delay. More... | |
Time | m_emlsrTransitionDelay |
EMLSR Transition delay. More... | |
uint8_t | m_mainPhyId |
ID of main PHY (position in the vector of PHYs held by WifiNetDevice) More... | |
Static Protected Attributes inherited from ns3::EmlsrManager | |
static constexpr bool | DONT_REQUEST_ACCESS |
do not request channel access when PHY switch ends More... | |
static constexpr bool | DONT_RESET_BACKOFF = false |
do not reset backoff on main PHY switch More... | |
static constexpr bool | REQUEST_ACCESS = true |
request channel access when PHY switch ends More... | |
static constexpr bool | RESET_BACKOFF = true |
reset backoff on main PHY switch More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
DefaultEmlsrManager is the default EMLSR manager.
Definition at line 35 of file default-emlsr-manager.h.
ns3::DefaultEmlsrManager::DefaultEmlsrManager | ( | ) |
Definition at line 56 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 61 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
overrideprivatevirtual |
Notify the subclass of the reception of an initial Control frame on the given link.
linkId | the ID of the link on which the initial Control frame was received |
Implements ns3::EmlsrManager.
Definition at line 130 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
overrideprivatevirtual |
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 |
Implements ns3::EmlsrManager.
Definition at line 67 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
overrideprivatevirtual |
Notify the subclass of the end of a TXOP on the given link.
linkId | the ID of the given link |
Implements ns3::EmlsrManager.
Definition at line 142 of file default-emlsr-manager.cc.
References ns3::EmlsrManager::DONT_RESET_BACKOFF, ns3::WifiMac::GetDevice(), ns3::EmlsrManager::GetMainPhyId(), ns3::WifiNetDevice::GetPhy(), ns3::EmlsrManager::GetStaMac(), m_auxPhyToReconnect, ns3::EmlsrManager::m_mainPhyId, m_switchAuxPhy, NS_LOG_FUNCTION, ns3::EmlsrManager::REQUEST_ACCESS, ns3::Simulator::Schedule(), and ns3::EmlsrManager::SwitchMainPhy().
|
overrideprivatevirtual |
Notify the subclass of the start of an UL TXOP on the given link.
linkId | the ID of the given link |
Implements ns3::EmlsrManager.
Definition at line 136 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Implements ns3::EmlsrManager.
Definition at line 73 of file default-emlsr-manager.cc.
References ns3::WifiMac::GetLinkForPhy(), ns3::EmlsrManager::GetStaMac(), ns3::EmlsrManager::m_mainPhyId, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 37 of file default-emlsr-manager.cc.
References m_switchAuxPhy, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), and ns3::TypeId::SetParent().
|
overrideprivatevirtual |
Notify subclass that EMLSR mode changed.
Implements ns3::EmlsrManager.
Definition at line 91 of file default-emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
overrideprivatevirtual |
Notify subclass that the main PHY is switching channel to operate on another link.
currLinkId | the ID of the link on which the main PHY is operating |
nextLinkId | the ID of the link on which the main PHY will be operating |
Implements ns3::EmlsrManager.
Definition at line 97 of file default-emlsr-manager.cc.
References ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::WifiMac::GetWifiPhy(), m_auxPhyToReconnect, m_switchAuxPhy, ns3::StaWifiMac::NotifySwitchingEmlsrLink(), NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Seconds(), ns3::EmlsrManager::SetCcaEdThresholdOnLinkSwitch(), and ns3::EmlsrManager::SwitchAuxPhy().
|
overrideprotectedvirtual |
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 |
Implements ns3::EmlsrManager.
Definition at line 82 of file default-emlsr-manager.cc.
References ns3::WifiMac::GetLinkForPhy(), ns3::EmlsrManager::GetStaMac(), ns3::EmlsrManager::m_mainPhyId, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Aux PHY the ChannelAccessManager of the link on which the main PHY is operating has to connect a listener to when the main PHY is back operating on its previous link.
Definition at line 61 of file default-emlsr-manager.h.
Referenced by DoNotifyTxopEnd(), and NotifyMainPhySwitch().
|
private |
whether Aux PHY should switch channel to operate on the link on which the Main PHY was operating before moving to the link of the Aux PHY
Definition at line 59 of file default-emlsr-manager.h.
Referenced by DoNotifyTxopEnd(), GetTypeId(), and NotifyMainPhySwitch().