|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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
45 class UniformRandomVariable;
110 friend class::PieQueueDiscTestCase;
a unique identifier for an interface.
bool DropEarly(Ptr< QueueDiscItem > item, uint32_t qSize)
Check if a packet needs to be dropped due to probability drop.
static constexpr const char * CE_THRESHOLD_EXCEEDED_MARK
Early probability marks: proactive.
An identifier for simulation events.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
bool m_useDerandomization
Enable Derandomization feature mentioned in RFC 8033.
PieQueueDisc()
PieQueueDisc Constructor.
Implements PIE Active Queue Management discipline.
bool m_useDqRateEstimator
Enable/Disable usage of dequeue rate estimator for queue delay calculation.
bool m_useL4s
True if L4S is used (ECT1 packets are marked at CE threshold)
bool m_isCapDropAdjustment
Enable/Disable Cap Drop Adjustment feature mentioned in RFC 8033.
BurstStateT m_burstState
Used to determine the current state of burst.
void CalculateP()
Periodically update the drop probability based on the delay samples: not only the current delay sampl...
Pie Queue Disc Test Case.
Smart pointer class similar to boost::intrusive_ptr.
virtual void DoDispose(void)
Dispose of the object.
virtual ~PieQueueDisc()
PieQueueDisc Destructor.
Time m_activeThreshold
Threshold for activating PIE (disabled by default)
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
Time m_qDelayRef
Desired queue delay.
Time m_sUpdate
Start time of the update timer.
Time m_dqStart
Start timestamp of current measurement cycle.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool m_active
Indicates whether PIE is in active state or not.
bool m_useEcn
Enable ECN Marking functionality.
double m_dropProb
Variable used in calculation of drop probability.
Simulation virtual time values and global simulation resolution.
double m_b
Parameter to pie controller.
double m_accuProb
Accumulated drop probability.
static TypeId GetTypeId(void)
Get the type ID.
bool m_inMeasurement
Indicates whether we are in a measurement cycle.
Ptr< UniformRandomVariable > m_uv
Rng stream.
Time m_qDelayOld
Old value of queue delay.
uint32_t m_burstReset
Used to reset value of burst allowance.
static constexpr const char * UNFORCED_DROP
Early probability drops: proactive.
static constexpr const char * FORCED_DROP
Drops due to queue limit: reactive.
double m_avgDqRate
Time averaged dequeue rate.
Time GetQueueDelay(void)
Get queue delay.
uint32_t m_meanPktSize
Average packet size in bytes.
uint64_t m_dqCount
Number of bytes departed since current measurement cycle starts.
virtual void InitializeParams(void)
Initialize the queue parameters.
Time m_ceThreshold
Threshold above which to CE mark.
double m_a
Parameter to pie controller.
Time m_burstAllowance
Current max burst value in seconds that is allowed before random drops kick in.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
EventId m_rtrsEvent
Event used to decide the decision of interval of drop probability calculation.
uint32_t m_dqThreshold
Minimum queue size in bytes before dequeue rate is measured.
static constexpr const char * UNFORCED_MARK
Early probability marks: proactive.
Time m_qDelay
Current value of queue delay.
static const uint64_t DQCOUNT_INVALID
Invalid dqCount value.
double m_markEcnTh
ECN marking threshold (default 10% as suggested in RFC 8033)
Time m_maxBurst
Maximum burst allowed before random early dropping kicks in.
Time m_tUpdate
Time period after which CalculateP () is called.