#include <introspected-doxygen.h>
Classes | |
struct | QueueElement |
Public Member Functions | |
WimaxMacQueue (uint32_t maxSize) | |
bool | CheckForFragmentation (MacHeaderType::HeaderType packetType) |
Fragmentation utilities. | |
Ptr< Packet > | Dequeue (MacHeaderType::HeaderType packetType) |
Dequeue a packet of type packetType from the queue. More... | |
Ptr< Packet > | Dequeue (MacHeaderType::HeaderType packetType, uint32_t availableByte) |
Dequeue a fragment of size availableByte from the queue. More... | |
bool | Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr) |
Enqueue a packet. More... | |
uint32_t | GetFirstPacketHdrSize (MacHeaderType::HeaderType packetType) |
uint32_t | GetFirstPacketPayloadSize (MacHeaderType::HeaderType packetType) |
uint32_t | GetFirstPacketRequiredByte (MacHeaderType::HeaderType packetType) |
uint32_t | GetMaxSize (void) const |
uint32_t | GetNBytes (void) const |
const WimaxMacQueue::PacketQueue & | GetPacketQueue (void) const |
uint32_t | GetQueueLengthWithMACOverhead (void) |
uint32_t | GetSize (void) const |
bool | IsEmpty (void) const |
bool | IsEmpty (MacHeaderType::HeaderType packetType) const |
Ptr< Packet > | Peek (GenericMacHeader &hdr) const |
Same as Dequeue but does not pop from queue. More... | |
Ptr< Packet > | Peek (GenericMacHeader &hdr, Time &timeStamp) const |
Ptr< Packet > | Peek (MacHeaderType::HeaderType packetType) const |
Two versions for SS without Generic MAC Header parameter, as SS's scheduler does not require to know the CID in Generic MAC Header. | |
Ptr< Packet > | Peek (MacHeaderType::HeaderType packetType, Time &timeStamp) const |
void | SetFragmentation (MacHeaderType::HeaderType packetType) |
void | SetFragmentNumber (MacHeaderType::HeaderType packetType) |
void | SetFragmentOffset (MacHeaderType::HeaderType packetType, uint32_t offset) |
void | SetMaxSize (uint32_t maxSize) |
set the maximum queue size More... | |
Public Member Functions inherited from ns3::Object | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Private Types | |
typedef std::deque< QueueElement > | PacketQueue |
Private Member Functions | |
WimaxMacQueue::QueueElement | Front (MacHeaderType::HeaderType packetType) const |
void | Pop (MacHeaderType::HeaderType packetType) |
Private Attributes | |
uint32_t | m_bytes |
uint32_t | m_maxSize |
uint32_t | m_nrDataPackets |
uint32_t | m_nrRequestPackets |
PacketQueue | m_queue |
TracedCallback< Ptr< const Packet > > | m_traceDequeue |
TracedCallback< Ptr< const Packet > > | m_traceDrop |
TracedCallback< Ptr< const Packet > > | m_traceEnqueue |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
ns3::WimaxMacQueue is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 37 of file wimax-mac-queue.h.
Ptr< Packet > ns3::WimaxMacQueue::Dequeue | ( | MacHeaderType::HeaderType | packetType | ) |
Dequeue a packet of type packetType from the queue.
packetType | the type of the packet |
Definition at line 164 of file wimax-mac-queue.cc.
References ns3::Packet::AddHeader(), ns3::Packet::CreateFragment(), ns3::GenericMacHeader::GetSerializedSize(), ns3::FragmentationSubheader::GetSerializedSize(), ns3::Packet::GetSize(), NS_ASSERT_MSG, and NS_LOG_INFO.
Ptr< Packet > ns3::WimaxMacQueue::Dequeue | ( | MacHeaderType::HeaderType | packetType, |
uint32_t | availableByte | ||
) |
Dequeue a fragment of size availableByte from the queue.
packetType | the type of the packet |
availableByte | the size of the fragment |
Definition at line 257 of file wimax-mac-queue.cc.
References ns3::Packet::Copy(), ns3::Packet::CreateFragment(), ns3::MacHeaderType::GetSerializedSize(), ns3::GenericMacHeader::GetSerializedSize(), ns3::FragmentationSubheader::GetSerializedSize(), ns3::Packet::GetSize(), and NS_LOG_INFO.
bool ns3::WimaxMacQueue::Enqueue | ( | Ptr< Packet > | packet, |
const MacHeaderType & | hdrType, | ||
const GenericMacHeader & | hdr | ||
) |
Enqueue a packet.
packet | the packet to enqueue |
hdrType | the mac header type of the packet |
hdr | the header of the packet |
Definition at line 135 of file wimax-mac-queue.cc.
References ns3::Simulator::Now().
uint32_t ns3::WimaxMacQueue::GetMaxSize | ( | void | ) | const |
Definition at line 129 of file wimax-mac-queue.cc.
Ptr< Packet > ns3::WimaxMacQueue::Peek | ( | GenericMacHeader & | hdr | ) | const |
Same as Dequeue but does not pop from queue.
Exclusive for BS. Two versions of Peek function (with Generic MAC Header as parameter) only for BS, as BS's scheduler needs to know the CID in Generic MAC Header.
Definition at line 326 of file wimax-mac-queue.cc.
References ns3::Packet::AddHeader(), and ns3::Packet::Copy().
void ns3::WimaxMacQueue::SetMaxSize | ( | uint32_t | maxSize | ) |
set the maximum queue size
maxSize | the max queue size |
Definition at line 123 of file wimax-mac-queue.cc.