A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
mq-queue-disc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 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 * Authors: Pasquale Imputato <p.imputato@gmail.com>
18 * Stefano Avallone <stavallo@unina.it>
19 */
20
21#ifndef MQ_QUEUE_DISC_H
22#define MQ_QUEUE_DISC_H
23
24#include "queue-disc.h"
25
26namespace ns3
27{
28
29/**
30 * \ingroup traffic-control
31 *
32 * mq is a classful multi-queue aware dummy scheduler. It has as many child
33 * queue discs as the number of device transmission queues. Packets are
34 * directly enqueued into and dequeued from child queue discs.
35 */
36class MqQueueDisc : public QueueDisc
37{
38 public:
39 /**
40 * \brief Get the type ID.
41 * \return the object TypeId
42 */
43 static TypeId GetTypeId();
44 /**
45 * \brief MqQueueDisc constructor
46 */
48
49 ~MqQueueDisc() override;
50
51 /**
52 * \brief Return the wake mode adopted by this queue disc.
53 * \return the wake mode adopted by this queue disc.
54 */
55 WakeMode GetWakeMode() const override;
56
57 private:
58 bool DoEnqueue(Ptr<QueueDiscItem> item) override;
61 bool CheckConfig() override;
62 void InitializeParams() override;
63};
64
65} // namespace ns3
66
67#endif /* MQ_QUEUE_DISC_H */
mq is a classful multi-queue aware dummy scheduler.
Definition: mq-queue-disc.h:37
Ptr< QueueDiscItem > DoDequeue() override
This function actually extracts a packet from the queue disc.
Ptr< const QueueDiscItem > DoPeek() override
Return a copy of the next packet the queue disc will extract.
void InitializeParams() override
Initialize parameters (if any) before the first packet is enqueued.
MqQueueDisc()
MqQueueDisc constructor.
static TypeId GetTypeId()
Get the type ID.
bool DoEnqueue(Ptr< QueueDiscItem > item) override
This function actually enqueues a packet into the queue disc.
bool CheckConfig() override
Check whether the current configuration is correct.
~MqQueueDisc() override
WakeMode GetWakeMode() const override
Return the wake mode adopted by this queue disc.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:184
WakeMode
Used to determine whether the queue disc itself or its children must be activated when a netdevice wa...
Definition: queue-disc.h:503
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.