|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
61 #ifndef RED_QUEUE_DISC_H
62 #define RED_QUEUE_DISC_H
64 #include "ns3/queue-disc.h"
65 #include "ns3/nstime.h"
66 #include "ns3/boolean.h"
67 #include "ns3/data-rate.h"
68 #include "ns3/random-variable-stream.h"
183 void SetTh (
double minTh,
double maxTh);
231 double Estimator (uint32_t nQueued, uint32_t m,
double qAvg,
double qW);
260 double ModifyP (
double p, uint32_t size);
319 #endif // RED_QUEUE_DISC_H
a unique identifier for an interface.
Time m_interval
Time interval to update m_curMaxP.
RedQueueDisc()
RedQueueDisc Constructor.
bool m_isNonlinear
True to enable Nonlinear RED.
uint32_t m_old
0 when average queue first exceeds threshold
double GetFengAdaptiveA(void)
Get the alpha value to adapt m_curMaxP in Feng's Adaptive RED.
double m_alpha
Increment parameter for m_curMaxP in ARED.
void UpdateMaxP(double newAve)
Update m_curMaxP.
bool m_isGentle
True to increase dropping prob.
double m_vC
(1.0 - m_curMaxP) / m_maxTh - used in "gentle" mode
double GetFengAdaptiveB(void)
Get the beta value to adapt m_curMaxP in Feng's Adaptive RED.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
@ DTYPE_UNFORCED
An "unforced" (random) drop.
@ DTYPE_FORCED
A "forced" drop.
double m_vB
-m_minTh / (m_maxTh - m_minTh)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetAredAlpha(double alpha)
Set the alpha value to adapt m_curMaxP.
void SetFengAdaptiveB(double b)
Set the beta value to adapt m_curMaxP in Feng's Adaptive RED.
uint32_t m_idlePktSize
Avg pkt size used during idle times.
@ Below
When m_qAvg < m_minTh.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
FengStatus
Used in Feng's Adaptive RED.
virtual void DoDispose(void)
Dispose of the object.
static constexpr const char * UNFORCED_MARK
Early probability marks.
double m_beta
Decrement parameter for m_curMaxP in ARED.
double m_bottom
Lower bound for m_curMaxP in ARED.
uint32_t m_cautious
0 for default RED 1 experimental (see red-queue-disc.cc) 2 experimental (see red-queue-disc....
uint32_t m_count
Number of packets since last random number generation.
void SetTh(double minTh, double maxTh)
Set the thresh limits of RED.
double m_top
Upper bound for m_curMaxP in ARED.
bool m_useEcn
True if ECN is used (packets are marked instead of being dropped)
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
@ Above
When m_qAvg > m_maxTh.
double GetAredBeta(void)
Get the beta value to adapt m_curMaxP.
Smart pointer class similar to boost::intrusive_ptr.
double GetAredAlpha(void)
Get the alpha value to adapt m_curMaxP.
Class for representing data rates.
bool m_isWait
True for waiting between dropped packets.
uint32_t m_meanPktSize
Avg pkt size.
double CalculatePNew(void)
Returns a probability using these function parameters for the DropEarly function.
double Estimator(uint32_t nQueued, uint32_t m, double qAvg, double qW)
Compute the average queue size.
double m_vA
1.0 / (m_maxTh - m_minTh)
double m_maxTh
Maximum threshold for m_qAvg (bytes or packets), should be >= 2 * m_minTh.
Ptr< UniformRandomVariable > m_uv
rng stream
DataRate m_linkBandwidth
Link bandwidth.
double ModifyP(double p, uint32_t size)
Returns a probability using these function parameters for the DropEarly function.
Time m_targetDelay
Target average queuing delay in ARED.
double m_a
Decrement parameter for m_curMaxP in Feng's Adaptive RED.
Simulation virtual time values and global simulation resolution.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool m_isARED
True to enable Adaptive RED.
FengStatus m_fengStatus
For use in Feng's Adaptive RED.
double m_ptc
packet time constant in packets/second
void SetFengAdaptiveA(double a)
Set the alpha value to adapt m_curMaxP in Feng's Adaptive RED.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
virtual ~RedQueueDisc()
Destructor.
@ Between
When m_maxTh < m_qAvg < m_minTh.
static constexpr const char * UNFORCED_DROP
Early probability drops.
uint32_t m_countBytes
Number of bytes since last drop.
Time m_rtt
Rtt to be considered while automatically setting m_bottom in ARED.
double m_curMaxP
Current max_p.
Time m_idleTime
Start of current idle period.
double m_b
Increment parameter for m_curMaxP in Feng's Adaptive RED.
static constexpr const char * FORCED_MARK
Forced marks, m_qAvg > m_maxTh.
double m_minTh
Minimum threshold for m_qAvg (bytes or packets)
double m_vD
2.0 * m_curMaxP - 1.0 - used in "gentle" mode
static TypeId GetTypeId(void)
Get the type ID.
static constexpr const char * FORCED_DROP
Forced drops, m_qAvg > m_maxTh.
Time m_lastSet
Last time m_curMaxP was updated.
virtual void InitializeParams(void)
Initialize the queue parameters.
double m_qAvg
Average queue length.
bool m_isNs1Compat
Ns-1 compatibility.
bool m_isAdaptMaxP
True to adapt m_curMaxP.
uint32_t m_idle
0/1 idle status
uint32_t DropEarly(Ptr< QueueDiscItem > item, uint32_t qSize)
Check if a packet needs to be dropped due to probability mark.
void SetAredBeta(double beta)
Set the beta value to adapt m_curMaxP.
double m_qW
Queue weight given to cur queue size sample.
bool m_useHardDrop
True if packets are always dropped above max threshold.
Time m_linkDelay
Link delay.
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
void UpdateMaxPFeng(double newAve)
Update m_curMaxP based on Feng's Adaptive RED.
double m_lInterm
The max probability of dropping a packet.
bool m_isFengAdaptive
True to enable Feng's Adaptive RED.