A Discrete-Event Network Simulator
API
traffic-control-helper.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 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  * Author: Stefano Avallone <stavallo@unina.it>
19  */
20 
21 #include "ns3/log.h"
22 #include "ns3/abort.h"
23 #include "ns3/queue-limits.h"
24 #include "ns3/queue.h"
25 #include "ns3/net-device-queue-interface.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/pointer.h"
28 #include "ns3/traffic-control-layer.h"
29 #include "traffic-control-helper.h"
30 
31 namespace ns3 {
32 
33 NS_LOG_COMPONENT_DEFINE ("TrafficControlHelper");
34 
36  : m_queueDiscFactory (factory)
37 {
38 }
39 
40 void
42 {
43  m_internalQueuesFactory.push_back (factory);
44 }
45 
46 void
48 {
49  m_packetFiltersFactory.push_back (factory);
50 }
51 
52 uint16_t
54 {
55  m_queueDiscClassesFactory.push_back (factory);
56  return static_cast<uint16_t>(m_queueDiscClassesFactory.size () - 1);
57 }
58 
59 void
60 QueueDiscFactory::SetChildQueueDisc (uint16_t classId, uint16_t handle)
61 {
62  NS_ABORT_MSG_IF (classId >= m_queueDiscClassesFactory.size (),
63  "Cannot attach a queue disc to a non existing class");
64  m_classIdChildHandleMap[classId] = handle;
65 }
66 
68 QueueDiscFactory::CreateQueueDisc (const std::vector<Ptr<QueueDisc> > & queueDiscs)
69 {
70  // create the queue disc
72 
73  // create and add the internal queues
74  for (std::vector<ObjectFactory>::iterator i = m_internalQueuesFactory.begin ();
75  i != m_internalQueuesFactory.end (); i++ )
76  {
77  qd->AddInternalQueue (i->Create<QueueDisc::InternalQueue> ());
78  }
79 
80  // create and add the packet filters
81  for (std::vector<ObjectFactory>::iterator i = m_packetFiltersFactory.begin ();
82  i != m_packetFiltersFactory.end (); i++ )
83  {
84  qd->AddPacketFilter (i->Create<PacketFilter> ());
85  }
86 
87  // create and add the queue disc classes
88  for (uint16_t i = 0; i < m_queueDiscClassesFactory.size (); i++)
89  {
90  // the class ID is given by the index i of the vector
92  "Cannot create a queue disc class with no attached queue disc");
93 
94  uint16_t handle = m_classIdChildHandleMap[i];
95  NS_ABORT_MSG_IF (handle >= queueDiscs.size () || queueDiscs[handle] == 0,
96  "A queue disc with handle " << handle << " has not been created yet");
97 
98  m_queueDiscClassesFactory[i].Set ("QueueDisc", PointerValue (queueDiscs[handle]));
99  qd->AddQueueDiscClass (m_queueDiscClassesFactory[i].Create<QueueDiscClass> ());
100  }
101 
102  return qd;
103 }
104 
105 
107 {
108 }
109 
111 TrafficControlHelper::Default (std::size_t nTxQueues)
112 {
113  NS_LOG_FUNCTION (nTxQueues);
114  NS_ABORT_MSG_IF (nTxQueues == 0, "The device must have at least one queue");
115  TrafficControlHelper helper;
116 
117  if (nTxQueues == 1)
118  {
119  helper.SetRootQueueDisc ("ns3::FqCoDelQueueDisc");
120  }
121  else
122  {
123  uint16_t handle = helper.SetRootQueueDisc ("ns3::MqQueueDisc");
124  ClassIdList cls = helper.AddQueueDiscClasses (handle, nTxQueues, "ns3::QueueDiscClass");
125  helper.AddChildQueueDiscs (handle, cls, "ns3::FqCoDelQueueDisc");
126  }
127  return helper;
128 }
129 
130 uint16_t
132  std::string n01, const AttributeValue& v01,
133  std::string n02, const AttributeValue& v02,
134  std::string n03, const AttributeValue& v03,
135  std::string n04, const AttributeValue& v04,
136  std::string n05, const AttributeValue& v05,
137  std::string n06, const AttributeValue& v06,
138  std::string n07, const AttributeValue& v07,
139  std::string n08, const AttributeValue& v08,
140  std::string n09, const AttributeValue& v09,
141  std::string n10, const AttributeValue& v10,
142  std::string n11, const AttributeValue& v11,
143  std::string n12, const AttributeValue& v12,
144  std::string n13, const AttributeValue& v13,
145  std::string n14, const AttributeValue& v14,
146  std::string n15, const AttributeValue& v15)
147 {
148  NS_ABORT_MSG_UNLESS (m_queueDiscFactory.empty (), "A root queue disc has been already added to this factory");
149 
150  ObjectFactory factory;
151  factory.SetTypeId (type);
152  factory.Set (n01, v01);
153  factory.Set (n02, v02);
154  factory.Set (n03, v03);
155  factory.Set (n04, v04);
156  factory.Set (n05, v05);
157  factory.Set (n06, v06);
158  factory.Set (n07, v07);
159  factory.Set (n08, v08);
160  factory.Set (n09, v09);
161  factory.Set (n10, v10);
162  factory.Set (n11, v11);
163  factory.Set (n12, v12);
164  factory.Set (n13, v13);
165  factory.Set (n14, v14);
166  factory.Set (n15, v15);
167 
168  m_queueDiscFactory.push_back (QueueDiscFactory (factory));
169  return 0;
170 }
171 
172 void
173 TrafficControlHelper::AddInternalQueues (uint16_t handle, uint16_t count, std::string type,
174  std::string n01, const AttributeValue& v01,
175  std::string n02, const AttributeValue& v02,
176  std::string n03, const AttributeValue& v03,
177  std::string n04, const AttributeValue& v04,
178  std::string n05, const AttributeValue& v05,
179  std::string n06, const AttributeValue& v06,
180  std::string n07, const AttributeValue& v07,
181  std::string n08, const AttributeValue& v08)
182 {
183  NS_ABORT_MSG_IF (handle >= m_queueDiscFactory.size (), "A queue disc with handle "
184  << handle << " does not exist");
185 
186  QueueBase::AppendItemTypeIfNotPresent (type, "QueueDiscItem");
187 
188  ObjectFactory factory;
189  factory.SetTypeId (type);
190  factory.Set (n01, v01);
191  factory.Set (n02, v02);
192  factory.Set (n03, v03);
193  factory.Set (n04, v04);
194  factory.Set (n05, v05);
195  factory.Set (n06, v06);
196  factory.Set (n07, v07);
197  factory.Set (n08, v08);
198 
199  for (int i = 0; i < count; i++)
200  {
201  m_queueDiscFactory[handle].AddInternalQueue (factory);
202  }
203 }
204 
205 void
206 TrafficControlHelper::AddPacketFilter (uint16_t handle, std::string type,
207  std::string n01, const AttributeValue& v01,
208  std::string n02, const AttributeValue& v02,
209  std::string n03, const AttributeValue& v03,
210  std::string n04, const AttributeValue& v04,
211  std::string n05, const AttributeValue& v05,
212  std::string n06, const AttributeValue& v06,
213  std::string n07, const AttributeValue& v07,
214  std::string n08, const AttributeValue& v08)
215 {
216  NS_ABORT_MSG_IF (handle >= m_queueDiscFactory.size (), "A queue disc with handle "
217  << handle << " does not exist");
218 
219  ObjectFactory factory;
220  factory.SetTypeId (type);
221  factory.Set (n01, v01);
222  factory.Set (n02, v02);
223  factory.Set (n03, v03);
224  factory.Set (n04, v04);
225  factory.Set (n05, v05);
226  factory.Set (n06, v06);
227  factory.Set (n07, v07);
228  factory.Set (n08, v08);
229 
230  m_queueDiscFactory[handle].AddPacketFilter (factory);
231 }
232 
234 TrafficControlHelper::AddQueueDiscClasses (uint16_t handle, uint16_t count, std::string type,
235  std::string n01, const AttributeValue& v01,
236  std::string n02, const AttributeValue& v02,
237  std::string n03, const AttributeValue& v03,
238  std::string n04, const AttributeValue& v04,
239  std::string n05, const AttributeValue& v05,
240  std::string n06, const AttributeValue& v06,
241  std::string n07, const AttributeValue& v07,
242  std::string n08, const AttributeValue& v08)
243 {
244  NS_ABORT_MSG_IF (handle >= m_queueDiscFactory.size (), "A queue disc with handle "
245  << handle << " does not exist");
246 
247  ObjectFactory factory;
248  factory.SetTypeId (type);
249  factory.Set (n01, v01);
250  factory.Set (n02, v02);
251  factory.Set (n03, v03);
252  factory.Set (n04, v04);
253  factory.Set (n05, v05);
254  factory.Set (n06, v06);
255  factory.Set (n07, v07);
256  factory.Set (n08, v08);
257 
259  uint16_t classId;
260 
261  for (int i = 0; i < count; i++)
262  {
263  classId = m_queueDiscFactory[handle].AddQueueDiscClass (factory);
264  list.push_back (classId);
265  }
266  return list;
267 }
268 
269 uint16_t
270 TrafficControlHelper::AddChildQueueDisc (uint16_t handle, uint16_t classId, std::string type,
271  std::string n01, const AttributeValue& v01,
272  std::string n02, const AttributeValue& v02,
273  std::string n03, const AttributeValue& v03,
274  std::string n04, const AttributeValue& v04,
275  std::string n05, const AttributeValue& v05,
276  std::string n06, const AttributeValue& v06,
277  std::string n07, const AttributeValue& v07,
278  std::string n08, const AttributeValue& v08,
279  std::string n09, const AttributeValue& v09,
280  std::string n10, const AttributeValue& v10,
281  std::string n11, const AttributeValue& v11,
282  std::string n12, const AttributeValue& v12,
283  std::string n13, const AttributeValue& v13,
284  std::string n14, const AttributeValue& v14,
285  std::string n15, const AttributeValue& v15)
286 {
287  NS_ABORT_MSG_IF (handle >= m_queueDiscFactory.size (), "A queue disc with handle "
288  << handle << " does not exist");
289 
290  ObjectFactory factory;
291  factory.SetTypeId (type);
292  factory.Set (n01, v01);
293  factory.Set (n02, v02);
294  factory.Set (n03, v03);
295  factory.Set (n04, v04);
296  factory.Set (n05, v05);
297  factory.Set (n06, v06);
298  factory.Set (n07, v07);
299  factory.Set (n08, v08);
300  factory.Set (n09, v09);
301  factory.Set (n10, v10);
302  factory.Set (n11, v11);
303  factory.Set (n12, v12);
304  factory.Set (n13, v13);
305  factory.Set (n14, v14);
306  factory.Set (n15, v15);
307 
308  uint16_t childHandle = static_cast<uint16_t>(m_queueDiscFactory.size ());
309  m_queueDiscFactory.push_back (QueueDiscFactory (factory));
310  m_queueDiscFactory[handle].SetChildQueueDisc (classId, childHandle);
311 
312  return childHandle;
313 }
314 
317  std::string type,
318  std::string n01, const AttributeValue& v01,
319  std::string n02, const AttributeValue& v02,
320  std::string n03, const AttributeValue& v03,
321  std::string n04, const AttributeValue& v04,
322  std::string n05, const AttributeValue& v05,
323  std::string n06, const AttributeValue& v06,
324  std::string n07, const AttributeValue& v07,
325  std::string n08, const AttributeValue& v08,
326  std::string n09, const AttributeValue& v09,
327  std::string n10, const AttributeValue& v10,
328  std::string n11, const AttributeValue& v11,
329  std::string n12, const AttributeValue& v12,
330  std::string n13, const AttributeValue& v13,
331  std::string n14, const AttributeValue& v14,
332  std::string n15, const AttributeValue& v15)
333 {
335  for (ClassIdList::const_iterator c = classes.begin (); c != classes.end (); c++)
336  {
337  uint16_t childHandle = AddChildQueueDisc (handle, *c, type, n01, v01, n02, v02, n03, v03,
338  n04, v04, n05, v05, n06, v06, n07, v07, n08, v08, n09, v09,
339  n10, v10, n11, v11, n12, v12, n13, v13, n14, v14, n15, v15);
340  list.push_back (childHandle);
341  }
342  return list;
343 }
344 
345 void
347  std::string n01, const AttributeValue& v01,
348  std::string n02, const AttributeValue& v02,
349  std::string n03, const AttributeValue& v03,
350  std::string n04, const AttributeValue& v04,
351  std::string n05, const AttributeValue& v05,
352  std::string n06, const AttributeValue& v06,
353  std::string n07, const AttributeValue& v07,
354  std::string n08, const AttributeValue& v08)
355 {
357  m_queueLimitsFactory.Set (n01, v01);
358  m_queueLimitsFactory.Set (n02, v02);
359  m_queueLimitsFactory.Set (n03, v03);
360  m_queueLimitsFactory.Set (n04, v04);
361  m_queueLimitsFactory.Set (n05, v05);
362  m_queueLimitsFactory.Set (n06, v06);
363  m_queueLimitsFactory.Set (n07, v07);
364  m_queueLimitsFactory.Set (n08, v08);
365 }
366 
369 {
370  QueueDiscContainer container;
371 
372  // A TrafficControlLayer object is aggregated by the InternetStackHelper, but check
373  // anyway because a queue disc has no effect without a TrafficControlLayer object
374  Ptr<TrafficControlLayer> tc = d->GetNode ()->GetObject<TrafficControlLayer> ();
375  NS_ASSERT (tc != 0);
376 
377  // Start from an empty vector of queue discs
378  m_queueDiscs.clear ();
379  m_queueDiscs.resize (m_queueDiscFactory.size ());
380 
381  // Create queue discs (from leaves to root)
382  for (auto i = m_queueDiscFactory.size (); i-- > 0; )
383  {
384  m_queueDiscs[i] = m_queueDiscFactory[i].CreateQueueDisc (m_queueDiscs);
385  }
386 
387  // Set the root queue disc (if any has been created) on the device
388  if (!m_queueDiscs.empty () && m_queueDiscs[0])
389  {
390  tc->SetRootQueueDiscOnDevice (d, m_queueDiscs[0]);
391  container.Add (m_queueDiscs[0]);
392  }
393 
394  // Queue limits objects can only be installed if a netdevice queue interface
395  // has been aggregated to the netdevice. This is normally the case if the
396  // netdevice has been created via helpers. Abort the simulation if not.
398  {
400  NS_ABORT_MSG_IF (!ndqi, "A NetDeviceQueueInterface object has not been"
401  "aggregated to the NetDevice");
402  for (uint8_t i = 0; i < ndqi->GetNTxQueues (); i++)
403  {
405  ndqi->GetTxQueue (i)->SetQueueLimits (ql);
406  }
407  }
408 
409  return container;
410 }
411 
414 {
415  QueueDiscContainer container;
416 
417  for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i)
418  {
419  container.Add (Install (*i));
420  }
421 
422  return container;
423 }
424 
425 void
427 {
428  Ptr<TrafficControlLayer> tc = d->GetNode ()->GetObject<TrafficControlLayer> ();
429  NS_ASSERT (tc != 0);
430 
431  tc->DeleteRootQueueDiscOnDevice (d);
432  // remove the queue limits objects installed on the device transmission queues
434  // if a queue disc has been installed on the device, a netdevice queue interface
435  // must have been aggregated to the device
436  NS_ASSERT (ndqi);
437  for (uint8_t i = 0; i < ndqi->GetNTxQueues (); i++)
438  {
439  ndqi->GetTxQueue (i)->SetQueueLimits (0);
440  }
441 }
442 
443 void
445 {
446  for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i)
447  {
448  Uninstall (*i);
449  }
450 }
451 
452 
453 } // namespace ns3
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
QueueDiscContainer Install(NetDeviceContainer c)
QueueDiscFactory()
Default constructor.
void AddQueueDiscClass(Ptr< QueueDiscClass > qdClass)
Add a queue disc class to the tail of the list of classes.
Definition: queue-disc.cc:629
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Introspection did not find any typical Config paths.
Hold a value for an Attribute.
Definition: attribute.h:68
std::vector< ObjectFactory > m_queueDiscClassesFactory
Vector of factories to create queue disc classes.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:204
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:181
std::vector< Ptr< QueueDisc > > m_queueDiscs
Vector of all the created queue discs.
void Uninstall(NetDeviceContainer c)
ClassIdList AddQueueDiscClasses(uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add the given number of queue disc classes (of the given type and with the gi...
void AddPacketFilter(uint16_t handle, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add a packet filter (of the given type and with the given attributes) to the ...
Abstract base class for NetDevice queue length controller.
Definition: queue-limits.h:43
static void AppendItemTypeIfNotPresent(std::string &typeId, const std::string &itemType)
Append the item type to the provided type ID if the latter does not end with &#39;>&#39;. ...
Definition: queue.cc:78
void SetChildQueueDisc(uint16_t classId, uint16_t handle)
Set the (child) queue disc to attach to a class.
Holds a vector of ns3::QueueDisc pointers.
ObjectFactory m_queueDiscFactory
Factory to create this queue disc.
void AddInternalQueue(Ptr< InternalQueue > queue)
Add an internal queue to the tail of the list of queues.
Definition: queue-disc.cc:576
TrafficControlHelper()
Create a TrafficControlHelper to make life easier when creating QueueDisc objects.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
holds a vector of ns3::NetDevice pointers
Build a set of QueueDisc objects.
void SetQueueLimits(std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add a queue limits object to the transmission queues of the devices...
Ptr< QueueDisc > CreateQueueDisc(const std::vector< Ptr< QueueDisc > > &queueDiscs)
Create a queue disc with the currently stored configuration.
Network device transmission queue interface.
#define list
HandleList AddChildQueueDiscs(uint16_t handle, const ClassIdList &classes, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to attach a child queue disc (of the given type and with the given attributes) t...
uint16_t AddChildQueueDisc(uint16_t handle, uint16_t classId, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to attach a child queue disc (of the given type and with the given attributes) t...
std::vector< uint16_t > ClassIdList
Container type for Class IDs.
uint16_t AddQueueDiscClass(ObjectFactory factory)
Add a factory to create a queue disc class.
uint16_t GetUid(void) const
Get the internal id of this TypeId.
Definition: type-id.cc:1183
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold objects of type Ptr<T>.
Definition: pointer.h:36
static TrafficControlHelper Default(std::size_t nTxQueues=1)
uint16_t SetRootQueueDisc(std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue(), std::string n09="", const AttributeValue &v09=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue(), std::string n11="", const AttributeValue &v11=EmptyAttributeValue(), std::string n12="", const AttributeValue &v12=EmptyAttributeValue(), std::string n13="", const AttributeValue &v13=EmptyAttributeValue(), std::string n14="", const AttributeValue &v14=EmptyAttributeValue(), std::string n15="", const AttributeValue &v15=EmptyAttributeValue())
Helper function used to set a root queue disc of the given type and with the given attributes...
std::vector< ObjectFactory > m_internalQueuesFactory
Vector of factories to create internal queues.
void Set(std::string name, const AttributeValue &value)
Set an attribute to be set during construction.
void AddInternalQueue(ObjectFactory factory)
Add a factory to create an internal queue.
ObjectFactory m_queueLimitsFactory
Factory to create a queue limits object.
void AddPacketFilter(ObjectFactory factory)
Add a factory to create a packet filter.
TypeId GetTypeId(void) const
Get the TypeId which will be created by this ObjectFactory.
Instantiate subclasses of ns3::Object.
std::vector< ObjectFactory > m_packetFiltersFactory
Vector of factories to create packet filters.
#define NS_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if a condition is false, with a message.
Definition: abort.h:144
std::vector< QueueDiscFactory > m_queueDiscFactory
QueueDisc factory, stores the configuration of all the queue discs.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
void AddInternalQueues(uint16_t handle, uint16_t count, std::string type, std::string n01="", const AttributeValue &v01=EmptyAttributeValue(), std::string n02="", const AttributeValue &v02=EmptyAttributeValue(), std::string n03="", const AttributeValue &v03=EmptyAttributeValue(), std::string n04="", const AttributeValue &v04=EmptyAttributeValue(), std::string n05="", const AttributeValue &v05=EmptyAttributeValue(), std::string n06="", const AttributeValue &v06=EmptyAttributeValue(), std::string n07="", const AttributeValue &v07=EmptyAttributeValue(), std::string n08="", const AttributeValue &v08=EmptyAttributeValue())
Helper function used to add the given number of internal queues (of the given type and with the given...
Introspection did not find any typical Config paths.
std::map< uint16_t, uint16_t > m_classIdChildHandleMap
Map storing the associations between class IDs and child queue disc handles.
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
PacketFilter is the abstract base class for filters used by queue discs to classify packets...
Definition: packet-filter.h:34
void AddPacketFilter(Ptr< PacketFilter > filter)
Add a packet filter to the tail of the list of filters used to classify packets.
Definition: queue-disc.cc:609
This class stores object factories required to create a queue disc and all of its components (packet ...
void Add(QueueDiscContainer other)
Append the contents of another QueueDiscContainer to the end of this container.
std::vector< uint16_t > HandleList
Container type for Handlers.