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"
Classes | |
struct | MediumSyncDelayStatus |
Information about the status of the MediumSyncDelay timer associated with a link. More... | |
Public Member Functions | |
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::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 | |
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 () |
virtual uint8_t | GetLinkToSendEmlOmn ()=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. More... | |
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... | |
Protected Attributes | |
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 | |
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... | |
Private Member Functions | |
void | ApplyMaxChannelWidthAndModClassOnAuxPhys () |
Adjust the operating channel of all the aux PHYs to meet the constraint on the maximum channel width supported by aux PHYs. More... | |
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. More... | |
void | ComputeOperatingChannels () |
Compute the operating channels that the main PHY and the aux PHY(s) must switch to in order to operate on each of the setup links. More... | |
virtual void | DoNotifyIcfReceived (uint8_t linkId)=0 |
Notify the subclass of the reception of an initial Control frame on the given link. More... | |
virtual void | DoNotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId)=0 |
Notify the subclass of the reception of a management frame addressed to us. More... | |
virtual void | DoNotifyTxopEnd (uint8_t linkId)=0 |
Notify the subclass of the end of a TXOP on the given link. More... | |
virtual void | DoNotifyUlTxopStart (uint8_t linkId)=0 |
Notify the subclass of the start of an UL TXOP on the given link. More... | |
void | MediumSyncDelayTimerExpired (uint8_t linkId) |
Take the appropriate actions when the MediumSyncDelay timer expires or is cancelled. More... | |
virtual void | NotifyEmlsrModeChanged ()=0 |
Notify subclass that EMLSR mode changed. More... | |
virtual void | NotifyMainPhySwitch (uint8_t currLinkId, uint8_t nextLinkId)=0 |
Notify subclass that the main PHY is switching channel to operate on another link. More... | |
void | SendEmlOmn () |
Send an EML Operating Mode Notification frame. More... | |
void | SetMainPhyId (uint8_t mainPhyId) |
Set the ID of main PHY (position in the vector of PHYs held by WifiNetDevice). More... | |
void | StartMediumSyncDelayTimer (uint8_t linkId) |
Start the MediumSyncDelay timer and take the appropriate actions, if the timer is not already running. More... | |
void | TxDropped (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu) |
Notify that the given MPDU has been discarded for the given reason. More... | |
void | TxOk (Ptr< const WifiMpdu > mpdu) |
Notify the acknowledgment of the given MPDU. More... | |
Private Attributes | |
std::map< uint8_t, WifiPhyOperatingChannel > | m_auxPhyChannels |
link ID-indexed map of operating channels for the aux PHYs More... | |
std::set< uint8_t > | m_emlsrLinks |
ID of the EMLSR links (empty if EMLSR mode is disabled) More... | |
std::optional< Time > | m_emlsrTransitionTimeout |
Transition timeout advertised by APs with EMLSR activated. More... | |
Time | m_lastAdvPaddingDelay |
last advertised padding delay More... | |
Time | m_lastAdvTransitionDelay |
last advertised transition delay More... | |
std::map< uint8_t, WifiPhyOperatingChannel > | m_mainPhyChannels |
link ID-indexed map of operating channels for the main PHY More... | |
std::map< uint8_t, MediumSyncDelayStatus > | m_mediumSyncDelayStatus |
the status of MediumSyncDelay timers (link ID-indexed) More... | |
Time | m_mediumSyncDuration |
duration of the MediumSyncDelay timer More... | |
std::optional< uint8_t > | m_msdMaxNTxops |
MediumSyncDelay max number of TXOPs. More... | |
int8_t | m_msdOfdmEdThreshold |
MediumSyncDelay OFDM ED threshold. More... | |
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. More... | |
std::map< Ptr< WifiPhy >, double > | m_prevCcaEdThreshold |
the CCA sensitivity threshold (dBm) to restore once the MediumSyncDelay timer expires or the PHY moves to a link on which the timer is not running More... | |
bool | m_resetCamState |
whether to reset the state of CAM when main PHY switches channel More... | |
Ptr< StaWifiMac > | m_staMac |
the MAC of the managed non-AP MLD More... | |
EventId | m_transitionTimeoutEvent |
Timer started after the successful transmission of an EML Operating Mode Notification frame. More... | |
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. More... | |
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.
Definition at line 46 of file emlsr-manager.h.
ns3::EmlsrManager::EmlsrManager | ( | ) |
Definition at line 121 of file emlsr-manager.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 133 of file emlsr-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
private |
Adjust the operating channel of all the aux PHYs to meet the constraint on the maximum channel width supported by aux PHYs.
Definition at line 890 of file emlsr-manager.cc.
References third::channel, NS_ASSERT, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
void ns3::EmlsrManager::CancelMediumSyncDelayTimer | ( | uint8_t | linkId | ) |
Cancel the MediumSyncDelay timer associated with the given link and take the appropriate actions.
This function must not be called when the MediumSyncDelay timer is not running on the given link.
linkId | the ID of the link associated with the MediumSyncDelay timer to cancel |
Definition at line 651 of file emlsr-manager.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
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 865 of file emlsr-manager.cc.
References NS_ASSERT_MSG, and NS_LOG_FUNCTION.
|
private |
Compute the operating channels that the main PHY and the aux PHY(s) must switch to in order to operate on each of the setup links.
The operating channels may be different due to limited channel width capabilities of the aux PHY(s). This method shall be called upon completion of ML setup.
Definition at line 936 of file emlsr-manager.cc.
References third::channel, ns3::GetMaximumChannelWidth(), min, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::WIFI_STANDARD_UNSPECIFIED.
Referenced by NotifyMgtFrameReceived().
void ns3::EmlsrManager::DecrementMediumSyncDelayNTxops | ( | uint8_t | linkId | ) |
Decrement the counter indicating the number of TXOP attempts left while the MediumSyncDelay timer is running.
This function must not be called when the MediumSyncDelay timer is not running on the given link.
linkId | the ID of the link on which a new TXOP attempt may be carried out |
Definition at line 694 of file emlsr-manager.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
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 139 of file emlsr-manager.cc.
References ns3::EventId::Cancel(), ns3::Object::DoDispose(), m_mediumSyncDelayStatus, m_staMac, m_transitionTimeoutEvent, ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::ObjectBase::TraceDisconnectWithoutContext(), TxDropped(), and TxOk().
|
privatepure virtual |
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 |
Implemented in ns3::DefaultEmlsrManager.
Referenced by NotifyIcfReceived().
|
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().
|
privatepure virtual |
Notify the subclass of the end of a TXOP on the given link.
linkId | the ID of the given link |
Implemented in ns3::DefaultEmlsrManager.
Referenced by NotifyTxopEnd().
|
privatepure virtual |
Notify the subclass of the start of an UL TXOP on the given link.
linkId | the ID of the given link |
Implemented in ns3::DefaultEmlsrManager.
Referenced by NotifyUlTxopStart().
bool ns3::EmlsrManager::GetAuxPhyTxCapable | ( | ) | const |
Definition at line 204 of file emlsr-manager.cc.
References m_auxPhyTxCapable.
Referenced by GetTypeId().
bool ns3::EmlsrManager::GetCamStateReset | ( | ) | const |
Definition at line 192 of file emlsr-manager.cc.
References m_resetCamState.
Referenced by GetTypeId().
|
protected |
linkId | the ID of the given link |
Definition at line 990 of file emlsr-manager.cc.
References NS_ASSERT_MSG.
|
protected |
linkId | the ID of the given link |
Definition at line 981 of file emlsr-manager.cc.
References NS_ASSERT_MSG.
|
protected |
linkId | the ID of the given link |
Definition at line 222 of file emlsr-manager.cc.
References ns3::WifiMac::GetFrameExchangeManager(), and m_staMac.
std::optional< Time > ns3::EmlsrManager::GetElapsedMediumSyncDelayTimer | ( | uint8_t | linkId | ) | const |
Check whether the MediumSyncDelay timer is running for the STA operating on the given link.
If so, returns the time elapsed since the timer started.
linkId | the ID of the given link |
Definition at line 228 of file emlsr-manager.cc.
References ns3::Simulator::GetDelayLeft(), m_mediumSyncDelayStatus, and m_mediumSyncDuration.
|
protected |
Definition at line 732 of file emlsr-manager.cc.
References ns3::MgtEmlOmn::EmlControl::emlsrMode, ns3::MgtEmlOmn::EmlControl::emlsrParamUpdateCtrl, ns3::MgtEmlOmn::m_emlControl, ns3::MgtEmlOmn::m_emlsrParamUpdate, NS_LOG_DEBUG, and ns3::MgtEmlOmn::SetLinkIdInBitmap().
const std::set< uint8_t > & ns3::EmlsrManager::GetEmlsrLinks | ( | ) | const |
Definition at line 210 of file emlsr-manager.cc.
References m_emlsrLinks.
|
protectedpure virtual |
Implemented in ns3::DefaultEmlsrManager.
uint8_t ns3::EmlsrManager::GetMainPhyId | ( | ) | const |
Definition at line 180 of file emlsr-manager.cc.
References m_mainPhyId.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd(), GetTypeId(), and ns3::DefaultEmlsrManager::NotifyMainPhySwitch().
Time ns3::EmlsrManager::GetMediumSyncDuration | ( | ) | const |
Definition at line 259 of file emlsr-manager.cc.
References m_mediumSyncDuration.
std::optional< uint8_t > ns3::EmlsrManager::GetMediumSyncMaxNTxops | ( | ) | const |
Definition at line 285 of file emlsr-manager.cc.
References m_msdMaxNTxops.
int8_t ns3::EmlsrManager::GetMediumSyncOfdmEdThreshold | ( | ) | const |
Definition at line 272 of file emlsr-manager.cc.
References m_msdOfdmEdThreshold.
|
protected |
Definition at line 216 of file emlsr-manager.cc.
References m_staMac.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd(), ns3::DefaultEmlsrManager::GetLinkToSendEmlOmn(), ns3::DefaultEmlsrManager::NotifyMainPhySwitch(), NotifyMgtFrameReceived(), ns3::DefaultEmlsrManager::ResendNotification(), and SetEmlsrLinks().
std::optional< Time > ns3::EmlsrManager::GetTransitionTimeout | ( | ) | const |
Definition at line 246 of file emlsr-manager.cc.
References m_emlsrTransitionTimeout.
Referenced by NotifyMgtFrameReceived(), and SetEmlsrLinks().
|
static |
Get the type ID.
Definition at line 42 of file emlsr-manager.cc.
References ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::ATTR_GET, GetAuxPhyTxCapable(), GetCamStateReset(), GetMainPhyId(), m_auxPhyMaxModClass, m_auxPhyMaxWidth, m_emlsrPaddingDelay, m_emlsrTransitionDelay, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeEnumChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MicroSeconds(), SetAuxPhyTxCapable(), SetCamStateReset(), SetEmlsrLinks(), SetMainPhyId(), ns3::TypeId::SetParent(), ns3::WIFI_MOD_CLASS_EHT, ns3::WIFI_MOD_CLASS_ERP_OFDM, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_MOD_CLASS_HR_DSSS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_OFDM, and ns3::WIFI_MOD_CLASS_VHT.
bool ns3::EmlsrManager::MediumSyncDelayNTxopsExceeded | ( | uint8_t | linkId | ) |
Return whether no more TXOP attempt is allowed on the given link.
This function must not be called when the MediumSyncDelay timer is not running on the given link.
linkId | the ID of the link on which a new TXOP attempt may be carried out |
Definition at line 721 of file emlsr-manager.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
private |
Take the appropriate actions when the MediumSyncDelay timer expires or is cancelled.
linkId | the ID of the link associated with the MediumSyncDelay timer to cancel |
Definition at line 664 of file emlsr-manager.cc.
References NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and third::phy.
|
privatepure virtual |
Notify subclass that EMLSR mode changed.
Implemented in ns3::DefaultEmlsrManager.
void ns3::EmlsrManager::NotifyIcfReceived | ( | uint8_t | linkId | ) |
Notify 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 |
Definition at line 349 of file emlsr-manager.cc.
References ns3::StaWifiMac::BlockTxOnLink(), DoNotifyIcfReceived(), DONT_REQUEST_ACCESS, ns3::WifiMac::GetChannelAccessManager(), ns3::WifiMac::GetDevice(), ns3::WifiMac::GetLinkIds(), ns3::WifiNetDevice::GetPhy(), ns3::WifiMac::GetWifiPhy(), ns3::StaWifiMac::IsEmlsrLink(), m_mainPhyId, m_staMac, ns3::ChannelAccessManager::NotifyStartUsingOtherEmlsrLink(), NS_ASSERT, NS_LOG_FUNCTION, RESET_BACKOFF, ns3::Simulator::ScheduleNow(), SwitchMainPhy(), and ns3::USING_OTHER_EMLSR_LINK.
|
privatepure virtual |
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 |
Implemented in ns3::DefaultEmlsrManager.
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 309 of file emlsr-manager.cc.
References check-style-clang-format::action, ns3::EventId::Cancel(), ComputeOperatingChannels(), 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 SendEmlOmn().
void ns3::EmlsrManager::NotifyTxopEnd | ( | uint8_t | linkId | ) |
Notify the end of a TXOP on the given link.
linkId | the ID of the given link |
Definition at line 442 of file emlsr-manager.cc.
References DoNotifyTxopEnd(), ns3::WifiMac::GetLinkIds(), ns3::StaWifiMac::IsEmlsrLink(), m_staMac, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and StartMediumSyncDelayTimer().
void ns3::EmlsrManager::NotifyUlTxopStart | ( | uint8_t | linkId, |
std::optional< Time > | timeToCtsEnd | ||
) |
Notify the start of an UL TXOP on the given link.
linkId | the ID of the given link |
timeToCtsEnd | time remaining to the end of CTS reception, in case the UL TXOP is started by an aux PHY |
Definition at line 389 of file emlsr-manager.cc.
References ns3::StaWifiMac::BlockTxOnLink(), DoNotifyUlTxopStart(), DONT_REQUEST_ACCESS, ns3::WifiMac::GetChannelAccessManager(), ns3::WifiPhy::GetChannelSwitchDelay(), ns3::WifiMac::GetDevice(), ns3::WifiMac::GetLinkForPhy(), ns3::WifiMac::GetLinkIds(), ns3::WifiNetDevice::GetPhy(), ns3::WifiPhy::GetState(), ns3::WifiMac::GetWifiPhy(), ns3::StaWifiMac::IsEmlsrLink(), m_mainPhyId, m_staMac, ns3::ChannelAccessManager::NotifyStartUsingOtherEmlsrLink(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, RESET_BACKOFF, ns3::Simulator::Schedule(), SwitchMainPhy(), TX, ns3::Time::US, and ns3::USING_OTHER_EMLSR_LINK.
|
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.
void ns3::EmlsrManager::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.
This function is normally called when a TXOP attempt is successful. This function must not be called when the MediumSyncDelay timer is not running on the given link.
linkId | the ID of the link for which the counter of the TXOP attempts is reset |
Definition at line 710 of file emlsr-manager.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
private |
Send an EML Operating Mode Notification frame.
Definition at line 775 of file emlsr-manager.cc.
References NS_ABORT_MSG_IF, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by NotifyMgtFrameReceived(), and SetEmlsrLinks().
void ns3::EmlsrManager::SetAuxPhyTxCapable | ( | bool | capable | ) |
Set the member variable indicating whether Aux PHYs are capable of transmitting PPDUs.
capable | whether Aux PHYs are capable of transmitting PPDUs |
Definition at line 198 of file emlsr-manager.cc.
References m_auxPhyTxCapable.
Referenced by GetTypeId().
void ns3::EmlsrManager::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.
enable | whether the CAM state should be reset |
Definition at line 186 of file emlsr-manager.cc.
References m_resetCamState.
Referenced by GetTypeId().
|
protected |
Set the CCA ED threshold (if needed) on the given PHY that is switching channel to operate on the given link.
phy | the given PHY |
linkId | the ID of the given link |
Definition at line 470 of file emlsr-manager.cc.
References NS_LOG_DEBUG, NS_LOG_FUNCTION, and third::phy.
Referenced by ns3::DefaultEmlsrManager::NotifyMainPhySwitch().
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 291 of file emlsr-manager.cc.
References GetStaMac(), GetTransitionTimeout(), m_emlsrLinks, m_nextEmlsrLinks, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and SendEmlOmn().
Referenced by GetTypeId().
|
private |
Set the ID of main PHY (position in the vector of PHYs held by WifiNetDevice).
This method cannot be called during or after initialization.
mainPhyId | the ID of the main PHY |
Definition at line 172 of file emlsr-manager.cc.
References ns3::Object::IsInitialized(), m_mainPhyId, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::EmlsrManager::SetMediumSyncDuration | ( | Time | duration | ) |
Set the duration of the MediumSyncDelay timer.
duration | the duration of the MediumSyncDelay timer |
Definition at line 252 of file emlsr-manager.cc.
References ns3::Time::As(), m_mediumSyncDuration, NS_LOG_FUNCTION, and ns3::Time::US.
void ns3::EmlsrManager::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.
No value indicates no limit.
nTxops | the maximum number of TXOPs a non-AP STA is allowed to attempt to initiate while the MediumSyncDelay timer is running |
Definition at line 278 of file emlsr-manager.cc.
References m_msdMaxNTxops, and NS_LOG_FUNCTION.
void ns3::EmlsrManager::SetMediumSyncOfdmEdThreshold | ( | int8_t | threshold | ) |
Set the Medium Synchronization OFDM ED threshold (dBm) to use while the MediumSyncDelay timer is running.
threshold | the threshold in dBm (ranges from -72 to -62 dBm) |
Definition at line 265 of file emlsr-manager.cc.
References m_msdOfdmEdThreshold, and NS_LOG_FUNCTION.
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 239 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 155 of file emlsr-manager.cc.
References ns3::WifiMac::GetEhtConfiguration(), ns3::WifiMac::GetNLinks(), ns3::WifiMac::GetTypeOfStation(), m_staMac, third::mac, ns3::MakeCallback(), NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_FUNCTION, ns3::STA, ns3::ObjectBase::TraceConnectWithoutContext(), TxDropped(), and TxOk().
|
private |
Start the MediumSyncDelay timer and take the appropriate actions, if the timer is not already running.
linkId | the ID of the link on which a TXOP was carried out that caused the STAs operating on other links to lose medium synchronization |
Definition at line 614 of file emlsr-manager.cc.
References NS_LOG_DEBUG, NS_LOG_FUNCTION, and third::phy.
Referenced by NotifyTxopEnd().
|
protected |
Switch channel on the Aux PHY operating on the given current link so that it operates on the given next link.
currLinkId | the ID of the link on which the aux PHY is currently operating |
nextLinkId | the ID of the link on which the aux PHY will be operating |
Definition at line 577 of file emlsr-manager.cc.
References ns3::MicroSeconds(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::DefaultEmlsrManager::NotifyMainPhySwitch().
|
protected |
Switch channel on the Main PHY so that it operates on the given link.
linkId | the ID of the link on which the main PHY has to operate |
noSwitchDelay | whether switching delay should be zero |
resetBackoff | whether backoff should be reset on the link on which the main PHY is operating |
requestAccess | whether channel access should be requested on the link on which the main PHY is moving onto |
Definition at line 499 of file emlsr-manager.cc.
References ns3::MicroSeconds(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Seconds(), and ns3::wifiAcList.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd(), NotifyIcfReceived(), and NotifyUlTxopStart().
|
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 833 of file emlsr-manager.cc.
References check-style-clang-format::action, and NS_LOG_FUNCTION.
Referenced by DoDispose(), and SetWifiMac().
Notify the acknowledgment of the given MPDU.
mpdu | the acknowledged MPDU |
Definition at line 798 of file emlsr-manager.cc.
References check-style-clang-format::action, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by DoDispose(), and SetWifiMac().
|
staticconstexprprotected |
do not request channel access when PHY switch ends
Definition at line 298 of file emlsr-manager.h.
Referenced by NotifyIcfReceived(), and NotifyUlTxopStart().
|
staticconstexprprotected |
do not reset backoff on main PHY switch
Definition at line 296 of file emlsr-manager.h.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd().
|
private |
link ID-indexed map of operating channels for the aux PHYs
Definition at line 474 of file emlsr-manager.h.
|
protected |
max modulation class supported by aux PHYs
Definition at line 328 of file emlsr-manager.h.
Referenced by GetTypeId().
|
protected |
max channel width (MHz) supported by aux PHYs
Definition at line 327 of file emlsr-manager.h.
Referenced by GetTypeId().
|
protected |
whether Aux PHYs are capable of transmitting PPDUs
Definition at line 329 of file emlsr-manager.h.
Referenced by GetAuxPhyTxCapable(), and SetAuxPhyTxCapable().
|
private |
ID of the EMLSR links (empty if EMLSR mode is disabled)
Definition at line 462 of file emlsr-manager.h.
Referenced by GetEmlsrLinks(), and SetEmlsrLinks().
|
protected |
|
protected |
|
private |
Transition timeout advertised by APs with EMLSR activated.
Definition at line 449 of file emlsr-manager.h.
Referenced by GetTransitionTimeout(), and SetTransitionTimeout().
|
private |
last advertised padding delay
Definition at line 466 of file emlsr-manager.h.
|
private |
last advertised transition delay
Definition at line 467 of file emlsr-manager.h.
|
private |
link ID-indexed map of operating channels for the main PHY
Definition at line 472 of file emlsr-manager.h.
|
protected |
ID of main PHY (position in the vector of PHYs held by WifiNetDevice)
Definition at line 326 of file emlsr-manager.h.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd(), ns3::DefaultEmlsrManager::GetLinkToSendEmlOmn(), GetMainPhyId(), NotifyIcfReceived(), NotifyUlTxopStart(), ns3::DefaultEmlsrManager::ResendNotification(), and SetMainPhyId().
|
private |
the status of MediumSyncDelay timers (link ID-indexed)
Definition at line 456 of file emlsr-manager.h.
Referenced by DoDispose(), and GetElapsedMediumSyncDelayTimer().
|
private |
duration of the MediumSyncDelay timer
Definition at line 451 of file emlsr-manager.h.
Referenced by GetElapsedMediumSyncDelayTimer(), GetMediumSyncDuration(), and SetMediumSyncDuration().
|
private |
MediumSyncDelay max number of TXOPs.
Definition at line 453 of file emlsr-manager.h.
Referenced by GetMediumSyncMaxNTxops(), and SetMediumSyncMaxNTxops().
|
private |
MediumSyncDelay OFDM ED threshold.
Definition at line 452 of file emlsr-manager.h.
Referenced by GetMediumSyncOfdmEdThreshold(), and SetMediumSyncOfdmEdThreshold().
|
private |
ID of the links that will become the EMLSR links when the pending notification frame is acknowledged.
Definition at line 463 of file emlsr-manager.h.
Referenced by NotifyMgtFrameReceived(), and SetEmlsrLinks().
the CCA sensitivity threshold (dBm) to restore once the MediumSyncDelay timer expires or the PHY moves to a link on which the timer is not running
Definition at line 457 of file emlsr-manager.h.
|
private |
whether to reset the state of CAM when main PHY switches channel
Definition at line 470 of file emlsr-manager.h.
Referenced by GetCamStateReset(), and SetCamStateReset().
|
private |
the MAC of the managed non-AP MLD
Definition at line 448 of file emlsr-manager.h.
Referenced by DoDispose(), GetEhtFem(), GetStaMac(), NotifyIcfReceived(), NotifyMgtFrameReceived(), NotifyTxopEnd(), NotifyUlTxopStart(), and SetWifiMac().
|
private |
Timer started after the successful transmission of an EML Operating Mode Notification frame.
Definition at line 468 of file emlsr-manager.h.
Referenced by DoDispose(), and NotifyMgtFrameReceived().
|
staticconstexprprotected |
request channel access when PHY switch ends
Definition at line 297 of file emlsr-manager.h.
Referenced by ns3::DefaultEmlsrManager::DoNotifyTxopEnd().
|
staticconstexprprotected |
reset backoff on main PHY switch
Definition at line 295 of file emlsr-manager.h.
Referenced by NotifyIcfReceived(), and NotifyUlTxopStart().