ns-3
ns3::WimaxMacQueue Class Reference
Inheritance diagram for ns3::WimaxMacQueue:
Collaboration diagram for ns3::WimaxMacQueue:

List of all members.

Classes

struct  QueueElement

Public Member Functions

 WimaxMacQueue (uint32_t maxSize)
void SetMaxSize (uint32_t maxSize)
 set the maximum queue size
uint32_t GetMaxSize (void) const
bool Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, const GenericMacHeader &hdr)
 Enqueue a packet.
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.
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
bool IsEmpty (void) const
bool IsEmpty (MacHeaderType::HeaderType packetType) const
uint32_t GetSize (void) const
uint32_t GetNBytes (void) const
bool CheckForFragmentation (MacHeaderType::HeaderType packetType)
 Fragmentation utilities.
uint32_t GetFirstPacketHdrSize (MacHeaderType::HeaderType packetType)
uint32_t GetFirstPacketPayloadSize (MacHeaderType::HeaderType packetType)
uint32_t GetFirstPacketRequiredByte (MacHeaderType::HeaderType packetType)
uint32_t GetQueueLengthWithMACOverhead (void)
void SetFragmentation (MacHeaderType::HeaderType packetType)
void SetFragmentNumber (MacHeaderType::HeaderType packetType)
void SetFragmentOffset (MacHeaderType::HeaderType packetType, uint32_t offset)
const WimaxMacQueue::PacketQueue & GetPacketQueue (void) const
- Public Member Functions inherited from ns3::Object
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Dispose (void)
void AggregateObject (Ptr< Object > other)
AggregateIterator GetAggregateIterator (void) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
uint32_t GetReferenceCount (void) const
- Public Member Functions inherited from ns3::ObjectBase
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
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.

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
virtual void NotifyNewAggregate (void)
virtual void DoStart (void)
virtual void DoDispose (void)
 Object (const Object &o)

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

References ns3::Packet::AddHeader(), ns3::Packet::CreateFragment(), ns3::GenericMacHeader::GetSerializedSize(), ns3::FragmentationSubheader::GetSerializedSize(), ns3::Packet::GetSize(), NS_ASSERT_MSG, and NS_LOG_INFO.

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

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

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

References ns3::Simulator::Now().

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

uint32_t ns3::WimaxMacQueue::GetMaxSize ( void  ) const
Returns:
the maximum queue size

Referenced by GetTypeId().

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.

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

Referenced by ns3::WimaxMacToMacHeader::GetInstanceTypeId().

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.

References ns3::Packet::AddHeader(), and ns3::Packet::Copy().

Referenced by ns3::BSSchedulerRtps::BSSchedulerRTPSConnection().

void ns3::WimaxMacQueue::SetMaxSize ( uint32_t  maxSize)

set the maximum queue size

Parameters:
maxSizethe max queue size

Referenced by GetTypeId().


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