31 template <
typename Item>
68 template <
typename Item>
75 .SetGroupName(
"Network")
76 .template AddConstructor<DropTailQueue<Item>>()
77 .AddAttribute(
"MaxSize",
81 MakeQueueSizeChecker());
85 template <
typename Item>
93 template <
typename Item>
99 template <
typename Item>
105 return DoEnqueue(GetContainer().end(), item);
108 template <
typename Item>
114 Ptr<Item> item = DoDequeue(GetContainer().begin());
121 template <
typename Item>
127 Ptr<Item> item = DoRemove(GetContainer().begin());
134 template <
typename Item>
140 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.
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.
std::string GetTemplateClassName()
Helper function to get the name (as a string) of the type of a template class.