26 #include "ns3/packet.h"
27 #include "ns3/object.h"
28 #include "ns3/traced-callback.h"
29 #include "ns3/net-device.h"
30 #include "ns3/traced-value.h"
182 void EnableRunningAverage (
Time averageWindow);
183 void DisableRunningAverage (
void);
185 double GetQueueSizeAverage (
void);
186 double GetReceivedBytesPerSecondAverage (
void);
187 double GetReceivedPacketsPerSecondAverage (
void);
188 double GetDroppedBytesPerSecondAverage (
void);
189 double GetDroppedPacketsPerSecondAverage (
void);
191 double GetQueueSizeVariance (
void);
192 double GetReceivedBytesPerSecondVariance (
void);
193 double GetReceivedPacketsPerSecondVariance (
void);
194 double GetDroppedBytesPerSecondVariance (
void);
195 double GetDroppedPacketsPerSecondVariance (
void);
void NotifyDrop(Ptr< QueueItem > item)
Notification of a packet drop.
virtual bool DoEnqueue(Ptr< QueueItem > item)=0
Push an item in the queue.
QueueMode m_mode
queue mode (packets or bytes limited)
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
uint32_t m_nTotalDroppedBytes
Total dropped bytes.
void SetMaxBytes(uint32_t maxBytes)
Set the maximum amount of bytes that can be stored in this queue.
Callback< void, Ptr< QueueItem > > DropCallback
Callback set by the object (e.g., a queue disc) that wants to be notified of a packet drop...
Forward calls to a chain of Callback.
uint32_t GetTotalDroppedPackets(void) const
TracedValue< uint32_t > m_nPackets
Number of packets in the queue.
uint32_t m_nTotalReceivedBytes
Total received bytes.
virtual void SetDropCallback(DropCallback cb)
Set the drop callback.
void ResetStatistics(void)
Resets the counts for dropped packets, dropped bytes, received packets, and received bytes...
uint32_t m_maxPackets
max packets in the queue
virtual Ptr< const QueueItem > DoPeek(void) const =0
Peek the front item in the queue.
TracedValue< uint32_t > m_nBytes
Number of bytes in the queue.
Abstract base class for packet Queues.
virtual Ptr< QueueItem > DoRemove(void)=0
Pull the item to drop from the queue.
uint32_t GetTotalReceivedBytes(void) const
static TypeId GetTypeId(void)
Get the type ID.
void Drop(Ptr< QueueItem > item)
Drop a packet.
uint32_t GetMaxPackets(void) const
Ptr< QueueItem > Remove(void)
Remove an item from the front of the Queue, counting it as dropped.
uint32_t GetNPackets(void) const
uint32_t GetMaxBytes(void) const
Use number of bytes for maximum queue size.
TracedCallback< Ptr< const Packet > > m_traceDequeue
Traced callback: fired when a packet is dequeued.
Queue::QueueMode GetMode(void) const
Get the encapsulation mode of this device.
TracedCallback< Ptr< const Packet > > m_traceDrop
Traced callback: fired when a packet is dropped.
uint32_t m_maxBytes
max bytes in the queue
uint32_t GetNBytes(void) const
DropCallback m_dropCallback
drop callback
void SetMode(Queue::QueueMode mode)
Set the operating mode of this device.
QueueMode
Enumeration of the modes supported in the class.
Use number of packets for maximum queue size.
uint32_t GetTotalReceivedPackets(void) const
virtual Ptr< QueueItem > DoDequeue(void)=0
Pull the item to dequeue from the queue.
uint32_t m_nTotalReceivedPackets
Total received packets.
void SetMaxPackets(uint32_t maxPackets)
Set the maximum amount of packets that can be stored in this queue.
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.
Ptr< const QueueItem > Peek(void) const
Get a copy of the item at the front of the queue without removing it.
uint32_t GetTotalDroppedBytes(void) const
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
bool Enqueue(Ptr< QueueItem > item)
Place a queue item into the rear of the Queue.
Ptr< QueueItem > Dequeue(void)
Remove an item from the front of the Queue, counting it as dequeued.