MultiUserScheduler is an abstract base class defining the API that APs supporting at least VHT can use to determine the format of their next transmission. More...
#include "multi-user-scheduler.h"
Classes | |
struct | DlMuInfo |
Information to be provided in case of DL MU transmission. More... | |
struct | UlMuInfo |
Information to be provided in case of UL MU transmission. More... | |
Public Types | |
enum | TxFormat { NO_TX = 0 , SU_TX , DL_MU_TX , UL_MU_TX } |
Enumeration of the possible transmission formats. More... | |
Public Member Functions | |
MultiUserScheduler () | |
~MultiUserScheduler () override | |
DlMuInfo & | GetDlMuInfo () |
Get the information required to perform a DL MU transmission. More... | |
UlMuInfo & | GetUlMuInfo () |
Get the information required to solicit an UL MU transmission. More... | |
TxFormat | NotifyAccessGranted (Ptr< QosTxop > edca, Time availableTime, bool initialFrame, uint16_t allowedWidth) |
Notify the Multi-user Scheduler that the given AC of the AP gained channel access. More... | |
![]() | |
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... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
![]() | |
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 erros. More... | |
virtual TypeId | GetInstanceTypeId () const =0 |
Get the most derived TypeId for this Object. 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 TypeId | GetTypeId () |
Register this type. More... | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Protected Member Functions | |
void | DoDispose () override |
Destructor implementation. More... | |
void | DoInitialize () override |
Initialize() implementation. More... | |
TxFormat | GetLastTxFormat () const |
Get the format of the last transmission, as determined by the last call to NotifyAccessGranted that did not return NO_TX. More... | |
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. More... | |
Ptr< WifiMpdu > | GetTriggerFrame (const CtrlTriggerHeader &trigger) const |
Get an MPDU containing the given Trigger Frame. More... | |
Ptr< WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
Get the station manager attached to the AP. More... | |
void | NotifyNewAggregate () override |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoDispose () |
Destructor implementation. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
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 | |
uint16_t | m_allowedWidth |
the allowed width in MHz for the current transmission More... | |
Ptr< ApWifiMac > | m_apMac |
the AP wifi MAC More... | |
Time | m_availableTime |
the time available for frame exchange More... | |
Ptr< QosTxop > | m_edca |
the AC that gained channel access More... | |
Ptr< HeFrameExchangeManager > | m_heFem |
HE Frame Exchange Manager. More... | |
bool | m_initialFrame |
true if a TXOP is being started More... | |
Private Member Functions | |
void | AccessReqTimeout () |
Perform actions required on expiration of the channel access request timer, such as requesting channel access (if not requested already) and restarting the channel access request timer. More... | |
void | CheckTriggerFrame () |
Ensure that the Trigger Frame returned in case of UL MU transmission is correct. More... | |
virtual DlMuInfo | ComputeDlMuInfo ()=0 |
Compute the information required to perform a DL MU transmission. More... | |
virtual UlMuInfo | ComputeUlMuInfo ()=0 |
Prepare the information required to solicit an UL MU transmission. More... | |
virtual TxFormat | SelectTxFormat ()=0 |
Select the format of the next transmission. More... | |
void | SetWifiMac (Ptr< ApWifiMac > mac) |
Set the wifi MAC. More... | |
Private Attributes | |
AcIndex | m_accessReqAc |
AC we request channel access for. More... | |
Time | m_accessReqInterval |
duration of the interval between channel access requests More... | |
EventId | m_accessReqTimer |
the timer controlling additional channel access requests More... | |
DlMuInfo | m_dlInfo |
information required to perform a DL MU transmission More... | |
TxFormat | m_lastTxFormat {NO_TX} |
the format of last transmission More... | |
bool | m_restartTimerUponAccess |
whether the channel access timer has to be restarted upon channel access More... | |
UlMuInfo | m_ulInfo |
information required to solicit an UL MU transmission More... | |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
MultiUserScheduler is an abstract base class defining the API that APs supporting at least VHT can use to determine the format of their next transmission.
Introspection did not find any typical Config paths.
VHT APs can only transmit DL MU PPDUs by using MU-MIMO, while HE APs can transmit both DL MU PPDUs and UL MU PPDUs by using OFDMA in addition to MU-MIMO.
However, given that DL MU-MIMO is not yet supported, a MultiUserScheduler can only be aggregated to HE APs.
Time
+9.22337e+18ns:+9.22337e+18ns AC_BE|AC_VI|AC_VO|AC_BK
No TraceSources are defined for this type.
Size of this type is 712 bytes (on a 64-bit architecture).
Definition at line 51 of file multi-user-scheduler.h.
Enumeration of the possible transmission formats.
Enumerator | |
---|---|
NO_TX | |
SU_TX | |
DL_MU_TX | |
UL_MU_TX |
Definition at line 63 of file multi-user-scheduler.h.
ns3::MultiUserScheduler::MultiUserScheduler | ( | ) |
Definition at line 81 of file multi-user-scheduler.cc.
|
override |
Definition at line 85 of file multi-user-scheduler.cc.
References NS_LOG_FUNCTION_NOARGS.
|
private |
Perform actions required on expiration of the channel access request timer, such as requesting channel access (if not requested already) and restarting the channel access request timer.
Definition at line 155 of file multi-user-scheduler.cc.
References AccessReqTimeout(), ns3::WifiMac::GetChannelAccessManager(), ns3::WifiMac::GetQosTxop(), m_accessReqAc, m_accessReqInterval, m_accessReqTimer, m_apMac, ns3::Txop::NOT_REQUESTED, NS_LOG_FUNCTION, ns3::ChannelAccessManager::RequestAccess(), ns3::Simulator::Schedule(), and ns3::SINGLE_LINK_OP_ID.
Referenced by AccessReqTimeout(), DoInitialize(), and NotifyAccessGranted().
|
private |
Ensure that the Trigger Frame returned in case of UL MU transmission is correct.
Currently, this method sets the CS Required, the AP Tx Power and the UL Target Receive Power subfields.
Definition at line 271 of file multi-user-scheduler.cc.
References ns3::CtrlTriggerHeader::GetUlLength(), m_heFem, m_ulInfo, NS_LOG_FUNCTION, ns3::CtrlTriggerHeader::SetCsRequired(), and ns3::MultiUserScheduler::UlMuInfo::trigger.
Referenced by NotifyAccessGranted().
|
privatepure virtual |
Compute the information required to perform a DL MU transmission.
Implemented in ns3::RrMultiUserScheduler, and TestMultiUserScheduler.
Referenced by NotifyAccessGranted().
|
privatepure virtual |
Prepare the information required to solicit an UL MU transmission.
Implemented in ns3::RrMultiUserScheduler, and TestMultiUserScheduler.
Referenced by NotifyAccessGranted().
|
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.
Reimplemented in ns3::RrMultiUserScheduler.
Definition at line 91 of file multi-user-scheduler.cc.
References ns3::EventId::Cancel(), ns3::WifiTxParameters::Clear(), ns3::Object::DoDispose(), m_accessReqTimer, m_apMac, m_dlInfo, m_edca, m_heFem, m_ulInfo, NS_LOG_FUNCTION, ns3::MultiUserScheduler::DlMuInfo::psduMap, ns3::MultiUserScheduler::DlMuInfo::txParams, and ns3::MultiUserScheduler::UlMuInfo::txParams.
Referenced by ns3::RrMultiUserScheduler::DoDispose().
|
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::Object.
Reimplemented in ns3::RrMultiUserScheduler.
Definition at line 122 of file multi-user-scheduler.cc.
References AccessReqTimeout(), ns3::Time::IsStrictlyPositive(), m_accessReqInterval, m_accessReqTimer, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by ns3::RrMultiUserScheduler::DoInitialize().
MultiUserScheduler::DlMuInfo & ns3::MultiUserScheduler::GetDlMuInfo | ( | ) |
Get the information required to perform a DL MU transmission.
Note that this method can only be called if GetTxFormat returns DL_MU_TX.
Definition at line 220 of file multi-user-scheduler.cc.
References DL_MU_TX, GetWifiRemoteStationManager(), m_dlInfo, m_lastTxFormat, NS_ABORT_MSG_IF, and ns3::MultiUserScheduler::DlMuInfo::psduMap.
|
protected |
Get the format of the last transmission, as determined by the last call to NotifyAccessGranted that did not return NO_TX.
Definition at line 214 of file multi-user-scheduler.cc.
References m_lastTxFormat.
Referenced by ns3::RrMultiUserScheduler::SelectTxFormat().
|
protected |
Get the maximum size in bytes among the A-MPDUs containing QoS Null frames and solicited by the given (BSRP) Trigger Frame.
For each station addressed by the Trigger Frame, the expected response is an A-MPDU containing as many QoS Null frames as the number of TIDs for which a BlockAck agreement has been established between the station and the AP.
trigger | the given Trigger Frame |
Definition at line 283 of file multi-user-scheduler.cc.
References ns3::WifiMacHeader::GetSerializedSize(), ns3::MpduAggregator::GetSizeIfAggregated(), ns3::ApWifiMac::GetStaList(), m_apMac, m_heFem, max, NS_ASSERT, ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsTo(), ns3::WIFI_MAC_FCS_LENGTH, and ns3::WIFI_MAC_QOSDATA_NULL.
Referenced by TestMultiUserScheduler::SelectTxFormat(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().
|
protected |
Get an MPDU containing the given Trigger Frame.
trigger | the given Trigger Frame |
Definition at line 245 of file multi-user-scheduler.cc.
References ns3::Packet::AddHeader(), ns3::CtrlTriggerHeader::begin(), ns3::WifiMac::GetAddress(), ns3::Mac48Address::GetBroadcast(), ns3::CtrlTriggerHeader::GetNUserInfoFields(), ns3::ApWifiMac::GetStaList(), m_apMac, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), and ns3::WIFI_MAC_CTL_TRIGGER.
Referenced by ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingBsrpTf().
|
static |
Get the type ID.
Definition at line 40 of file multi-user-scheduler.cc.
References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_accessReqAc, m_accessReqInterval, m_restartTimerUponAccess, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::Seconds(), and ns3::TypeId::SetParent().
MultiUserScheduler::UlMuInfo & ns3::MultiUserScheduler::GetUlMuInfo | ( | ) |
Get the information required to solicit an UL MU transmission.
Note that this method can only be called if GetTxFormat returns UL_MU_TX.
Definition at line 237 of file multi-user-scheduler.cc.
References m_lastTxFormat, m_ulInfo, NS_ABORT_MSG_IF, and UL_MU_TX.
|
protected |
Get the station manager attached to the AP.
Definition at line 149 of file multi-user-scheduler.cc.
References ns3::WifiMac::GetWifiRemoteStationManager(), and m_apMac.
Referenced by TestMultiUserScheduler::ComputeWifiTxVector(), GetDlMuInfo(), ns3::RrMultiUserScheduler::GetTxVectorForUlMu(), ns3::RrMultiUserScheduler::NotifyStationAssociated(), ns3::RrMultiUserScheduler::NotifyStationDeassociated(), ns3::RrMultiUserScheduler::SelectTxFormat(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
MultiUserScheduler::TxFormat ns3::MultiUserScheduler::NotifyAccessGranted | ( | Ptr< QosTxop > | edca, |
Time | availableTime, | ||
bool | initialFrame, | ||
uint16_t | allowedWidth | ||
) |
Notify the Multi-user Scheduler that the given AC of the AP gained channel access.
The Multi-user Scheduler determines the format of the next transmission.
edca | the EDCAF which has been granted the opportunity to transmit |
availableTime | the amount of time allowed for the frame exchange. Pass Time::Min() in case the TXOP limit is null |
initialFrame | true if the frame being transmitted is the initial frame of the TXOP. This is used to determine whether the TXOP limit can be exceeded |
allowedWidth | the allowed width in MHz for the next transmission |
Definition at line 173 of file multi-user-scheduler.cc.
References AccessReqTimeout(), ns3::EventId::Cancel(), CheckTriggerFrame(), ComputeDlMuInfo(), ComputeUlMuInfo(), DL_MU_TX, ns3::EventId::IsRunning(), m_accessReqInterval, m_accessReqTimer, m_allowedWidth, m_availableTime, m_dlInfo, m_edca, m_heFem, m_initialFrame, m_lastTxFormat, m_restartTimerUponAccess, m_ulInfo, NO_TX, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), SelectTxFormat(), and UL_MU_TX.
|
overrideprotectedvirtual |
Notify all Objects aggregated to this one of a new Object being aggregated.
This function must be implemented in the stack that needs to notify other stacks connected to the node of their presence in the node.
This method is invoked whenever two sets of Objects are aggregated together. It is invoked exactly once for each Object in both sets. This method can be overridden by subclasses who wish to be notified of aggregation events. These subclasses must chain up to their base class NotifyNewAggregate() method.
It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 105 of file multi-user-scheduler.cc.
References m_apMac, ns3::Object::NotifyNewAggregate(), NS_LOG_FUNCTION, and SetWifiMac().
|
privatepure virtual |
Select the format of the next transmission.
Implemented in ns3::RrMultiUserScheduler, and TestMultiUserScheduler.
Referenced by NotifyAccessGranted().
Set the wifi MAC.
Note that it must be the MAC of an HE AP.
mac | the AP wifi MAC |
Definition at line 134 of file multi-user-scheduler.cc.
References ns3::WifiMac::GetFrameExchangeManager(), ns3::WifiMac::GetHeConfiguration(), m_apMac, m_heFem, third::mac, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.
Referenced by NotifyNewAggregate().
|
private |
AC we request channel access for.
Definition at line 216 of file multi-user-scheduler.h.
Referenced by AccessReqTimeout(), and GetTypeId().
|
private |
duration of the interval between channel access requests
Definition at line 215 of file multi-user-scheduler.h.
Referenced by AccessReqTimeout(), DoInitialize(), GetTypeId(), and NotifyAccessGranted().
|
private |
the timer controlling additional channel access requests
Definition at line 214 of file multi-user-scheduler.h.
Referenced by AccessReqTimeout(), DoDispose(), DoInitialize(), and NotifyAccessGranted().
|
protected |
the allowed width in MHz for the current transmission
Definition at line 166 of file multi-user-scheduler.h.
Referenced by ns3::RrMultiUserScheduler::GetTxVectorForUlMu(), NotifyAccessGranted(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
the AP wifi MAC
Definition at line 161 of file multi-user-scheduler.h.
Referenced by AccessReqTimeout(), TestMultiUserScheduler::ComputeWifiTxVector(), DoDispose(), ns3::RrMultiUserScheduler::DoDispose(), ns3::RrMultiUserScheduler::DoInitialize(), GetMaxSizeOfQosNullAmpdu(), GetTriggerFrame(), ns3::RrMultiUserScheduler::GetTxVectorForUlMu(), GetWifiRemoteStationManager(), NotifyNewAggregate(), TestMultiUserScheduler::SelectTxFormat(), SetWifiMac(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
|
protected |
the time available for frame exchange
Definition at line 164 of file multi-user-scheduler.h.
Referenced by NotifyAccessGranted(), TestMultiUserScheduler::SelectTxFormat(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
|
private |
information required to perform a DL MU transmission
Definition at line 212 of file multi-user-scheduler.h.
Referenced by DoDispose(), GetDlMuInfo(), and NotifyAccessGranted().
the AC that gained channel access
Definition at line 163 of file multi-user-scheduler.h.
Referenced by DoDispose(), NotifyAccessGranted(), ns3::RrMultiUserScheduler::SelectTxFormat(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
|
protected |
HE Frame Exchange Manager.
Definition at line 162 of file multi-user-scheduler.h.
Referenced by CheckTriggerFrame(), DoDispose(), GetMaxSizeOfQosNullAmpdu(), ns3::RrMultiUserScheduler::GetTxVectorForUlMu(), NotifyAccessGranted(), TestMultiUserScheduler::SelectTxFormat(), SetWifiMac(), ns3::RrMultiUserScheduler::TrySendingBasicTf(), ns3::RrMultiUserScheduler::TrySendingBsrpTf(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
|
protected |
true if a TXOP is being started
Definition at line 165 of file multi-user-scheduler.h.
Referenced by NotifyAccessGranted(), TestMultiUserScheduler::SelectTxFormat(), and ns3::RrMultiUserScheduler::TrySendingDlMuPpdu().
the format of last transmission
Definition at line 211 of file multi-user-scheduler.h.
Referenced by GetDlMuInfo(), GetLastTxFormat(), GetUlMuInfo(), and NotifyAccessGranted().
|
private |
whether the channel access timer has to be restarted upon channel access
Definition at line 217 of file multi-user-scheduler.h.
Referenced by GetTypeId(), and NotifyAccessGranted().
|
private |
information required to solicit an UL MU transmission
Definition at line 213 of file multi-user-scheduler.h.
Referenced by CheckTriggerFrame(), DoDispose(), GetUlMuInfo(), and NotifyAccessGranted().