28 #ifndef PIE_QUEUE_DISC_H 29 #define PIE_QUEUE_DISC_H 31 #include "ns3/queue-disc.h" 32 #include "ns3/nstime.h" 33 #include "ns3/boolean.h" 34 #include "ns3/data-rate.h" 35 #include "ns3/timer.h" 36 #include "ns3/event-id.h" 37 #include "ns3/random-variable-stream.h" 39 #define BURST_RESET_TIMEOUT 1.5 44 class UniformRandomVariable;
Simulation virtual time values and global simulation resolution.
Time m_tUpdate
Time period after which CalculateP () is called.
Smart pointer class similar to boost::intrusive_ptr.
double m_avgDqRate
Time averaged dequeue rate.
Time m_maxBurst
Maximum burst allowed before random early dropping kicks in.
double m_a
Parameter to pie controller.
static constexpr const char * FORCED_DROP
Drops due to queue limit: reactive.
virtual void InitializeParams(void)
Initialize the queue parameters.
uint32_t m_burstReset
Used to reset value of burst allowance.
static constexpr const char * UNFORCED_DROP
Early probability drops: proactive.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
Implements PIE Active Queue Management discipline.
Time m_qDelayRef
Desired queue delay.
double m_dropProb
Variable used in calculation of drop probability.
uint32_t m_meanPktSize
Average packet size in bytes.
Time GetQueueDelay(void)
Get queue delay.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
Time m_sUpdate
Start time of the update timer.
uint32_t m_dqThreshold
Minimum queue size in bytes before dequeue rate is measured.
Time m_qDelayOld
Old value of queue delay.
double m_dqStart
Start timestamp of current measurement cycle.
bool DropEarly(Ptr< QueueDiscItem > item, uint32_t qSize)
Check if a packet needs to be dropped due to probability drop.
virtual void DoDispose(void)
Dispose of the object.
void CalculateP()
Periodically update the drop probability based on the delay samples: not only the current delay sampl...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
EventId m_rtrsEvent
Event used to decide the decision of interval of drop probability calculation.
Ptr< UniformRandomVariable > m_uv
Rng stream.
PieQueueDisc()
PieQueueDisc Constructor.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Time m_qDelay
Current value of queue delay.
An identifier for simulation events.
static TypeId GetTypeId(void)
Get the type ID.
BurstStateT m_burstState
Used to determine the current state of burst.
Time m_burstAllowance
Current max burst value in seconds that is allowed before random drops kick in.
virtual ~PieQueueDisc()
PieQueueDisc Destructor.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
double m_b
Parameter to pie controller.
uint64_t m_dqCount
Number of bytes departed since current measurement cycle starts.
a unique identifier for an interface.
static const uint64_t DQCOUNT_INVALID
Invalid dqCount value.
bool m_inMeasurement
Indicates whether we are in a measurement cycle.