37 static TypeId tid =
TypeId(
"ns3::FcfsWifiQueueScheduler")
41 .AddAttribute(
"DropPolicy",
42 "Upon enqueue with full queue, drop oldest (DropOldest) "
43 "or newest (DropNewest) packet",
62 if (queue->QueueBase::GetNPackets() < queue->GetMaxSize().GetValue())
74 std::get<WifiContainerQueueType>(sortedQueuesIt->second.get().first) ==
82 return queue->PeekByQueueId(sortedQueuesIt->second.get().first);
104 (mpdu->GetHeader().IsMgt() ?
Seconds(0)
105 : mpdu->GetExpiryTime());
114 std::set<WifiContainerQueueId> queueIds;
116 for (
const auto& mpdu : mpdus)
121 for (
const auto& queueId : queueIds)
129 if (
auto item =
GetWifiMacQueue(ac)->PeekByQueueId(queueId); item !=
nullptr)
141 std::set<WifiContainerQueueId> queueIds;
143 for (
const auto& mpdu : mpdus)
148 for (
const auto& queueId : queueIds)
156 if (
auto item =
GetWifiMacQueue(ac)->PeekByQueueId(queueId); item !=
nullptr)
Hold variables of type enum.
FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve ...
Ptr< WifiMpdu > HasToDropBeforeEnqueuePriv(AcIndex ac, Ptr< WifiMpdu > mpdu) override
Check whether an MPDU has to be dropped before enqueuing the given MPDU.
static TypeId GetTypeId()
Get the type ID.
void DoNotifyEnqueue(AcIndex ac, Ptr< WifiMpdu > mpdu) override
Notify the scheduler that the given MPDU has been enqueued by the given Access Category.
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.
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.
DropPolicy m_dropPolicy
Drop behavior of queue.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
static WifiContainerQueueId GetQueueId(Ptr< const WifiMpdu > mpdu)
Return the QueueId identifying the container queue in which the given MPDU is (or is to be) enqueued.
Ptr< WifiMacQueue > GetWifiMacQueue(AcIndex ac) const
Get the wifi MAC queue associated with the given Access Category.
const SortedQueues & GetSortedQueues(AcIndex ac) const
Get a const reference to the sorted list of container queues for the given Access Category.
void SetPriority(AcIndex ac, const WifiContainerQueueId &queueId, const Time &priority)
Set the priority for the given container queue belonging to the given Access Category.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_TEMPLATE_DEFINE(name)
Initialize a reference to a Log component.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time Seconds(double value)
Construct a Time in the indicated unit.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.