A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
TestMultiUserScheduler Class Reference

Dummy Multi User Scheduler used to test OFDMA ack sequences. More...

+ Inheritance diagram for TestMultiUserScheduler:
+ Collaboration diagram for TestMultiUserScheduler:

Public Member Functions

 TestMultiUserScheduler ()
 
 ~TestMultiUserScheduler () override
 
- 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.
 
virtual Time GetExtraTimeForBsrpTfDurationId (uint8_t linkId) const
 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.
 
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.
 

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 ComputeWifiTxVector ()
 Compute the TX vector to use for MU PPDUs.
 
TxFormat SelectTxFormat () override
 Select the format of the next transmission.
 

Private Attributes

WifiModulationClass m_modClass
 modulation class for DL MU PPDUs and TB PPDUs
 
WifiPsduMap m_psduMap
 the DL MU PPDU to transmit
 
CtrlTriggerHeader m_trigger
 Trigger Frame to send.
 
WifiMacHeader m_triggerHdr
 MAC header for Trigger Frame.
 
TxFormat m_txFormat
 the format of next transmission
 
WifiTxParameters m_txParams
 TX parameters.
 
WifiTxVector m_txVector
 the TX vector for MU PPDUs
 
TriggerFrameType m_ulTriggerType
 Trigger Frame type for UL MU.
 

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 Member Functions inherited from ns3::MultiUserScheduler
void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
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.
 
virtual void UpdateDlMuAfterProtection (uint8_t linkId, WifiPsduMap &psduMap, WifiTxParameters &txParams) const
 Update the given PSDU map after protection is completed on the given link.
 
virtual void UpdateTriggerFrameAfterProtection (uint8_t linkId, CtrlTriggerHeader &trigger, WifiTxParameters &txParams) const
 Update the given Trigger Frame after protection is completed on the given link.
 
- 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.
 
- 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

Dummy Multi User Scheduler used to test OFDMA ack sequences.

This Multi User Scheduler returns SU_TX until the simulation time reaches 1.5 seconds (when all BA agreements have been established). Afterwards, it cycles through UL_MU_TX (with a BSRP Trigger Frame), UL_MU_TX (with a Basic Trigger Frame) and DL_MU_TX. This scheduler requires that 4 stations are associated with the AP.

Definition at line 50 of file wifi-mac-ofdma-test.cc.

Constructor & Destructor Documentation

◆ TestMultiUserScheduler()

TestMultiUserScheduler::TestMultiUserScheduler ( )

Definition at line 101 of file wifi-mac-ofdma-test.cc.

References NS_LOG_FUNCTION.

◆ ~TestMultiUserScheduler()

TestMultiUserScheduler::~TestMultiUserScheduler ( )
override

Definition at line 108 of file wifi-mac-ofdma-test.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

◆ ComputeDlMuInfo()

MultiUserScheduler::DlMuInfo TestMultiUserScheduler::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 344 of file wifi-mac-ofdma-test.cc.

References m_psduMap, m_txParams, and NS_LOG_FUNCTION.

◆ ComputeUlMuInfo()

MultiUserScheduler::UlMuInfo TestMultiUserScheduler::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 351 of file wifi-mac-ofdma-test.cc.

References m_trigger, m_triggerHdr, m_txParams, and NS_LOG_FUNCTION.

◆ ComputeWifiTxVector()

void TestMultiUserScheduler::ComputeWifiTxVector ( )
private

◆ GetTypeId()

TypeId TestMultiUserScheduler::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 85 of file wifi-mac-ofdma-test.cc.

References m_modClass, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::TypeId::SetParent(), ns3::WIFI_MOD_CLASS_EHT, and ns3::WIFI_MOD_CLASS_HE.

+ Here is the call graph for this function:

◆ SelectTxFormat()

MultiUserScheduler::TxFormat TestMultiUserScheduler::SelectTxFormat ( )
overrideprivatevirtual

Select the format of the next transmission.

Returns
the format of the next transmission

Implements ns3::MultiUserScheduler.

Definition at line 114 of file wifi-mac-ofdma-test.cc.

References ns3::CtrlTriggerHeader::begin(), ns3::WifiPhy::CalculateTxDuration(), ns3::WifiTxParameters::Clear(), ComputeWifiTxVector(), ns3::HePhy::ConvertHeTbPpduDurationToLSigLength(), ns3::Create(), ns3::MultiUserScheduler::DL_MU_TX, ns3::WifiMacHeader::GetAddr1(), ns3::Mac48Address::GetBroadcast(), ns3::CtrlTriggerHeader::GetGuardInterval(), ns3::MultiUserScheduler::GetHeFem(), ns3::CtrlTriggerHeader::GetHeTbTxVector(), ns3::MultiUserScheduler::GetMaxSizeOfQosNullAmpdu(), ns3::WifiTxParameters::m_acknowledgment, ns3::MultiUserScheduler::m_allowedWidth, ns3::MultiUserScheduler::m_apMac, ns3::MultiUserScheduler::m_availableTime, ns3::MultiUserScheduler::m_initialFrame, m_modClass, ns3::WifiTxParameters::m_protection, m_psduMap, m_trigger, m_triggerHdr, ns3::WifiTxParameters::m_txDuration, m_txFormat, m_txParams, ns3::WifiTxParameters::m_txVector, m_txVector, m_ulTriggerType, ns3::Time::Min(), ns3::Simulator::Now(), NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Seconds(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiTxVector::SetGuardInterval(), ns3::WifiTxVector::SetPreambleType(), ns3::CtrlTriggerHeader::SetUlLength(), ns3::SINGLE_LINK_OP_ID, ns3::MultiUserScheduler::SU_TX, ns3::MultiUserScheduler::UL_MU_TX, ns3::WIFI_MAC_CTL_TRIGGER, ns3::WIFI_MOD_CLASS_HE, ns3::WIFI_PREAMBLE_EHT_TB, and ns3::WIFI_PREAMBLE_HE_TB.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_modClass

WifiModulationClass TestMultiUserScheduler::m_modClass
private

modulation class for DL MU PPDUs and TB PPDUs

Definition at line 79 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeWifiTxVector(), GetTypeId(), and SelectTxFormat().

◆ m_psduMap

WifiPsduMap TestMultiUserScheduler::m_psduMap
private

the DL MU PPDU to transmit

Definition at line 78 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeDlMuInfo(), and SelectTxFormat().

◆ m_trigger

CtrlTriggerHeader TestMultiUserScheduler::m_trigger
private

Trigger Frame to send.

Definition at line 74 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeUlMuInfo(), and SelectTxFormat().

◆ m_triggerHdr

WifiMacHeader TestMultiUserScheduler::m_triggerHdr
private

MAC header for Trigger Frame.

Definition at line 75 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeUlMuInfo(), and SelectTxFormat().

◆ m_txFormat

TxFormat TestMultiUserScheduler::m_txFormat
private

the format of next transmission

Definition at line 72 of file wifi-mac-ofdma-test.cc.

Referenced by SelectTxFormat().

◆ m_txParams

WifiTxParameters TestMultiUserScheduler::m_txParams
private

TX parameters.

Definition at line 77 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeDlMuInfo(), ComputeUlMuInfo(), and SelectTxFormat().

◆ m_txVector

WifiTxVector TestMultiUserScheduler::m_txVector
private

the TX vector for MU PPDUs

Definition at line 76 of file wifi-mac-ofdma-test.cc.

Referenced by ComputeWifiTxVector(), and SelectTxFormat().

◆ m_ulTriggerType

TriggerFrameType TestMultiUserScheduler::m_ulTriggerType
private

Trigger Frame type for UL MU.

Definition at line 73 of file wifi-mac-ofdma-test.cc.

Referenced by SelectTxFormat().


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