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  return u <= p;
332 }
333 
334 void
336 {
337  NS_LOG_FUNCTION(this);
338  Time qDelay;
339  double p = 0.0;
340  bool missingInitFlag = false;
341 
343  {
344  if (m_avgDqRate > 0)
345  {
346  qDelay = Seconds(GetInternalQueue(0)->GetNBytes() / m_avgDqRate);
347  }
348  else
349  {
350  qDelay = Seconds(0);
351  missingInitFlag = true;
352  }
353  m_qDelay = qDelay;
354  }
355  else
356  {
357  qDelay = m_qDelay;
358  }
359  NS_LOG_DEBUG("Queue delay while calculating probability: " << qDelay.GetMilliSeconds() << "ms");
360 
361  if (m_burstAllowance.GetSeconds() > 0)
362  {
363  m_dropProb = 0;
364  }
365  else
366  {
367  p = m_a * (qDelay.GetSeconds() - m_qDelayRef.GetSeconds()) +
368  m_b * (qDelay.GetSeconds() - m_qDelayOld.GetSeconds());
369  if (m_dropProb < 0.000001)
370  {
371  p /= 2048;
372  }
373  else if (m_dropProb < 0.00001)
374  {
375  p /= 512;
376  }
377  else if (m_dropProb < 0.0001)
378  {
379  p /= 128;
380  }
381  else if (m_dropProb < 0.001)
382  {
383  p /= 32;
384  }
385  else if (m_dropProb < 0.01)
386  {
387  p /= 8;
388  }
389  else if (m_dropProb < 0.1)
390  {
391  p /= 2;
392  }
393  else
394  {
395  // The pseudocode in Section 4.2 of RFC 8033 suggests to use this for
396  // assignment of p, but this assignment causes build failure on Mac OS
397  // p = p;
398  }
399 
400  // Cap Drop Adjustment (Section 5.5 of RFC 8033)
401  if (m_isCapDropAdjustment && (m_dropProb >= 0.1) && (p > 0.02))
402  {
403  p = 0.02;
404  }
405  }
406 
407  p += m_dropProb;
408 
409  // For non-linear drop in prob
410  // Decay the drop probability exponentially (Section 4.2 of RFC 8033)
411  if (qDelay.GetSeconds() == 0 && m_qDelayOld.GetSeconds() == 0)
412  {
413  p *= 0.98;
414  }
415 
416  // bound the drop probability (Section 4.2 of RFC 8033)
417  if (p < 0)
418  {
419  m_dropProb = 0;
420  }
421  else if (p > 1)
422  {
423  m_dropProb = 1;
424  }
425  else
426  {
427  m_dropProb = p;
428  }
429 
430  // Section 4.4 #2
432  {
434  }
435  else
436  {
438  }
439 
440  auto burstResetLimit = static_cast<uint32_t>(BURST_RESET_TIMEOUT / m_tUpdate.GetSeconds());
441  if ((qDelay.GetSeconds() < 0.5 * m_qDelayRef.GetSeconds()) &&
442  (m_qDelayOld.GetSeconds() < (0.5 * m_qDelayRef.GetSeconds())) && (m_dropProb == 0) &&
443  !missingInitFlag)
444  {
446  m_avgDqRate = 0.0;
447  }
448  if ((qDelay.GetSeconds() < 0.5 * m_qDelayRef.GetSeconds()) &&
449  (m_qDelayOld.GetSeconds() < (0.5 * m_qDelayRef.GetSeconds())) && (m_dropProb == 0) &&
450  (m_burstAllowance.GetSeconds() == 0))
451  {
453  {
455  m_burstReset = 0;
456  }
457  else if (m_burstState == IN_BURST)
458  {
459  m_burstReset++;
460  if (m_burstReset > burstResetLimit)
461  {
462  m_burstReset = 0;
464  }
465  }
466  }
467  else if (m_burstState == IN_BURST)
468  {
469  m_burstReset = 0;
470  }
471 
472  m_qDelayOld = qDelay;
474 }
475 
478 {
479  NS_LOG_FUNCTION(this);
480 
481  if (GetInternalQueue(0)->IsEmpty())
482  {
483  NS_LOG_LOGIC("Queue empty");
484  return nullptr;
485  }
486 
487  Ptr<QueueDiscItem> item = GetInternalQueue(0)->Dequeue();
488  NS_ASSERT_MSG(item, "Dequeue null, but internal queue not empty");
489 
490  // If L4S is enabled and packet is ECT1, then check if delay is greater
491  // than CE threshold and if it is then mark the packet,
492  // skip PIE steps, and return the item.
493  if (m_useL4s)
494  {
495  uint8_t tosByte = 0;
496  if (item->GetUint8Value(QueueItem::IP_DSFIELD, tosByte) &&
497  (((tosByte & 0x3) == 1) || (tosByte & 0x3) == 3))
498  {
499  if ((tosByte & 0x3) == 1)
500  {
501  NS_LOG_DEBUG("ECT1 packet " << static_cast<uint16_t>(tosByte & 0x3));
502  }
503  else
504  {
505  NS_LOG_DEBUG("CE packet " << static_cast<uint16_t>(tosByte & 0x3));
506  }
507  if ((Now() - item->GetTimeStamp() > m_ceThreshold) &&
509  {
510  NS_LOG_LOGIC("Marking due to CeThreshold " << m_ceThreshold.GetSeconds());
511  }
512  return item;
513  }
514  }
515 
516  // if not in a measurement cycle and the queue has built up to dq_threshold,
517  // start the measurement cycle
519  {
521  {
522  m_dqStart = Now();
523  m_dqCount = 0;
524  m_inMeasurement = true;
525  }
526 
527  if (m_inMeasurement)
528  {
529  m_dqCount += item->GetSize();
530 
531  // done with a measurement cycle
532  if (m_dqCount >= m_dqThreshold)
533  {
534  Time dqTime = Now() - m_dqStart;
535  if (dqTime > Seconds(0))
536  {
537  if (m_avgDqRate == 0)
538  {
539  m_avgDqRate = m_dqCount / dqTime.GetSeconds();
540  }
541  else
542  {
543  m_avgDqRate =
544  (0.5 * m_avgDqRate) + (0.5 * (m_dqCount / dqTime.GetSeconds()));
545  }
546  }
547  NS_LOG_DEBUG("Average Dequeue Rate after Dequeue: " << m_avgDqRate);
548 
549  // restart a measurement cycle if there is enough data
551  {
552  m_dqStart = Now();
553  m_dqCount = 0;
554  m_inMeasurement = true;
555  }
556  else
557  {
558  m_dqCount = 0;
559  m_inMeasurement = false;
560  }
561  }
562  }
563  }
564  else
565  {
566  m_qDelay = Now() - item->GetTimeStamp();
567 
568  if (GetInternalQueue(0)->GetNBytes() == 0)
569  {
570  m_qDelay = Seconds(0);
571  }
572  }
573  return item;
574 }
575 
576 bool
578 {
579  NS_LOG_FUNCTION(this);
580  if (GetNQueueDiscClasses() > 0)
581  {
582  NS_LOG_ERROR("PieQueueDisc cannot have classes");
583  return false;
584  }
585 
586  if (GetNPacketFilters() > 0)
587  {
588  NS_LOG_ERROR("PieQueueDisc cannot have packet filters");
589  return false;
590  }
591 
592  if (GetNInternalQueues() == 0)
593  {
594  // add a DropTail queue
597  QueueSizeValue(GetMaxSize())));
598  }
599 
600  if (GetNInternalQueues() != 1)
601  {
602  NS_LOG_ERROR("PieQueueDisc needs 1 internal queue");
603  return false;
604  }
605 
606  return true;
607 }
608 
609 } // namespace ns3
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
A FIFO packet queue that drops tail-end packets on overflow.
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:77
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:573
uint32_t GetNPackets() const
Get the number of packets stored by the queue disc.
Definition: queue-disc.cc:432
uint32_t GetNBytes() const
Get the amount of bytes stored by the queue disc.
Definition: queue-disc.cc:439
Ptr< InternalQueue > GetInternalQueue(std::size_t i) const
Get the i-th internal queue.
Definition: queue-disc.cc:591
QueueSize GetCurrentSize() const
Get the current size of the queue disc in bytes, if operating in bytes mode, or packets,...
Definition: queue-disc.cc:515
std::size_t GetNQueueDiscClasses() const
Get the number of queue disc classes.
Definition: queue-disc.cc:661
QueueSize GetMaxSize() const
Get the maximum size of the queue disc.
Definition: queue-disc.cc:446
std::size_t GetNPacketFilters() const
Get the number of packet filters.
Definition: queue-disc.cc:618
bool SetMaxSize(QueueSize size)
Set the maximum size of the queue disc.
Definition: queue-disc.cc:474
std::size_t GetNInternalQueues() const
Get the number of internal queues.
Definition: queue-disc.cc:598
void DoDispose() override
Dispose of the object.
Definition: queue-disc.cc:376
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:809
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:720
Class for representing queue sizes.
Definition: queue-size.h:96
uint32_t GetValue() const
Get the underlying value.
Definition: queue-size.cc:183
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:571
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:408
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:403
static Time Max()
Maximum representable Time Not to be confused with Max(Time,Time).
Definition: nstime.h:297
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:931
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
#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:305
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1326
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
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 > MakeBooleanChecker()
Definition: boolean.cc:124
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition: nstime.h:1414
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:533
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition: boolean.h:86
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Definition: double.h:43
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Definition: uinteger.h:46
#define BURST_RESET_TIMEOUT
static const uint32_t packetSize
Packet size generated at the AP.