A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
12
#include "
wifi-mac-queue-scheduler-impl.h
"
13
14
#include "ns3/nstime.h"
15
16
namespace
ns3
17
{
18
19
class
WifiMpdu;
20
21
/**
22
* \ingroup wifi
23
*
24
* Definition of priority for container queues.
25
*/
26
struct
FcfsPrio
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
*/
37
bool
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
*/
43
bool
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
*/
53
class
FcfsWifiQueueScheduler
:
public
WifiMacQueueSchedulerImpl
<FcfsPrio>
54
{
55
public
:
56
/**
57
* \brief Get the type ID.
58
* \return the object TypeId
59
*/
60
static
TypeId
GetTypeId
();
61
62
FcfsWifiQueueScheduler
();
63
64
/// drop policy
65
enum
DropPolicy
66
{
67
DROP_NEWEST
,
68
DROP_OLDEST
69
};
70
71
private
:
72
Ptr<WifiMpdu>
HasToDropBeforeEnqueuePriv
(
AcIndex
ac,
Ptr<WifiMpdu>
mpdu)
override
;
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 */
ns3::FcfsWifiQueueScheduler
FcfsWifiQueueScheduler is a wifi queue scheduler that serves data frames in a first come first serve ...
Definition
fcfs-wifi-queue-scheduler.h:54
ns3::FcfsWifiQueueScheduler::FcfsWifiQueueScheduler
FcfsWifiQueueScheduler()
Definition
fcfs-wifi-queue-scheduler.cc:75
ns3::FcfsWifiQueueScheduler::NS_LOG_TEMPLATE_DECLARE
NS_LOG_TEMPLATE_DECLARE
redefinition of the log component
Definition
fcfs-wifi-queue-scheduler.h:78
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:81
ns3::FcfsWifiQueueScheduler::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
fcfs-wifi-queue-scheduler.cc:56
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:119
ns3::FcfsWifiQueueScheduler::DropPolicy
DropPolicy
drop policy
Definition
fcfs-wifi-queue-scheduler.h:66
ns3::FcfsWifiQueueScheduler::DROP_NEWEST
@ DROP_NEWEST
Definition
fcfs-wifi-queue-scheduler.h:67
ns3::FcfsWifiQueueScheduler::DROP_OLDEST
@ DROP_OLDEST
Definition
fcfs-wifi-queue-scheduler.h:68
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:133
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:156
ns3::FcfsWifiQueueScheduler::m_dropPolicy
DropPolicy m_dropPolicy
Drop behavior of queue.
Definition
fcfs-wifi-queue-scheduler.h:77
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::WifiMacQueueSchedulerImpl
WifiMacQueueSchedulerImpl is a template class enabling the definition of different types of priority ...
Definition
wifi-mac-queue-scheduler-impl.h:43
ns3::AcIndex
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition
qos-utils.h:62
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:155
ns3::operator<
bool operator<(const EventId &a, const EventId &b)
Definition
event-id.h:168
ns3::WifiContainerQueueType
WifiContainerQueueType
enumeration of container queue types
Definition
wifi-mac-queue-container.h:26
ns3::FcfsPrio
Definition of priority for container queues.
Definition
fcfs-wifi-queue-scheduler.h:27
ns3::FcfsPrio::type
WifiContainerQueueType type
type of container queue
Definition
fcfs-wifi-queue-scheduler.h:29
ns3::FcfsPrio::priority
Time priority
time priority
Definition
fcfs-wifi-queue-scheduler.h:28
wifi-mac-queue-scheduler-impl.h
src
wifi
model
fcfs-wifi-queue-scheduler.h
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0