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

A FIFO packet queue that drops tail-end packets on overflow. More...

#include <drop-tail-queue.h>

+ Inheritance diagram for ns3::DropTailQueue:

Public Member Functions

 DropTailQueue ()
 DropTailQueue Constructor. More...
 
DropTailQueue::QueueMode GetMode (void)
 
void SetMode (DropTailQueue::QueueMode mode)
 
- 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

virtual Ptr< PacketDoDequeue (void)
 
virtual bool DoEnqueue (Ptr< Packet > p)
 
virtual Ptr< const PacketDoPeek (void) const
 

Private Attributes

uint32_t m_bytesInQueue
 
uint32_t m_maxBytes
 
uint32_t m_maxPackets
 
QueueMode m_mode
 
std::queue< Ptr< Packet > > m_packets
 

Additional Inherited Members

- Public Types inherited from ns3::Queue
enum  QueueMode { QUEUE_MODE_PACKETS, QUEUE_MODE_BYTES }
 Enumeration of the modes supported in the class. More...
 
- 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

A FIFO packet queue that drops tail-end packets on overflow.

Config Paths

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

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

Attributes

  • Mode: Whether to use bytes (see MaxBytes) or packets (see MaxPackets) as the maximum queue size metric.
    • Set with class: ns3::EnumValue
    • Underlying type: QUEUE_MODE_BYTES|QUEUE_MODE_PACKETS
    • Initial value: QUEUE_MODE_PACKETS
    • Flags: construct write
  • MaxPackets: The maximum number of packets accepted by this DropTailQueue.
  • MaxBytes: The maximum number of bytes accepted by this DropTailQueue.

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 35 of file drop-tail-queue.h.

Constructor & Destructor Documentation

ns3::DropTailQueue::DropTailQueue ( )

DropTailQueue Constructor.

Creates a droptail queue with a maximum size of 100 packets by default

Definition at line 56 of file drop-tail-queue.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

DropTailQueue::QueueMode ns3::DropTailQueue::GetMode ( void  )

Get the encapsulation mode of this device.

Returns
The encapsulation mode of this device.

Definition at line 77 of file drop-tail-queue.cc.

References NS_LOG_FUNCTION.

void ns3::DropTailQueue::SetMode ( DropTailQueue::QueueMode  mode)

Set the operating mode of this device.

Parameters
modeThe operating mode of this device.

Definition at line 70 of file drop-tail-queue.cc.

References NS_LOG_FUNCTION.


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