#include <red-queue.h>
Inheritance diagram for ns3::RedQueue:
Collaboration diagram for ns3::RedQueue:Classes | |
| struct | Stats |
| Stats. More... | |
Public Types | |
| enum | { DTYPE_NONE, DTYPE_FORCED, DTYPE_UNFORCED } |
| Drop types. More... | |
Public Types inherited from ns3::Queue | |
| enum | QueueMode { QUEUE_MODE_PACKETS, QUEUE_MODE_BYTES } |
| Enumeration of the modes supported in the class. More... | |
Public Member Functions | |
| RedQueue () | |
| RedQueue Constructor. More... | |
| virtual | ~RedQueue () |
| Destructor. More... | |
| int64_t | AssignStreams (int64_t stream) |
| Assign a fixed random variable stream number to the random variables used by this model. More... | |
| RedQueue::QueueMode | GetMode (void) |
| Get the encapsulation mode of this queue. More... | |
| uint32_t | GetQueueSize (void) |
| Get the current value of the queue in bytes or packets. More... | |
| Stats | GetStats () |
| Get the RED statistics after running. More... | |
| void | SetMode (RedQueue::QueueMode mode) |
| Set the operating mode of this queue. More... | |
| void | SetQueueLimit (uint32_t lim) |
| Set the limit of the queue. More... | |
| void | SetTh (double minTh, double maxTh) |
| Set the thresh limits of RED. More... | |
Public Member Functions inherited from ns3::Queue | |
| Queue () | |
| virtual | ~Queue () |
| Ptr< Packet > | Dequeue (void) |
| Remove a packet from the front of the Queue. More... | |
| void | DequeueAll (void) |
| Flush the queue. More... | |
| bool | Enqueue (Ptr< Packet > p) |
| Place a packet into the rear of the Queue. More... | |
| uint32_t | GetNBytes (void) const |
| uint32_t | GetNPackets (void) const |
| uint32_t | GetTotalDroppedBytes (void) const |
| uint32_t | GetTotalDroppedPackets (void) const |
| uint32_t | GetTotalReceivedBytes (void) const |
| uint32_t | GetTotalReceivedPackets (void) const |
| bool | IsEmpty (void) const |
| Ptr< const Packet > | Peek (void) const |
| Get a copy of the item at the front of the queue without removing it. More... | |
| void | ResetStatistics (void) |
| Resets the counts for dropped packets, dropped bytes, received packets, and received bytes. More... | |
Public Member Functions inherited from ns3::Object | |
| Object () | |
| virtual | ~Object () |
| void | AggregateObject (Ptr< Object > other) |
| void | Dispose (void) |
| Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
| AggregateIterator | GetAggregateIterator (void) const |
| virtual TypeId | GetInstanceTypeId (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| void | Initialize (void) |
| This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Constructor. More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. More... | |
| uint32_t | GetReferenceCount (void) const |
| Get the reference count of the object. More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment. More... | |
| void | Ref (void) const |
| Increment the reference count. More... | |
| void | Unref (void) const |
| Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. More... | |
| void | GetAttribute (std::string name, AttributeValue &value) const |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Queue | |
| static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId (void) |
| Register this type. More... | |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| static void | Cleanup (void) |
| Noop. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId (void) |
| Get the type ID. More... | |
Private Member Functions | |
| double | CalculatePNew (double qAvg, double maxTh, bool gentle, double vA, double vB, double vC, double vD, double maxP) |
| virtual Ptr< Packet > | DoDequeue (void) |
| virtual bool | DoEnqueue (Ptr< Packet > p) |
| virtual Ptr< const Packet > | DoPeek (void) const |
| uint32_t | DropEarly (Ptr< Packet > p, uint32_t qSize) |
| double | Estimator (uint32_t nQueued, uint32_t m, double qAvg, double qW) |
| void | InitializeParams (void) |
| double | ModifyP (double p, uint32_t count, uint32_t countBytes, uint32_t meanPktSize, bool wait, uint32_t size) |
Private Attributes | |
| uint32_t | m_bytesInQueue |
| uint32_t | m_cautious |
| uint32_t | m_count |
| uint32_t | m_countBytes |
| double | m_curMaxP |
| bool | m_hasRedStarted |
| uint32_t | m_idle |
| uint32_t | m_idlePktSize |
| Time | m_idleTime |
| bool | m_isGentle |
| bool | m_isNs1Compat |
| bool | m_isWait |
| DataRate | m_linkBandwidth |
| Time | m_linkDelay |
| double | m_lInterm |
| double | m_maxTh |
| uint32_t | m_meanPktSize |
| double | m_minTh |
| QueueMode | m_mode |
| uint32_t | m_old |
| std::list< Ptr< Packet > > | m_packets |
| double | m_ptc |
| double | m_qAvg |
| uint32_t | m_queueLimit |
| double | m_qW |
| Stats | m_stats |
| Ptr< UniformRandomVariable > | m_uv |
| double | m_vA |
| double | m_vB |
| double | m_vC |
| double | m_vD |
| double | m_vProb |
| double | m_vProb1 |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Queue | |
| void | Drop (Ptr< Packet > packet) |
| Drop a packet. More... | |
Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| virtual void | DoDispose (void) |
| This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
| virtual void | DoInitialize (void) |
| This method is called only once by Object::Initialize. More... | |
| virtual void | NotifyNewAggregate (void) |
| This method is invoked whenever two sets of objects are aggregated together. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| virtual void | NotifyConstructionCompleted (void) |
| This method is invoked once all member attributes have been initialized. More... | |
ns3::RedQueue is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Definition at line 82 of file red-queue.h.
| anonymous enum |
Drop types.
| Enumerator | |
|---|---|
| DTYPE_NONE | |
| DTYPE_FORCED |
Ok, no drop. |
| DTYPE_UNFORCED |
A "forced" drop. |
Definition at line 115 of file red-queue.h.
| ns3::RedQueue::RedQueue | ( | ) |
RedQueue Constructor.
Create a RED queue
Definition at line 151 of file red-queue.cc.
References m_uv, and NS_LOG_FUNCTION.
|
virtual |
| int64_t ns3::RedQueue::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
| stream | first stream index to use |
Definition at line 204 of file red-queue.cc.
References m_uv, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
Here is the call graph for this function:
|
private |
Definition at line 502 of file red-queue.cc.
References NS_LOG_FUNCTION.
Referenced by DropEarly().
Here is the caller graph for this function:Implements ns3::Queue.
Definition at line 613 of file red-queue.cc.
References ns3::Packet::GetSize(), m_bytesInQueue, m_idle, m_idleTime, m_packets, ns3::Simulator::Now(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Here is the call graph for this function:Implements ns3::Queue.
Definition at line 212 of file red-queue.cc.
References ns3::Queue::Drop(), DropEarly(), DTYPE_FORCED, DTYPE_NONE, DTYPE_UNFORCED, Estimator(), ns3::RedQueue::Stats::forcedDrop, GetMode(), ns3::Packet::GetSize(), InitializeParams(), m_bytesInQueue, m_cautious, m_count, m_countBytes, m_hasRedStarted, m_idle, m_idlePktSize, m_idleTime, m_isGentle, m_isNs1Compat, m_maxTh, m_meanPktSize, m_minTh, m_old, m_packets, m_ptc, m_qAvg, m_queueLimit, m_qW, m_stats, m_vProb, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::RedQueue::Stats::qLimDrop, ns3::Queue::QUEUE_MODE_BYTES, ns3::Queue::QUEUE_MODE_PACKETS, and ns3::RedQueue::Stats::unforcedDrop.
Here is the call graph for this function:Implements ns3::Queue.
Definition at line 642 of file red-queue.cc.
References m_bytesInQueue, m_packets, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Definition at line 441 of file red-queue.cc.
References CalculatePNew(), ns3::Packet::GetSize(), ns3::UniformRandomVariable::GetValue(), m_cautious, m_count, m_countBytes, m_curMaxP, m_isGentle, m_isWait, m_maxTh, m_meanPktSize, m_ptc, m_qAvg, m_qW, m_uv, m_vA, m_vB, m_vC, m_vD, m_vProb, m_vProb1, ModifyP(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by DoEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 421 of file red-queue.cc.
References NS_LOG_FUNCTION.
Referenced by DoEnqueue().
Here is the caller graph for this function:| RedQueue::QueueMode ns3::RedQueue::GetMode | ( | void | ) |
Get the encapsulation mode of this queue.
Get the encapsulation mode of this queue
Definition at line 174 of file red-queue.cc.
References m_mode, and NS_LOG_FUNCTION.
Referenced by DoEnqueue(), GetQueueSize(), ModifyP(), and RedQueueTestCase::RunRedTest().
Here is the caller graph for this function:| uint32_t ns3::RedQueue::GetQueueSize | ( | void | ) |
Get the current value of the queue in bytes or packets.
Definition at line 595 of file red-queue.cc.
References GetMode(), m_bytesInQueue, m_packets, NS_ABORT_MSG, NS_LOG_FUNCTION, ns3::Queue::QUEUE_MODE_BYTES, and ns3::Queue::QUEUE_MODE_PACKETS.
Referenced by RedQueueTestCase::RunRedTest().
Here is the call graph for this function:
Here is the caller graph for this function:| RedQueue::Stats ns3::RedQueue::GetStats | ( | ) |
Get the RED statistics after running.
Definition at line 197 of file red-queue.cc.
References m_stats, and NS_LOG_FUNCTION.
|
static |
Definition at line 75 of file red-queue.cc.
References m_idlePktSize, m_isGentle, m_isNs1Compat, m_isWait, m_linkBandwidth, m_linkDelay, m_lInterm, m_maxTh, m_meanPktSize, m_minTh, m_queueLimit, m_qW, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakeTimeChecker(), ns3::Queue::QUEUE_MODE_BYTES, ns3::Queue::QUEUE_MODE_PACKETS, SetMode(), and ns3::TypeId::SetParent().
Here is the call graph for this function:
|
private |
Definition at line 342 of file red-queue.cc.
References ns3::RedQueue::Stats::forcedDrop, ns3::DataRate::GetBitRate(), ns3::Time::GetSeconds(), m_cautious, m_count, m_countBytes, m_curMaxP, m_idle, m_idleTime, m_isGentle, m_isWait, m_linkBandwidth, m_linkDelay, m_lInterm, m_maxTh, m_meanPktSize, m_minTh, m_old, m_ptc, m_qAvg, m_qW, m_stats, m_vA, m_vB, m_vC, m_vD, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::RedQueue::Stats::qLimDrop, and ns3::RedQueue::Stats::unforcedDrop.
Referenced by DoEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 543 of file red-queue.cc.
References GetMode(), NS_LOG_FUNCTION, and ns3::Queue::QUEUE_MODE_BYTES.
Referenced by DropEarly().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::RedQueue::SetMode | ( | RedQueue::QueueMode | mode | ) |
Set the operating mode of this queue.
Set operating mode
| mode | The operating mode of this queue. |
Definition at line 167 of file red-queue.cc.
References m_mode, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
Here is the caller graph for this function:| void ns3::RedQueue::SetQueueLimit | ( | uint32_t | lim | ) |
Set the limit of the queue.
| lim | The limit in bytes or packets. |
Definition at line 181 of file red-queue.cc.
References m_queueLimit, and NS_LOG_FUNCTION.
Referenced by RedQueueTestCase::RunRedTest().
Here is the caller graph for this function:| void ns3::RedQueue::SetTh | ( | double | minTh, |
| double | maxTh | ||
| ) |
Set the thresh limits of RED.
| minTh | Minimum thresh in bytes or packets. |
| maxTh | Maximum thresh in bytes or packets. |
Definition at line 188 of file red-queue.cc.
References m_maxTh, m_minTh, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by RedQueueTestCase::RunRedTest().
Here is the caller graph for this function:
|
private |
Definition at line 197 of file red-queue.h.
Referenced by DoDequeue(), DoEnqueue(), DoPeek(), and GetQueueSize().
|
private |
Definition at line 261 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Definition at line 254 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Definition at line 244 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Definition at line 240 of file red-queue.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Definition at line 198 of file red-queue.h.
Referenced by DoEnqueue().
|
private |
Definition at line 248 of file red-queue.h.
Referenced by DoDequeue(), DoEnqueue(), and InitializeParams().
|
private |
Definition at line 207 of file red-queue.h.
Referenced by DoEnqueue(), and GetTypeId().
|
private |
Definition at line 263 of file red-queue.h.
Referenced by DoDequeue(), DoEnqueue(), and InitializeParams().
|
private |
Definition at line 211 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Definition at line 223 of file red-queue.h.
Referenced by DoEnqueue(), and GetTypeId().
|
private |
Definition at line 209 of file red-queue.h.
Referenced by DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Definition at line 225 of file red-queue.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Definition at line 227 of file red-queue.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Definition at line 221 of file red-queue.h.
Referenced by GetTypeId(), and InitializeParams().
|
private |
Definition at line 215 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), InitializeParams(), and SetTh().
|
private |
Definition at line 205 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Definition at line 213 of file red-queue.h.
Referenced by DoEnqueue(), GetTypeId(), InitializeParams(), and SetTh().
|
private |
Definition at line 203 of file red-queue.h.
|
private |
Definition at line 246 of file red-queue.h.
Referenced by DoEnqueue(), and InitializeParams().
Definition at line 195 of file red-queue.h.
Referenced by DoDequeue(), DoEnqueue(), DoPeek(), and GetQueueSize().
|
private |
Definition at line 250 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Definition at line 252 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), and InitializeParams().
|
private |
Definition at line 217 of file red-queue.h.
Referenced by DoEnqueue(), GetTypeId(), and SetQueueLimit().
|
private |
Definition at line 219 of file red-queue.h.
Referenced by DoEnqueue(), DropEarly(), GetTypeId(), and InitializeParams().
|
private |
Definition at line 199 of file red-queue.h.
Referenced by DoEnqueue(), GetStats(), and InitializeParams().
|
private |
Definition at line 265 of file red-queue.h.
Referenced by AssignStreams(), DropEarly(), and RedQueue().
|
private |
Definition at line 233 of file red-queue.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Definition at line 234 of file red-queue.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Definition at line 236 of file red-queue.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Definition at line 238 of file red-queue.h.
Referenced by DropEarly(), and InitializeParams().
|
private |
Definition at line 242 of file red-queue.h.
Referenced by DoEnqueue(), and DropEarly().
|
private |
Definition at line 231 of file red-queue.h.
Referenced by DropEarly().