59 TypeId(
"ns3::FcfsWifiQueueScheduler")
63 .AddAttribute(
"DropPolicy",
64 "Upon enqueue with full queue, drop oldest (DropOldest) "
65 "or newest (DropNewest) packet",
84 if (queue->QueueBase::GetNPackets() < queue->GetMaxSize().GetValue())
95 if (std::get<WifiContainerQueueType>(queueInfo.get().first) ==
WIFI_MGT_QUEUE ||
96 std::get<WifiContainerQueueType>(queueInfo.get().first) ==
WIFI_CTL_QUEUE)
104 while ((item = queue->PeekByQueueId(queueInfo.get().first, item)))
106 if (!item->IsInFlight() && !item->GetHeader().IsRetry())
129 SetPriority(ac, queueId, {item->GetTimestamp(), std::get<WifiContainerQueueType>(queueId)});
137 std::set<WifiContainerQueueId> queueIds;
139 for (
const auto& mpdu : mpdus)
144 for (
const auto& queueId : queueIds)
150 {item->GetTimestamp(), std::get<WifiContainerQueueType>(queueId)});
160 std::set<WifiContainerQueueId> queueIds;
162 for (
const auto& mpdu : mpdus)
167 for (
const auto& queueId : queueIds)
173 {item->GetTimestamp(), std::get<WifiContainerQueueType>(queueId)});
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.
WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority ...
Ptr< WifiMacQueue > GetWifiMacQueue(AcIndex ac) const
const SortedQueues & GetSortedQueues(AcIndex ac) const
void SetPriority(AcIndex ac, const WifiContainerQueueId &queueId, const FcfsPrio &priority)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#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_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#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.
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.
bool operator==(const EventId &a, const EventId &b)
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
bool operator<(const EventId &a, const EventId &b)
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Definition of priority for container queues.
WifiContainerQueueType type
type of container queue
Time priority
time priority