A Discrete-Event Network Simulator
API
fq-pie-queue-disc.cc
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  * Copyright (c) 2018 NITK Surathkal (modified for FQ-PIE)
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Pasquale Imputato <p.imputato@gmail.com>
20  * Stefano Avallone <stefano.avallone@unina.it>
21  * Modified for FQ-PIE by: Sumukha PK <sumukhapk46@gmail.com>
22  * Prajval M <26prajval98@gmail.com>
23  * Ishaan R D <ishaanrd6@gmail.com>
24  * Mohit P. Tahiliani <tahiliani@nitk.edu.in>
25  */
26 
27 
28 #include "ns3/log.h"
29 #include "ns3/string.h"
30 #include "ns3/queue.h"
31 #include "fq-pie-queue-disc.h"
32 #include "pie-queue-disc.h"
33 #include "ns3/net-device-queue-interface.h"
34 
35 namespace ns3 {
36 
37 NS_LOG_COMPONENT_DEFINE ("FqPieQueueDisc");
38 
39 NS_OBJECT_ENSURE_REGISTERED (FqPieFlow);
40 
42 {
43  static TypeId tid = TypeId ("ns3::FqPieFlow")
45  .SetGroupName ("TrafficControl")
46  .AddConstructor<FqPieFlow> ()
47  ;
48  return tid;
49 }
50 
52  : m_deficit (0),
53  m_status (INACTIVE),
54  m_index (0)
55 {
56  NS_LOG_FUNCTION (this);
57 }
58 
60 {
61  NS_LOG_FUNCTION (this);
62 }
63 
64 void
65 FqPieFlow::SetDeficit (uint32_t deficit)
66 {
67  NS_LOG_FUNCTION (this << deficit);
68  m_deficit = deficit;
69 }
70 
71 int32_t
73 {
74  NS_LOG_FUNCTION (this);
75  return m_deficit;
76 }
77 
78 void
79 FqPieFlow::IncreaseDeficit (int32_t deficit)
80 {
81  NS_LOG_FUNCTION (this << deficit);
82  m_deficit += deficit;
83 }
84 
85 void
87 {
88  NS_LOG_FUNCTION (this);
89  m_status = status;
90 }
91 
94 {
95  NS_LOG_FUNCTION (this);
96  return m_status;
97 }
98 
99 void
100 FqPieFlow::SetIndex (uint32_t index)
101 {
102  NS_LOG_FUNCTION (this);
103  m_index = index;
104 }
105 
106 uint32_t
108 {
109  return m_index;
110 }
111 
112 
114 
116 {
117  static TypeId tid = TypeId ("ns3::FqPieQueueDisc")
118  .SetParent<QueueDisc> ()
119  .SetGroupName ("TrafficControl")
120  .AddConstructor<FqPieQueueDisc> ()
121  .AddAttribute ("UseEcn",
122  "True to use ECN (packets are marked instead of being dropped)",
123  BooleanValue (true),
126  .AddAttribute ("MarkEcnThreshold",
127  "ECN marking threshold (RFC 8033 suggests 0.1 (i.e., 10%) default)",
128  DoubleValue (0.1),
130  MakeDoubleChecker<double> (0, 1))
131  .AddAttribute ("CeThreshold",
132  "The FqPie CE threshold for marking packets",
133  TimeValue (Time::Max ()),
135  MakeTimeChecker ())
136  .AddAttribute ("UseL4s",
137  "True to use L4S (only ECT1 packets are marked at CE threshold)",
138  BooleanValue (false),
141  .AddAttribute ("MeanPktSize",
142  "Average of packet size",
143  UintegerValue (1000),
145  MakeUintegerChecker<uint32_t> ())
146  .AddAttribute ("A",
147  "Value of alpha",
148  DoubleValue (0.125),
150  MakeDoubleChecker<double> ())
151  .AddAttribute ("B",
152  "Value of beta",
153  DoubleValue (1.25),
155  MakeDoubleChecker<double> ())
156  .AddAttribute ("Tupdate",
157  "Time period to calculate drop probability",
158  TimeValue (Seconds (0.015)),
160  MakeTimeChecker ())
161  .AddAttribute ("Supdate",
162  "Start time of the update timer",
163  TimeValue (Seconds (0)),
165  MakeTimeChecker ())
166  .AddAttribute ("MaxSize",
167  "The maximum number of packets accepted by this queue disc",
168  QueueSizeValue (QueueSize ("10240p")),
172  .AddAttribute ("DequeueThreshold",
173  "Minimum queue size in bytes before dequeue rate is measured",
174  UintegerValue (16384),
176  MakeUintegerChecker<uint32_t> ())
177  .AddAttribute ("QueueDelayReference",
178  "Desired queue delay",
179  TimeValue (Seconds (0.015)),
181  MakeTimeChecker ())
182  .AddAttribute ("MaxBurstAllowance",
183  "Current max burst allowance before random drop",
184  TimeValue (Seconds (0.15)),
186  MakeTimeChecker ())
187  .AddAttribute ("UseDequeueRateEstimator",
188  "Enable/Disable usage of Dequeue Rate Estimator",
189  BooleanValue (false),
192  .AddAttribute ("UseCapDropAdjustment",
193  "Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033",
194  BooleanValue (true),
197  .AddAttribute ("UseDerandomization",
198  "Enable/Disable Derandomization feature mentioned in RFC 8033",
199  BooleanValue (false),
202  .AddAttribute ("Flows",
203  "The number of queues into which the incoming packets are classified",
204  UintegerValue (1024),
206  MakeUintegerChecker<uint32_t> ())
207  .AddAttribute ("DropBatchSize",
208  "The maximum number of packets dropped from the fat flow",
209  UintegerValue (64),
211  MakeUintegerChecker<uint32_t> ())
212  .AddAttribute ("Perturbation",
213  "The salt used as an additional input to the hash function used to classify packets",
214  UintegerValue (0),
216  MakeUintegerChecker<uint32_t> ())
217  .AddAttribute ("EnableSetAssociativeHash",
218  "Enable/Disable Set Associative Hash",
219  BooleanValue (false),
222  .AddAttribute ("SetWays",
223  "The size of a set of queues (used by set associative hash)",
224  UintegerValue (8),
226  MakeUintegerChecker<uint32_t> ())
227  ;
228  return tid;
229 }
230 
233  m_quantum (0)
234 {
235  NS_LOG_FUNCTION (this);
236 }
237 
239 {
240  NS_LOG_FUNCTION (this);
241 }
242 
243 void
244 FqPieQueueDisc::SetQuantum (uint32_t quantum)
245 {
246  NS_LOG_FUNCTION (this << quantum);
247  m_quantum = quantum;
248 }
249 
250 uint32_t
252 {
253  return m_quantum;
254 }
255 
256 uint32_t
258 {
259  NS_LOG_FUNCTION (this << flowHash);
260 
261  uint32_t h = (flowHash % m_flows);
262  uint32_t innerHash = h % m_setWays;
263  uint32_t outerHash = h - innerHash;
264 
265  for (uint32_t i = outerHash; i < outerHash + m_setWays; i++)
266  {
267  auto it = m_flowsIndices.find (i);
268 
269  if (it == m_flowsIndices.end ()
270  || (m_tags.find (i) != m_tags.end () && m_tags[i] == flowHash)
271  || StaticCast<FqPieFlow> (GetQueueDiscClass (it->second))->GetStatus () == FqPieFlow::INACTIVE)
272  {
273  // this queue has not been created yet or is associated with this flow
274  // or is inactive, hence we can use it
275  m_tags[i] = flowHash;
276  return i;
277  }
278  }
279 
280  // all the queues of the set are used. Use the first queue of the set
281  m_tags[outerHash] = flowHash;
282  return outerHash;
283 }
284 
285 bool
287 {
288  NS_LOG_FUNCTION (this << item);
289 
290  uint32_t flowHash, h;
291 
292  if (GetNPacketFilters () == 0)
293  {
294  flowHash = item->Hash (m_perturbation);
295  }
296  else
297  {
298  int32_t ret = Classify (item);
299 
300  if (ret != PacketFilter::PF_NO_MATCH)
301  {
302  flowHash = static_cast<uint32_t> (ret);
303  }
304  else
305  {
306  NS_LOG_ERROR ("No filter has been able to classify this packet, drop it.");
308  return false;
309  }
310  }
311 
313  {
314  h = SetAssociativeHash (flowHash);
315  }
316  else
317  {
318  h = flowHash % m_flows;
319  }
320 
321  Ptr<FqPieFlow> flow;
322  if (m_flowsIndices.find (h) == m_flowsIndices.end ())
323  {
324  NS_LOG_DEBUG ("Creating a new flow queue with index " << h);
325  flow = m_flowFactory.Create<FqPieFlow> ();
327  // If Pie, Set values of PieQueueDisc to match this QueueDisc
328  Ptr<PieQueueDisc> pie = qd->GetObject<PieQueueDisc> ();
329  if (pie)
330  {
331  pie->SetAttribute ("UseEcn", BooleanValue (m_useEcn));
332  pie->SetAttribute ("CeThreshold", TimeValue (m_ceThreshold));
333  pie->SetAttribute ("UseL4s", BooleanValue (m_useL4s));
334  }
335  qd->Initialize ();
336  flow->SetQueueDisc (qd);
337  flow->SetIndex (h);
338  AddQueueDiscClass (flow);
339 
341  }
342  else
343  {
344  flow = StaticCast<FqPieFlow> (GetQueueDiscClass (m_flowsIndices[h]));
345  }
346 
347  if (flow->GetStatus () == FqPieFlow::INACTIVE)
348  {
349  flow->SetStatus (FqPieFlow::NEW_FLOW);
350  flow->SetDeficit (m_quantum);
351  m_newFlows.push_back (flow);
352  }
353 
354  flow->GetQueueDisc ()->Enqueue (item);
355 
356  NS_LOG_DEBUG ("Packet enqueued into flow " << h << "; flow index " << m_flowsIndices[h]);
357 
358  if (GetCurrentSize () > GetMaxSize ())
359  {
360  NS_LOG_DEBUG ("Overload; enter FqPieDrop ()");
361  FqPieDrop ();
362  }
363 
364  return true;
365 }
366 
369 {
370  NS_LOG_FUNCTION (this);
371 
372  Ptr<FqPieFlow> flow;
373  Ptr<QueueDiscItem> item;
374 
375  do
376  {
377  bool found = false;
378 
379  while (!found && !m_newFlows.empty ())
380  {
381  flow = m_newFlows.front ();
382 
383  if (flow->GetDeficit () <= 0)
384  {
385  NS_LOG_DEBUG ("Increase deficit for new flow index " << flow->GetIndex ());
386  flow->IncreaseDeficit (m_quantum);
387  flow->SetStatus (FqPieFlow::OLD_FLOW);
388  m_oldFlows.push_back (flow);
389  m_newFlows.pop_front ();
390  }
391  else
392  {
393  NS_LOG_DEBUG ("Found a new flow " << flow->GetIndex () << " with positive deficit");
394  found = true;
395  }
396  }
397 
398  while (!found && !m_oldFlows.empty ())
399  {
400  flow = m_oldFlows.front ();
401 
402  if (flow->GetDeficit () <= 0)
403  {
404  NS_LOG_DEBUG ("Increase deficit for old flow index " << flow->GetIndex ());
405  flow->IncreaseDeficit (m_quantum);
406  m_oldFlows.push_back (flow);
407  m_oldFlows.pop_front ();
408  }
409  else
410  {
411  NS_LOG_DEBUG ("Found an old flow " << flow->GetIndex () << " with positive deficit");
412  found = true;
413  }
414  }
415 
416  if (!found)
417  {
418  NS_LOG_DEBUG ("No flow found to dequeue a packet");
419  return 0;
420  }
421 
422  item = flow->GetQueueDisc ()->Dequeue ();
423 
424  if (!item)
425  {
426  NS_LOG_DEBUG ("Could not get a packet from the selected flow queue");
427  if (!m_newFlows.empty ())
428  {
429  flow->SetStatus (FqPieFlow::OLD_FLOW);
430  m_oldFlows.push_back (flow);
431  m_newFlows.pop_front ();
432  }
433  else
434  {
435  flow->SetStatus (FqPieFlow::INACTIVE);
436  m_oldFlows.pop_front ();
437  }
438  }
439  else
440  {
441  NS_LOG_DEBUG ("Dequeued packet " << item->GetPacket ());
442  }
443  }
444  while (item == 0);
445 
446  flow->IncreaseDeficit (item->GetSize () * -1);
447 
448  return item;
449 }
450 
451 bool
453 {
454  NS_LOG_FUNCTION (this);
455  if (GetNQueueDiscClasses () > 0)
456  {
457  NS_LOG_ERROR ("FqPieQueueDisc cannot have classes");
458  return false;
459  }
460 
461  if (GetNInternalQueues () > 0)
462  {
463  NS_LOG_ERROR ("FqPieQueueDisc cannot have internal queues");
464  return false;
465  }
466  // we are at initialization time. If the user has not set a quantum value,
467  // set the quantum to the MTU of the device (if any)
468  if (!m_quantum)
469  {
471  Ptr<NetDevice> dev;
472  // if the NetDeviceQueueInterface object is aggregated to a
473  // NetDevice, get the MTU of such NetDevice
474  if (ndqi && (dev = ndqi->GetObject<NetDevice> ()))
475  {
476  m_quantum = dev->GetMtu ();
477  NS_LOG_DEBUG ("Setting the quantum to the MTU of the device: " << m_quantum);
478  }
479 
480  if (!m_quantum)
481  {
482  NS_LOG_ERROR ("The quantum parameter cannot be null");
483  return false;
484  }
485  }
486 
488  {
489  NS_LOG_ERROR ("The number of queues must be an integer multiple of the size "
490  "of the set of queues used by set associative hash");
491  return false;
492  }
493 
494  // If UseL4S attribute is enabled then CE threshold must be set.
495  if (m_useL4s)
496  {
497  NS_ABORT_MSG_IF (m_ceThreshold == Time::Max (), "CE threshold not set");
498  if (m_useEcn == false)
499  {
500  NS_LOG_WARN ("Enabling ECN as L4S mode is enabled");
501  }
502  }
503  return true;
504 }
505 
506 void
508 {
509  NS_LOG_FUNCTION (this);
510 
511  m_flowFactory.SetTypeId ("ns3::FqPieFlow");
512 
513  m_queueDiscFactory.SetTypeId ("ns3::PieQueueDisc");
518  m_queueDiscFactory.Set ("Tupdate", TimeValue (m_tUpdate));
519  m_queueDiscFactory.Set ("Supdate", TimeValue (m_sUpdate));
520  m_queueDiscFactory.Set ("DequeueThreshold", UintegerValue (m_dqThreshold));
521  m_queueDiscFactory.Set ("QueueDelayReference", TimeValue (m_qDelayRef));
522  m_queueDiscFactory.Set ("MaxBurstAllowance", TimeValue (m_maxBurst));
523  m_queueDiscFactory.Set ("UseDequeueRateEstimator", BooleanValue (m_useDqRateEstimator));
524  m_queueDiscFactory.Set ("UseCapDropAdjustment", BooleanValue (m_isCapDropAdjustment));
525  m_queueDiscFactory.Set ("UseDerandomization", BooleanValue (m_useDerandomization));
526 }
527 
528 uint32_t
530 {
531  NS_LOG_FUNCTION (this);
532 
533  uint32_t maxBacklog = 0, index = 0;
534  Ptr<QueueDisc> qd;
535 
536  /* Queue is full! Find the fat flow and drop packet(s) from it */
537  for (uint32_t i = 0; i < GetNQueueDiscClasses (); i++)
538  {
539  qd = GetQueueDiscClass (i)->GetQueueDisc ();
540  uint32_t bytes = qd->GetNBytes ();
541  if (bytes > maxBacklog)
542  {
543  maxBacklog = bytes;
544  index = i;
545  }
546  }
547 
548  /* Our goal is to drop half of this fat flow backlog */
549  uint32_t len = 0, count = 0, threshold = maxBacklog >> 1;
550  qd = GetQueueDiscClass (index)->GetQueueDisc ();
551  Ptr<QueueDiscItem> item;
552 
553  do
554  {
555  NS_LOG_DEBUG ("Drop packet (overflow); count: " << count << " len: " << len << " threshold: " << threshold);
556  item = qd->GetInternalQueue (0)->Dequeue ();
558  len += item->GetSize ();
559  }
560  while (++count < m_dropBatchSize && len < threshold);
561 
562  return index;
563 }
564 
565 } // namespace ns3
566 
AttributeValue implementation for Boolean.
Definition: boolean.h:37
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
A flow queue used by the FqPie queue disc.
uint32_t GetIndex(void) const
Get the index of this flow.
FlowStatus GetStatus(void) const
Get the status of this flow.
void SetIndex(uint32_t index)
Set the index for this flow.
FlowStatus
Used to determine the status of this flow queue.
int32_t m_deficit
the deficit for this flow
void SetStatus(FlowStatus status)
Set the status for this flow.
FlowStatus m_status
the status of this flow
uint32_t m_index
the index for this flow
void SetDeficit(uint32_t deficit)
Set the deficit for this flow.
int32_t GetDeficit(void) const
Get the deficit for this flow.
static TypeId GetTypeId(void)
Get the type ID.
FqPieFlow()
FqPieFlow constructor.
void IncreaseDeficit(int32_t deficit)
Increase the deficit for this flow.
A FqPie packet queue disc.
Time m_qDelayRef
Desired queue delay.
std::map< uint32_t, uint32_t > m_tags
Tags used by set associative hash.
uint32_t FqPieDrop(void)
Drop a packet from the head of the queue with the largest current byte count.
bool m_useEcn
True if ECN is used (packets are marked instead of being dropped)
bool m_enableSetAssociativeHash
whether to enable set associative hash
uint32_t m_meanPktSize
Average packet size in bytes.
static constexpr const char * UNCLASSIFIED_DROP
No packet filter able to classify packet.
uint32_t m_perturbation
hash perturbation value
FqPieQueueDisc()
FqPieQueueDisc constructor.
ObjectFactory m_queueDiscFactory
Factory to create a new queue.
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
double m_a
Parameter to pie controller.
Time m_sUpdate
Start time of the update timer.
bool m_useDqRateEstimator
Enable/Disable usage of dequeue rate estimator for queue delay calculation.
Time m_ceThreshold
Threshold above which to CE mark.
uint32_t m_dqThreshold
Minimum queue size in bytes before dequeue rate is measured.
uint32_t m_dropBatchSize
Max number of packets dropped from the fat flow.
uint32_t m_quantum
Deficit assigned to flows at each round.
Time m_tUpdate
Time period after which CalculateP () is called.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
bool m_isCapDropAdjustment
Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033.
std::list< Ptr< FqPieFlow > > m_newFlows
The list of new flows.
Time m_maxBurst
Maximum burst allowed before random early dropping kicks in.
bool m_useDerandomization
Enable Derandomization feature mentioned in RFC 8033.
uint32_t m_setWays
size of a set of queues (used by set associative hash)
uint32_t m_flows
Number of flow queues.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
double m_markEcnTh
ECN marking threshold (default 10% as suggested in RFC 8033)
std::map< uint32_t, uint32_t > m_flowsIndices
Map with the index of class for each flow.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
uint32_t SetAssociativeHash(uint32_t flowHash)
Compute the index of the queue for the flow having the given flowHash, according to the set associati...
static constexpr const char * OVERLIMIT_DROP
Overlimit dropped packets.
bool m_useL4s
True if L4S is used (ECT1 packets are marked at CE threshold)
uint32_t GetQuantum(void) const
Get the quantum value.
void SetQuantum(uint32_t quantum)
Set the quantum value.
double m_b
Parameter to pie controller.
ObjectFactory m_flowFactory
Factory to create a new flow.
std::list< Ptr< FqPieFlow > > m_oldFlows
The list of old flows.
static TypeId GetTypeId(void)
Get the type ID.
Network layer to device interface.
Definition: net-device.h:96
virtual uint16_t GetMtu(void) const =0
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:256
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
static const int PF_NO_MATCH
Standard value used by packet filters to indicate that no match was possible.
Definition: packet-filter.h:48
Implements PIE Active Queue Management discipline.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
QueueDiscClass is the base class for classes that are included in a queue disc.
Definition: queue-disc.h:49
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:181
QueueSize GetCurrentSize(void)
Get the current size of the queue disc in bytes, if operating in bytes mode, or packets,...
Definition: queue-disc.cc:521
void AddQueueDiscClass(Ptr< QueueDiscClass > qdClass)
Add a queue disc class to the tail of the list of classes.
Definition: queue-disc.cc:632
uint32_t GetNBytes(void) const
Get the amount of bytes stored by the queue disc.
Definition: queue-disc.cc:445
QueueSize GetMaxSize(void) const
Get the maximum size of the queue disc.
Definition: queue-disc.cc:452
Ptr< InternalQueue > GetInternalQueue(std::size_t i) const
Get the i-th internal queue.
Definition: queue-disc.cc:599
int32_t Classify(Ptr< QueueDiscItem > item)
Classify a packet by calling the packet filters, one at a time, until either a filter able to classif...
Definition: queue-disc.cc:673
void DropAfterDequeue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped after dequeue.
Definition: queue-disc.cc:766
Ptr< NetDeviceQueueInterface > GetNetDeviceQueueInterface(void) const
Definition: queue-disc.cc:544
std::size_t GetNPacketFilters(void) const
Get the number of packet filters.
Definition: queue-disc.cc:626
Ptr< QueueDiscClass > GetQueueDiscClass(std::size_t i) const
Get the i-th queue disc class.
Definition: queue-disc.cc:660
std::size_t GetNQueueDiscClasses(void) const
Get the number of queue disc classes.
Definition: queue-disc.cc:667
bool SetMaxSize(QueueSize size)
Set the maximum size of the queue disc.
Definition: queue-disc.cc:480
std::size_t GetNInternalQueues(void) const
Get the number of internal queues.
Definition: queue-disc.cc:606
void DropBeforeEnqueue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped before enqueue.
Definition: queue-disc.cc:727
Class for representing queue sizes.
Definition: queue-size.h:95
AttributeValue implementation for QueueSize.
Definition: queue-size.h:221
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition: nstime.h:282
AttributeValue implementation for Time.
Definition: nstime.h:1308
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:922
Hold an unsigned integer type.
Definition: uinteger.h:44
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: boolean.h:85
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: double.h:42
Ptr< const AttributeChecker > MakeQueueSizeChecker(void)
Definition: queue-size.cc:28
Ptr< const AttributeAccessor > MakeQueueSizeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: queue-size.h:221
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: nstime.h:1309
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:265
@ INACTIVE
Inactive Period or unslotted CSMA-CA.
Definition: lr-wpan-mac.h:93
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
QueueSizeUnit
Enumeration of the operating modes of queues.
Definition: queue-size.h:43
@ PACKETS
Use number of packets for queue size.
Definition: queue-size.h:44
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1244
QueueDiscSizePolicy
Enumeration of the available policies to handle the queue disc size.
Definition: queue-disc.h:104
@ MULTIPLE_QUEUES
Used by queue discs with multiple internal queues/child queue discs.
Definition: queue-disc.h:107
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:522