AdvancedEmlsrManager is an advanced EMLSR manager. More...
#include "advanced-emlsr-manager.h"
Public Member Functions | |
AdvancedEmlsrManager () | |
~AdvancedEmlsrManager () override | |
std::optional< WifiIcfDrop > | CheckMainPhyTakesOverDlTxop (uint8_t linkId) const override |
This method is called when an aux PHY has completed reception of an ICF to determine whether there is any reason preventing the main PHY from switching link and be on the aux PHY link by the time the ICF reception is completed to take over the DL TXOP. | |
void | InterruptSwitchMainPhyBackTimerIfNeeded () |
This method is called by the PHY listener attached to the main PHY when a switch main PHY back timer is started to notify of events that may delay the channel access for the main PHY on the current link. | |
![]() | |
DefaultEmlsrManager () | |
~DefaultEmlsrManager () override | |
void | NotifyRtsSent (uint8_t linkId, Ptr< const WifiPsdu > rts, const WifiTxVector &txVector) override |
Notify that RTS transmission is starting on the given link. | |
![]() | |
EmlsrManager () | |
~EmlsrManager () override | |
void | CancelMediumSyncDelayTimer (uint8_t linkId) |
Cancel the MediumSyncDelay timer associated with the given link and take the appropriate actions. | |
std::pair< bool, Time > | CheckPossiblyReceivingIcf (uint8_t linkId) const |
Check whether a PPDU that may be an ICF is being received on the given link. | |
void | DecrementMediumSyncDelayNTxops (uint8_t linkId) |
Decrement the counter indicating the number of TXOP attempts left while the MediumSyncDelay timer is running. | |
bool | GetAuxPhyTxCapable () const |
bool | GetCamStateReset () const |
std::pair< bool, Time > | GetDelayUntilAccessRequest (uint8_t linkId, AcIndex aci) |
Notify that an UL TXOP is gained on the given link by the given AC. | |
std::optional< Time > | GetElapsedMediumSyncDelayTimer (uint8_t linkId) const |
Check whether the MediumSyncDelay timer is running for the STA operating on the given link. | |
const std::set< uint8_t > & | GetEmlsrLinks () const |
bool | GetInDeviceInterference () 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. | |
void | NotifyDlTxopStart (uint8_t linkId) |
Notify the start of a DL TXOP on the given link. | |
virtual void | NotifyInDeviceInterferenceStart (uint8_t linkId, Time duration) |
Notify that an STA affiliated with the EMLSR client is causing in-device interference for the given amount of time. | |
void | NotifyMgtFrameReceived (Ptr< const WifiMpdu > mpdu, uint8_t linkId) |
Notify the reception of a management frame addressed to us. | |
void | NotifyProtectionCompleted (uint8_t linkId) |
Notify that protection (if required) is completed and data frame exchange can start on the given link. | |
void | NotifyTxopEnd (uint8_t linkId, Ptr< QosTxop > edca=nullptr) |
Notify the end of a TXOP on the given link. | |
void | NotifyUlTxopStart (uint8_t linkId) |
Notify the start of an UL TXOP on the given link. | |
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. | |
void | SetAuxPhyTxCapable (bool capable) |
Set the member variable indicating whether Aux PHYs are capable of transmitting PPDUs. | |
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. | |
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 | SetInDeviceInterference (bool enable) |
Set the member variable indicating whether in-device interference is such that a PHY cannot decode anything and cannot decrease the backoff counter when another PHY is transmitting. | |
void | SetMediumSyncDuration (Time duration) |
Set the duration of the MediumSyncDelay timer. | |
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. | |
void | SetMediumSyncOfdmEdThreshold (int8_t threshold) |
Set the Medium Synchronization OFDM ED threshold (dBm) to use while the MediumSyncDelay timer is running. | |
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. | |
![]() | |
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 final |
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. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
![]() | |
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. | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) 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. | |
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 TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
![]() | |
static TypeId | GetTypeId () |
Register this type. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | CheckNavAndCcaLastPifs (Ptr< WifiPhy > phy, uint8_t linkId, Ptr< QosTxop > edca) |
Use information from NAV and CCA performed by the given PHY on the given link in the last PIFS interval to determine whether the given EDCAF can start a TXOP. | |
void | DoDispose () override |
Destructor implementation. | |
std::pair< bool, Time > | DoGetDelayUntilAccessRequest (uint8_t linkId) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link. | |
void | DoSetWifiMac (Ptr< StaWifiMac > mac) override |
Allow subclasses to take actions when the MAC is set. | |
std::pair< bool, Time > | GetDelayUnlessMainPhyTakesOverUlTxop (uint8_t linkId) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link, on which an aux PHY that is TX capable is operating. | |
void | NotifyEmlsrModeChanged () override |
Notify subclass that EMLSR mode changed. | |
void | ReceivedMacHdr (Ptr< WifiPhy > phy, const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration) |
Possibly take actions when notified of the MAC header of the MPDU being received by the given PHY. | |
void | RegisterListener (Ptr< WifiPhy > phy) |
Register a PHY listener so that this EMLSR Manager is notified of PHY events generated by the given PHY. | |
bool | RequestMainPhyToSwitch (uint8_t linkId, AcIndex aci, const Time &delay) |
Determine whether the main PHY shall be requested to switch to the link of an aux PHY that is expected to gain channel access through the given AC in the given delay but it is not TX capable. | |
void | SwitchMainPhyBackDelayExpired (uint8_t linkId, std::optional< WifiExpectedAccessReason > stopReason) |
This method is called when the switch main PHY back timer (which is started when the main PHY switches to the link of an aux PHY that does not switch and is not TX capable) expires and decides whether to delay the request to switch the main PHY back to the preferred link or to execute it immediately. | |
void | SwitchMainPhyBackToPreferredLink (uint8_t linkId, EmlsrMainPhySwitchTrace &&traceInfo) override |
This method can only be called when aux PHYs do not switch link. | |
void | SwitchMainPhyIfTxopGainedByAuxPhy (uint8_t linkId, AcIndex aci) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the given AC of the EMLSR client gets channel access on the given link, on which an aux PHY that is not TX capable is operating. | |
void | SwitchMainPhyIfTxopToBeGainedByAuxPhy (uint8_t linkId, AcIndex aci, const Time &delay) |
This method is called when the given AC of the EMLSR client is expected to get channel access in the given delay on the given link, on which an aux PHY that is not TX capable is operating. | |
void | UnregisterListener () |
Disconnect the PHY listener from the PHY it is connected to (if any) | |
![]() | |
std::pair< bool, Time > | DoGetDelayUntilAccessRequest (uint8_t linkId) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link. | |
std::pair< bool, Time > | GetDelayUnlessMainPhyTakesOverUlTxop (uint8_t linkId) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link, on which an aux PHY that is TX capable is operating. | |
uint8_t | GetLinkToSendEmlOmn () override |
Time | GetTimeToCtsEnd (uint8_t linkId) const |
This function is intended to be called when an aux PHY is about to transmit an RTS on the given link to calculate the time remaining to the end of the CTS reception. | |
Time | GetTimeToCtsEnd (uint8_t linkId, const WifiTxVector &rtsTxVector) const |
This function is intended to be called when an aux PHY is about to transmit an RTS on the given link to calculate the time remaining to the end of the CTS reception. | |
void | NotifyEmlsrModeChanged () override |
Notify subclass that EMLSR mode changed. | |
std::optional< uint8_t > | ResendNotification (Ptr< const WifiMpdu > mpdu) override |
A previous EML Operating Mode Notification frame was dropped. | |
void | SwitchMainPhyIfTxopGainedByAuxPhy (uint8_t linkId, AcIndex aci) override |
Subclasses have to provide an implementation for this method, that is called by the base class when the given AC of the EMLSR client gets channel access on the given link, on which an aux PHY that is not TX capable is operating. | |
![]() | |
void | CancelAllSleepEvents () |
Cancel all pending events to put aux PHYs into sleep/awake state. | |
void | DoDispose () override |
Destructor implementation. | |
virtual void | EmlsrLinkSwitchCallback (uint8_t linkId, Ptr< WifiPhy > phy, bool connected) |
Callback connected to the EmlsrLinkSwitch trace source of StaWifiMac. | |
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. | |
void | SetSleepStateForAllAuxPhys (bool sleep) |
Set sleep state or awake state for all aux PHYs. | |
void | SwitchAuxPhy (Ptr< WifiPhy > auxPhy, 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. | |
void | SwitchMainPhy (uint8_t linkId, bool noSwitchDelay, bool requestAccess, EmlsrMainPhySwitchTrace &&traceInfo) |
Switch channel on the Main PHY so that it operates on the given link. | |
![]() | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Private Member Functions | |
void | DoNotifyDlTxopStart (uint8_t linkId) override |
Notify the subclass of the reception of an initial Control frame on the given link. | |
void | DoNotifyTxopEnd (uint8_t linkId, Ptr< QosTxop > edca) override |
Notify the subclass of the end of a TXOP on the given link. | |
void | DoNotifyUlTxopStart (uint8_t linkId) override |
Notify the subclass of the start of an UL TXOP on the given link. | |
Private Attributes | |
bool | m_allowUlTxopInRx |
whether a (main or aux) PHY is allowed to start an UL TXOP if another PHY is receiving a PPDU | |
Ptr< WifiPhy > | m_auxPhyWithListener |
aux PHY which a PHY listener is connected to | |
EventId | m_ccaLastPifs |
event scheduled in case of non-TX capable aux PHY to determine whether TX can be started based on whether the medium has been idle during the last PIFS interval | |
bool | m_checkAccessOnMainPhyLink |
in case aux PHYs are not TX capable and an Access Category, say it AC X, is about to gain channel access on an aux PHY link, determine whether the time the ACs with priority higher than or equal to AC X and with frames to send on the main PHY link are expected to gain access on the main PHY link should be taken into account when taking the decision to switch the main PHY to the aux PHY link | |
bool | m_interruptSwitching |
whether a main PHY switching can be interrupted to start switching to another link | |
bool | m_keepMainPhyAfterDlTxop |
whether the main PHY must stay, for a switch main PHY back delay, on an aux PHY link after a DL TXOP, in case aux PHYs are not TX capable and do not switch | |
AcIndex | m_minAcToSkipCheckAccess |
if m_checkAccessOnMainPhyLink is set to false, indicate the minimum priority AC for which it is allowed to skip the check related to the expected channel access time on the main PHY link | |
std::shared_ptr< WifiPhyListener > | m_phyListener |
PHY listener connected to an aux PHY (that is not TX capable and does not switch link) while the main PHY attempts to gain access on the aux PHY link. | |
Time | m_switchMainPhyBackDelay |
duration of the timer started in case of non-TX capable aux PHY when medium is sensed busy during the PIFS interval preceding/following the main PHY switch end | |
EventId | m_switchMainPhyBackEvent |
event scheduled in case of non-TX capable aux PHY when medium is sensed busy during the PIFS interval preceding/following the main PHY switch end | |
bool | m_useAuxPhyCca |
whether the CCA performed in the last PIFS interval by a non-TX capable aux PHY should be used when the main PHY ends switching to the aux PHY's link to determine whether TX can start or not | |
Friends | |
class | ::EmlsrSwitchMainPhyBackTest |
Allow test cases to access private members. | |
Additional Inherited Members | |
![]() | |
static constexpr uint16_t | MEDIUM_SYNC_THRESHOLD_USEC = 72 |
The aMediumSyncThreshold defined by Sec. 35.3.16.18.1 of 802.11be D4.0. | |
![]() | |
EventId | m_auxPhySwitchEvent |
event scheduled for an aux PHY to switch link | |
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. | |
std::map< uint8_t, std::pair< Time, bool > > | m_rtsStartingUlTxop |
link ID-indexed map indicating the time when an UL TXOP is going to start and whether it is starting with an RTS | |
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 | |
![]() | |
WifiModulationClass | m_auxPhyMaxModClass |
max modulation class supported by aux PHYs | |
MHz_u | m_auxPhyMaxWidth |
max channel width supported by aux PHYs | |
bool | m_auxPhyToSleep |
whether Aux PHYs should be put into sleep mode while the Main PHY is carrying out a (DL or UL) TXOP | |
std::map< uint8_t, EventId > | m_auxPhyToSleepEvents |
PHY ID-indexed map of events scheduled to put an Aux PHY to sleep. | |
bool | m_auxPhyTxCapable |
whether Aux PHYs are capable of transmitting PPDUs | |
Time | m_emlsrPaddingDelay |
EMLSR Padding delay. | |
Time | m_emlsrTransitionDelay |
EMLSR Transition delay. | |
uint8_t | m_mainPhyId |
ID of main PHY (position in the vector of PHYs held by WifiNetDevice) | |
MainPhySwitchInfo | m_mainPhySwitchInfo |
main PHY switch info | |
std::map< uint8_t, Time > | m_startSleep |
PHY ID-indexed map of last time sleep mode started. | |
std::map< uint8_t, EventId > | m_ulMainPhySwitch |
link ID-indexed map of timers started when an aux PHY gains an UL TXOP and schedules a channel switch for the main PHY | |
bool | m_useNotifiedMacHdr |
whether to use the information about the MAC header of the MPDU being received (if notified by the PHY) | |
![]() | |
static constexpr bool | DONT_REQUEST_ACCESS |
do not request channel access when PHY switch ends | |
static constexpr bool | REQUEST_ACCESS = true |
request channel access when PHY switch ends | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
AdvancedEmlsrManager is an advanced EMLSR manager.
Introspection did not find any typical Config paths.
AC_BE|AC_VI|AC_VO|AC_BK
Time
-9.22337e+18ns:+9.22337e+18ns HR-DSSS|ERP-OFDM|OFDM|HT|VHT|HE|EHT
ns3::Ptr<N3ns313UintegerValueE>
Time
+0ns:+256000ns Time
+0ns:+256000ns No TraceSources are defined for this type.
Group: Wifi
Size of this type is 928 bytes (on a 64-bit architecture).
Definition at line 30 of file advanced-emlsr-manager.h.
ns3::AdvancedEmlsrManager::AdvancedEmlsrManager | ( | ) |
Definition at line 182 of file advanced-emlsr-manager.cc.
References m_phyListener, and NS_LOG_FUNCTION.
|
override |
Definition at line 188 of file advanced-emlsr-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
overridevirtual |
This method is called when an aux PHY has completed reception of an ICF to determine whether there is any reason preventing the main PHY from switching link and be on the aux PHY link by the time the ICF reception is completed to take over the DL TXOP.
linkId | the ID of the link on which ICF has been received |
Reimplemented from ns3::EmlsrManager.
Definition at line 469 of file advanced-emlsr-manager.cc.
References ns3::EmlsrManager::CheckMainPhyTakesOverDlTxop(), m_interruptSwitching, and ns3::NOT_ENOUGH_TIME_SWITCH.
|
protected |
Use information from NAV and CCA performed by the given PHY on the given link in the last PIFS interval to determine whether the given EDCAF can start a TXOP.
This function is intended to be used when the main PHY switches channel to start an UL TXOP on a link where channel access was obtained by a non-TX capable aux PHY.
phy | the PHY that performed CCA in the last PIFS interval |
linkId | the ID of the given link |
edca | the given EDCAF |
Definition at line 518 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::Txop::CHECK_MEDIUM_BUSY, ns3::Txop::DIDNT_HAVE_FRAMES_TO_TRANSMIT, ns3::EmlsrManager::GetChannelForMainPhy(), ns3::Simulator::GetDelayLeft(), ns3::EmlsrManager::GetEhtFem(), ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::EventId::IsPending(), m_ccaLastPifs, ns3::DefaultEmlsrManager::m_switchAuxPhy, m_switchMainPhyBackEvent, ns3::EmlsrManager::NotifyUlTxopStart(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and SwitchMainPhyBackDelayExpired().
Referenced by SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
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 194 of file advanced-emlsr-manager.cc.
References ns3::Object::DoDispose(), ns3::EmlsrManager::GetStaMac(), m_phyListener, ns3::MakeCallback(), NS_LOG_FUNCTION, ReceivedMacHdr(), and UnregisterListener().
|
overrideprotectedvirtual |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link.
This method has to check possible reasons to give up the TXOP that apply to both main PHY and aux PHYs.
linkId | the ID of the given link |
Implements ns3::EmlsrManager.
Definition at line 272 of file advanced-emlsr-manager.cc.
References ns3::EmlsrManager::CheckPossiblyReceivingIcf(), ns3::EmlsrManager::GetStaMac(), ns3::EventId::IsPending(), m_allowUlTxopInRx, ns3::EmlsrManager::m_auxPhyTxCapable, m_ccaLastPifs, ns3::EmlsrManager::m_mainPhyId, ns3::DefaultEmlsrManager::m_rtsStartingUlTxop, ns3::Simulator::Now(), and NS_LOG_FUNCTION.
Referenced by SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
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 725 of file advanced-emlsr-manager.cc.
References ns3::EventId::Cancel(), m_ccaLastPifs, m_switchMainPhyBackEvent, NS_LOG_FUNCTION, and UnregisterListener().
|
overrideprivatevirtual |
Notify the subclass of the end of a TXOP on the given link.
linkId | the ID of the given link |
edca | the EDCAF that carried out the TXOP, in case of UL TXOP, or a null pointer, in case of DL TXOP |
Implements ns3::EmlsrManager.
Definition at line 371 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::EmlsrManager::MainPhySwitchInfo::disconnected, ns3::EmlsrManager::MainPhySwitchInfo::from, ns3::EmlsrManager::GetEhtFem(), ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::EventId::IsPending(), ns3::DefaultEmlsrManager::m_auxPhyToReconnect, ns3::EmlsrManager::m_auxPhyTxCapable, m_interruptSwitching, m_keepMainPhyAfterDlTxop, ns3::EmlsrManager::m_mainPhyId, ns3::EmlsrManager::m_mainPhySwitchInfo, ns3::DefaultEmlsrManager::m_rtsStartingUlTxop, ns3::DefaultEmlsrManager::m_switchAuxPhy, m_switchMainPhyBackDelay, m_switchMainPhyBackEvent, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, RegisterListener(), ns3::EmlsrManager::REQUEST_ACCESS, ns3::Simulator::Schedule(), ns3::EmlsrManager::SwitchMainPhy(), and SwitchMainPhyBackDelayExpired().
|
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 734 of file advanced-emlsr-manager.cc.
References ns3::EventId::Cancel(), m_ccaLastPifs, m_switchMainPhyBackEvent, NS_LOG_FUNCTION, and UnregisterListener().
|
overrideprotectedvirtual |
Allow subclasses to take actions when the MAC is set.
mac | the wifi MAC |
Reimplemented from ns3::EmlsrManager.
Definition at line 235 of file advanced-emlsr-manager.cc.
References ns3::EmlsrManager::GetStaMac(), ns3::MakeCallback(), NS_LOG_FUNCTION, and ReceivedMacHdr().
|
overrideprotectedvirtual |
Subclasses have to provide an implementation for this method, that is called by the base class when the EMLSR client gets channel access on the given link, on which an aux PHY that is TX capable is operating.
This method has to request the main PHY to switch to the given link to take over the TXOP, if possible, or determine the delay after which the EMLSR client restarts channel access on the given link, otherwise.
linkId | the ID of the given link |
Implements ns3::EmlsrManager.
Definition at line 482 of file advanced-emlsr-manager.cc.
References ns3::CCA_BUSY, ns3::DefaultEmlsrManager::GetDelayUnlessMainPhyTakesOverUlTxop(), ns3::EmlsrManager::GetStaMac(), ns3::DefaultEmlsrManager::GetTimeToCtsEnd(), ns3::IDLE, m_interruptSwitching, ns3::EmlsrManager::m_mainPhyId, ns3::DefaultEmlsrManager::m_rtsStartingUlTxop, ns3::Simulator::Now(), NS_ABORT_MSG_UNLESS, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::RX, and ns3::SWITCHING.
|
static |
Get the type ID.
Definition at line 109 of file advanced-emlsr-manager.cc.
References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_allowUlTxopInRx, m_checkAccessOnMainPhyLink, m_interruptSwitching, m_keepMainPhyAfterDlTxop, m_minAcToSkipCheckAccess, m_switchMainPhyBackDelay, m_useAuxPhyCca, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MilliSeconds(), and ns3::TypeId::SetParent().
void ns3::AdvancedEmlsrManager::InterruptSwitchMainPhyBackTimerIfNeeded | ( | ) |
This method is called by the PHY listener attached to the main PHY when a switch main PHY back timer is started to notify of events that may delay the channel access for the main PHY on the current link.
If the expected channel access is beyond the end of the switch main PHY timer expiration plus a channel switch delay, the timer is stopped immediately.
Definition at line 695 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::EmlsrManager::MainPhySwitchInfo::disconnected, ns3::Simulator::GetDelayLeft(), ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::EventId::IsPending(), ns3::EmlsrManager::m_mainPhySwitchInfo, m_switchMainPhyBackEvent, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, SwitchMainPhyBackDelayExpired(), and ns3::EmlsrManager::MainPhySwitchInfo::to.
Referenced by ns3::EmlsrPhyListener::NotifyCcaBusyStart(), ns3::EmlsrPhyListener::NotifyRxEndOk(), and ns3::EmlsrPhyListener::NotifyRxStart().
|
overrideprotectedvirtual |
Notify subclass that EMLSR mode changed.
Implements ns3::EmlsrManager.
Definition at line 209 of file advanced-emlsr-manager.cc.
References ns3::EmlsrManager::GetEmlsrLinks(), ns3::EmlsrManager::GetStaMac(), ns3::MakeCallback(), ns3::DefaultEmlsrManager::NotifyEmlsrModeChanged(), NS_LOG_FUNCTION, and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
protected |
Possibly take actions when notified of the MAC header of the MPDU being received by the given PHY.
phy | the given PHY |
macHdr | the MAC header of the MPDU being received |
txVector | the TXVECTOR used to transmit the PSDU |
psduDuration | the remaining duration of the PSDU |
Definition at line 319 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::Time::As(), ns3::EmlsrManager::MainPhySwitchInfo::disconnected, ns3::WifiMacHeader::GetAddr1(), ns3::Simulator::GetDelayLeft(), ns3::EmlsrManager::GetEhtFem(), ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::Mac48Address::IsBroadcast(), ns3::WifiMacHeader::IsCts(), ns3::EventId::IsPending(), ns3::EmlsrManager::m_mainPhySwitchInfo, m_switchMainPhyBackEvent, ns3::EmlsrManager::m_useNotifiedMacHdr, ns3::Time::MS, ns3::EmlsrManager::NotifyTxopEnd(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and ns3::EmlsrManager::MainPhySwitchInfo::to.
Referenced by DoDispose(), and DoSetWifiMac().
Register a PHY listener so that this EMLSR Manager is notified of PHY events generated by the given PHY.
phy | the PHY which a listener is connected to |
Definition at line 248 of file advanced-emlsr-manager.cc.
References ns3::WifiPhy::GetPhyId(), m_auxPhyWithListener, m_phyListener, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by DoNotifyTxopEnd(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
protected |
Determine whether the main PHY shall be requested to switch to the link of an aux PHY that is expected to gain channel access through the given AC in the given delay but it is not TX capable.
linkId | the ID of the link on which the aux PHY is operating |
aci | the index of the given AC |
delay | the delay after which the given AC is expected to gain channel access. Zero indicates that channel access has been actually gained |
Definition at line 743 of file advanced-emlsr-manager.cc.
References ns3::Time::As(), ns3::CCA_BUSY, ns3::EmlsrManager::MainPhySwitchInfo::disconnected, ns3::EmlsrManager::GetChannelForAuxPhy(), ns3::EmlsrManager::GetChannelForMainPhy(), ns3::EmlsrManager::GetElapsedMediumSyncDelayTimer(), ns3::EmlsrManager::GetMediumSyncDuration(), ns3::EmlsrManager::GetStaMac(), ns3::IDLE, ns3::EventId::IsPending(), m_ccaLastPifs, m_checkAccessOnMainPhyLink, m_interruptSwitching, ns3::EmlsrManager::m_mainPhyId, ns3::EmlsrManager::m_mainPhySwitchInfo, m_minAcToSkipCheckAccess, m_switchMainPhyBackDelay, m_switchMainPhyBackEvent, m_useAuxPhyCca, ns3::EmlsrManager::MediumSyncDelayNTxopsExceeded(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::EmlsrManager::MainPhySwitchInfo::reason, ns3::RX, ns3::SWITCHING, ns3::Time::US, and ns3::wifiAcList.
Referenced by SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
protected |
This method is called when the switch main PHY back timer (which is started when the main PHY switches to the link of an aux PHY that does not switch and is not TX capable) expires and decides whether to delay the request to switch the main PHY back to the preferred link or to execute it immediately.
This method can also be called to terminate a running switch main PHY back timer, in case it is determined that channel access is not expected to be gained before the expiration of the timer plus the channel switch delay.
linkId | the ID of the link that the main PHY is leaving |
stopReason | the reason for terminating the switch main PHY back timer before expiration |
Definition at line 585 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::EventId::Cancel(), ns3::EmlsrManager::CheckPossiblyReceivingIcf(), ns3::EmlsrManager::GetEhtFem(), ns3::EmlsrManager::GetMainPhyId(), ns3::EmlsrManager::GetStaMac(), ns3::EventImpl::Invoke(), ns3::EventId::IsPending(), ns3::LOG_FUNCTION, m_ccaLastPifs, ns3::EmlsrManager::m_mainPhySwitchInfo, ns3::DefaultEmlsrManager::m_switchAuxPhy, m_switchMainPhyBackEvent, Max, ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::EventId::PeekEventImpl(), ns3::Simulator::Schedule(), ns3::EmlsrManager::MainPhySwitchInfo::start, SwitchMainPhyBackDelayExpired(), SwitchMainPhyBackToPreferredLink(), UnregisterListener(), and ns3::Time::US.
Referenced by CheckNavAndCcaLastPifs(), DoNotifyTxopEnd(), InterruptSwitchMainPhyBackTimerIfNeeded(), SwitchMainPhyBackDelayExpired(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
overrideprotectedvirtual |
This method can only be called when aux PHYs do not switch link.
Switch the main PHY back to the preferred link and reconnect the aux PHY that was operating on the link left by the main PHY.
linkId | the ID of the link that the main PHY is leaving |
traceInfo | information to pass to the main PHY switch traced callback (the fromLinkId and toLinkId fields are set by SwitchMainPhy) |
Reimplemented from ns3::DefaultEmlsrManager.
Definition at line 668 of file advanced-emlsr-manager.cc.
References ns3::EmlsrManager::GetMainPhyId(), ns3::DefaultEmlsrManager::m_auxPhyToReconnect, m_interruptSwitching, ns3::DefaultEmlsrManager::m_switchAuxPhy, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::EmlsrManager::REQUEST_ACCESS, ns3::EmlsrManager::SwitchMainPhy(), and ns3::DefaultEmlsrManager::SwitchMainPhyBackToPreferredLink().
Referenced by SwitchMainPhyBackDelayExpired().
|
overrideprotectedvirtual |
Subclasses have to provide an implementation for this method, that is called by the base class when the given AC of the EMLSR client gets channel access on the given link, on which an aux PHY that is not TX capable is operating.
This method has to request the main PHY to switch to the given link to take over the TXOP, unless it is decided to give up the TXOP.
linkId | the ID of the given link |
aci | the index of the given AC |
Implements ns3::EmlsrManager.
Definition at line 863 of file advanced-emlsr-manager.cc.
References ns3::EventId::Cancel(), ns3::Txop::CHECK_MEDIUM_BUSY, CheckNavAndCcaLastPifs(), ns3::Txop::DIDNT_HAVE_FRAMES_TO_TRANSMIT, ns3::EmlsrManager::DONT_REQUEST_ACCESS, ns3::EmlsrManager::GetChannelForAuxPhy(), ns3::EmlsrManager::GetChannelForMainPhy(), ns3::Simulator::GetDelayLeft(), ns3::EmlsrManager::GetStaMac(), ns3::EventId::IsPending(), ns3::EmlsrManager::m_auxPhyTxCapable, m_ccaLastPifs, ns3::EmlsrManager::m_mainPhyId, ns3::EmlsrManager::m_mainPhySwitchInfo, ns3::DefaultEmlsrManager::m_switchAuxPhy, m_switchMainPhyBackDelay, m_switchMainPhyBackEvent, m_useAuxPhyCca, Max, ns3::Simulator::Now(), ns3::Time::NS, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, RegisterListener(), RequestMainPhyToSwitch(), ns3::Simulator::Schedule(), ns3::EmlsrManager::SwitchMainPhy(), SwitchMainPhyBackDelayExpired(), and ns3::EmlsrManager::MainPhySwitchInfo::to.
|
protected |
This method is called when the given AC of the EMLSR client is expected to get channel access in the given delay on the given link, on which an aux PHY that is not TX capable is operating.
This method has to decide whether to request the main PHY to switch to the given link to try to start a TXOP.
linkId | the ID of the given link |
aci | the index of the given AC |
delay | the delay after which the given AC is expected to gain channel access |
use aux PHY CCA in the last PIFS interval before main PHY switch end
Backoff Switch end end (now)
──────────┴─────────┴────────── |-— PIFS -—|
the remaining backoff time (if any) when the main PHY completes the switch is shorter than or equal to a PIFS, thus the main PHY performs CCA in the last PIFS interval after switch end
Switch Backoff Backoff Switch end (now) end end end (now)
──────────┴─────────┴────────── ──────────┴─────────┴────────── |-— PIFS -—| |-— PIFS -—|
Definition at line 994 of file advanced-emlsr-manager.cc.
References ns3::ACCESS_EXPECTED, ns3::Time::As(), ns3::EventId::Cancel(), CheckNavAndCcaLastPifs(), DoGetDelayUntilAccessRequest(), ns3::EmlsrManager::DONT_REQUEST_ACCESS, ns3::EmlsrManager::GetChannelForAuxPhy(), ns3::EmlsrManager::GetChannelForMainPhy(), ns3::Simulator::GetDelayLeft(), ns3::EmlsrManager::GetEhtFem(), ns3::EmlsrManager::GetStaMac(), ns3::WifiPhyOperatingChannel::GetTotalWidth(), ns3::EventId::IsPending(), ns3::Time::IsStrictlyPositive(), ns3::EmlsrManager::m_auxPhyTxCapable, m_ccaLastPifs, ns3::EmlsrManager::m_mainPhyId, ns3::DefaultEmlsrManager::m_switchAuxPhy, m_switchMainPhyBackDelay, m_switchMainPhyBackEvent, m_useAuxPhyCca, Max, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, RegisterListener(), RequestMainPhyToSwitch(), ns3::Simulator::Schedule(), ns3::EmlsrManager::SwitchMainPhy(), SwitchMainPhyBackDelayExpired(), SwitchMainPhyIfTxopToBeGainedByAuxPhy(), and ns3::Time::US.
Referenced by NotifyEmlsrModeChanged(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
protected |
Disconnect the PHY listener from the PHY it is connected to (if any)
Definition at line 259 of file advanced-emlsr-manager.cc.
References ns3::WifiPhy::GetPhyId(), m_auxPhyWithListener, m_phyListener, NS_LOG_FUNCTION, and ns3::WifiPhy::UnregisterListener().
Referenced by DoDispose(), DoNotifyDlTxopStart(), DoNotifyUlTxopStart(), and SwitchMainPhyBackDelayExpired().
|
friend |
Allow test cases to access private members.
Definition at line 33 of file advanced-emlsr-manager.h.
|
private |
whether a (main or aux) PHY is allowed to start an UL TXOP if another PHY is receiving a PPDU
Definition at line 146 of file advanced-emlsr-manager.h.
Referenced by DoGetDelayUntilAccessRequest(), and GetTypeId().
aux PHY which a PHY listener is connected to
Definition at line 181 of file advanced-emlsr-manager.h.
Referenced by RegisterListener(), and UnregisterListener().
|
private |
event scheduled in case of non-TX capable aux PHY to determine whether TX can be started based on whether the medium has been idle during the last PIFS interval
Definition at line 171 of file advanced-emlsr-manager.h.
Referenced by CheckNavAndCcaLastPifs(), DoGetDelayUntilAccessRequest(), DoNotifyDlTxopStart(), DoNotifyUlTxopStart(), RequestMainPhyToSwitch(), SwitchMainPhyBackDelayExpired(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
private |
in case aux PHYs are not TX capable and an Access Category, say it AC X, is about to gain channel access on an aux PHY link, determine whether the time the ACs with priority higher than or equal to AC X and with frames to send on the main PHY link are expected to gain access on the main PHY link should be taken into account when taking the decision to switch the main PHY to the aux PHY link
Definition at line 160 of file advanced-emlsr-manager.h.
Referenced by GetTypeId(), and RequestMainPhyToSwitch().
|
private |
whether a main PHY switching can be interrupted to start switching to another link
Definition at line 148 of file advanced-emlsr-manager.h.
Referenced by CheckMainPhyTakesOverDlTxop(), DoNotifyTxopEnd(), GetDelayUnlessMainPhyTakesOverUlTxop(), GetTypeId(), RequestMainPhyToSwitch(), and SwitchMainPhyBackToPreferredLink().
|
private |
whether the main PHY must stay, for a switch main PHY back delay, on an aux PHY link after a DL TXOP, in case aux PHYs are not TX capable and do not switch
Definition at line 157 of file advanced-emlsr-manager.h.
Referenced by DoNotifyTxopEnd(), and GetTypeId().
|
private |
if m_checkAccessOnMainPhyLink is set to false, indicate the minimum priority AC for which it is allowed to skip the check related to the expected channel access time on the main PHY link
Definition at line 167 of file advanced-emlsr-manager.h.
Referenced by GetTypeId(), and RequestMainPhyToSwitch().
|
private |
PHY listener connected to an aux PHY (that is not TX capable and does not switch link) while the main PHY attempts to gain access on the aux PHY link.
Definition at line 178 of file advanced-emlsr-manager.h.
Referenced by AdvancedEmlsrManager(), DoDispose(), RegisterListener(), and UnregisterListener().
|
private |
duration of the timer started in case of non-TX capable aux PHY when medium is sensed busy during the PIFS interval preceding/following the main PHY switch end
Definition at line 154 of file advanced-emlsr-manager.h.
Referenced by DoNotifyTxopEnd(), GetTypeId(), RequestMainPhyToSwitch(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
private |
event scheduled in case of non-TX capable aux PHY when medium is sensed busy during the PIFS interval preceding/following the main PHY switch end
Definition at line 174 of file advanced-emlsr-manager.h.
Referenced by CheckNavAndCcaLastPifs(), DoNotifyDlTxopStart(), DoNotifyTxopEnd(), DoNotifyUlTxopStart(), InterruptSwitchMainPhyBackTimerIfNeeded(), ReceivedMacHdr(), RequestMainPhyToSwitch(), SwitchMainPhyBackDelayExpired(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().
|
private |
whether the CCA performed in the last PIFS interval by a non-TX capable aux PHY should be used when the main PHY ends switching to the aux PHY's link to determine whether TX can start or not
Definition at line 150 of file advanced-emlsr-manager.h.
Referenced by GetTypeId(), RequestMainPhyToSwitch(), SwitchMainPhyIfTxopGainedByAuxPhy(), and SwitchMainPhyIfTxopToBeGainedByAuxPhy().