21 #include "ns3/uinteger.h" 
   34     .SetGroupName(
"Network")
 
   36     .AddAttribute (
"Mode", 
 
   37                    "Whether to use bytes (see MaxBytes) or packets (see MaxPackets) as the maximum queue size metric.",
 
   43     .AddAttribute (
"MaxPackets", 
 
   44                    "The maximum number of packets accepted by this DropTailQueue.",
 
   47                    MakeUintegerChecker<uint32_t> ())
 
   48     .AddAttribute (
"MaxBytes", 
 
   49                    "The maximum number of bytes accepted by this DropTailQueue.",
 
   52                    MakeUintegerChecker<uint32_t> ())
 
   92       NS_LOG_LOGIC (
"Queue full (at max packets) -- droppping pkt");
 
   99       NS_LOG_LOGIC (
"Queue full (packet would exceed max bytes) -- droppping pkt");
 
DropTailQueue::QueueMode GetMode(void) const 
Get the encapsulation mode of this device. 
 
virtual Ptr< const Packet > DoPeek(void) const 
Peek the front packet in the queue. 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
Use number of bytes for maximum queue size. 
 
void SetMode(DropTailQueue::QueueMode mode)
Set the operating mode of this device. 
 
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
#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). 
 
virtual bool DoEnqueue(Ptr< Packet > p)
Push a packet in the queue. 
 
uint32_t m_maxBytes
max bytes in the queue 
 
Abstract base class for packet Queues. 
 
uint32_t m_maxPackets
max packets in the queue 
 
QueueMode
Enumeration of the modes supported in the class. 
 
Hold variables of type enum. 
 
Hold an unsigned integer type. 
 
virtual Ptr< Packet > DoDequeue(void)
Pull a packet from the queue. 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
std::queue< Ptr< Packet > > m_packets
the packets in the queue 
 
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name. 
 
QueueMode m_mode
queue mode (packets or bytes limited) 
 
uint32_t m_bytesInQueue
actual bytes in the queue 
 
Use number of packets for maximum queue size. 
 
DropTailQueue()
DropTailQueue Constructor. 
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
A FIFO packet queue that drops tail-end packets on overflow. 
 
void Drop(Ptr< Packet > packet)
Drop a packet.