WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue scheduler. More...
#include "wifi-mac-queue-scheduler.h"
Public Types | |
using | Mask = std::bitset<static_cast<std::size_t>(WifiQueueBlockedReason::REASONS_COUNT)> |
Bitset identifying the reasons to block individual links for a container queue. | |
Public Member Functions | |
virtual void | BlockQueues (WifiQueueBlockedReason reason, AcIndex ac, const std::list< WifiContainerQueueType > &types, const Mac48Address &rxAddress, const Mac48Address &txAddress, const std::set< uint8_t > &tids={}, const std::set< uint8_t > &linkIds={})=0 |
Block the given set of links for the container queues of the given types and Access Category that hold frames having the given Receiver Address (RA), Transmitter Address (TA) and TID (if needed) for the given reason, such that frames in these queues are not transmitted on the given set of links. | |
virtual std::list< uint8_t > | GetLinkIds (AcIndex ac, Ptr< const WifiMpdu > mpdu, const std::list< WifiQueueBlockedReason > &ignoredReasons={})=0 |
Get the list of the IDs of the links the given MPDU (belonging to the given Access Category) can be sent over. | |
virtual std::optional< WifiContainerQueueId > | GetNext (AcIndex ac, std::optional< uint8_t > linkId)=0 |
Get the next queue to serve, which is guaranteed to contain at least an MPDU whose lifetime has not expired. | |
virtual std::optional< WifiContainerQueueId > | GetNext (AcIndex ac, std::optional< uint8_t > linkId, const WifiContainerQueueId &prevQueueId)=0 |
Get the next queue to serve after the given one. | |
virtual std::optional< Mask > | GetQueueLinkMask (AcIndex ac, const WifiContainerQueueId &queueId, uint8_t linkId)=0 |
Get the mask associated with the given container queue indicating whether the given link is blocked and for which reason, provided that the given container queue exists and has a mask for the given link. | |
virtual Ptr< WifiMpdu > | HasToDropBeforeEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu)=0 |
Check whether an MPDU has to be dropped before enqueuing the given MPDU. | |
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. | |
virtual void | NotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu)=0 |
Notify the scheduler that the given MPDU has been enqueued by the given Access Category. | |
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. | |
virtual void | SetWifiMac (Ptr< WifiMac > mac) |
Set the wifi MAC. | |
virtual void | UnblockQueues (WifiQueueBlockedReason reason, AcIndex ac, const std::list< WifiContainerQueueType > &types, const Mac48Address &rxAddress, const Mac48Address &txAddress, const std::set< uint8_t > &tids={}, const std::set< uint8_t > &linkIds={})=0 |
Unblock the given set of links for the container queues of the given types and Access Category that hold frames having the given Receiver Address (RA), Transmitter Address (TA) and TID (if needed) for the given reason, such that frames in these queues can be transmitted on the given set of links. | |
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< 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. | |
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. | |
SimpleRefCount & | operator= (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::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 | |
void | DoDispose () override |
Destructor implementation. | |
Ptr< WifiMac > | GetMac () const |
Get the wifi MAC. | |
Protected Member Functions inherited from ns3::Object | |
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. | |
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 Attributes | |
Ptr< WifiMac > | m_mac |
MAC layer. | |
Additional Inherited Members | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue scheduler.
Definition at line 77 of file wifi-mac-queue-scheduler.h.
using ns3::WifiMacQueueScheduler::Mask = std::bitset<static_cast<std::size_t>(WifiQueueBlockedReason::REASONS_COUNT)> |
Bitset identifying the reasons to block individual links for a container queue.
Definition at line 179 of file wifi-mac-queue-scheduler.h.
|
pure virtual |
Block the given set of links for the container queues of the given types and Access Category that hold frames having the given Receiver Address (RA), Transmitter Address (TA) and TID (if needed) for the given reason, such that frames in these queues are not transmitted on the given set of links.
reason | the reason for blocking the queues |
ac | the given Access Category |
types | the types of the queues to block |
rxAddress | the Receiver Address (RA) of the frames |
txAddress | the Transmitter Address (TA) of the frames |
tids | the TIDs optionally identifying the queues to block |
linkIds | set of links to block (empty to block all setup links) |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
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< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
Definition at line 29 of file wifi-mac-queue-scheduler.cc.
References m_mac.
Referenced by ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoDispose().
|
pure virtual |
Get the list of the IDs of the links the given MPDU (belonging to the given Access Category) can be sent over.
ac | the given Access Category |
mpdu | the given MPDU |
ignoredReasons | list of reasons for blocking a link that are ignored |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
Get the wifi MAC.
Definition at line 42 of file wifi-mac-queue-scheduler.cc.
References m_mac.
|
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 (if any) are ignored.
ac | the Access Category that we want to serve |
linkId | the ID of the link on which MPDUs contained in the returned queue must be allowed to be sent |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
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 (if any) are ignored.
ac | the Access Category that we want to serve |
linkId | the ID of the link on which MPDUs contained in the returned queue must be allowed to be sent |
prevQueueId | the ID of the container queue served previously |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
pure virtual |
Get the mask associated with the given container queue indicating whether the given link is blocked and for which reason, provided that the given container queue exists and has a mask for the given link.
ac | the given Access Category |
queueId | the ID of the given container queue |
linkId | the ID of the given link |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
static |
Get the type ID.
Definition at line 21 of file wifi-mac-queue-scheduler.cc.
References ns3::TypeId::SetParent().
|
pure virtual |
Check whether an MPDU has to be dropped before enqueuing the given MPDU.
ac | the Access Category of the MPDU being enqueued |
mpdu | the MPDU to enqueue |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
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.
ac | the Access Category of the dequeued MPDUs |
mpdus | the list of dequeued MPDUs |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
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.
ac | the Access Category of the enqueued MPDU |
mpdu | the enqueued MPDU |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
|
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.
ac | the Access Category of the removed MPDUs |
mpdus | the list of removed MPDUs |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
Set the wifi MAC.
mac | the wifi MAC |
Reimplemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
Definition at line 35 of file wifi-mac-queue-scheduler.cc.
References m_mac, and NS_LOG_FUNCTION.
Referenced by ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::SetWifiMac().
|
pure virtual |
Unblock the given set of links for the container queues of the given types and Access Category that hold frames having the given Receiver Address (RA), Transmitter Address (TA) and TID (if needed) for the given reason, such that frames in these queues can be transmitted on the given set of links.
reason | the reason for unblocking the queues |
ac | the given Access Category |
types | the types of the queues to unblock |
rxAddress | the Receiver Address (RA) of the frames |
txAddress | the Transmitter Address (TA) of the frames |
tids | the TIDs optionally identifying the queues to unblock |
linkIds | set of links to unblock (empty to unblock all setup links) |
Implemented in ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >.
MAC layer.
Definition at line 242 of file wifi-mac-queue-scheduler.h.
Referenced by DoDispose(), GetMac(), and SetWifiMac().