21 #include "ns3/object.h"
23 #include "ns3/abort.h"
24 #include "ns3/uinteger.h"
126 static TypeId tid =
TypeId (
"ns3::NetDeviceQueueInterface")
128 .SetGroupName(
"Network")
174 " transmission queues after setting up the wake callback.");
180 for (uint8_t i = prevNumTxQueues; i < numTxQueues; i++)
209 .SetGroupName(
"Network")
virtual bool HasWakeCallbackSet(void) const
Check whether a wake callback has been set on this device queue.
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 "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
QueueItem()
Default constructor.
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 (hardware) 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.
uint8_t GetSelectedQueue(Ptr< QueueItem > item) const
Get the id of the transmission queue selected for the given packet.
static TypeId GetTypeId(void)
Get the type ID.
SelectQueueCallback m_selectQueueCallback
Select queue callback.
Network device transmission queue interface.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
virtual void Stop(void)
Called by the device to stop this (hardware) transmission queue.
std::vector< Ptr< NetDeviceQueue > > m_txQueuesVector
Device transmission queues.
uint8_t GetTxQueuesN(void) const
Get the number of device transmission queues.
virtual void DoDispose(void)
Dispose of the object.
virtual void Print(std::ostream &os) const
Print the item contents.
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 (hardware) transmission queue...
Network layer to device interface.
Ptr< NetDeviceQueue > GetTxQueue(uint8_t i) const
Get the i-th transmission queue of the device.
virtual void SetWakeCallback(WakeCallback cb)
Set the wake callback.
virtual ~NetDeviceQueueInterface()
A base class which provides memory management and object aggregation.
virtual ~NetDeviceQueue()
bool m_stopped
Status of the transmission queue.
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.
Ptr< Packet > GetPacket(void) const