|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef WIMAX_MAC_QUEUE_H
22 #define WIMAX_MAC_QUEUE_H
27 #include "ns3/packet.h"
28 #include "ns3/object.h"
29 #include "ns3/traced-callback.h"
30 #include "ns3/nstime.h"
85 uint32_t availableByte);
Class implementing the device packet queue.
a unique identifier for an interface.
MacHeaderType m_hdrType
header type
Ptr< Packet > Peek(GenericMacHeader &hdr) const
Exclusively for BS.
TracedCallback< Ptr< const Packet > > m_traceDrop
drop trace callback
static TypeId GetTypeId(void)
Get the type ID.
void Pop(MacHeaderType::HeaderType packetType)
Pop function.
void SetFragmentOffset(uint32_t offset)
Set fragment offset.
void SetFragmentOffset(MacHeaderType::HeaderType packetType, uint32_t offset)
Set fragment offset for first packet of type packetType.
TracedCallback< Ptr< const Packet > > m_traceEnqueue
enqueue trace callback
uint32_t m_nrDataPackets
number data packets
void SetFragmentNumber(void)
Set fragment number.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsEmpty(void) const
Check if queue is empty.
uint32_t GetFirstPacketPayloadSize(MacHeaderType::HeaderType packetType)
Get first packet payload size of the specified type.
void SetFragmentation(MacHeaderType::HeaderType packetType)
Set fragmentation function.
const WimaxMacQueue::PacketQueue & GetPacketQueue(void) const
Get packet queue function.
void SetFragmentation(void)
Set fragmentation.
Ptr< Packet > Dequeue(MacHeaderType::HeaderType packetType)
Dequeue a packet of type packetType from the queue.
uint32_t GetFirstPacketHdrSize(MacHeaderType::HeaderType packetType)
Get first packet header size of the specified type.
uint32_t m_maxSize
maximum size
A base class which provides memory management and object aggregation.
uint32_t m_nrRequestPackets
number request packets
GenericMacHeader m_hdr
header
Ptr< Packet > m_packet
packet
bool CheckForFragmentation(MacHeaderType::HeaderType packetType)
Check for fragmentation of the first packet of the specified type.
Simulation virtual time values and global simulation resolution.
uint32_t GetSize(void) const
Get size of queue.
void SetFragmentNumber(MacHeaderType::HeaderType packetType)
Set fragment number for first packet of type packetType.
uint32_t m_fragmentOffset
tracks the start of the next fragment into the packet
std::deque< QueueElement > PacketQueue
PacketQueue typedef.
bool m_fragmentation
To manage fragmentation feature, each QueueElement have 3 new fields: m_fragmentation that becomes tr...
uint32_t GetSize(void) const
Get size function.
Time m_timeStamp
timestamp
uint32_t GetFirstPacketRequiredByte(MacHeaderType::HeaderType packetType)
Get required number of bytes to hold first packet of packetType.
void SetMaxSize(uint32_t maxSize)
set the maximum queue size
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr)
Enqueue a packet.
uint32_t GetQueueLengthWithMACOverhead(void)
Get queue length considering also the MAC overhead.
Forward calls to a chain of Callback.
uint32_t m_fragmentNumber
incremented when a new fragment is sent
TracedCallback< Ptr< const Packet > > m_traceDequeue
dequeue trace callback
uint32_t GetNBytes(void) const
Get number of bytes in queue.
uint32_t GetMaxSize(void) const
PacketQueue m_queue
the queue
WimaxMacQueue::QueueElement Front(MacHeaderType::HeaderType packetType) const
In the case of non-UGS service flows at the SS side the queue will store both data packets and bandwi...