LteMacBuffer Class Reference¶
|
Simu5G
|
#include <LteMacBuffer.h>
Public Member Functions | |
| LteMacBuffer () | |
| LteMacBuffer (const LteMacQueue &queue) | |
| void | pushBack (PacketInfo pkt) |
| void | pushFront (PacketInfo pkt) |
| PacketInfo | popFront () |
| PacketInfo | popBack () |
| PacketInfo & | front () |
| PacketInfo | back () const |
| void | setProcessed (unsigned int i) |
| unsigned int | getQueueOccupancy () const |
| int | getQueueLength () const |
| bool | isEmpty () const |
| simtime_t | getHolTimestamp () const |
| unsigned int | getProcessed () const |
| const std::list< PacketInfo > * | getPacketlist () const |
Detailed Description
Buffers for MAC packets.
Constructor & Destructor Documentation
◆ LteMacBuffer() [1/2]
| LteMacBuffer | ( | ) |
Constructor initializes the list
Referenced by LteMacBuffer().
◆ LteMacBuffer() [2/2]
| LteMacBuffer | ( | const LteMacQueue & | queue | ) |
Copy Constructors
References LteMacBuffer().
Member Function Documentation
◆ pushBack()
| void pushBack | ( | PacketInfo | pkt | ) |
pushBack() inserts a new packet at the back of the queue (standard operation)
- Parameters
-
pkt packet to insert
◆ pushFront()
| void pushFront | ( | PacketInfo | pkt | ) |
pushFront() inserts a new packet at the front of the queue
- Parameters
-
pkt packet to insert
◆ popFront()
| PacketInfo popFront | ( | ) |
popFront() extracts a packet from the front of the queue (standard operation). NOTE: This function increases the processed_ variable.
- Returns
- zero-size packet if queue is empty, pkt on successful operation
◆ popBack()
| PacketInfo popBack | ( | ) |
popBack() extracts a packet from the back of the queue.
- Returns
- zero-size packet if queue is empty, pkt on successful operation
◆ front()
| PacketInfo & front | ( | ) |
front() returns the packet in front of the queue without performing actual extraction.
- Returns
- zero-size packet if queue is empty, pkt on successful operation
◆ back()
| PacketInfo back | ( | ) | const |
back() returns the packet at the back of the queue without performing actual extraction.
- Returns
- nullptr if queue is empty, pointer to pkt on successful operation
◆ setProcessed()
| void setProcessed | ( | unsigned int | i | ) |
setProcessed() sets the value of the processed_ variable
- Parameters
-
i value for processed_
◆ getQueueOccupancy()
| unsigned int getQueueOccupancy | ( | ) | const |
getQueueOccupancy() returns the occupancy of the queue (in bytes).
- Returns
- queue occupancy
◆ getQueueLength()
| int getQueueLength | ( | ) | const |
getQueueLength() returns the number of packets in the queue
- Returns
- #packets in queue
◆ isEmpty()
| bool isEmpty | ( | ) | const |
- Returns
- TRUE if the queue is empty
◆ getHolTimestamp()
| simtime_t getHolTimestamp | ( | ) | const |
getHolTimestamp() returns the timestamp of the Head Of Line (front) packet of the queue
- Returns
- Hol Timestamp (0 if queue empty)
◆ getProcessed()
| unsigned int getProcessed | ( | ) | const |
getProcessed() returns the number of SDUs processed by the scheduler. It is assumed that the scheduler processes packets only from the front of the queue
- Returns
- Number of processed SDUs
◆ getPacketlist()
| const std::list< PacketInfo > * getPacketlist | ( | ) | const |
Get direct (readonly) access to PDU list
Generated by