A Discrete-Event Network Simulator
API
pie-queue-disc.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 NITK Surathkal
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  * Authors: Shravya Ks <shravya.ks0@gmail.com>
18  * Smriti Murali <m.smriti.95@gmail.com>
19  * Mohit P. Tahiliani <tahiliani@nitk.edu.in>
20  */
21 
22 /*
23  * PORT NOTE: This code was ported from ns-2.36rc1 (queue/pie.cc).
24  * Most of the comments are also ported from the same.
25  */
26 
27 #include "pie-queue-disc.h"
28 
29 #include "ns3/abort.h"
30 #include "ns3/double.h"
31 #include "ns3/drop-tail-queue.h"
32 #include "ns3/enum.h"
33 #include "ns3/log.h"
34 #include "ns3/simulator.h"
35 #include "ns3/uinteger.h"
36 
37 namespace ns3
38 {
39 
40 NS_LOG_COMPONENT_DEFINE("PieQueueDisc");
41 
42 NS_OBJECT_ENSURE_REGISTERED(PieQueueDisc);
43 
44 TypeId
46 {
47  static TypeId tid =
48  TypeId("ns3::PieQueueDisc")
50  .SetGroupName("TrafficControl")
51  .AddConstructor<PieQueueDisc>()
52  .AddAttribute("MeanPktSize",
53  "Average of packet size",
54  UintegerValue(1000),
56  MakeUintegerChecker<uint32_t>())
57  .AddAttribute("A",
58  "Value of alpha",
59  DoubleValue(0.125),
61  MakeDoubleChecker<double>())
62  .AddAttribute("B",
63  "Value of beta",
64  DoubleValue(1.25),
66  MakeDoubleChecker<double>())
67  .AddAttribute("Tupdate",
68  "Time period to calculate drop probability",
72  .AddAttribute("Supdate",
73  "Start time of the update timer",
74  TimeValue(Seconds(0)),
77  .AddAttribute("MaxSize",
78  "The maximum number of packets accepted by this queue disc",
79  QueueSizeValue(QueueSize("25p")),
80  MakeQueueSizeAccessor(&QueueDisc::SetMaxSize, &QueueDisc::GetMaxSize),
81  MakeQueueSizeChecker())
82  .AddAttribute("DequeueThreshold",
83  "Minimum queue size in bytes before dequeue rate is measured",
84  UintegerValue(16384),
86  MakeUintegerChecker<uint32_t>())
87  .AddAttribute("QueueDelayReference",
88  "Desired queue delay",
92  .AddAttribute("MaxBurstAllowance",
93  "Current max burst allowance before random drop",
94  TimeValue(MilliSeconds(150)),
97  .AddAttribute("UseDequeueRateEstimator",
98  "Enable/Disable usage of Dequeue Rate Estimator",
99  BooleanValue(false),
102  .AddAttribute("UseCapDropAdjustment",
103  "Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033",
104  BooleanValue(true),
107  .AddAttribute("UseEcn",
108  "True to use ECN (packets are marked instead of being dropped)",
109  BooleanValue(false),
112  .AddAttribute("MarkEcnThreshold",
113  "ECN marking threshold (RFC 8033 suggests 0.1 (i.e., 10%) default)",
114  DoubleValue(0.1),
116  MakeDoubleChecker<double>(0, 1))
117  .AddAttribute("UseDerandomization",
118  "Enable/Disable Derandomization feature mentioned in RFC 8033",
119  BooleanValue(false),
122  .AddAttribute("ActiveThreshold",
123  "Threshold for activating PIE (disabled by default)",
124  TimeValue(Time::Max()),
126  MakeTimeChecker())
127  .AddAttribute("CeThreshold",
128  "The FqPie CE threshold for marking packets",
129  TimeValue(Time::Max()),
131  MakeTimeChecker())
132  .AddAttribute("UseL4s",
133  "True to use L4S (only ECT1 packets are marked at CE threshold)",
134  BooleanValue(false),
137 
138  return tid;
139 }
140 
143 {
144  NS_LOG_FUNCTION(this);
145  m_uv = CreateObject<UniformRandomVariable>();
147 }
148 
150 {
151  NS_LOG_FUNCTION(this);
152 }
153 
154 void
156 {
157  NS_LOG_FUNCTION(this);
158  m_uv = nullptr;
161 }
162 
163 Time
165 {
166  return m_qDelay;
167 }
168 
169 int64_t
171 {
172  NS_LOG_FUNCTION(this << stream);
173  m_uv->SetStream(stream);
174  return 1;
175 }
176 
177 bool
179 {
180  NS_LOG_FUNCTION(this << item);
181 
182  QueueSize nQueued = GetCurrentSize();
183  // If L4S is enabled, then check if the packet is ECT1, and if it is then set isEct true
184  bool isEct1 = false;
185  if (item && m_useL4s)
186  {
187  uint8_t tosByte = 0;
188  if (item->GetUint8Value(QueueItem::IP_DSFIELD, tosByte) &&
189  (((tosByte & 0x3) == 1) || (tosByte & 0x3) == 3))
190  {
191  if ((tosByte & 0x3) == 1)
192  {
193  NS_LOG_DEBUG("Enqueueing ECT1 packet " << static_cast<uint16_t>(tosByte & 0x3));
194  }
195  else
196  {
197  NS_LOG_DEBUG("Enqueueing CE packet " << static_cast<uint16_t>(tosByte & 0x3));
198  }
199  isEct1 = true;
200  }
201  }
202 
203  if (nQueued + item > GetMaxSize())
204  {
205  // Drops due to queue limit: reactive
207  m_accuProb = 0;
208  return false;
209  }
210  // isEct1 will be true only if L4S enabled as well as the packet is ECT1.
211  // If L4S is enabled and packet is ECT1 then directly enqueue the packet.
212  else if ((m_activeThreshold == Time::Max() || m_active) && !isEct1 &&
213  DropEarly(item, nQueued.GetValue()))
214  {
215  if (!m_useEcn || m_dropProb >= m_markEcnTh || !Mark(item, UNFORCED_MARK))
216  {
217  // Early probability drop: proactive
219  m_accuProb = 0;
220  return false;
221  }
222  }
223 
224  // No drop
225  bool retval = GetInternalQueue(0)->Enqueue(item);
226 
227  // If the queue is over a certain threshold, Turn ON PIE
229  {
230  m_active = true;
231  m_qDelayOld = Seconds(0);
232  m_dropProb = 0;
233  m_inMeasurement = true;
234  m_dqCount = 0;
235  m_avgDqRate = 0;
237  m_accuProb = 0;
238  m_dqStart = Now();
239  }
240 
241  // If queue has been Idle for a while, Turn OFF PIE
242  // Reset Counters when accessing the queue after some idle period if PIE was active before
244  m_qDelay.GetMilliSeconds() == 0)
245  {
246  m_active = false;
247  m_inMeasurement = false;
248  }
249 
250  // If Queue::Enqueue fails, QueueDisc::DropBeforeEnqueue is called by the
251  // internal queue because QueueDisc::AddInternalQueue sets the trace callback
252 
253  NS_LOG_LOGIC("\t bytesInQueue " << GetInternalQueue(0)->GetNBytes());
254  NS_LOG_LOGIC("\t packetsInQueue " << GetInternalQueue(0)->GetNPackets());
255 
256  return retval;
257 }
258 
259 void
261 {
262  // Initially queue is empty so variables are initialize to zero except m_dqCount
263  m_inMeasurement = false;
265  m_dropProb = 0;
266  m_avgDqRate = 0.0;
267  m_dqStart = Seconds(0);
269  m_qDelayOld = Seconds(0);
270  m_accuProb = 0.0;
271  m_active = false;
272 }
273 
274 bool
276 {
277  NS_LOG_FUNCTION(this << item << qSize);
278  if (m_burstAllowance.GetSeconds() > 0)
279  {
280  // If there is still burst_allowance left, skip random early drop.
281  return false;
282  }
283 
284  if (m_burstState == NO_BURST)
285  {
288  }
289 
290  double p = m_dropProb;
291 
292  uint32_t packetSize = item->GetSize();
293 
294  if (GetMaxSize().GetUnit() == QueueSizeUnit::BYTES)
295  {
296  p = p * packetSize / m_meanPktSize;
297  }
298 
299  // Safeguard PIE to be work conserving (Section 4.1 of RFC 8033)
300  if ((m_qDelayOld.GetSeconds() < (0.5 * m_qDelayRef.GetSeconds())) && (m_dropProb < 0.2))
301  {
302  return false;
303  }
304  else if (GetMaxSize().GetUnit() == QueueSizeUnit::BYTES && qSize <= 2 * m_meanPktSize)
305  {
306  return false;
307  }
308  else if (GetMaxSize().GetUnit() == QueueSizeUnit::PACKETS && qSize <= 2)
309  {
310  return false;
311  }
312 
314  {
315  if (m_dropProb == 0)
316  {
317  m_accuProb = 0;
318  }
320  if (m_accuProb < 0.85)
321  {
322  return false;
323  }
324  else if (m_accuProb >= 8.5)
325  {
326  return true;
327  }
328  }
329 
330  double u = m_uv->GetValue();
331  if (u > p)
332  {
333  return false;
334  }
335 
336  return true;
337 }
338 
339 void
341 {
342  NS_LOG_FUNCTION(this);
343  Time qDelay;
344  double p = 0.0;
345  bool missingInitFlag = false;
346 
348  {
349  if (m_avgDqRate > 0)
350  {
351  qDelay = Seconds(GetInternalQueue(0)->GetNBytes() / m_avgDqRate);
352  }
353  else
354  {
355  qDelay = Seconds(0);
356  missingInitFlag = true;
357  }
358  m_qDelay = qDelay;
359  }
360  else
361  {
362  qDelay = m_qDelay;
363  }
364  NS_LOG_DEBUG("Queue delay while calculating probability: " << qDelay.GetMilliSeconds() << "ms");
365 
366  if (m_burstAllowance.GetSeconds() > 0)
367  {
368  m_dropProb = 0;
369  }
370  else
371  {
372  p = m_a * (qDelay.GetSeconds() - m_qDelayRef.GetSeconds()) +
373  m_b * (qDelay.GetSeconds() - m_qDelayOld.GetSeconds());
374  if (m_dropProb < 0.000001)
375  {
376  p /= 2048;
377  }
378  else if (m_dropProb < 0.00001)
379  {
380  p /= 512;
381  }
382  else if (m_dropProb < 0.0001)
383  {
384  p /= 128;
385  }
386  else if (m_dropProb < 0.001)
387  {
388  p /= 32;
389  }
390  else if (m_dropProb < 0.01)
391  {
392  p /= 8;
393  }
394  else if (m_dropProb < 0.1)
395  {
396  p /= 2;
397  }
398  else
399  {
400  // The pseudocode in Section 4.2 of RFC 8033 suggests to use this for
401  // assignment of p, but this assignment causes build failure on Mac OS
402  // p = p;
403  }
404 
405  // Cap Drop Adjustment (Section 5.5 of RFC 8033)
406  if (m_isCapDropAdjustment && (m_dropProb >= 0.1) && (p > 0.02))
407  {
408  p = 0.02;
409  }
410  }
411 
412  p += m_dropProb;
413 
414  // For non-linear drop in prob
415  // Decay the drop probability exponentially (Section 4.2 of RFC 8033)
416  if (qDelay.GetSeconds() == 0 && m_qDelayOld.GetSeconds() == 0)
417  {
418  p *= 0.98;
419  }
420 
421  // bound the drop probability (Section 4.2 of RFC 8033)
422  if (p < 0)
423  {
424  m_dropProb = 0;
425  }
426  else if (p > 1)
427  {
428  m_dropProb = 1;
429  }
430  else
431  {
432  m_dropProb = p;
433  }
434 
435  // Section 4.4 #2
437  {
439  }
440  else
441  {
443  }
444 
445  uint32_t burstResetLimit = static_cast<uint32_t>(BURST_RESET_TIMEOUT / m_tUpdate.GetSeconds());
446  if ((qDelay.GetSeconds() < 0.5 * m_qDelayRef.GetSeconds()) &&
447  (m_qDelayOld.GetSeconds() < (0.5 * m_qDelayRef.GetSeconds())) && (m_dropProb == 0) &&
448  !missingInitFlag)
449  {
451  m_avgDqRate = 0.0;
452  }
453  if ((qDelay.GetSeconds() < 0.5 * m_qDelayRef.GetSeconds()) &&
454  (m_qDelayOld.GetSeconds() < (0.5 * m_qDelayRef.GetSeconds())) && (m_dropProb == 0) &&
455  (m_burstAllowance.GetSeconds() == 0))
456  {
458  {
460  m_burstReset = 0;
461  }
462  else if (m_burstState == IN_BURST)
463  {
464  m_burstReset++;
465  if (m_burstReset > burstResetLimit)
466  {
467  m_burstReset = 0;
469  }
470  }
471  }
472  else if (m_burstState == IN_BURST)
473  {
474  m_burstReset = 0;
475  }
476 
477  m_qDelayOld = qDelay;
479 }
480 
483 {
484  NS_LOG_FUNCTION(this);
485 
486  if (GetInternalQueue(0)->IsEmpty())
487  {
488  NS_LOG_LOGIC("Queue empty");
489  return nullptr;
490  }
491 
492  Ptr<QueueDiscItem> item = GetInternalQueue(0)->Dequeue();
493  NS_ASSERT_MSG(item, "Dequeue null, but internal queue not empty");
494 
495  // If L4S is enabled and packet is ECT1, then check if delay is greater
496  // than CE threshold and if it is then mark the packet,
497  // skip PIE steps, and return the item.
498  if (m_useL4s)
499  {
500  uint8_t tosByte = 0;
501  if (item->GetUint8Value(QueueItem::IP_DSFIELD, tosByte) &&
502  (((tosByte & 0x3) == 1) || (tosByte & 0x3) == 3))
503  {
504  if ((tosByte & 0x3) == 1)
505  {
506  NS_LOG_DEBUG("ECT1 packet " << static_cast<uint16_t>(tosByte & 0x3));
507  }
508  else
509  {
510  NS_LOG_DEBUG("CE packet " << static_cast<uint16_t>(tosByte & 0x3));
511  }
512  if ((Now() - item->GetTimeStamp() > m_ceThreshold) &&
514  {
515  NS_LOG_LOGIC("Marking due to CeThreshold " << m_ceThreshold.GetSeconds());
516  }
517  return item;
518  }
519  }
520 
521  // if not in a measurement cycle and the queue has built up to dq_threshold,
522  // start the measurement cycle
524  {
526  {
527  m_dqStart = Now();
528  m_dqCount = 0;
529  m_inMeasurement = true;
530  }
531 
532  if (m_inMeasurement)
533  {
534  m_dqCount += item->GetSize();
535 
536  // done with a measurement cycle
537  if (m_dqCount >= m_dqThreshold)
538  {
539  Time dqTime = Now() - m_dqStart;
540  if (dqTime > Seconds(0))
541  {
542  if (m_avgDqRate == 0)
543  {
544  m_avgDqRate = m_dqCount / dqTime.GetSeconds();
545  }
546  else
547  {
548  m_avgDqRate =
549  (0.5 * m_avgDqRate) + (0.5 * (m_dqCount / dqTime.GetSeconds()));
550  }
551  }
552  NS_LOG_DEBUG("Average Dequeue Rate after Dequeue: " << m_avgDqRate);
553 
554  // restart a measurement cycle if there is enough data
556  {
557  m_dqStart = Now();
558  m_dqCount = 0;
559  m_inMeasurement = true;
560  }
561  else
562  {
563  m_dqCount = 0;
564  m_inMeasurement = false;
565  }
566  }
567  }
568  }
569  else
570  {
571  m_qDelay = Now() - item->GetTimeStamp();
572 
573  if (GetInternalQueue(0)->GetNBytes() == 0)
574  {
575  m_qDelay = Seconds(0);
576  }
577  }
578  return item;
579 }
580 
581 bool
583 {
584  NS_LOG_FUNCTION(this);
585  if (GetNQueueDiscClasses() > 0)
586  {
587  NS_LOG_ERROR("PieQueueDisc cannot have classes");
588  return false;
589  }
590 
591  if (GetNPacketFilters() > 0)
592  {
593  NS_LOG_ERROR("PieQueueDisc cannot have packet filters");
594  return false;
595  }
596 
597  if (GetNInternalQueues() == 0)
598  {
599  // add a DropTail queue
603  }
604 
605  if (GetNInternalQueues() != 1)
606  {
607  NS_LOG_ERROR("PieQueueDisc needs 1 internal queue");
608  return false;
609  }
610 
611  return true;
612 }
613 
614 } // namespace ns3
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:42
Introspection did not find any typical Config paths.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Definition: event-id.cc:55
Implements PIE Active Queue Management discipline.
uint32_t m_dqThreshold
Minimum queue size in bytes before dequeue rate is measured.
uint32_t m_meanPktSize
Average packet size in bytes.
double m_markEcnTh
ECN marking threshold (default 10% as suggested in RFC 8033)
bool m_useDqRateEstimator
Enable/Disable usage of dequeue rate estimator for queue delay calculation.
bool DoEnqueue(Ptr< QueueDiscItem > item) override
This function actually enqueues a packet into the queue disc.
void DoDispose() override
Dispose of the object.
bool m_useL4s
True if L4S is used (ECT1 packets are marked at CE threshold)
Time m_sUpdate
Start time of the update timer.
Time m_dqStart
Start timestamp of current measurement cycle.
bool m_useDerandomization
Enable Derandomization feature mentioned in RFC 8033.
static constexpr const char * UNFORCED_DROP
Early probability drops: proactive.
Time m_maxBurst
Maximum burst allowed before random early dropping kicks in.
EventId m_rtrsEvent
Event used to decide the decision of interval of drop probability calculation.
void CalculateP()
Periodically update the drop probability based on the delay samples: not only the current delay sampl...
Time m_ceThreshold
Threshold above which to CE mark.
Time m_qDelayOld
Old value of queue delay.
double m_dropProb
Variable used in calculation of drop probability.
Time m_burstAllowance
Current max burst value in seconds that is allowed before random drops kick in.
BurstStateT m_burstState
Used to determine the current state of burst.
Time GetQueueDelay()
Get queue delay.
Ptr< QueueDiscItem > DoDequeue() override
This function actually extracts a packet from the queue disc.
bool DropEarly(Ptr< QueueDiscItem > item, uint32_t qSize)
Check if a packet needs to be dropped due to probability drop.
bool m_active
Indicates whether PIE is in active state or not.
double m_avgDqRate
Time averaged dequeue rate.
static const uint64_t DQCOUNT_INVALID
Invalid dqCount value.
uint32_t m_burstReset
Used to reset value of burst allowance.
void InitializeParams() override
Initialize the queue parameters.
bool m_inMeasurement
Indicates whether we are in a measurement cycle.
static constexpr const char * FORCED_DROP
Drops due to queue limit: reactive.
Time m_qDelayRef
Desired queue delay.
~PieQueueDisc() override
PieQueueDisc Destructor.
double m_a
Parameter to pie controller.
static constexpr const char * CE_THRESHOLD_EXCEEDED_MARK
Early probability marks: proactive.
Time m_activeThreshold
Threshold for activating PIE (disabled by default)
bool m_isCapDropAdjustment
Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
double m_accuProb
Accumulated drop probability.
Ptr< UniformRandomVariable > m_uv
Rng stream.
bool m_useEcn
Enable ECN Marking functionality.
Time m_tUpdate
Time period after which CalculateP () is called.
PieQueueDisc()
PieQueueDisc Constructor.
bool CheckConfig() override
Check whether the current configuration is correct.
Time m_qDelay
Current value of queue delay.
uint64_t m_dqCount
Number of bytes departed since current measurement cycle starts.
static TypeId GetTypeId()
Get the type ID.
double m_b
Parameter to pie controller.
static constexpr const char * UNFORCED_MARK
Early probability marks: proactive.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Definition: queue-disc.h:184
void AddInternalQueue(Ptr< InternalQueue > queue)
Add an internal queue to the tail of the list of queues.
Definition: queue-disc.cc:577
QueueSize GetCurrentSize()
Get the current size of the queue disc in bytes, if operating in bytes mode, or packets,...
Definition: queue-disc.cc:519
uint32_t GetNPackets() const
Get the number of packets stored by the queue disc.
Definition: queue-disc.cc:436
uint32_t GetNBytes() const
Get the amount of bytes stored by the queue disc.
Definition: queue-disc.cc:443
Ptr< InternalQueue > GetInternalQueue(std::size_t i) const
Get the i-th internal queue.
Definition: queue-disc.cc:595
std::size_t GetNQueueDiscClasses() const
Get the number of queue disc classes.
Definition: queue-disc.cc:665
QueueSize GetMaxSize() const
Get the maximum size of the queue disc.
Definition: queue-disc.cc:450
std::size_t GetNPacketFilters() const
Get the number of packet filters.
Definition: queue-disc.cc:622
bool SetMaxSize(QueueSize size)
Set the maximum size of the queue disc.
Definition: queue-disc.cc:478
std::size_t GetNInternalQueues() const
Get the number of internal queues.
Definition: queue-disc.cc:602
void DoDispose() override
Dispose of the object.
Definition: queue-disc.cc:379
bool Mark(Ptr< QueueDiscItem > item, const char *reason)
Marks the given packet and, if successful, updates the counters associated with the given reason.
Definition: queue-disc.cc:817
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:726
Class for representing queue sizes.
Definition: queue-size.h:96
uint32_t GetValue() const
Get the underlying value.
Definition: queue-size.cc:183
AttributeValue implementation for QueueSize.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition: simulator.h:568
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:407
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:402
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition: nstime.h:296
AttributeValue implementation for Time.
Definition: nstime.h:1423
a unique identifier for an interface.
Definition: type-id.h:60
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:935
Hold an unsigned integer type.
Definition: uinteger.h:45
double GetValue(double min, double max)
Get the next random value drawn from the distribution.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
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:86
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition: boolean.cc:124
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:43
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:1424
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:46
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:254
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:282
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > CreateObjectWithAttributes(Args... args)
Allocate an Object on the heap and initialize with a set of attributes.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
@ BYTES
Use number of bytes for queue size.
Definition: queue-size.h:46
@ PACKETS
Use number of packets for queue size.
Definition: queue-size.h:45
Time Now()
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:296
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1336
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1348
QueueDiscSizePolicy
Enumeration of the available policies to handle the queue disc size.
Definition: queue-disc.h:107
@ SINGLE_INTERNAL_QUEUE
Used by queue discs with single internal queue.
Definition: queue-disc.h:108
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:535
#define BURST_RESET_TIMEOUT
static const uint32_t packetSize
Packet size generated at the AP.