A Discrete-Event Network Simulator
API
ns3::FcfsWifiQueueScheduler Class Reference

FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve fashion. More...

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

+ Inheritance diagram for ns3::FcfsWifiQueueScheduler:
+ Collaboration diagram for ns3::FcfsWifiQueueScheduler:

Public Types

enum  DropPolicy { DROP_NEWEST , DROP_OLDEST }
 drop policy More...
 

Public Member Functions

 FcfsWifiQueueScheduler ()
 
- Public Member Functions inherited from ns3::WifiMacQueueSchedulerImpl< FcfsPrio >
 WifiMacQueueSchedulerImpl ()
 Constructor. More...
 
std::list< uint8_t > GetLinkIds (AcIndex ac, const WifiContainerQueueId &queueId) final
 Get the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with. More...
 
std::optional< WifiContainerQueueIdGetNext (AcIndex ac, uint8_t linkId) final
 Get the next queue to serve, which is guaranteed to contain at least an MPDU whose lifetime has not expired. More...
 
std::optional< WifiContainerQueueIdGetNext (AcIndex ac, uint8_t linkId, const WifiContainerQueueId &prevQueueId) final
 Get the next queue to serve after the given one. More...
 
Ptr< WifiMpduHasToDropBeforeEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu) final
 Check whether an MPDU has to be dropped before enqueuing the given MPDU. More...
 
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. More...
 
void NotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu) final
 Notify the scheduler that the given MPDU has been enqueued by the given Access Category. More...
 
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. More...
 
void SetLinkIds (AcIndex ac, const WifiContainerQueueId &queueId, const std::list< uint8_t > &linkIds) final
 Set the list of the IDs of the links the given container queue (belonging to the given Access Category) is associated with. More...
 
void SetWifiMac (Ptr< WifiMac > mac) final
 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::WifiMacQueueSchedulerImpl< FcfsPrio >
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::WifiMacQueueScheduler
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...
 

Private Member Functions

void DoNotifyDequeue (AcIndex ac, const std::list< Ptr< WifiMpdu >> &mpdus) override
 Notify the scheduler that the given list of MPDUs have been dequeued by the given Access Category. More...
 
void DoNotifyEnqueue (AcIndex ac, Ptr< WifiMpdu > mpdu) override
 Notify the scheduler that the given MPDU has been enqueued by the given Access Category. More...
 
void DoNotifyRemove (AcIndex ac, const std::list< Ptr< WifiMpdu >> &mpdus) override
 Notify the scheduler that the given list of MPDUs have been removed by the given Access Category. More...
 
Ptr< WifiMpduHasToDropBeforeEnqueuePriv (AcIndex ac, Ptr< WifiMpdu > mpdu) override
 Check whether an MPDU has to be dropped before enqueuing the given MPDU. More...
 

Private Attributes

DropPolicy m_dropPolicy
 Drop behavior of queue. More...
 
 NS_LOG_TEMPLATE_DECLARE
 redefinition of the log component More...
 

Additional Inherited Members

- Protected Types inherited from ns3::WifiMacQueueSchedulerImpl< FcfsPrio >
using QueueInfoMap = std::unordered_map< WifiContainerQueueId, QueueInfo >
 Map identifiers (QueueIds) to information associated with container queues. More...
 
using QueueInfoPair = std::pair< const WifiContainerQueueId, QueueInfo >
 typedef for a QueueInfoMap element More...
 
using SortedQueues = std::multimap< FcfsPrio, std::reference_wrapper< QueueInfoPair >, std::less< FcfsPrio > >
 List of container queues sorted in decreasing order of priority. More...
 
- Protected Member Functions inherited from ns3::WifiMacQueueSchedulerImpl< FcfsPrio >
void DoDispose () override
 Destructor implementation. More...
 
const SortedQueuesGetSortedQueues (AcIndex ac) const
 Get a const reference to the sorted list of container queues for the given Access Category. More...
 
Ptr< WifiMacQueueGetWifiMacQueue (AcIndex ac) const
 Get the wifi MAC queue associated with the given Access Category. More...
 
void SetPriority (AcIndex ac, const WifiContainerQueueId &queueId, const FcfsPrio &priority)
 Set the priority for the given container queue belonging to the given Access Category. More...
 
- Protected Member Functions inherited from ns3::WifiMacQueueScheduler
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...
 

Detailed Description

FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve fashion.

Introspection did not find any typical Config paths.

Control frames have the highest priority. Management frames have the second highest priority. Hence, data frames are served after control and management frames.


Attributes

  • DropPolicy: Upon enqueue with full queue, drop oldest (DropOldest) or newest (DropNewest) packet
    • Set with class: ns3::EnumValue
    • Underlying type: DropOldest|DropNewest
    • Initial value: DropNewest
    • Flags: constructwriteread

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

Definition at line 64 of file fcfs-wifi-queue-scheduler.h.

Member Enumeration Documentation

◆ DropPolicy

drop policy

Enumerator
DROP_NEWEST 
DROP_OLDEST 

Definition at line 76 of file fcfs-wifi-queue-scheduler.h.

Constructor & Destructor Documentation

◆ FcfsWifiQueueScheduler()

ns3::FcfsWifiQueueScheduler::FcfsWifiQueueScheduler ( )

Definition at line 85 of file fcfs-wifi-queue-scheduler.cc.

Member Function Documentation

◆ DoNotifyDequeue()

void ns3::FcfsWifiQueueScheduler::DoNotifyDequeue ( AcIndex  ac,
const std::list< Ptr< WifiMpdu >> &  mpdus 
)
overrideprivatevirtual

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::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 147 of file fcfs-wifi-queue-scheduler.cc.

References ns3::WifiMacQueueContainer::GetQueueId(), ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::GetWifiMacQueue(), NS_LOG_FUNCTION, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::SetPriority().

+ Here is the call graph for this function:

◆ DoNotifyEnqueue()

void ns3::FcfsWifiQueueScheduler::DoNotifyEnqueue ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
overrideprivatevirtual

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::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 129 of file fcfs-wifi-queue-scheduler.cc.

References ns3::WifiMacQueueContainer::GetQueueId(), ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::GetWifiMacQueue(), NS_LOG_FUNCTION, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::SetPriority().

+ Here is the call graph for this function:

◆ DoNotifyRemove()

void ns3::FcfsWifiQueueScheduler::DoNotifyRemove ( AcIndex  ac,
const std::list< Ptr< WifiMpdu >> &  mpdus 
)
overrideprivatevirtual

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::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 170 of file fcfs-wifi-queue-scheduler.cc.

References ns3::WifiMacQueueContainer::GetQueueId(), ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::GetWifiMacQueue(), NS_LOG_FUNCTION, and ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::SetPriority().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::FcfsWifiQueueScheduler::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 67 of file fcfs-wifi-queue-scheduler.cc.

References DROP_NEWEST, DROP_OLDEST, m_dropPolicy, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ HasToDropBeforeEnqueuePriv()

Ptr< WifiMpdu > ns3::FcfsWifiQueueScheduler::HasToDropBeforeEnqueuePriv ( AcIndex  ac,
Ptr< WifiMpdu mpdu 
)
overrideprivatevirtual

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::WifiMacQueueSchedulerImpl< FcfsPrio >.

Definition at line 91 of file fcfs-wifi-queue-scheduler.cc.

References DROP_OLDEST, ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::GetSortedQueues(), ns3::WifiMacQueueSchedulerImpl< FcfsPrio >::GetWifiMacQueue(), m_dropPolicy, NS_LOG_DEBUG, ns3::WIFI_CTL_QUEUE, and ns3::WIFI_MGT_QUEUE.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_dropPolicy

DropPolicy ns3::FcfsWifiQueueScheduler::m_dropPolicy
private

Drop behavior of queue.

Definition at line 88 of file fcfs-wifi-queue-scheduler.h.

Referenced by GetTypeId(), and HasToDropBeforeEnqueuePriv().

◆ NS_LOG_TEMPLATE_DECLARE

ns3::FcfsWifiQueueScheduler::NS_LOG_TEMPLATE_DECLARE
private

redefinition of the log component

Definition at line 89 of file fcfs-wifi-queue-scheduler.h.


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