A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiMacQueueSchedulerImpl< Priority, Compare > Class Template Referenceabstract

WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority values for the container queues. More...

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

+ Inheritance diagram for ns3::WifiMacQueueSchedulerImpl< Priority, Compare >:
+ Collaboration diagram for ns3::WifiMacQueueSchedulerImpl< Priority, Compare >:

Classes

struct  PerAcInfo
 Information specific to a wifi MAC queue. More...
 
struct  QueueInfo
 Information associated with a container queue. More...
 

Public Member Functions

 WifiMacQueueSchedulerImpl ()
 Constructor.
 
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) final
 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.
 
std::list< uint8_t > GetLinkIds (AcIndex ac, Ptr< const WifiMpdu > mpdu, const std::list< WifiQueueBlockedReason > &ignoredReasons) final
 Get the list of the IDs of the links the given MPDU (belonging to the given Access Category) can be sent over.
 
std::optional< WifiContainerQueueIdGetNext (AcIndex ac, std::optional< uint8_t > linkId) final
 Get the next queue to serve, which is guaranteed to contain at least an MPDU whose lifetime has not expired.
 
std::optional< WifiContainerQueueIdGetNext (AcIndex ac, std::optional< uint8_t > linkId, const WifiContainerQueueId &prevQueueId) final
 Get the next queue to serve after the given one.
 
std::optional< MaskGetQueueLinkMask (AcIndex ac, const WifiContainerQueueId &queueId, uint8_t linkId) final
 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.
 
Ptr< WifiMpduHasToDropBeforeEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu) final
 Check whether an MPDU has to be dropped before enqueuing the given MPDU.
 
void NotifyDequeue (AcIndex ac, const std::list< Ptr< WifiMpdu > > &mpdus) final
 Notify the scheduler that the given list of MPDUs have been dequeued by the given Access Category.
 
void NotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu) final
 Notify the scheduler that the given MPDU has been enqueued by the given Access Category.
 
void NotifyRemove (AcIndex ac, const std::list< Ptr< WifiMpdu > > &mpdus) final
 Notify the scheduler that the given list of MPDUs have been removed by the given Access Category.
 
void SetWifiMac (Ptr< WifiMac > mac) final
 Set the wifi MAC.
 
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) final
 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.
 
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< WifiContainerQueueIdGetNext (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< WifiContainerQueueIdGetNext (AcIndex ac, std::optional< uint8_t > linkId, const WifiContainerQueueId &prevQueueId)=0
 Get the next queue to serve after the given one.
 
virtual std::optional< MaskGetQueueLinkMask (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< WifiMpduHasToDropBeforeEnqueue (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< 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) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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::WifiMacQueueScheduler
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 Types

using QueueInfoMap = std::unordered_map< WifiContainerQueueId, QueueInfo >
 Map identifiers (QueueIds) to information associated with container queues.
 
using QueueInfoPair = std::pair< const WifiContainerQueueId, QueueInfo >
 typedef for a QueueInfoMap element
 
using SortedQueues = std::multimap< Priority, std::reference_wrapper< QueueInfoPair >, Compare >
 List of container queues sorted in decreasing order of priority.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
const SortedQueuesGetSortedQueues (AcIndex ac) const
 Get a const reference to the sorted list of container queues for the given Access Category.
 
Ptr< WifiMacQueueGetWifiMacQueue (AcIndex ac) const
 Get the wifi MAC queue associated with the given Access Category.
 
void SetPriority (AcIndex ac, const WifiContainerQueueId &queueId, const Priority &priority)
 Set the priority for the given container queue belonging to the given Access Category.
 
- Protected Member Functions inherited from ns3::WifiMacQueueScheduler
void DoDispose () override
 Destructor implementation.
 
Ptr< WifiMacGetMac () const
 Get the wifi MAC.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
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 Member Functions

void DoBlockQueues (bool block, 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)
 Block or 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.
 
std::optional< WifiContainerQueueIdDoGetNext (AcIndex ac, std::optional< uint8_t > linkId, typename SortedQueues::iterator sortedQueuesIt)
 Get the next queue to serve.
 
virtual void DoNotifyDequeue (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 DoNotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu)=0
 Notify the scheduler that the given MPDU has been enqueued by the given Access Category.
 
virtual void DoNotifyRemove (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 Ptr< WifiMpduHasToDropBeforeEnqueuePriv (AcIndex ac, Ptr< WifiMpdu > mpdu)=0
 Check whether an MPDU has to be dropped before enqueuing the given MPDU.
 
QueueInfoMap::iterator InitQueueInfo (AcIndex ac, Ptr< const WifiMpdu > mpdu)
 If no information for the container queue used to store the given MPDU of the given Access Category is present in the queue info map, add the information for such a container queue and initialize the list of the IDs of the links over which packets contained in that container queue can be sent.
 

Private Attributes

std::vector< PerAcInfom_perAcInfo {AC_UNDEF}
 vector of per-AC information
 
 NS_LOG_TEMPLATE_DECLARE
 the log component
 

Friends

class ::WifiMacQueueDropOldestTest
 allow WifiMacQueueDropOldestTest class access
 

Additional Inherited Members

- Public Types inherited from ns3::WifiMacQueueScheduler
using Mask = std::bitset< static_cast< std::size_t >(WifiQueueBlockedReason::REASONS_COUNT)>
 Bitset identifying the reasons to block individual links for a container queue.
 

Detailed Description

template<class Priority, class Compare = std::less<Priority>>
class ns3::WifiMacQueueSchedulerImpl< Priority, Compare >

WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority values for the container queues.

Introspection did not find any typical Config paths.

The function to compare priority values can be customized as well.


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

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

Member Typedef Documentation

◆ QueueInfoMap

template<class Priority , class Compare = std::less<Priority>>
using ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::QueueInfoMap = std::unordered_map<WifiContainerQueueId, QueueInfo>
protected

Map identifiers (QueueIds) to information associated with container queues.

Empty queues shall be kept in this data structure because queue information (such as the set of link IDs) may be configured just once.

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

◆ QueueInfoPair

template<class Priority , class Compare = std::less<Priority>>
using ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::QueueInfoPair = std::pair<const WifiContainerQueueId, QueueInfo>
protected

typedef for a QueueInfoMap element

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

◆ SortedQueues

template<class Priority , class Compare = std::less<Priority>>
using ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::SortedQueues = std::multimap<Priority, std::reference_wrapper<QueueInfoPair>, Compare>
protected

List of container queues sorted in decreasing order of priority.

Empty queues shall not be kept in this data structure.

Note
We cannot store iterators to QueueInfoMap because if rehashing occurs due to an insertion, all iterators are invalidated. References are not invalidated instead. Therefore, we store reference wrappers (which can be reassigned).

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

Constructor & Destructor Documentation

◆ WifiMacQueueSchedulerImpl()

template<class Priority , class Compare >
ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::WifiMacQueueSchedulerImpl

Constructor.

Implementation of the templates declared above.

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

Member Function Documentation

◆ BlockQueues()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::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 
)
finalvirtual

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.

Parameters
reasonthe reason for blocking the queues
acthe given Access Category
typesthe types of the queues to block
rxAddressthe Receiver Address (RA) of the frames
txAddressthe Transmitter Address (TA) of the frames
tidsthe TIDs optionally identifying the queues to block
linkIdsset of links to block (empty to block all setup links)

Implements ns3::WifiMacQueueScheduler.

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

◆ DoBlockQueues()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoBlockQueues ( bool  block,
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 
)
private

Block or 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.

Parameters
blocktrue to block the queues, false to unblock
reasonthe reason for blocking the queues
acthe given Access Category
typesthe types of the queues to block
rxAddressthe Receiver Address (RA) of the frames
txAddressthe Transmitter Address (TA) of the frames
tidsthe TIDs optionally identifying the queues to block
linkIdsset of links to block (empty to block all setup links)

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

References ns3::LOG_FUNCTION, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::WIFI_CTL_QUEUE, ns3::WIFI_DATA_QUEUE, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_DATA, ns3::WIFI_MAC_MGT_ACTION, ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MGT_QUEUE, and ns3::WIFI_QOSDATA_QUEUE.

◆ DoDispose()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::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.

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

References ns3::WifiMacQueueScheduler::DoDispose().

+ Here is the call graph for this function:

◆ DoGetNext()

template<class Priority , class Compare >
std::optional< WifiContainerQueueId > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoGetNext ( AcIndex  ac,
std::optional< uint8_t >  linkId,
typename SortedQueues::iterator  sortedQueuesIt 
)
private

Get the next queue to serve.

The search starts from 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 MPDUs contained in the returned queue must be allowed to be sent
sortedQueuesItiterator pointing to the queue we start the search from
Returns
the ID of the selected container queue (if any)

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

References ns3::AC_UNDEF, NS_ASSERT, and NS_LOG_FUNCTION.

◆ DoNotifyDequeue()

template<class Priority , class Compare = std::less<Priority>>
virtual void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoNotifyDequeue ( AcIndex  ac,
const std::list< Ptr< WifiMpdu > > &  mpdus 
)
privatepure 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::FcfsWifiQueueScheduler.

◆ DoNotifyEnqueue()

template<class Priority , class Compare = std::less<Priority>>
virtual void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoNotifyEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
privatepure 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::FcfsWifiQueueScheduler.

◆ DoNotifyRemove()

template<class Priority , class Compare = std::less<Priority>>
virtual void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::DoNotifyRemove ( AcIndex  ac,
const std::list< Ptr< WifiMpdu > > &  mpdus 
)
privatepure 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::FcfsWifiQueueScheduler.

◆ GetLinkIds()

template<class Priority , class Compare >
std::list< uint8_t > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetLinkIds ( AcIndex  ac,
Ptr< const WifiMpdu mpdu,
const std::list< WifiQueueBlockedReason > &  ignoredReasons 
)
finalvirtual

Get the list of the IDs of the links the given MPDU (belonging to the given Access Category) can be sent over.

Parameters
acthe given Access Category
mpduthe given MPDU
ignoredReasonslist of reasons for blocking a link that are ignored
Returns
the list of the IDs of the links the given MPDU can be sent over

Implements ns3::WifiMacQueueScheduler.

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

◆ GetNext() [1/2]

template<class Priority , class Compare >
std::optional< WifiContainerQueueId > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetNext ( AcIndex  ac,
std::optional< uint8_t >  linkId 
)
finalvirtual

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.

Parameters
acthe Access Category that we want to serve
linkIdthe ID of the link on which MPDUs contained in the returned queue must be allowed to be sent
Returns
the ID of the selected container queue (if any)

Implements ns3::WifiMacQueueScheduler.

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

References NS_LOG_FUNCTION.

◆ GetNext() [2/2]

template<class Priority , class Compare >
std::optional< WifiContainerQueueId > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetNext ( AcIndex  ac,
std::optional< uint8_t >  linkId,
const WifiContainerQueueId prevQueueId 
)
finalvirtual

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.

Parameters
acthe Access Category that we want to serve
linkIdthe ID of the link on which MPDUs contained in the returned queue must be allowed to be sent
prevQueueIdthe ID of the container queue served previously
Returns
the ID of the selected container queue (if any)

Implements ns3::WifiMacQueueScheduler.

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

References NS_ABORT_IF, and NS_LOG_FUNCTION.

◆ GetQueueLinkMask()

template<class Priority , class Compare >
std::optional< WifiMacQueueScheduler::Mask > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetQueueLinkMask ( AcIndex  ac,
const WifiContainerQueueId queueId,
uint8_t  linkId 
)
finalvirtual

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.

Parameters
acthe given Access Category
queueIdthe ID of the given container queue
linkIdthe ID of the given link
Returns
the mask associated with the given container queue for the given link

Implements ns3::WifiMacQueueScheduler.

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

References NS_LOG_FUNCTION.

◆ GetSortedQueues()

template<class Priority , class Compare >
const WifiMacQueueSchedulerImpl< Priority, Compare >::SortedQueues & ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetSortedQueues ( AcIndex  ac) const
protected

Get a const reference to the sorted list of container queues for the given Access Category.

Parameters
acthe given Access Category
Returns
a const reference to the sorted list of container queues for the given Access Category

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

References ns3::AC_UNDEF, and NS_ASSERT.

◆ GetTypeId()

template<class Priority , class Compare >
TypeId ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetTypeId
static

Get the type ID.

Returns
the object TypeId

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

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetWifiMacQueue()

template<class Priority , class Compare >
Ptr< WifiMacQueue > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::GetWifiMacQueue ( AcIndex  ac) const
protected

Get the wifi MAC queue associated with the given Access Category.

Parameters
acthe given Access Category
Returns
the wifi MAC queue associated with the given Access Category

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

References ns3::AC_UNDEF, and NS_ASSERT.

◆ HasToDropBeforeEnqueue()

template<class Priority , class Compare >
Ptr< WifiMpdu > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::HasToDropBeforeEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
finalvirtual

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

Implements ns3::WifiMacQueueScheduler.

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

References NS_LOG_FUNCTION.

◆ HasToDropBeforeEnqueuePriv()

template<class Priority , class Compare = std::less<Priority>>
virtual Ptr< WifiMpdu > ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::HasToDropBeforeEnqueuePriv ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
privatepure 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::FcfsWifiQueueScheduler.

◆ InitQueueInfo()

template<class Priority , class Compare >
WifiMacQueueSchedulerImpl< Priority, Compare >::QueueInfoMap::iterator ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::InitQueueInfo ( AcIndex  ac,
Ptr< const WifiMpdu mpdu 
)
private

If no information for the container queue used to store the given MPDU of the given Access Category is present in the queue info map, add the information for such a container queue and initialize the list of the IDs of the links over which packets contained in that container queue can be sent.

Parameters
acthe given Access Category
mpduthe given MPDU
Returns
an iterator to the information associated with the container queue used to store the given MPDU of the given Access Category

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

References ns3::WifiMacQueueContainer::GetQueueId(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::SINGLE_LINK_OP_ID.

+ Here is the call graph for this function:

◆ NotifyDequeue()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::NotifyDequeue ( AcIndex  ac,
const std::list< Ptr< WifiMpdu > > &  mpdus 
)
finalvirtual

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

Implements ns3::WifiMacQueueScheduler.

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

References ns3::AC_UNDEF, ns3::WifiMacQueueContainer::GetQueueId(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyEnqueue()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::NotifyEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
finalvirtual

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

Implements ns3::WifiMacQueueScheduler.

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

References ns3::AC_UNDEF, NS_ABORT_MSG, NS_ASSERT, and NS_LOG_FUNCTION.

◆ NotifyRemove()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::NotifyRemove ( AcIndex  ac,
const std::list< Ptr< WifiMpdu > > &  mpdus 
)
finalvirtual

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

Implements ns3::WifiMacQueueScheduler.

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

References ns3::AC_UNDEF, ns3::WifiMacQueueContainer::GetQueueId(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetPriority()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::SetPriority ( AcIndex  ac,
const WifiContainerQueueId queueId,
const Priority &  priority 
)
protected

Set the priority for the given container queue belonging to the given Access Category.

Parameters
acthe Access Category of the container queue
queueIdthe ID of the given container queue
prioritythe priority value

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

References ns3::AC_UNDEF, NS_ABORT_MSG_IF, NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

◆ SetWifiMac()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::SetWifiMac ( Ptr< WifiMac mac)
finalvirtual

Set the wifi MAC.

Parameters
macthe wifi MAC

Reimplemented from ns3::WifiMacQueueScheduler.

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

References ns3::AC_BE, ns3::AC_BE_NQOS, ns3::AC_BEACON, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, and ns3::WifiMacQueueScheduler::SetWifiMac().

+ Here is the call graph for this function:

◆ UnblockQueues()

template<class Priority , class Compare >
void ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::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 
)
finalvirtual

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.

Parameters
reasonthe reason for unblocking the queues
acthe given Access Category
typesthe types of the queues to unblock
rxAddressthe Receiver Address (RA) of the frames
txAddressthe Transmitter Address (TA) of the frames
tidsthe TIDs optionally identifying the queues to unblock
linkIdsset of links to unblock (empty to unblock all setup links)

Implements ns3::WifiMacQueueScheduler.

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

Friends And Related Function Documentation

◆ ::WifiMacQueueDropOldestTest

template<class Priority , class Compare = std::less<Priority>>
friend class ::WifiMacQueueDropOldestTest
friend

allow WifiMacQueueDropOldestTest class access

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

Member Data Documentation

◆ m_perAcInfo

template<class Priority , class Compare = std::less<Priority>>
std::vector<PerAcInfo> ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::m_perAcInfo {AC_UNDEF}
private

vector of per-AC information

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

◆ NS_LOG_TEMPLATE_DECLARE

template<class Priority , class Compare = std::less<Priority>>
ns3::WifiMacQueueSchedulerImpl< Priority, Compare >::NS_LOG_TEMPLATE_DECLARE
private

the log component

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


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