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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Stefano Avallone <stavallo@unina.it>
18 */
19
20#ifndef FCFS_WIFI_QUEUE_SCHEDULER_H
21#define FCFS_WIFI_QUEUE_SCHEDULER_H
22
24
25#include "ns3/nstime.h"
26
27namespace ns3
28{
29
30class WifiMpdu;
31
32/**
33 * \ingroup wifi
34 *
35 * Definition of priority for container queues.
36 */
38{
39 Time priority; ///< time priority
40 WifiContainerQueueType type; ///< type of container queue
41};
42
43/**
44 * \param lhs the left hand side priority
45 * \param rhs the right hand side priority
46 * \return whether the left hand side priority is equal to the right hand side priority
47 */
48bool operator==(const FcfsPrio& lhs, const FcfsPrio& rhs);
49/**
50 * \param lhs the left hand side priority
51 * \param rhs the right hand side priority
52 * \return whether the left hand side priority is less than the right hand side priority
53 */
54bool operator<(const FcfsPrio& lhs, const FcfsPrio& rhs);
55
56/**
57 * \ingroup wifi
58 *
59 * FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a
60 * first come first serve fashion. Control frames have the highest priority.
61 * Management frames have the second highest priority. Hence, data frames are
62 * served after control and management frames.
63 */
65{
66 public:
67 /**
68 * \brief Get the type ID.
69 * \return the object TypeId
70 */
71 static TypeId GetTypeId();
72
74
75 /// drop policy
77 {
80 };
81
82 private:
84 void DoNotifyEnqueue(AcIndex ac, Ptr<WifiMpdu> mpdu) override;
85 void DoNotifyDequeue(AcIndex ac, const std::list<Ptr<WifiMpdu>>& mpdus) override;
86 void DoNotifyRemove(AcIndex ac, const std::list<Ptr<WifiMpdu>>& mpdus) override;
87
88 DropPolicy m_dropPolicy; //!< Drop behavior of queue
89 NS_LOG_TEMPLATE_DECLARE; //!< redefinition of the log component
90};
91
92} // namespace ns3
93
94#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.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
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:73
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:157
bool operator<(const EventId &a, const EventId &b)
Definition: event-id.h:170
WifiContainerQueueType
enumeration of container queue types
Definition of priority for container queues.
WifiContainerQueueType type
type of container queue
Time priority
time priority