20 #include "ns3/trace-source-accessor.h"
35 .AddTraceSource (
"Enqueue",
"Enqueue a packet in the queue.",
37 .AddTraceSource (
"Dequeue",
"Dequeue a packet from the queue.",
39 .AddTraceSource (
"Drop",
"Drop a packet stored in the queue.",
47 m_nTotalReceivedBytes (0),
49 m_nTotalReceivedPackets (0),
50 m_nTotalDroppedBytes (0),
51 m_nTotalDroppedPackets (0)
#define NS_LOG_FUNCTION(parameters)
bool Enqueue(Ptr< Packet > p)
Place a packet into the rear of the Queue.
uint32_t m_nTotalDroppedBytes
virtual Ptr< Packet > DoDequeue(void)=0
uint32_t GetTotalDroppedPackets(void) const
uint32_t m_nTotalReceivedBytes
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
uint32_t GetSize(void) const
void ResetStatistics(void)
Resets the counts for dropped packets, dropped bytes, received packets, and received bytes...
NS_LOG_COMPONENT_DEFINE("Queue")
uint32_t GetTotalReceivedBytes(void) const
static TypeId GetTypeId(void)
virtual bool DoEnqueue(Ptr< Packet > p)=0
Ptr< Packet > Dequeue(void)
Remove a packet from the front of the Queue.
uint32_t GetNPackets(void) const
#define NS_LOG_LOGIC(msg)
TracedCallback< Ptr< const Packet > > m_traceDequeue
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
TracedCallback< Ptr< const Packet > > m_traceDrop
uint32_t GetNBytes(void) const
Ptr< const Packet > Peek(void) const
Get a copy of the item at the front of the queue without removing it.
uint32_t GetTotalReceivedPackets(void) const
uint32_t m_nTotalReceivedPackets
uint32_t m_nTotalDroppedPackets
void DequeueAll(void)
Flush the queue.
TracedCallback< Ptr< const Packet > > m_traceEnqueue
virtual Ptr< const Packet > DoPeek(void) const =0
uint32_t GetTotalDroppedBytes(void) const
a base class which provides memory management and object aggregation
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void Drop(Ptr< Packet > packet)
Drop a packet.