A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
traffic-control
model
fifo-queue-disc.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2017 Universita' degli Studi di Napoli Federico II
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Stefano Avallone <stavallo@unina.it>
19
*/
20
21
#ifndef FIFO_QUEUE_DISC_H
22
#define FIFO_QUEUE_DISC_H
23
24
#include "ns3/queue-disc.h"
25
26
namespace
ns3
{
27
34
class
FifoQueueDisc
:
public
QueueDisc
{
35
public
:
40
static
TypeId
GetTypeId
(
void
);
46
FifoQueueDisc
();
47
48
virtual
~FifoQueueDisc
();
49
50
// Reasons for dropping packets
51
static
constexpr
const
char
*
LIMIT_EXCEEDED_DROP
=
"Queue disc limit exceeded"
;
52
53
private
:
54
virtual
bool
DoEnqueue
(
Ptr<QueueDiscItem>
item);
55
virtual
Ptr<QueueDiscItem>
DoDequeue
(
void
);
56
virtual
Ptr<const QueueDiscItem>
DoPeek
(
void
);
57
virtual
bool
CheckConfig
(
void
);
58
virtual
void
InitializeParams
(
void
);
59
};
60
61
}
// namespace ns3
62
63
#endif
/* FIFO_QUEUE_DISC_H */
ns3::FifoQueueDisc
Simple queue disc implementing the FIFO (First-In First-Out) policy.
Definition:
fifo-queue-disc.h:34
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::FifoQueueDisc::DoPeek
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
Definition:
fifo-queue-disc.cc:100
ns3::FifoQueueDisc::DoEnqueue
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
Definition:
fifo-queue-disc.cc:61
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:51
ns3::FifoQueueDisc::DoDequeue
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
Definition:
fifo-queue-disc.cc:84
ns3::FifoQueueDisc::InitializeParams
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
Definition:
fifo-queue-disc.cc:148
ns3::QueueDisc
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition:
queue-disc.h:182
ns3::FifoQueueDisc::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
fifo-queue-disc.cc:33
ns3::FifoQueueDisc::FifoQueueDisc
FifoQueueDisc()
FifoQueueDisc constructor.
Definition:
fifo-queue-disc.cc:49
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::FifoQueueDisc::CheckConfig
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
Definition:
fifo-queue-disc.cc:116
ns3::FifoQueueDisc::~FifoQueueDisc
virtual ~FifoQueueDisc()
Definition:
fifo-queue-disc.cc:55
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
Generated on Wed Nov 7 2018 10:02:11 for ns-3 by
1.8.14