A FIFO packet queue that drops tail-end packets on overflow. More...
#include "drop-tail-queue.h"
Inheritance diagram for ns3::DropTailQueue< Item >:
Collaboration diagram for ns3::DropTailQueue< Item >:Public Member Functions | |
| DropTailQueue () | |
| DropTailQueue Constructor. | |
| ~DropTailQueue () override | |
| Ptr< Item > | Dequeue () override |
| Remove an item from the Queue (each subclass defines the position), counting it and tracing it as dequeued. | |
| bool | Enqueue (Ptr< Item > item) override |
| Place an item into the Queue (each subclass defines the position) | |
| Ptr< const Item > | Peek () const override |
| Get a copy of an item in the queue (each subclass defines the position) without removing it. | |
| Ptr< Item > | Remove () override |
| Remove an item from the Queue (each subclass defines the position), counting it and tracing it as both dequeued and dropped. | |
Public Member Functions inherited from ns3::Queue< Item > | |
| Queue () | |
| ~Queue () override | |
| void | Flush () |
| Flush the queue by calling Remove() on each item enqueued. | |
Public Member Functions inherited from ns3::QueueBase | |
| QueueBase () | |
| ~QueueBase () override | |
| QueueSize | GetCurrentSize () const |
| QueueSize | GetMaxSize () const |
| uint32_t | GetNBytes () const |
| uint32_t | GetNPackets () const |
| uint32_t | GetTotalDroppedBytes () const |
| uint32_t | GetTotalDroppedBytesAfterDequeue () const |
| uint32_t | GetTotalDroppedBytesBeforeEnqueue () const |
| uint32_t | GetTotalDroppedPackets () const |
| uint32_t | GetTotalDroppedPacketsAfterDequeue () const |
| uint32_t | GetTotalDroppedPacketsBeforeEnqueue () const |
| uint32_t | GetTotalReceivedBytes () const |
| uint32_t | GetTotalReceivedPackets () const |
| bool | IsEmpty () const |
| void | ResetStatistics () |
| Resets the counts for dropped packets, dropped bytes, received packets, and received bytes. | |
| void | SetMaxSize (QueueSize size) |
| Set the maximum size of this queue. | |
| bool | WouldOverflow (uint32_t nPackets, uint32_t nBytes) const |
| Check if the queue would overflow with additional bytes or packets Note: the check is performed according to the queue's operating mode (bytes or packets). | |
Public Member Functions inherited from ns3::Object | |
| Object () | |
| Constructor. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) |
| Aggregate two Objects together. | |
| void | Dispose () |
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const |
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final |
| Get the most derived TypeId for this Object. | |
| template<typename T> | |
| Ptr< T > | GetObject () const |
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject () const |
| Specialization of () for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject (TypeId tid) const |
| Get a pointer to the requested aggregated Object by TypeId. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const |
| Specialization of (TypeId tid) for objects of type ns3::Object. | |
| void | Initialize () |
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const |
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) |
| Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Static Public Member Functions inherited from ns3::Queue< Item > | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Static Public Member Functions inherited from ns3::QueueBase | |
| static void | AppendItemTypeIfNotPresent (std::string &typeId, const std::string &itemType) |
| Append the item type to the provided type ID if the latter does not end with '>'. | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () |
| Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Private Attributes | |
| NS_LOG_TEMPLATE_DECLARE | |
| redefinition of the log component | |
Additional Inherited Members | |
Public Types inherited from ns3::Queue< Item > | |
| typedef Item | ItemType |
| Define ItemType as the type of the stored elements. | |
Protected Types inherited from ns3::Queue< Item > | |
| typedef Container::const_iterator | ConstIterator |
| Const iterator. | |
| typedef Container::iterator | Iterator |
| Iterator. | |
Protected Member Functions inherited from ns3::Queue< Item > | |
| Ptr< Item > | DoDequeue (ConstIterator pos) |
| Pull the item to dequeue from the queue. | |
| void | DoDispose () override |
| Destructor implementation. | |
| bool | DoEnqueue (ConstIterator pos, Ptr< Item > item) |
| Push an item in the queue. | |
| bool | DoEnqueue (ConstIterator pos, Ptr< Item > item, Iterator &ret) |
| Push an item in the queue. | |
| Ptr< const Item > | DoPeek (ConstIterator pos) const |
| Peek the front item in the queue. | |
| Ptr< Item > | DoRemove (ConstIterator pos) |
| Pull the item to drop from the queue. | |
| void | DropAfterDequeue (Ptr< Item > item) |
| Drop a packet after dequeue. | |
| void | DropBeforeEnqueue (Ptr< Item > item) |
| Drop a packet before enqueue. | |
| const Container & | GetContainer () const |
| Get a const reference to the container of queue items. | |
Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| virtual void | DoInitialize () |
| Initialize() implementation. | |
| virtual void | NotifyNewAggregate () |
| Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () |
| Notifier called once the ObjectBase is fully constructed. | |
Protected Attributes inherited from ns3::QueueBase | |
| QueueSize | m_maxSize |
| max queue size | |
| TracedValue< uint32_t > | m_nBytes |
| Number of bytes in the queue. | |
| TracedValue< uint32_t > | m_nPackets |
| Number of packets in the queue. | |
| uint32_t | m_nTotalDroppedBytes |
| Total dropped bytes. | |
| uint32_t | m_nTotalDroppedBytesAfterDequeue |
| Total dropped bytes after dequeue. | |
| uint32_t | m_nTotalDroppedBytesBeforeEnqueue |
| Total dropped bytes before enqueue. | |
| uint32_t | m_nTotalDroppedPackets |
| Total dropped packets. | |
| uint32_t | m_nTotalDroppedPacketsAfterDequeue |
| Total dropped packets after dequeue. | |
| uint32_t | m_nTotalDroppedPacketsBeforeEnqueue |
| Total dropped packets before enqueue. | |
| uint32_t | m_nTotalReceivedBytes |
| Total received bytes. | |
| uint32_t | m_nTotalReceivedPackets |
| Total received packets. | |
Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
A FIFO packet queue that drops tail-end packets on overflow.
Definition at line 21 of file drop-tail-queue.h.
| ns3::DropTailQueue< Item >::DropTailQueue | ( | ) |
DropTailQueue Constructor.
Creates a droptail queue with a maximum size of 100 packets by default
Definition at line 75 of file drop-tail-queue.h.
References ns3::Queue< Item >::Queue(), NS_LOG_FUNCTION, and NS_LOG_TEMPLATE_DEFINE.
Referenced by GetTypeId().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 83 of file drop-tail-queue.h.
References NS_LOG_FUNCTION.
|
overridevirtual |
Remove an item from the Queue (each subclass defines the position), counting it and tracing it as dequeued.
Implements ns3::Queue< Item >.
Definition at line 99 of file drop-tail-queue.h.
References ns3::Queue< Item >::DoDequeue(), ns3::Queue< Item >::GetContainer(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Here is the call graph for this function:
|
overridevirtual |
Place an item into the Queue (each subclass defines the position)
| item | item to enqueue |
Implements ns3::Queue< Item >.
Definition at line 90 of file drop-tail-queue.h.
References ns3::Queue< Item >::DoEnqueue(), ns3::Queue< Item >::GetContainer(), and NS_LOG_FUNCTION.
Here is the call graph for this function:
|
static |
Get the type ID.
Implementation of the templates declared above.
Definition at line 59 of file drop-tail-queue.h.
References DropTailQueue(), ns3::Queue< Item >::Queue(), ns3::QueueBase::GetMaxSize(), ns3::GetTemplateClassName(), ns3::MakeQueueSizeAccessor(), ns3::MakeQueueSizeChecker(), ns3::QueueBase::SetMaxSize(), and ns3::TypeId::SetParent().
Here is the call graph for this function:
|
overridevirtual |
Get a copy of an item in the queue (each subclass defines the position) without removing it.
Implements ns3::Queue< Item >.
Definition at line 125 of file drop-tail-queue.h.
References ns3::Queue< Item >::DoPeek(), ns3::Queue< Item >::GetContainer(), and NS_LOG_FUNCTION.
Here is the call graph for this function:
|
overridevirtual |
Remove an item from the Queue (each subclass defines the position), counting it and tracing it as both dequeued and dropped.
Implements ns3::Queue< Item >.
Definition at line 112 of file drop-tail-queue.h.
References ns3::Queue< Item >::DoRemove(), ns3::Queue< Item >::GetContainer(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Here is the call graph for this function:
|
private |
redefinition of the log component
Definition at line 50 of file drop-tail-queue.h.