21 #include "ns3/object.h"
23 #include "ns3/abort.h"
24 #include "ns3/uinteger.h"
25 #include "ns3/queue-limits.h"
76 : m_stoppedByDevice (false),
77 m_stoppedByQueueLimits (false)
190 static TypeId tid =
TypeId (
"ns3::NetDeviceQueueInterface")
192 .SetGroupName(
"Network")
236 " device transmission queues once they have been created.");
247 " have been already created.");
274 .SetGroupName(
"Network")
Base class to represent items of packet Queues.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint8_t GetNTxQueues(void) const
Get the number of device transmission queues.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
QueueItem()
Default constructor.
bool m_stoppedByDevice
True if the queue has been stopped by the device.
void NotifyQueuedBytes(uint32_t bytes)
Called by the netdevice to report the number of bytes queued to the device queue. ...
bool m_stoppedByQueueLimits
True if the queue has been stopped by a queue limits object.
bool IsNull(void) const
Check for null implementation.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
WakeCallback m_wakeCallback
Wake callback.
Ptr< Packet > m_packet
The packet contained in the queue item.
#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 SetSelectQueueCallback(SelectQueueCallback cb)
Set the select queue callback.
virtual void DoDispose(void)
Destructor implementation.
virtual void Start(void)
Called by the device to start this device transmission queue.
bool IsStopped(void) const
Get the status of the device transmission queue.
virtual uint32_t GetPacketSize(void) const
Use this method (instead of GetPacket ()->GetSize ()) to get the packet size.
static TypeId GetTypeId(void)
Get the type ID.
SelectQueueCallback GetSelectQueueCallback(void) const
Get the select queue callback.
static TypeId GetTypeId(void)
Get the type ID.
SelectQueueCallback m_selectQueueCallback
Select queue callback.
Network device transmission queue interface.
uint8_t m_numTxQueues
Number of transmission queues to create.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
void ResetQueueLimits()
Reset queue limits state.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Stop(void)
Called by the device to stop this device transmission queue.
std::vector< Ptr< NetDeviceQueue > > m_txQueuesVector
Device transmission queues.
virtual bool GetUint8Value(Uint8Values field, uint8_t &value) const
Retrieve the value of a given field from the packet, if present.
virtual void DoDispose(void)
Dispose of the object.
void SetQueueLimits(Ptr< QueueLimits > ql)
Set queue limits to this queue.
void NotifyTransmittedBytes(uint32_t bytes)
Called by the netdevice to report the number of bytes it is going to transmit.
Uint8Values
1-byte fields of the packet whose value can be retrieved, if present
virtual void Print(std::ostream &os) const
Print the item contents.
Ptr< QueueLimits > m_queueLimits
Queue limits object.
NetDeviceQueueInterface()
Constructor.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
virtual void Wake(void)
Called by the device to wake the queue disc associated with this device transmission queue...
Network layer to device interface.
Ptr< NetDeviceQueue > GetTxQueue(uint8_t i) const
Get the i-th transmission queue of the device.
void CreateTxQueues(void)
Create the device transmission queues.
Ptr< QueueLimits > GetQueueLimits()
Get queue limits to this queue.
virtual void SetWakeCallback(WakeCallback cb)
Set the wake callback.
virtual ~NetDeviceQueueInterface()
A base class which provides memory management and object aggregation.
virtual ~NetDeviceQueue()
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetTxQueuesN(uint8_t numTxQueues)
Set the number of device transmission queues to create.
Ptr< Packet > GetPacket(void) const