A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
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
23
#include "
wifi-mac-queue-scheduler-impl.h
"
24
25
#include "ns3/nstime.h"
26
27
namespace
ns3
28
{
29
30
class
WifiMpdu;
31
37
struct
FcfsPrio
38
{
39
Time
priority
;
40
WifiContainerQueueType
type
;
41
};
42
48
bool
operator==
(
const
FcfsPrio
& lhs,
const
FcfsPrio
& rhs);
54
bool
operator<
(
const
FcfsPrio
& lhs,
const
FcfsPrio
& rhs);
55
64
class
FcfsWifiQueueScheduler
:
public
WifiMacQueueSchedulerImpl
<FcfsPrio>
65
{
66
public
:
71
static
TypeId
GetTypeId
();
72
73
FcfsWifiQueueScheduler
();
74
76
enum
DropPolicy
77
{
78
DROP_NEWEST
,
79
DROP_OLDEST
80
};
81
82
private
:
83
Ptr<WifiMpdu>
HasToDropBeforeEnqueuePriv
(
AcIndex
ac,
Ptr<WifiMpdu>
mpdu)
override
;
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
;
89
NS_LOG_TEMPLATE_DECLARE
;
90
};
91
92
}
// namespace ns3
93
94
#endif
/* FCFS_WIFI_QUEUE_SCHEDULER_H */
ns3::FcfsWifiQueueScheduler
FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve ...
Definition:
fcfs-wifi-queue-scheduler.h:65
ns3::FcfsWifiQueueScheduler::FcfsWifiQueueScheduler
FcfsWifiQueueScheduler()
Definition:
fcfs-wifi-queue-scheduler.cc:85
ns3::FcfsWifiQueueScheduler::DoNotifyDequeue
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.
Definition:
fcfs-wifi-queue-scheduler.cc:147
ns3::FcfsWifiQueueScheduler::NS_LOG_TEMPLATE_DECLARE
NS_LOG_TEMPLATE_DECLARE
redefinition of the log component
Definition:
fcfs-wifi-queue-scheduler.h:89
ns3::FcfsWifiQueueScheduler::HasToDropBeforeEnqueuePriv
Ptr< WifiMpdu > HasToDropBeforeEnqueuePriv(AcIndex ac, Ptr< WifiMpdu > mpdu) override
Check whether an MPDU has to be dropped before enqueuing the given MPDU.
Definition:
fcfs-wifi-queue-scheduler.cc:91
ns3::FcfsWifiQueueScheduler::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
fcfs-wifi-queue-scheduler.cc:67
ns3::FcfsWifiQueueScheduler::DoNotifyEnqueue
void DoNotifyEnqueue(AcIndex ac, Ptr< WifiMpdu > mpdu) override
Notify the scheduler that the given MPDU has been enqueued by the given Access Category.
Definition:
fcfs-wifi-queue-scheduler.cc:129
ns3::FcfsWifiQueueScheduler::DropPolicy
DropPolicy
drop policy
Definition:
fcfs-wifi-queue-scheduler.h:77
ns3::FcfsWifiQueueScheduler::DROP_NEWEST
@ DROP_NEWEST
Definition:
fcfs-wifi-queue-scheduler.h:78
ns3::FcfsWifiQueueScheduler::DROP_OLDEST
@ DROP_OLDEST
Definition:
fcfs-wifi-queue-scheduler.h:79
ns3::FcfsWifiQueueScheduler::DoNotifyRemove
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.
Definition:
fcfs-wifi-queue-scheduler.cc:170
ns3::FcfsWifiQueueScheduler::m_dropPolicy
DropPolicy m_dropPolicy
Drop behavior of queue.
Definition:
fcfs-wifi-queue-scheduler.h:88
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::WifiMacQueueSchedulerImpl
WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority ...
Definition:
wifi-mac-queue-scheduler-impl.h:51
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition:
qos-utils.h:72
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator==
bool operator==(const EventId &a, const EventId &b)
Definition:
event-id.h:157
ns3::operator<
bool operator<(const EventId &a, const EventId &b)
Definition:
event-id.h:170
ns3::WifiContainerQueueType
WifiContainerQueueType
enumeration of container queue types
Definition:
wifi-mac-queue-container.h:37
list
#define list
Definition:
openflow-interface.h:46
ns3::FcfsPrio
Definition of priority for container queues.
Definition:
fcfs-wifi-queue-scheduler.h:38
ns3::FcfsPrio::type
WifiContainerQueueType type
type of container queue
Definition:
fcfs-wifi-queue-scheduler.h:40
ns3::FcfsPrio::priority
Time priority
time priority
Definition:
fcfs-wifi-queue-scheduler.h:39
wifi-mac-queue-scheduler-impl.h
src
wifi
model
fcfs-wifi-queue-scheduler.h
Generated on Fri Mar 31 2023 13:30:53 for ns-3 by
1.9.1