A Discrete-Event Network Simulator
API
ns3::WifiMacQueueScheduler Class Referenceabstract

WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue scheduler. More...

#include "wifi-mac-queue-scheduler.h"

+ Inheritance diagram for ns3::WifiMacQueueScheduler:
+ Collaboration diagram for ns3::WifiMacQueueScheduler:

Public Member Functions

virtual std::list< uint8_t > GetLinkIds (AcIndex ac, const WifiContainerQueueId &queueId)=0
 Get the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with. More...
 
virtual std::optional< WifiContainerQueueIdGetNext (AcIndex ac, uint8_t linkId)=0
 Get the next queue to serve, which is guaranteed to contain at least an MPDU whose lifetime has not expired. More...
 
virtual std::optional< WifiContainerQueueIdGetNext (AcIndex ac, uint8_t linkId, const WifiContainerQueueId &prevQueueId)=0
 Get the next queue to serve after the given one. More...
 
virtual Ptr< WifiMpduHasToDropBeforeEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu)=0
 Check whether an MPDU has to be dropped before enqueuing the given MPDU. More...
 
virtual void NotifyDequeue (AcIndex ac, const std::list< Ptr< WifiMpdu >> &mpdus)=0
 Notify the scheduler that the given list of MPDUs have been dequeued by the given Access Category. More...
 
virtual void NotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu)=0
 Notify the scheduler that the given MPDU has been enqueued by the given Access Category. More...
 
virtual void NotifyRemove (AcIndex ac, const std::list< Ptr< WifiMpdu >> &mpdus)=0
 Notify the scheduler that the given list of MPDUs have been removed by the given Access Category. More...
 
virtual void SetLinkIds (AcIndex ac, const WifiContainerQueueId &queueId, const std::list< uint8_t > &linkIds)=0
 Set the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with. More...
 
virtual void SetWifiMac (Ptr< WifiMac > mac)
 Set the wifi MAC. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
 ~Object () override
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose ()
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one. More...
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object. More...
 
template<>
Ptr< ObjectGetObject () 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< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized () const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Protected Member Functions

void DoDispose () override
 Destructor implementation. More...
 
Ptr< WifiMacGetMac () const
 Get the wifi MAC. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize ()
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed. More...
 

Private Attributes

Ptr< WifiMacm_mac
 MAC layer. More...
 

Additional Inherited Members

Detailed Description

WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue scheduler.

Introspection did not find any typical Config paths.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 40 bytes (on a 64-bit architecture).

Definition at line 42 of file wifi-mac-queue-scheduler.h.

Member Function Documentation

◆ DoDispose()

void ns3::WifiMacQueueScheduler::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::Object.

Reimplemented in ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 40 of file wifi-mac-queue-scheduler.cc.

References m_mac.

Referenced by ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoDispose().

+ Here is the caller graph for this function:

◆ GetLinkIds()

virtual std::list<uint8_t> ns3::WifiMacQueueScheduler::GetLinkIds ( AcIndex  ac,
const WifiContainerQueueId queueId 
)
pure virtual

Get the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with.

Parameters
acthe given Access Category
queueIdthe given container queue
Returns
the list of the IDs of the links the given container queue is associated with

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ GetMac()

Ptr< WifiMac > ns3::WifiMacQueueScheduler::GetMac ( ) const
protected

Get the wifi MAC.

Returns
the wifi MAC

Definition at line 53 of file wifi-mac-queue-scheduler.cc.

References m_mac.

◆ GetNext() [1/2]

virtual std::optional<WifiContainerQueueId> ns3::WifiMacQueueScheduler::GetNext ( AcIndex  ac,
uint8_t  linkId 
)
pure virtual

Get the next queue to serve, which is guaranteed to contain at least an MPDU whose lifetime has not expired.

Queues containing MPDUs that cannot be sent over the given link are ignored.

Parameters
acthe Access Category that we want to serve
linkIdthe ID of the link on which we got channel access
Returns
the ID of the selected container queue (if any)

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ GetNext() [2/2]

virtual std::optional<WifiContainerQueueId> ns3::WifiMacQueueScheduler::GetNext ( AcIndex  ac,
uint8_t  linkId,
const WifiContainerQueueId prevQueueId 
)
pure virtual

Get the next queue to serve after the given one.

The returned queue is guaranteed to contain at least an MPDU whose lifetime has not expired. Queues containing MPDUs that cannot be sent over the given link are ignored.

Parameters
acthe Access Category that we want to serve
linkIdthe ID of the link on which we got channel access
prevQueueIdthe ID of the container queue served previously
Returns
the ID of the selected container queue (if any)

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ GetTypeId()

TypeId ns3::WifiMacQueueScheduler::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 32 of file wifi-mac-queue-scheduler.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ HasToDropBeforeEnqueue()

virtual Ptr<WifiMpdu> ns3::WifiMacQueueScheduler::HasToDropBeforeEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
pure virtual

Check whether an MPDU has to be dropped before enqueuing the given MPDU.

Parameters
acthe Access Category of the MPDU being enqueued
mpduthe MPDU to enqueue
Returns
a pointer to the MPDU to drop, if any, or a null pointer, otherwise

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ NotifyDequeue()

virtual void ns3::WifiMacQueueScheduler::NotifyDequeue ( AcIndex  ac,
const std::list< Ptr< WifiMpdu >> &  mpdus 
)
pure virtual

Notify the scheduler that the given list of MPDUs have been dequeued by the given Access Category.

The container queues which became empty after dequeuing the MPDUs are removed from the sorted list of queues.

Parameters
acthe Access Category of the dequeued MPDUs
mpdusthe list of dequeued MPDUs

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ NotifyEnqueue()

virtual void ns3::WifiMacQueueScheduler::NotifyEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
pure virtual

Notify the scheduler that the given MPDU has been enqueued by the given Access Category.

The container queue in which the MPDU has been enqueued must be assigned a priority value.

Parameters
acthe Access Category of the enqueued MPDU
mpduthe enqueued MPDU

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ NotifyRemove()

virtual void ns3::WifiMacQueueScheduler::NotifyRemove ( AcIndex  ac,
const std::list< Ptr< WifiMpdu >> &  mpdus 
)
pure virtual

Notify the scheduler that the given list of MPDUs have been removed by the given Access Category.

The container queues which became empty after removing the MPDUs are removed from the sorted list of queues.

Parameters
acthe Access Category of the removed MPDUs
mpdusthe list of removed MPDUs

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ SetLinkIds()

virtual void ns3::WifiMacQueueScheduler::SetLinkIds ( AcIndex  ac,
const WifiContainerQueueId queueId,
const std::list< uint8_t > &  linkIds 
)
pure virtual

Set the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with.

Parameters
acthe given Access Category
queueIdthe given container queue
linkIdsthe list of the IDs of the links the given container queue is associated with

Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

◆ SetWifiMac()

void ns3::WifiMacQueueScheduler::SetWifiMac ( Ptr< WifiMac mac)
virtual

Set the wifi MAC.

Parameters
macthe wifi MAC

Reimplemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 46 of file wifi-mac-queue-scheduler.cc.

References m_mac, third::mac, and NS_LOG_FUNCTION.

Referenced by ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::SetWifiMac().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_mac

Ptr<WifiMac> ns3::WifiMacQueueScheduler::m_mac
private

MAC layer.

Definition at line 151 of file wifi-mac-queue-scheduler.h.

Referenced by DoDispose(), GetMac(), and SetWifiMac().


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