ns3::DropTailQueue Class Reference
[Queue]

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

#include <drop-tail-queue.h>

Inheritance diagram for ns3::DropTailQueue:
Inheritance graph
[legend]
Collaboration diagram for ns3::DropTailQueue:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DropTailQueue ()
 DropTailQueue Constructor.
virtual ~DropTailQueue ()

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::DropTailQueue.

Private Member Functions

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

Private Attributes

std::queue< Ptr< Packet > > m_packets
uint32_t m_maxPackets

Detailed Description

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

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 43 of file drop-tail-queue.cc.

References NS_LOG_FUNCTION_NOARGS.

ns3::DropTailQueue::~DropTailQueue (  )  [virtual]

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

References NS_LOG_FUNCTION_NOARGS.


Member Function Documentation

Ptr< Packet > ns3::DropTailQueue::DoDequeue ( void   )  [private, virtual]

Implements ns3::Queue.

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

References m_packets, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

bool ns3::DropTailQueue::DoEnqueue ( Ptr< Packet p  )  [private, virtual]

Implements ns3::Queue.

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

References ns3::Queue::Drop(), m_maxPackets, m_packets, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Ptr< const Packet > ns3::DropTailQueue::DoPeek ( void   )  const [private, virtual]

Implements ns3::Queue.

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

References m_packets, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

TypeId ns3::DropTailQueue::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::DropTailQueue.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3CsmaNetDevice/TxQueue/$ns3DropTailQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3EmuNetDevice/TxQueue/$ns3DropTailQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3PointToPointNetDevice/TxQueue/$ns3DropTailQueue

Attributes defined for this type:

  • MaxPackets: The maximum number of packets accepted by this DropTailQueue.

No TraceSources 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.

Reimplemented from ns3::Queue.

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

References ns3::TypeId::AddAttribute(), m_maxPackets, and ns3::TypeId::SetParent().


Member Data Documentation

Definition at line 54 of file drop-tail-queue.h.

Referenced by DoEnqueue(), and GetTypeId().

std::queue<Ptr<Packet> > ns3::DropTailQueue::m_packets [private]

Definition at line 53 of file drop-tail-queue.h.

Referenced by DoDequeue(), DoEnqueue(), and DoPeek().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:12:00 2009 for NS-3 by  doxygen 1.6.3