A Discrete-Event Network Simulator
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
14namespace ns3
15{
16
17/**
18 * \ingroup traffic-control
19 *
20 * Simple queue disc implementing the FIFO (First-In First-Out) policy.
21 *
22 */
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 */
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;
48 bool CheckConfig() override;
49 void InitializeParams() override;
50};
51
52} // namespace ns3
53
54#endif /* FIFO_QUEUE_DISC_H */
Simple queue disc implementing the FIFO (First-In First-Out) policy.
FifoQueueDisc()
FifoQueueDisc constructor.
Ptr< const QueueDiscItem > DoPeek() override
Return a copy of the next packet the queue disc will extract.
Ptr< QueueDiscItem > DoDequeue() override
This function actually extracts a packet from the queue disc.
bool CheckConfig() override
Check whether the current configuration is correct.
void InitializeParams() override
Initialize parameters (if any) before the first packet is enqueued.
bool DoEnqueue(Ptr< QueueDiscItem > item) override
This function actually enqueues a packet into the queue disc.
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
static TypeId GetTypeId()
Get the type ID.
Smart pointer class similar to boost::intrusive_ptr.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition queue-disc.h:173
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.