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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Pasquale Imputato <p.imputato@gmail.com>
7 * Stefano Avallone <stavallo@unina.it>
8 */
9
10#ifndef MQ_QUEUE_DISC_H
11#define MQ_QUEUE_DISC_H
12
13#include "queue-disc.h"
14
15namespace ns3
16{
17
18/**
19 * \ingroup traffic-control
20 *
21 * mq is a classful multi-queue aware dummy scheduler. It has as many child
22 * queue discs as the number of device transmission queues. Packets are
23 * directly enqueued into and dequeued from child queue discs.
24 */
25class MqQueueDisc : public QueueDisc
26{
27 public:
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33 /**
34 * \brief MqQueueDisc constructor
35 */
37
38 ~MqQueueDisc() override;
39
40 /**
41 * \brief Return the wake mode adopted by this queue disc.
42 * \return the wake mode adopted by this queue disc.
43 */
44 WakeMode GetWakeMode() const override;
45
46 private:
47 bool DoEnqueue(Ptr<QueueDiscItem> item) override;
50 bool CheckConfig() override;
51 void InitializeParams() override;
52};
53
54} // namespace ns3
55
56#endif /* MQ_QUEUE_DISC_H */
mq is a classful multi-queue aware dummy scheduler.
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.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition queue-disc.h:173
WakeMode
Used to determine whether the queue disc itself or its children must be activated when a netdevice wa...
Definition queue-disc.h:492
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.