A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::RedQueue Class Reference

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::RedQueue:

Classes

struct  Stats
 

Public Types

enum  { DTYPE_NONE, DTYPE_FORCED, DTYPE_UNFORCED }
 
- 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

int64_t AssignStreams (int64_t stream)
 
RedQueue::QueueMode GetMode (void)
 
uint32_t GetQueueSize (void)
 
Stats GetStats ()
 
void SetMode (RedQueue::QueueMode mode)
 
void SetQueueLimit (uint32_t lim)
 
void SetTh (double minTh, double maxTh)
 
- Public Member Functions inherited from ns3::Queue
Ptr< PacketDequeue (void)
 
void DequeueAll (void)
 
bool Enqueue (Ptr< Packet > p)
 
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 PacketPeek (void) const
 
void ResetStatistics (void)
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
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)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
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)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Member Functions

double CalculatePNew (double qAvg, double maxTh, bool gentle, double vA, double vB, double vC, double vD, double maxP)
 
virtual Ptr< PacketDoDequeue (void)
 
virtual bool DoEnqueue (Ptr< Packet > p)
 
virtual Ptr< const PacketDoPeek (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< UniformRandomVariablem_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)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

Config Paths

ns3::RedQueue is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Queue/$ns3::RedQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::CsmaNetDevice/TxQueue/$ns3::RedQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::EmuNetDevice/TxQueue/$ns3::RedQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::PointToPointNetDevice/TxQueue/$ns3::RedQueue

Attributes

  • Mode: Determines unit for QueueLimit
    • Set with class: ns3::EnumValue
    • Underlying type: QUEUE_MODE_BYTES|QUEUE_MODE_PACKETS
    • Initial value: QUEUE_MODE_PACKETS
    • Flags: construct write
  • MeanPktSize: Average of packet size
  • IdlePktSize: Average packet size used during idle times. Used when m_cautions = 3
  • Wait: True for waiting between dropped packets
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Gentle: True to increases dropping probability slowly when average queue exceeds maxthresh
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • MinTh: Minimum average length threshold in packets/bytes
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 5
    • Flags: construct write read
  • MaxTh: Maximum average length threshold in packets/bytes
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 15
    • Flags: construct write read
  • QueueLimit: Queue limit in bytes/packets
  • QW: Queue weight related to the exponential weighted moving average (EWMA)
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0.002
    • Flags: construct write read
  • LInterm: The maximum probability of dropping a packet
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 50
    • Flags: construct write read
  • Ns1Compat: NS-1 compatibility
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • LinkBandwidth: The RED link bandwidth
    • Set with class: DataRateValue
    • Underlying type: DataRate
    • Initial value: 1500000bps
    • Flags: construct write read
  • LinkDelay: The RED link delay
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +20000000.0ns
    • Flags: construct write read

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::Queue

  • Enqueue: Enqueue a packet in the queue.
  • Dequeue: Dequeue a packet from the queue.
  • Drop: Drop a packet stored in the queue.

Definition at line 82 of file red-queue.h.

Member Function Documentation

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.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 203 of file red-queue.cc.

References NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().


The documentation for this class was generated from the following files: