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
fifo-queue-disc.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#ifndef FIFO_QUEUE_DISC_H
10
#define FIFO_QUEUE_DISC_H
11
12
#include "
queue-disc.h
"
13
14
namespace
ns3
15
{
16
17
/**
18
* \ingroup traffic-control
19
*
20
* Simple queue disc implementing the FIFO (First-In First-Out) policy.
21
*
22
*/
23
class
FifoQueueDisc
:
public
QueueDisc
24
{
25
public
:
26
/**
27
* \brief Get the type ID.
28
* \return the object TypeId
29
*/
30
static
TypeId
GetTypeId
();
31
/**
32
* \brief FifoQueueDisc constructor
33
*
34
* Creates a queue with a depth of 1000 packets by default
35
*/
36
FifoQueueDisc
();
37
38
~FifoQueueDisc
()
override
;
39
40
// Reasons for dropping packets
41
static
constexpr
const
char
*
LIMIT_EXCEEDED_DROP
=
42
"Queue disc limit exceeded"
;
//!< Packet dropped due to queue disc limit exceeded
43
44
private
:
45
bool
DoEnqueue
(
Ptr<QueueDiscItem>
item)
override
;
46
Ptr<QueueDiscItem>
DoDequeue
()
override
;
47
Ptr<const QueueDiscItem>
DoPeek
()
override
;
48
bool
CheckConfig
()
override
;
49
void
InitializeParams
()
override
;
50
};
51
52
}
// namespace ns3
53
54
#endif
/* FIFO_QUEUE_DISC_H */
ns3::FifoQueueDisc
Simple queue disc implementing the FIFO (First-In First-Out) policy.
Definition
fifo-queue-disc.h:24
ns3::FifoQueueDisc::FifoQueueDisc
FifoQueueDisc()
FifoQueueDisc constructor.
Definition
fifo-queue-disc.cc:38
ns3::FifoQueueDisc::DoPeek
Ptr< const QueueDiscItem > DoPeek() override
Return a copy of the next packet the queue disc will extract.
Definition
fifo-queue-disc.cc:89
ns3::FifoQueueDisc::DoDequeue
Ptr< QueueDiscItem > DoDequeue() override
This function actually extracts a packet from the queue disc.
Definition
fifo-queue-disc.cc:73
ns3::FifoQueueDisc::CheckConfig
bool CheckConfig() override
Check whether the current configuration is correct.
Definition
fifo-queue-disc.cc:105
ns3::FifoQueueDisc::InitializeParams
void InitializeParams() override
Initialize parameters (if any) before the first packet is enqueued.
Definition
fifo-queue-disc.cc:138
ns3::FifoQueueDisc::DoEnqueue
bool DoEnqueue(Ptr< QueueDiscItem > item) override
This function actually enqueues a packet into the queue disc.
Definition
fifo-queue-disc.cc:50
ns3::FifoQueueDisc::LIMIT_EXCEEDED_DROP
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
Definition
fifo-queue-disc.h:41
ns3::FifoQueueDisc::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
fifo-queue-disc.cc:23
ns3::FifoQueueDisc::~FifoQueueDisc
~FifoQueueDisc() override
Definition
fifo-queue-disc.cc:44
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::QueueDisc
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition
queue-disc.h:173
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
queue-disc.h
src
traffic-control
model
fifo-queue-disc.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0