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 
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  */
36 class MqQueueDisc : public QueueDisc {
37 public:
38   /**
39    * \brief Get the type ID.
40    * \return the object TypeId
41    */
42   static TypeId GetTypeId (void);
43   /**
44    * \brief MqQueueDisc constructor
45    */
46   MqQueueDisc ();
47 
48   virtual ~MqQueueDisc();
49 
50  /**
51    * \brief Return the wake mode adopted by this queue disc.
52    * \return the wake mode adopted by this queue disc.
53    */
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 */
67