A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::RrMultiUserScheduler Class Reference

RrMultiUserScheduler is a simple OFDMA scheduler that indicates to perform a DL OFDMA transmission if the AP has frames to transmit to at least one station. More...

#include "rr-multi-user-scheduler.h"

+ Inheritance diagram for ns3::RrMultiUserScheduler:
+ Collaboration diagram for ns3::RrMultiUserScheduler:

Classes

struct  MasterInfo
 Information used to sort stations. More...
 

Public Member Functions

 RrMultiUserScheduler ()
 
 ~RrMultiUserScheduler () override
 
Time GetExtraTimeForBsrpTfDurationId (uint8_t linkId) const override
 When the TXOP limit is zero and the TXOP continues a SIFS after receiving a response to a BSRP TF, the Duration/ID field of the BSRP TF should be extended to reserve the medium for the frame exchange following the BSRP TF.
 
- Public Member Functions inherited from ns3::MultiUserScheduler
 MultiUserScheduler ()
 
 ~MultiUserScheduler () override
 
Time GetAccessReqInterval () const
 
DlMuInfoGetDlMuInfo (uint8_t linkId)
 Get the information required to perform a DL MU transmission on the given link.
 
UlMuInfoGetUlMuInfo (uint8_t linkId)
 Get the information required to solicit an UL MU transmission on the given link.
 
TxFormat NotifyAccessGranted (Ptr< QosTxop > edca, Time availableTime, bool initialFrame, MHz_u allowedWidth, uint8_t linkId)
 Notify the Multi-user Scheduler that the given AC of the AP gained channel access.
 
void NotifyProtectionCompleted (uint8_t linkId, WifiPsduMap &psduMap, WifiTxParameters &txParams)
 This method is called when a protection mechanism for an MU transmission is completed and gives the MU scheduler the opportunity to modify the MU PPDU or the TX parameters before the actual MU transmission.
 
void SetAccessReqInterval (Time interval)
 Set the duration of the interval between two consecutive requests for channel access made by the MultiUserScheduler.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, 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 Public Member Functions inherited from ns3::MultiUserScheduler
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

virtual bool CanSolicitStaInBasicTf (const MasterInfo &info) const
 Determine whether the given STA can be solicited via a Basic Trigger Frame.
 
virtual bool CanSolicitStaInBsrpTf (const MasterInfo &info) const
 Determine whether the given STA can be solicited via a BSRP Trigger Frame.
 
void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
void UpdateDlMuAfterProtection (uint8_t linkId, WifiPsduMap &psduMap, WifiTxParameters &txParams) const override
 Update the given PSDU map after protection is completed on the given link.
 
void UpdateTriggerFrameAfterProtection (uint8_t linkId, CtrlTriggerHeader &trigger, WifiTxParameters &txParams) const override
 Update the given Trigger Frame after protection is completed on the given link.
 
- Protected Member Functions inherited from ns3::MultiUserScheduler
Ptr< HeFrameExchangeManagerGetHeFem (uint8_t linkId) const
 Get the HE Frame Exchange Manager attached to the AP on the given link.
 
TxFormat GetLastTxFormat (uint8_t linkId) const
 Get the format of the last transmission on the given link, as determined by the last call to NotifyAccessGranted that did not return NO_TX.
 
uint32_t GetMaxSizeOfQosNullAmpdu (const CtrlTriggerHeader &trigger) const
 Get the maximum size in bytes among the A-MPDUs containing QoS Null frames and solicited by the given (BSRP) Trigger Frame.
 
Ptr< WifiMpduGetTriggerFrame (const CtrlTriggerHeader &trigger, uint8_t linkId) const
 Get an MPDU containing the given Trigger Frame.
 
Ptr< WifiRemoteStationManagerGetWifiRemoteStationManager (uint8_t linkId) const
 Get the station manager attached to the AP on the given link.
 
void NotifyNewAggregate () override
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
void RemoveRecipientsFromDlMu (uint8_t linkId, WifiPsduMap &psduMap, WifiTxParameters &txParams, std::function< bool(uint8_t, Mac48Address)> predicate) const
 Remove PSDUs for which the given predicate is true from the given PSDU map.
 
void RemoveRecipientsFromTf (uint8_t linkId, CtrlTriggerHeader &trigger, WifiTxParameters &txParams, std::function< bool(uint8_t, Mac48Address)> predicate) const
 Remove the User Info fields for which the given predicate is true from the given Trigger Frame.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Types

typedef std::pair< std::list< MasterInfo >::iterator, Ptr< WifiMpdu > > CandidateInfo
 Information stored for candidate stations.
 

Private Member Functions

DlMuInfo ComputeDlMuInfo () override
 Compute the information required to perform a DL MU transmission.
 
UlMuInfo ComputeUlMuInfo () override
 Prepare the information required to solicit an UL MU transmission.
 
void FinalizeTxVector (WifiTxVector &txVector)
 Finalize the given TXVECTOR by only including the largest subset of the current set of candidate stations that can be allocated equal-sized RUs (with the possible exception of using central 26-tone RUs) without leaving RUs unallocated.
 
virtual WifiTxVector GetTxVectorForUlMu (std::function< bool(const MasterInfo &)> canBeSolicited)
 Compute a TXVECTOR that can be used to construct a Trigger Frame to solicit transmissions from suitable stations, i.e., stations that have established a BlockAck agreement with the AP and for which the given predicate returns true.
 
void NotifyStationAssociated (uint16_t aid, Mac48Address address)
 Notify the scheduler that a station associated with the AP.
 
void NotifyStationDeassociated (uint16_t aid, Mac48Address address)
 Notify the scheduler that a station deassociated with the AP.
 
TxFormat SelectTxFormat () override
 Select the format of the next transmission.
 
virtual TxFormat TrySendingBasicTf ()
 Check if it is possible to send a Basic Trigger Frame given the current time limits.
 
virtual TxFormat TrySendingBsrpTf ()
 Check if it is possible to send a BSRP Trigger Frame given the current time limits.
 
virtual TxFormat TrySendingDlMuPpdu ()
 Check if it is possible to send a DL MU PPDU given the current time limits.
 
void UpdateCredits (std::list< MasterInfo > &staList, Time txDuration, const WifiTxVector &txVector)
 Update credits of the stations in the given list considering that a PPDU having the given duration is being transmitted or solicited by using the given TXVECTOR.
 

Private Attributes

std::list< CandidateInfom_candidates
 Candidate stations for MU TX.
 
bool m_enableBsrp
 send a BSRP before an UL MU transmission
 
bool m_enableTxopSharing
 allow A-MPDUs of different TIDs in a DL MU PPDU
 
bool m_enableUlOfdma
 enable the scheduler to also return UL_OFDMA
 
bool m_forceDlOfdma
 return DL_OFDMA even if no DL MU PPDU was built
 
Time m_maxCredits
 Max amount of credits a station can have.
 
uint8_t m_nStations
 Number of stations/slots to fill.
 
std::map< AcIndex, std::list< MasterInfo > > m_staListDl
 Per-AC list of stations (next to serve for DL first)
 
std::list< MasterInfom_staListUl
 List of stations to serve for UL.
 
CtrlTriggerHeader m_trigger
 Trigger Frame to send.
 
WifiMacHeader m_triggerMacHdr
 MAC header for Trigger Frame.
 
Time m_triggerTxDuration {0}
 Trigger Frame TX duration.
 
WifiTxParameters m_txParams
 TX parameters.
 
uint32_t m_ulPsduSize
 the size in byte of the solicited PSDU
 
bool m_useCentral26TonesRus
 whether to allocate central 26-tone RUs
 

Additional Inherited Members

- Public Types inherited from ns3::MultiUserScheduler
enum  TxFormat { NO_TX = 0 , SU_TX , DL_MU_TX , UL_MU_TX }
 Enumeration of the possible transmission formats. More...
 
- Protected Attributes inherited from ns3::MultiUserScheduler
MHz_u m_allowedWidth
 the allowed width for the current transmission
 
Ptr< ApWifiMacm_apMac
 the AP wifi MAC
 
Time m_availableTime
 the time available for frame exchange
 
Time m_defaultTbPpduDuration
 the default duration of TB PPDUs solicited by Basic TFs
 
Ptr< QosTxopm_edca
 the AC that gained channel access
 
bool m_initialFrame
 true if a TXOP is being started
 
const std::function< bool(uint8_t, Mac48Address)> m_isUnprotectedEmlsrClient
 predicate returning true if the device with the given (link) address is an EMLSR client that is not protected on the given link
 
uint8_t m_linkId
 the ID of the link over which channel access has been granted
 

Detailed Description

RrMultiUserScheduler is a simple OFDMA scheduler that indicates to perform a DL OFDMA transmission if the AP has frames to transmit to at least one station.

Introspection did not find any typical Config paths.

RrMultiUserScheduler assigns RUs of equal size (in terms of tones) to stations to which the AP has frames to transmit belonging to the AC who gained access to the channel or higher. The maximum number of stations that can be granted an RU is configurable. Associated stations are served based on their priority. The priority is determined by the credits/debits a station gets when it is selected or not for transmission.

Todo
Take the supported channel width of the stations into account while selecting stations and assigning RUs to them.


Attributes

  • EnableBsrp: If enabled, send a BSRP Trigger Frame before an UL MU transmission.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • EnableTxopSharing: If enabled, allow A-MPDUs of different TIDs in a DL MU PPDU.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • EnableUlOfdma: If enabled, return UL_MU_TX if DL_MU_TX was returned the previous time.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • ForceDlOfdma: If enabled, return DL_MU_TX even if no DL MU PPDU could be built.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • MaxCredits: Maximum amount of credits a station can have. When transmitting a DL MU PPDU, the amount of credits received by each station equals the TX duration (in microseconds) divided by the total number of stations. Stations that are the recipient of the DL MU PPDU have to pay a number of credits equal to the TX duration (in microseconds) times the allocated bandwidth share
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +1e+09ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • NStations: The maximum number of stations that can be granted an RU in a DL MU OFDMA transmission
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:74
    • Initial value: 4
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • UlPsduSize: The default size in bytes of the solicited PSDU (to be sent in a TB PPDU)
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 500
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • UseCentral26TonesRus: If enabled, central 26-tone RUs are allocated, too, when the selected RU type is at least 52 tones.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: constructwriteread
    • Support level: SUPPORTED

Attributes defined in parent class ns3::MultiUserScheduler

  • AccessReqAc: The Access Category for which the MultiUserScheduler makes requests for channel access.
    • Set with class: ns3::EnumValue<ns3::AcIndex>
    • Underlying type: AC_BE|AC_VI|AC_VO|AC_BK
    • Initial value: AC_BE
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • AccessReqInterval: Duration of the interval between two consecutive requests for channel access made by the MultiUserScheduler. Such requests are made independently of the presence of frames in the queues of the AP and are intended to allow the AP to coordinate UL MU transmissions even without DL traffic. A null duration indicates that such requests shall not be made.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • DefaultTbPpduDuration: Default duration of TB PPDUs solicited via a Basic Trigger Frame. This value is used to compute the Duration/ID field of BSRP Trigger Frames sent when the TXOP Limit is zero and the FrameExchangeManager continues the TXOP a SIFS after receiving response to the BSRP TF. This value shall also be used by subclasses when they have no other information available to determine the TX duration of solicited PPDUs. The default value roughly corresponds to half the maximum PPDU TX duration.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+06ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • DelayAccessReqUponAccess: If enabled, the access request interval is measured starting from the last time an EDCA function obtained channel access. Otherwise, the access request interval is measured starting from the last time the MultiUserScheduler made a request for channel access.
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: constructwriteread
    • Support level: SUPPORTED

No TraceSources are defined for this type.
Group: Wifi

Size of this type is 848 bytes (on a 64-bit architecture).

Definition at line 34 of file rr-multi-user-scheduler.h.

Member Typedef Documentation

◆ CandidateInfo

typedef std::pair<std::list<MasterInfo>::iterator, Ptr<WifiMpdu> > ns3::RrMultiUserScheduler::CandidateInfo
private

Information stored for candidate stations.

Definition at line 169 of file rr-multi-user-scheduler.h.

Constructor & Destructor Documentation

◆ RrMultiUserScheduler()

ns3::RrMultiUserScheduler::RrMultiUserScheduler ( )

Definition at line 90 of file rr-multi-user-scheduler.cc.

References NS_LOG_FUNCTION.

◆ ~RrMultiUserScheduler()

ns3::RrMultiUserScheduler::~RrMultiUserScheduler ( )
override

Definition at line 95 of file rr-multi-user-scheduler.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ CanSolicitStaInBasicTf()

bool ns3::RrMultiUserScheduler::CanSolicitStaInBasicTf ( const MasterInfo & info) const
protectedvirtual

Determine whether the given STA can be solicited via a Basic Trigger Frame.

Parameters
infothe information about the given STA
Returns
whether the given STA can be solicited via a Basic Trigger Frame

Definition at line 433 of file rr-multi-user-scheduler.cc.

References ns3::RrMultiUserScheduler::MasterInfo::address, CanSolicitStaInBsrpTf(), and ns3::MultiUserScheduler::m_apMac.

Referenced by TrySendingBasicTf().

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

◆ CanSolicitStaInBsrpTf()

bool ns3::RrMultiUserScheduler::CanSolicitStaInBsrpTf ( const MasterInfo & info) const
protectedvirtual

Determine whether the given STA can be solicited via a BSRP Trigger Frame.

Parameters
infothe information about the given STA
Returns
whether the given STA can be solicited via a BSRP Trigger Frame

Definition at line 282 of file rr-multi-user-scheduler.cc.

References ns3::AC_BE, ns3::RrMultiUserScheduler::MasterInfo::address, ns3::RrMultiUserScheduler::MasterInfo::aid, ns3::MultiUserScheduler::GetWifiRemoteStationManager(), ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_linkId, NS_LOG_DEBUG, NS_LOG_INFO, ns3::UPLINK, ns3::USING_OTHER_EMLSR_LINK, and ns3::WAITING_EMLSR_TRANSITION_DELAY.

Referenced by CanSolicitStaInBasicTf(), and TrySendingBsrpTf().

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

◆ ComputeDlMuInfo()

MultiUserScheduler::DlMuInfo ns3::RrMultiUserScheduler::ComputeDlMuInfo ( )
overrideprivatevirtual

Compute the information required to perform a DL MU transmission.

Returns
the information required to perform a DL MU transmission

Implements ns3::MultiUserScheduler.

Definition at line 1006 of file rr-multi-user-scheduler.cc.

References ns3::WifiTxParameters::m_txDuration, ns3::WifiTxParameters::m_txVector, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::MultiUserScheduler::DlMuInfo::psduMap, ns3::QosUtilsMapTidToAc(), and ns3::MultiUserScheduler::DlMuInfo::txParams.

+ Here is the call graph for this function:

◆ ComputeUlMuInfo()

MultiUserScheduler::UlMuInfo ns3::RrMultiUserScheduler::ComputeUlMuInfo ( )
overrideprivatevirtual

Prepare the information required to solicit an UL MU transmission.

Returns
the information required to solicit an UL MU transmission

Implements ns3::MultiUserScheduler.

Definition at line 1097 of file rr-multi-user-scheduler.cc.

◆ DoDispose()

void ns3::RrMultiUserScheduler::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

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

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

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

Reimplemented from ns3::MultiUserScheduler.

Definition at line 119 of file rr-multi-user-scheduler.cc.

References ns3::WifiTxParameters::Clear(), ns3::MultiUserScheduler::DoDispose(), ns3::MultiUserScheduler::m_apMac, m_candidates, m_staListDl, m_staListUl, m_txParams, ns3::MakeCallback(), NotifyStationAssociated(), NotifyStationDeassociated(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::RrMultiUserScheduler::DoInitialize ( )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::MultiUserScheduler.

Definition at line 101 of file rr-multi-user-scheduler.cc.

References ns3::MultiUserScheduler::DoInitialize(), ns3::MultiUserScheduler::m_apMac, m_staListDl, ns3::MakeCallback(), NotifyStationAssociated(), NotifyStationDeassociated(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::wifiAcList.

+ Here is the call graph for this function:

◆ FinalizeTxVector()

void ns3::RrMultiUserScheduler::FinalizeTxVector ( WifiTxVector & txVector)
private

Finalize the given TXVECTOR by only including the largest subset of the current set of candidate stations that can be allocated equal-sized RUs (with the possible exception of using central 26-tone RUs) without leaving RUs unallocated.

The given TXVECTOR must be a MU TXVECTOR and must contain an HeMuUserInfo entry for each candidate station. The finalized TXVECTOR contains a subset of such HeMuUserInfo entries. The set of candidate stations is also updated by removing stations that are not allocated an RU.

Parameters
txVectorthe given TXVECTOR

Definition at line 908 of file rr-multi-user-scheduler.cc.

References ns3::WifiTxVector::GetHeMuUserInfoMap(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiTxVector::SetHeMuUserInfo().

Referenced by GetTxVectorForUlMu().

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

◆ GetExtraTimeForBsrpTfDurationId()

Time ns3::RrMultiUserScheduler::GetExtraTimeForBsrpTfDurationId ( uint8_t linkId) const
overridevirtual

When the TXOP limit is zero and the TXOP continues a SIFS after receiving a response to a BSRP TF, the Duration/ID field of the BSRP TF should be extended to reserve the medium for the frame exchange following the BSRP TF.

This method is intended to return the estimated duration of the frame exchange following the BSRP TF (including the SIFS after the responses to the BSRP TF). Specifically, the base class method simply returns the default duration of TB PPDUs solicited via a Basic Trigger Frame. Subclasses can override this method to return a more accurate estimate of the time required by the following frame exchange.

This method should only be called when the MU scheduler has determined that a BSRP TF has to be sent on the given link.

Parameters
linkIdthe ID of the given link
Returns
the estimated duration of the frame exchange following the BSRP TF

Reimplemented from ns3::MultiUserScheduler.

Definition at line 634 of file rr-multi-user-scheduler.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::GetBlockAckSize(), ns3::CtrlTriggerHeader::GetHeTbTxVector(), ns3::MultiUserScheduler::GetWifiRemoteStationManager(), ns3::MultiUserScheduler::m_apMac, ns3::BlockAckType::m_bitmapLen, ns3::MultiUserScheduler::m_defaultTbPpduDuration, m_trigger, m_triggerTxDuration, ns3::BlockAckType::MULTI_STA, NS_ASSERT, and NS_ASSERT_MSG.

+ Here is the call graph for this function:

◆ GetTxVectorForUlMu()

WifiTxVector ns3::RrMultiUserScheduler::GetTxVectorForUlMu ( std::function< bool(const MasterInfo &)> canBeSolicited)
privatevirtual

Compute a TXVECTOR that can be used to construct a Trigger Frame to solicit transmissions from suitable stations, i.e., stations that have established a BlockAck agreement with the AP and for which the given predicate returns true.

Parameters
canBeSoliciteda predicate returning false for stations that shall not be solicited
Returns
a TXVECTOR that can be used to construct a Trigger Frame to solicit transmissions from suitable stations

Definition at line 173 of file rr-multi-user-scheduler.cc.

References FinalizeTxVector(), ns3::HeRu::GetEqualSizedRusForStations(), ns3::WifiTxVector::GetHeMuUserInfoMap(), ns3::WifiTxVector::GetPreambleType(), ns3::MultiUserScheduler::GetWifiRemoteStationManager(), ns3::MultiUserScheduler::m_allowedWidth, ns3::MultiUserScheduler::m_apMac, m_candidates, ns3::MultiUserScheduler::m_linkId, m_nStations, m_staListUl, m_useCentral26TonesRus, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiTxVector::SetBssColor(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetEhtPpduType(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetPreambleType(), ns3::WIFI_MAC_QOSDATA, ns3::WIFI_PREAMBLE_EHT_TB, and ns3::WIFI_PREAMBLE_HE_TB.

Referenced by TrySendingBasicTf(), and TrySendingBsrpTf().

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

◆ GetTypeId()

TypeId ns3::RrMultiUserScheduler::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 32 of file rr-multi-user-scheduler.cc.

References m_enableBsrp, m_enableTxopSharing, m_enableUlOfdma, m_forceDlOfdma, m_maxCredits, m_nStations, m_ulPsduSize, m_useCentral26TonesRus, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::Seconds(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ NotifyStationAssociated()

void ns3::RrMultiUserScheduler::NotifyStationAssociated ( uint16_t aid,
Mac48Address address )
private

Notify the scheduler that a station associated with the AP.

Parameters
aidthe AID of the station
addressthe MAC address of the station

Definition at line 677 of file rr-multi-user-scheduler.cc.

References ns3::MultiUserScheduler::m_apMac, m_staListDl, m_staListUl, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by DoDispose(), and DoInitialize().

+ Here is the caller graph for this function:

◆ NotifyStationDeassociated()

void ns3::RrMultiUserScheduler::NotifyStationDeassociated ( uint16_t aid,
Mac48Address address )
private

Notify the scheduler that a station deassociated with the AP.

Parameters
aidthe AID of the station
addressthe MAC address of the station

Definition at line 712 of file rr-multi-user-scheduler.cc.

References ns3::RrMultiUserScheduler::MasterInfo::aid, ns3::MultiUserScheduler::m_apMac, m_staListDl, m_staListUl, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by DoDispose(), and DoInitialize().

+ Here is the caller graph for this function:

◆ SelectTxFormat()

MultiUserScheduler::TxFormat ns3::RrMultiUserScheduler::SelectTxFormat ( )
overrideprivatevirtual

Select the format of the next transmission.

Returns
the format of the next transmission

Implements ns3::MultiUserScheduler.

Definition at line 136 of file rr-multi-user-scheduler.cc.

References ns3::BSRP_TRIGGER, ns3::MultiUserScheduler::DL_MU_TX, ns3::MultiUserScheduler::GetLastTxFormat(), ns3::CtrlTriggerHeader::GetType(), ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_edca, m_enableBsrp, m_enableUlOfdma, ns3::MultiUserScheduler::m_initialFrame, ns3::MultiUserScheduler::m_linkId, m_trigger, NS_LOG_FUNCTION, ns3::QosTxop::PeekNextMpdu(), ns3::MultiUserScheduler::SU_TX, TrySendingBasicTf(), TrySendingBsrpTf(), and TrySendingDlMuPpdu().

+ Here is the call graph for this function:

◆ TrySendingBasicTf()

MultiUserScheduler::TxFormat ns3::RrMultiUserScheduler::TrySendingBasicTf ( )
privatevirtual

Check if it is possible to send a Basic Trigger Frame given the current time limits.

Returns
UL_MU_TX if it is possible to send a Basic TF, DL_MU_TX if we can try to send a DL MU PPDU and NO_TX if the remaining time is too short

Definition at line 446 of file rr-multi-user-scheduler.cc.

References ns3::Time::As(), ns3::BASIC_TRIGGER, ns3::WifiPhy::CalculateTxDuration(), CanSolicitStaInBasicTf(), ns3::WifiTxParameters::Clear(), ns3::HePhy::ConvertHeTbPpduDurationToLSigLength(), ns3::MultiUserScheduler::DL_MU_TX, ns3::QosTxop::GetAccessCategory(), ns3::WifiMacHeader::GetAddr1(), ns3::CtrlTriggerHeader::GetGuardInterval(), ns3::MultiUserScheduler::GetHeFem(), ns3::GetPpduMaxTime(), ns3::MultiUserScheduler::GetTriggerFrame(), GetTxVectorForUlMu(), ns3::Time::IsNegative(), ns3::Time::IsZero(), ns3::WifiTxParameters::m_acknowledgment, ns3::MultiUserScheduler::m_allowedWidth, ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_availableTime, ns3::MultiUserScheduler::m_edca, ns3::MultiUserScheduler::m_linkId, ns3::WifiTxParameters::m_protection, m_staListUl, m_trigger, m_triggerMacHdr, m_triggerTxDuration, ns3::WifiTxParameters::m_txDuration, m_txParams, ns3::WifiTxParameters::m_txVector, m_ulPsduSize, Max, Min, ns3::Time::Min(), ns3::Time::MS, ns3::MultiUserScheduler::NO_TX, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, queueSize, ns3::CtrlTriggerHeader::SetUlLength(), ns3::MultiUserScheduler::SU_TX, ns3::MultiUserScheduler::UL_MU_TX, and UpdateCredits().

Referenced by SelectTxFormat().

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

◆ TrySendingBsrpTf()

MultiUserScheduler::TxFormat ns3::RrMultiUserScheduler::TrySendingBsrpTf ( )
privatevirtual

Check if it is possible to send a BSRP Trigger Frame given the current time limits.

Returns
UL_MU_TX if it is possible to send a BSRP TF, NO_TX otherwise

Definition at line 335 of file rr-multi-user-scheduler.cc.

References ns3::Time::As(), ns3::CtrlTriggerHeader::begin(), ns3::BSRP_TRIGGER, ns3::WifiPhy::CalculateTxDuration(), CanSolicitStaInBsrpTf(), ns3::WifiTxParameters::Clear(), ns3::HePhy::ConvertHeTbPpduDurationToLSigLength(), ns3::Create(), ns3::MultiUserScheduler::DL_MU_TX, ns3::DynamicCast(), ns3::WifiMacHeader::GetAddr1(), ns3::CtrlTriggerHeader::GetGuardInterval(), ns3::MultiUserScheduler::GetHeFem(), ns3::CtrlTriggerHeader::GetHeTbTxVector(), ns3::MultiUserScheduler::GetMaxSizeOfQosNullAmpdu(), ns3::CtrlTriggerHeader::GetPaddingSize(), ns3::MultiUserScheduler::GetTriggerFrame(), GetTxVectorForUlMu(), ns3::WifiTxParameters::m_acknowledgment, ns3::MultiUserScheduler::m_allowedWidth, ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_availableTime, ns3::MultiUserScheduler::m_linkId, ns3::WifiTxParameters::m_protection, m_staListUl, m_trigger, m_triggerMacHdr, m_triggerTxDuration, ns3::WifiTxParameters::m_txDuration, m_txParams, ns3::WifiTxParameters::m_txVector, Max, ns3::Time::Min(), ns3::Time::MS, ns3::MultiUserScheduler::NO_TX, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::CtrlTriggerHeader::SetUlLength(), ns3::MultiUserScheduler::SU_TX, and ns3::MultiUserScheduler::UL_MU_TX.

Referenced by SelectTxFormat().

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

◆ TrySendingDlMuPpdu()

MultiUserScheduler::TxFormat ns3::RrMultiUserScheduler::TrySendingDlMuPpdu ( )
privatevirtual

Check if it is possible to send a DL MU PPDU given the current time limits.

Returns
DL_MU_TX if it is possible to send a DL MU PPDU, SU_TX if a SU PPDU can be transmitted (e.g., there are no HE stations associated or sending a DL MU PPDU is not possible and m_forceDlOfdma is false) or NO_TX otherwise

Definition at line 738 of file rr-multi-user-scheduler.cc.

References ns3::WifiTxParameters::Clear(), ns3::QosTxop::GetAccessCategory(), ns3::WifiTxVector::GetChannelWidth(), ns3::HeRu::GetEqualSizedRusForStations(), ns3::MultiUserScheduler::GetHeFem(), ns3::WifiMode::GetMcsValue(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetNss(), ns3::WifiTxVector::GetPreambleType(), ns3::MultiUserScheduler::GetWifiRemoteStationManager(), ns3::MultiUserScheduler::m_allowedWidth, ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_availableTime, m_candidates, ns3::MultiUserScheduler::m_edca, m_enableTxopSharing, ns3::MultiUserScheduler::m_initialFrame, ns3::MultiUserScheduler::m_linkId, m_nStations, m_staListDl, m_txParams, ns3::WifiTxParameters::m_txVector, m_useCentral26TonesRus, ns3::Time::Min(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosTxop::PeekNextMpdu(), ns3::QosUtilsMapTidToAc(), ns3::HeRu::RU_26_TONE, ns3::WifiTxVector::SetBssColor(), ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetEhtPpduType(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetHeMuUserInfo(), ns3::WifiTxVector::SetPreambleType(), ns3::MultiUserScheduler::SU_TX, ns3::WIFI_PREAMBLE_EHT_MU, ns3::WIFI_PREAMBLE_HE_MU, and ns3::wifiAcList.

Referenced by SelectTxFormat().

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

◆ UpdateCredits()

void ns3::RrMultiUserScheduler::UpdateCredits ( std::list< MasterInfo > & staList,
Time txDuration,
const WifiTxVector & txVector )
private

Update credits of the stations in the given list considering that a PPDU having the given duration is being transmitted or solicited by using the given TXVECTOR.

Parameters
staListthe list of stations
txDurationthe TX duration of the PPDU being transmitted or solicited
txVectorthe TXVECTOR for the PPDU being transmitted or solicited

Definition at line 961 of file rr-multi-user-scheduler.cc.

References ns3::Time::As(), ns3::RrMultiUserScheduler::MasterInfo::credits, ns3::WifiTxVector::GetHeMuUserInfoMap(), NS_ASSERT, NS_LOG_FUNCTION, and ns3::Time::ToDouble().

Referenced by TrySendingBasicTf().

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

◆ UpdateDlMuAfterProtection()

void ns3::RrMultiUserScheduler::UpdateDlMuAfterProtection ( uint8_t linkId,
WifiPsduMap & psduMap,
WifiTxParameters & txParams ) const
overrideprotectedvirtual

Update the given PSDU map after protection is completed on the given link.

Parameters
linkIdthe ID of the given link
psduMapthe given PSDU map
txParamsthe TX parameters for the DL MU transmission

Reimplemented from ns3::MultiUserScheduler.

Definition at line 623 of file rr-multi-user-scheduler.cc.

References ns3::MultiUserScheduler::m_isUnprotectedEmlsrClient, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::MultiUserScheduler::RemoveRecipientsFromDlMu().

+ Here is the call graph for this function:

◆ UpdateTriggerFrameAfterProtection()

void ns3::RrMultiUserScheduler::UpdateTriggerFrameAfterProtection ( uint8_t linkId,
CtrlTriggerHeader & trigger,
WifiTxParameters & txParams ) const
overrideprotectedvirtual

Update the given Trigger Frame after protection is completed on the given link.

Parameters
linkIdthe ID of the given link
triggerthe given Trigger Frame
txParamsthe TX parameters for the UL MU transmission

Reimplemented from ns3::MultiUserScheduler.

Definition at line 605 of file rr-multi-user-scheduler.cc.

References ns3::CtrlTriggerHeader::IsBsrp(), ns3::MultiUserScheduler::m_isUnprotectedEmlsrClient, NS_LOG_FUNCTION, NS_LOG_INFO, and ns3::MultiUserScheduler::RemoveRecipientsFromTf().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_candidates

std::list<CandidateInfo> ns3::RrMultiUserScheduler::m_candidates
private

Candidate stations for MU TX.

Definition at line 181 of file rr-multi-user-scheduler.h.

Referenced by DoDispose(), GetTxVectorForUlMu(), and TrySendingDlMuPpdu().

◆ m_enableBsrp

bool ns3::RrMultiUserScheduler::m_enableBsrp
private

send a BSRP before an UL MU transmission

Definition at line 175 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId(), and SelectTxFormat().

◆ m_enableTxopSharing

bool ns3::RrMultiUserScheduler::m_enableTxopSharing
private

allow A-MPDUs of different TIDs in a DL MU PPDU

Definition at line 172 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId(), and TrySendingDlMuPpdu().

◆ m_enableUlOfdma

bool ns3::RrMultiUserScheduler::m_enableUlOfdma
private

enable the scheduler to also return UL_OFDMA

Definition at line 174 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId(), and SelectTxFormat().

◆ m_forceDlOfdma

bool ns3::RrMultiUserScheduler::m_forceDlOfdma
private

return DL_OFDMA even if no DL MU PPDU was built

Definition at line 173 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId().

◆ m_maxCredits

Time ns3::RrMultiUserScheduler::m_maxCredits
private

Max amount of credits a station can have.

Definition at line 182 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId().

◆ m_nStations

uint8_t ns3::RrMultiUserScheduler::m_nStations
private

Number of stations/slots to fill.

Definition at line 171 of file rr-multi-user-scheduler.h.

Referenced by GetTxVectorForUlMu(), GetTypeId(), and TrySendingDlMuPpdu().

◆ m_staListDl

std::map<AcIndex, std::list<MasterInfo> > ns3::RrMultiUserScheduler::m_staListDl
private

Per-AC list of stations (next to serve for DL first)

Definition at line 179 of file rr-multi-user-scheduler.h.

Referenced by DoDispose(), DoInitialize(), NotifyStationAssociated(), NotifyStationDeassociated(), and TrySendingDlMuPpdu().

◆ m_staListUl

std::list<MasterInfo> ns3::RrMultiUserScheduler::m_staListUl
private

◆ m_trigger

CtrlTriggerHeader ns3::RrMultiUserScheduler::m_trigger
private

Trigger Frame to send.

Definition at line 183 of file rr-multi-user-scheduler.h.

Referenced by GetExtraTimeForBsrpTfDurationId(), SelectTxFormat(), TrySendingBasicTf(), and TrySendingBsrpTf().

◆ m_triggerMacHdr

WifiMacHeader ns3::RrMultiUserScheduler::m_triggerMacHdr
private

MAC header for Trigger Frame.

Definition at line 184 of file rr-multi-user-scheduler.h.

Referenced by TrySendingBasicTf(), and TrySendingBsrpTf().

◆ m_triggerTxDuration

Time ns3::RrMultiUserScheduler::m_triggerTxDuration {0}
private

Trigger Frame TX duration.

Definition at line 185 of file rr-multi-user-scheduler.h.

Referenced by GetExtraTimeForBsrpTfDurationId(), TrySendingBasicTf(), and TrySendingBsrpTf().

◆ m_txParams

WifiTxParameters ns3::RrMultiUserScheduler::m_txParams
private

TX parameters.

Definition at line 186 of file rr-multi-user-scheduler.h.

Referenced by DoDispose(), TrySendingBasicTf(), TrySendingBsrpTf(), and TrySendingDlMuPpdu().

◆ m_ulPsduSize

uint32_t ns3::RrMultiUserScheduler::m_ulPsduSize
private

the size in byte of the solicited PSDU

Definition at line 177 of file rr-multi-user-scheduler.h.

Referenced by GetTypeId(), and TrySendingBasicTf().

◆ m_useCentral26TonesRus

bool ns3::RrMultiUserScheduler::m_useCentral26TonesRus
private

whether to allocate central 26-tone RUs

Definition at line 176 of file rr-multi-user-scheduler.h.

Referenced by GetTxVectorForUlMu(), GetTypeId(), and TrySendingDlMuPpdu().


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