|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/object-factory.h"
24 #include "ns3/drop-tail-queue.h"
36 .SetGroupName (
"TrafficControl")
38 .AddAttribute (
"MaxSize",
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
QueueDiscSizePolicy
Enumeration of the available policies to handle the queue disc size.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static constexpr const char * LIMIT_EXCEEDED_DROP
Packet dropped due to queue disc limit exceeded.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
bool SetMaxSize(QueueSize size)
Set the maximum size of the queue disc.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
QueueSize GetMaxSize(void) const
Get the maximum size of the queue disc.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< const AttributeChecker > MakeQueueSizeChecker(void)
uint32_t GetNBytes(void) const
Get the amount of bytes stored by the queue disc.
std::size_t GetNPacketFilters(void) const
Get the number of packet filters.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Smart pointer class similar to boost::intrusive_ptr.
FifoQueueDisc()
FifoQueueDisc constructor.
@ SINGLE_INTERNAL_QUEUE
Used by queue discs with single internal queue.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
void AddInternalQueue(Ptr< InternalQueue > queue)
Add an internal queue to the tail of the list of queues.
std::size_t GetNInternalQueues(void) const
Get the number of internal queues.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
QueueSize GetCurrentSize(void)
Get the current size of the queue disc in bytes, if operating in bytes mode, or packets,...
Introspection did not find any typical Config paths.
Ptr< T > CreateObjectWithAttributes(Args... args)
Allocate an Object on the heap and initialize with a set of attributes.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
uint32_t GetNPackets(void) const
Get the number of packets stored by the queue disc.
Simple queue disc implementing the FIFO (First-In First-Out) policy.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.
virtual Ptr< const QueueDiscItem > DoPeek(void)
Return a copy of the next packet the queue disc will extract.
Ptr< const AttributeAccessor > MakeQueueSizeAccessor(T1 a1)
std::size_t GetNQueueDiscClasses(void) const
Get the number of queue disc classes.
void DropBeforeEnqueue(Ptr< const QueueDiscItem > item, const char *reason)
Perform the actions required when the queue disc is notified of a packet dropped before enqueue.
Ptr< InternalQueue > GetInternalQueue(std::size_t i) const
Get the i-th internal queue.
Class for representing queue sizes.