20 #include "ns3/trace-source-accessor.h" 
   34     .AddTraceSource (
"Enqueue", 
"Enqueue a packet in the queue.",
 
   36     .AddTraceSource (
"Dequeue", 
"Dequeue a packet from the queue.",
 
   38     .AddTraceSource (
"Drop", 
"Drop a packet stored in the queue.",
 
   46   m_nTotalReceivedBytes (0),
 
   48   m_nTotalReceivedPackets (0),
 
   49   m_nTotalDroppedBytes (0),
 
   50   m_nTotalDroppedPackets (0)
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
bool Enqueue(Ptr< Packet > p)
Place a packet into the rear of the Queue. 
 
uint32_t m_nTotalDroppedBytes
Total dropped bytes. 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory. 
 
virtual Ptr< Packet > DoDequeue(void)=0
Pull a packet from the queue. 
 
uint32_t GetTotalDroppedPackets(void) const 
 
uint32_t m_nTotalReceivedBytes
Total received bytes. 
 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
void ResetStatistics(void)
Resets the counts for dropped packets, dropped bytes, received packets, and received bytes...
 
uint32_t m_nPackets
Number of packets in the queue. 
 
uint32_t GetTotalReceivedBytes(void) const 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
virtual bool DoEnqueue(Ptr< Packet > p)=0
Push a packet in the queue. 
 
Ptr< Packet > Dequeue(void)
Remove a packet from the front of the Queue. 
 
uint32_t GetNPackets(void) const 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
uint32_t m_nBytes
Number of bytes in the queue. 
 
TracedCallback< Ptr< const Packet > > m_traceDequeue
Traced callback: fired when a packet is dequeued. 
 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
 
TracedCallback< Ptr< const Packet > > m_traceDrop
Traced callback: fired when a packet is dropped. 
 
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
Total received packets. 
 
uint32_t m_nTotalDroppedPackets
Total dropped packets. 
 
void DequeueAll(void)
Flush the queue. 
 
TracedCallback< Ptr< const Packet > > m_traceEnqueue
Traced callback: fired when a packet is enqueued. 
 
virtual Ptr< const Packet > DoPeek(void) const =0
Peek the front packet in the queue. 
 
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.