ns-3
ns3::LteMacQueue Class Reference

#include <lte-mac-queue.h>

Inheritance diagram for ns3::LteMacQueue:
Collaboration diagram for ns3::LteMacQueue:

List of all members.

Classes

struct  QueueElement

Public Member Functions

 LteMacQueue (uint32_t maxSize)
void SetMaxSize (uint32_t maxSize)
 set the maximum queue size
uint32_t GetMaxSize (void) const
bool Enqueue (Ptr< Packet > packet)
 Enqueue a packet.
Ptr< PacketDequeue (void)
 Dequeue a packet from the queue.
Ptr< PacketDequeue (uint32_t availableByte)
 Dequeue a fragment of size availableByte from the queue.
Ptr< PacketPeek (void) const
 Same as Dequeue but does not pop from queue.
bool IsEmpty (void) const
 Check if there are packets into the queue.
uint32_t GetSize (void) const
 Get the size of the queue.
uint32_t GetNBytes (void) const
 Get the number of bytes into the queue.
uint32_t GetQueueLengthWithMACOverhead (void)
 Get the length of the queue with MAC + RLC + CRC overhead.
const LteMacQueue::PacketQueue & GetPacketQueue (void) const
 Get the packet queue.

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::LteMacQueue.

Detailed Description

The MAC queue for each bearer


Constructor & Destructor Documentation

ns3::LteMacQueue::LteMacQueue ( uint32_t  maxSize)

Create the Mac queue defining its maximum size

Parameters:
maxSizethe maximum size of the queue

Member Function Documentation

Dequeue a packet from the queue.

Returns:
the first packet in the queue

References IsEmpty(), and NS_LOG_FUNCTION.

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

Ptr< Packet > ns3::LteMacQueue::Dequeue ( uint32_t  availableByte)

Dequeue a fragment of size availableByte from the queue.

Parameters:
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 NS_LOG_FUNCTION.

bool ns3::LteMacQueue::Enqueue ( Ptr< Packet packet)

Enqueue a packet.

Parameters:
packetthe packet to enqueue

References ns3::Packet::GetSize(), ns3::Simulator::Now(), and NS_LOG_FUNCTION.

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

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

References NS_LOG_FUNCTION.

Referenced by GetTypeId().

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

Get the number of bytes into the queue.

Returns:
the number of bytes into the queue

References NS_LOG_FUNCTION.

Referenced by GetQueueLengthWithMACOverhead().

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

Get the packet queue.

Returns:
the apcket queue

References NS_LOG_FUNCTION.

Get the length of the queue with MAC + RLC + CRC overhead.

Returns:
the length of the queue with MAC + RLC + CRC overhead

References GetNBytes(), GetSize(), and NS_LOG_FUNCTION.

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

Get the size of the queue.

Returns:
the size of the queue

References NS_LOG_FUNCTION.

Referenced by GetQueueLengthWithMACOverhead().

TypeId ns3::LteMacQueue::GetTypeId ( void  ) [static]

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

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::LteMacQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::RadioBearerInstance/TxQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::LteMacQueue
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::RadioBearerInstance/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().

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

set the maximum queue size

Parameters:
maxSizethe max queue size

References NS_LOG_FUNCTION.

Referenced by GetTypeId().


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