A Discrete-Event Network Simulator
API
mq-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) 2016 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: Pasquale Imputato <p.imputato@gmail.com>
19  * Stefano Avallone <stavallo@unina.it>
20  */
21 
22 #ifndef MQ_QUEUE_DISC_H
23 #define MQ_QUEUE_DISC_H
24 
25 #include "ns3/queue-disc.h"
26 
27 namespace ns3 {
28 
36 class MqQueueDisc : public QueueDisc {
37 public:
42  static TypeId GetTypeId (void);
46  MqQueueDisc ();
47 
48  virtual ~MqQueueDisc();
49 
54  WakeMode GetWakeMode (void) const;
55 
56 private:
57  virtual bool DoEnqueue (Ptr<QueueDiscItem> item);
58  virtual Ptr<QueueDiscItem> DoDequeue (void);
59  virtual Ptr<const QueueDiscItem> DoPeek (void);
60  virtual bool CheckConfig (void);
61  virtual void InitializeParams (void);
62 };
63 
64 } // namespace ns3
65 
66 #endif /* MQ_QUEUE_DISC_H */
mq is a classful multi-queue aware dummy scheduler.
Definition: mq-queue-disc.h:36
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
MqQueueDisc()
MqQueueDisc constructor.
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:182
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
WakeMode GetWakeMode(void) const
Return the wake mode adopted by this queue disc.
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual ~MqQueueDisc()
WakeMode
Used to determine whether the queue disc itself or its children must be activated when a netdevice wa...
Definition: queue-disc.h:474
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
Definition: type-id.h:58