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

#include <wimax-mac-queue.h>

+ Inheritance diagram for ns3::WimaxMacQueue:
+ Collaboration diagram for ns3::WimaxMacQueue:

Classes

struct  QueueElement

Public Member Functions

 WimaxMacQueue (void)
 WimaxMacQueue (uint32_t maxSize)
 ~WimaxMacQueue (void)
bool CheckForFragmentation (MacHeaderType::HeaderType packetType)
 Fragmentation utilities.
Ptr< PacketDequeue (MacHeaderType::HeaderType packetType)
 Dequeue a packet of type packetType from the queue.
Ptr< PacketDequeue (MacHeaderType::HeaderType packetType, uint32_t availableByte)
 Dequeue a fragment of size availableByte from the queue.
bool Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr)
 Enqueue a packet.
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::PacketQueueGetPacketQueue (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.
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
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~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 Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 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
virtual ~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)
 This method returns the TypeId associated to ns3::WimaxMacQueue.

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 DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

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

Member Typedef Documentation

typedef std::deque<QueueElement> ns3::WimaxMacQueue::PacketQueue
private

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

Constructor & Destructor Documentation

ns3::WimaxMacQueue::WimaxMacQueue ( void  )

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

ns3::WimaxMacQueue::WimaxMacQueue ( uint32_t  maxSize)

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

ns3::WimaxMacQueue::~WimaxMacQueue ( void  )

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

Member Function Documentation

bool ns3::WimaxMacQueue::CheckForFragmentation ( MacHeaderType::HeaderType  packetType)

Fragmentation utilities.

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

References ns3::MacHeaderType::GetType(), ns3::WimaxMacQueue::QueueElement::m_fragmentation, ns3::WimaxMacQueue::QueueElement::m_hdrType, m_queue, and NS_LOG_INFO.

Referenced by GetFirstPacketHdrSize(), GetFirstPacketPayloadSize(), GetQueueLengthWithMACOverhead(), and ns3::SSScheduler::Schedule().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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::WimaxMacQueue::QueueElement::GetSize(), ns3::MacHeaderType::GetType(), ns3::MacHeaderType::HEADER_TYPE_GENERIC, m_bytes, m_maxSize, m_nrDataPackets, m_nrRequestPackets, m_queue, m_traceDrop, m_traceEnqueue, and ns3::Simulator::Now().

Referenced by ns3::WimaxConnection::Enqueue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WimaxMacQueue::QueueElement ns3::WimaxMacQueue::Front ( MacHeaderType::HeaderType  packetType) const
private

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

References ns3::MacHeaderType::GetType(), ns3::WimaxMacQueue::QueueElement::m_hdrType, and m_queue.

Referenced by Dequeue(), and Peek().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::WimaxMacQueue::GetFirstPacketPayloadSize ( MacHeaderType::HeaderType  packetType)
uint32_t ns3::WimaxMacQueue::GetFirstPacketRequiredByte ( MacHeaderType::HeaderType  packetType)
uint32_t ns3::WimaxMacQueue::GetMaxSize ( void  ) const
Returns
the maximum queue size

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

References m_maxSize.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

uint32_t ns3::WimaxMacQueue::GetNBytes ( void  ) const

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

References m_bytes.

Referenced by GetQueueLengthWithMACOverhead().

+ Here is the caller graph for this function:

const WimaxMacQueue::PacketQueue & ns3::WimaxMacQueue::GetPacketQueue ( void  ) const

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

References m_queue.

uint32_t ns3::WimaxMacQueue::GetQueueLengthWithMACOverhead ( void  )

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

References CheckForFragmentation(), GetNBytes(), GetSize(), and ns3::MacHeaderType::HEADER_TYPE_GENERIC.

Referenced by ns3::BSSchedulerRtps::BSSchedulerRTPSConnection(), and ns3::BandwidthManager::SelectFlowForRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::WimaxMacQueue::GetSize ( void  ) const

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

References m_queue.

Referenced by GetQueueLengthWithMACOverhead(), ns3::BSSchedulerSimple::Schedule(), and ns3::BSSchedulerRtps::Schedule().

+ Here is the caller graph for this function:

TypeId ns3::WimaxMacQueue::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::WimaxMacQueue.

This object 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 defined for this type:

  • MaxSize: Maximum size

TraceSources defined for this type:

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

Reimplemented from ns3::Object.

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

References GetMaxSize(), m_traceDequeue, m_traceDrop, m_traceEnqueue, ns3::MakeTraceSourceAccessor(), SetMaxSize(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

bool ns3::WimaxMacQueue::IsEmpty ( void  ) const

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

References m_queue.

Referenced by Dequeue(), ns3::WimaxConnection::HasPackets(), and Peek().

+ Here is the caller graph for this function:

bool ns3::WimaxMacQueue::IsEmpty ( MacHeaderType::HeaderType  packetType) const
Ptr< Packet > ns3::WimaxMacQueue::Peek ( GenericMacHeader hdr) const
Ptr< Packet > ns3::WimaxMacQueue::Peek ( GenericMacHeader hdr,
Time timeStamp 
) const
Ptr< Packet > ns3::WimaxMacQueue::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.

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

References ns3::Packet::AddHeader(), ns3::Packet::Copy(), Front(), ns3::MacHeaderType::GetType(), ns3::MacHeaderType::HEADER_TYPE_GENERIC, IsEmpty(), ns3::WimaxMacQueue::QueueElement::m_hdr, ns3::WimaxMacQueue::QueueElement::m_hdrType, and ns3::WimaxMacQueue::QueueElement::m_packet.

+ Here is the call graph for this function:

void ns3::WimaxMacQueue::Pop ( MacHeaderType::HeaderType  packetType)
private

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

References ns3::MacHeaderType::GetType(), ns3::WimaxMacQueue::QueueElement::m_hdrType, and m_queue.

Referenced by Dequeue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WimaxMacQueue::SetFragmentation ( MacHeaderType::HeaderType  packetType)

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

References m_queue.

Referenced by Dequeue().

+ Here is the caller graph for this function:

void ns3::WimaxMacQueue::SetFragmentNumber ( MacHeaderType::HeaderType  packetType)

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

References m_queue.

Referenced by Dequeue().

+ Here is the caller graph for this function:

void ns3::WimaxMacQueue::SetFragmentOffset ( MacHeaderType::HeaderType  packetType,
uint32_t  offset 
)

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

References m_queue.

Referenced by Dequeue().

+ Here is the caller graph for this function:

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.

References m_maxSize.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t ns3::WimaxMacQueue::m_bytes
private

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

Referenced by Dequeue(), Enqueue(), and GetNBytes().

uint32_t ns3::WimaxMacQueue::m_maxSize
private

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

Referenced by Enqueue(), GetMaxSize(), and SetMaxSize().

uint32_t ns3::WimaxMacQueue::m_nrDataPackets
private

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

Referenced by Dequeue(), Enqueue(), and IsEmpty().

uint32_t ns3::WimaxMacQueue::m_nrRequestPackets
private

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

Referenced by Dequeue(), Enqueue(), and IsEmpty().

TracedCallback<Ptr<const Packet> > ns3::WimaxMacQueue::m_traceDequeue
private

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

Referenced by Dequeue(), and GetTypeId().

TracedCallback<Ptr<const Packet> > ns3::WimaxMacQueue::m_traceDrop
private

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

Referenced by Enqueue(), and GetTypeId().

TracedCallback<Ptr<const Packet> > ns3::WimaxMacQueue::m_traceEnqueue
private

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

Referenced by Enqueue(), and GetTypeId().


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