A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::WimaxMacQueue Class Reference

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::WimaxMacQueue:

Classes

struct  QueueElement
 

Public Member Functions

 WimaxMacQueue (uint32_t maxSize)
 
bool CheckForFragmentation (MacHeaderType::HeaderType packetType)
 Fragmentation utilities.
 
Ptr< PacketDequeue (MacHeaderType::HeaderType packetType)
 Dequeue a packet of type packetType from the queue. More...
 
Ptr< PacketDequeue (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< PacketPeek (GenericMacHeader &hdr) const
 Same as Dequeue but does not pop from queue. More...
 
Ptr< PacketPeek (GenericMacHeader &hdr, Time &timeStamp) const
 
Ptr< PacketPeek (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< PacketPeek (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
 
SimpleRefCountoperator= (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< QueueElementPacketQueue
 

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)
 

Detailed Description

Config Paths

ns3::WimaxMacQueue is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/BasicConnection/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/PrimaryConnection/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BroadcastConnection/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/InitialRangingConnection/TxQueue

Attributes

  • MaxSize: Maximum size

TraceSources

  • Enqueue: Enqueue trace
  • Dequeue: Dequeue trace
  • Drop: Drop trace

Definition at line 37 of file wimax-mac-queue.h.

Member Function Documentation

Ptr< Packet > ns3::WimaxMacQueue::Dequeue ( MacHeaderType::HeaderType  packetType)

Dequeue a packet of type packetType from the queue.

Parameters
packetTypethe type of the packet
Returns
the first packet in the queue

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.

Parameters
packetTypethe type of the packet
availableBytethe size of the fragment
Returns
the first packet in the queue if its size is lower than availableByte, the first availableByte of the first packet otherwise

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.

Parameters
packetthe packet to enqueue
hdrTypethe mac header type of the packet
hdrthe 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
Returns
the maximum queue size

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

Parameters
maxSizethe max queue size

Definition at line 123 of file wimax-mac-queue.cc.


The documentation for this class was generated from the following files: