A Discrete-Event Network Simulator
API
ofswitch13-priority-queue.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 University of Campinas (Unicamp)
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  * Author: Luciano Jerez Chaves <ljerezchaves@gmail.com>
18  */
19 #ifndef OFSWITCH13_PRIORITY_QUEUE_H
20 #define OFSWITCH13_PRIORITY_QUEUE_H
21 
22 #include "ofswitch13-queue.h"
23 
24 namespace ns3
25 {
26 
27 // The following explicit template instantiation declaration prevents modules
28 // including this header file from implicitly instantiating Queue<Packet>.
29 extern template class Queue<Packet>;
30 
41 {
42  public:
47  static TypeId GetTypeId();
48 
50  ~OFSwitch13PriorityQueue() override;
51 
52  // Inherited from Queue.
53  Ptr<Packet> Dequeue() override;
54  Ptr<Packet> Remove() override;
55  Ptr<const Packet> Peek() const override;
56 
57  protected:
58  // Inherited from Object.
59  void DoInitialize() override;
60 
61  private:
66  int GetNonEmptyQueue() const;
67 
70 
72 };
73 
74 } // namespace ns3
75 #endif /* OFSWITCH13_PRIORITY_QUEUE_H */
This class implements the priority queuing discipline for OpenFlow queue.
ObjectFactory m_facQueues
Factory for internal queues.
int m_numQueues
Number of internal queues.
NS_LOG_TEMPLATE_DECLARE
Redefinition of the log component.
The OpenFlow 1.3 queue interface.
Instantiate subclasses of ns3::Object.
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.