20template <
typename Item>
57template <
typename Item>
64 .SetGroupName(
"Network")
65 .template AddConstructor<DropTailQueue<Item>>()
66 .AddAttribute(
"MaxSize",
74template <
typename Item>
82template <
typename Item>
88template <
typename Item>
94 return DoEnqueue(GetContainer().end(), item);
97template <
typename Item>
103 Ptr<Item> item = DoDequeue(GetContainer().begin());
110template <
typename Item>
116 Ptr<Item> item = DoRemove(GetContainer().begin());
123template <
typename Item>
129 return DoPeek(GetContainer().begin());
A FIFO packet queue that drops tail-end packets on overflow.
NS_LOG_TEMPLATE_DECLARE
redefinition of the log component
static TypeId GetTypeId()
Get the type ID.
Ptr< const Item > Peek() const override
Get a copy of an item in the queue (each subclass defines the position) without removing it.
DropTailQueue()
DropTailQueue Constructor.
bool Enqueue(Ptr< Item > item) override
Place an item into the Queue (each subclass defines the position)
Ptr< Item > Remove() override
Remove an item from the Queue (each subclass defines the position), counting it and tracing it as bot...
Ptr< Item > Dequeue() override
Remove an item from the Queue (each subclass defines the position), counting it and tracing it as deq...
~DropTailQueue() override
Smart pointer class similar to boost::intrusive_ptr.
QueueSize GetMaxSize() const
void SetMaxSize(QueueSize size)
Set the maximum size of this queue.
Template class for packet Queues.
Ptr< Item > DoRemove(ConstIterator pos)
Ptr< Item > DoDequeue(ConstIterator pos)
bool DoEnqueue(ConstIterator pos, Ptr< Item > item)
Ptr< const Item > DoPeek(ConstIterator pos) const
const Container & GetContainer() const
Class for representing queue sizes.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_LOG_TEMPLATE_DEFINE(name)
Initialize a reference to a Log component.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakeQueueSizeAccessor(T1 a1)
std::string GetTemplateClassName()
Helper function to get the name (as a string) of the type of a template class.
Ptr< const AttributeChecker > MakeQueueSizeChecker()