A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
fcfs-wifi-queue-scheduler.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#ifndef FCFS_WIFI_QUEUE_SCHEDULER_H
10#define FCFS_WIFI_QUEUE_SCHEDULER_H
11
13
14#include "ns3/nstime.h"
15
16namespace ns3
17{
18
19class WifiMpdu;
20
21/**
22 * \ingroup wifi
23 *
24 * Definition of priority for container queues.
25 */
27{
28 Time priority; ///< time priority
29 WifiContainerQueueType type; ///< type of container queue
30};
31
32/**
33 * \param lhs the left hand side priority
34 * \param rhs the right hand side priority
35 * \return whether the left hand side priority is equal to the right hand side priority
36 */
37bool operator==(const FcfsPrio& lhs, const FcfsPrio& rhs);
38/**
39 * \param lhs the left hand side priority
40 * \param rhs the right hand side priority
41 * \return whether the left hand side priority is less than the right hand side priority
42 */
43bool operator<(const FcfsPrio& lhs, const FcfsPrio& rhs);
44
45/**
46 * \ingroup wifi
47 *
48 * FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a
49 * first come first serve fashion. Control frames have the highest priority.
50 * Management frames have the second highest priority. Hence, data frames are
51 * served after control and management frames.
52 */
54{
55 public:
56 /**
57 * \brief Get the type ID.
58 * \return the object TypeId
59 */
60 static TypeId GetTypeId();
61
63
64 /// drop policy
70
71 private:
73 void DoNotifyEnqueue(AcIndex ac, Ptr<WifiMpdu> mpdu) override;
74 void DoNotifyDequeue(AcIndex ac, const std::list<Ptr<WifiMpdu>>& mpdus) override;
75 void DoNotifyRemove(AcIndex ac, const std::list<Ptr<WifiMpdu>>& mpdus) override;
76
77 DropPolicy m_dropPolicy; //!< Drop behavior of queue
78 NS_LOG_TEMPLATE_DECLARE; //!< redefinition of the log component
79};
80
81} // namespace ns3
82
83#endif /* FCFS_WIFI_QUEUE_SCHEDULER_H */
FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve ...
NS_LOG_TEMPLATE_DECLARE
redefinition of the log component
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.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority ...
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition qos-utils.h:62
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
Definition event-id.h:155
bool operator<(const EventId &a, const EventId &b)
Definition event-id.h:168
WifiContainerQueueType
enumeration of container queue types
Definition of priority for container queues.
WifiContainerQueueType type
type of container queue
Time priority
time priority