LteMacQueue Class Reference¶
|
Simu5G
|
#include <LteMacQueue.h>
Public Member Functions | |
| LteMacQueue (int queueSize) | |
| LteMacQueue (const LteMacQueue &queue) | |
| virtual bool | pushBack (cPacket *pkt) |
| virtual bool | pushFront (cPacket *pkt) |
| virtual cPacket * | popFront () |
| virtual cPacket * | popBack () |
| virtual int64_t | getQueueOccupancy () const |
| int64_t | getQueueSize () const |
| int | getQueueLength () const |
| virtual simtime_t | getHolTimestamp () const |
Protected Member Functions | |
| virtual bool | isEnqueueablePacket (inet::Packet *pkt) |
Detailed Description
Queue for MAC SDU packets.
The Queue registers the following information:
- Packets
- Occupation (in bytes)
- Maximum size
- Number of packets
- Head Of Line Timestamp
The Queue size can be configured, and packets are dropped if stored packets exceed the queue size A size equal to 0 means that the size is infinite.
Constructor & Destructor Documentation
◆ LteMacQueue() [1/2]
| LteMacQueue | ( | int | queueSize | ) |
Constructor creates a new cPacketQueue with configurable maximum size
Referenced by getHolTimestamp(), and LteMacQueue().
◆ LteMacQueue() [2/2]
| LteMacQueue | ( | const LteMacQueue & | queue | ) |
Copy Constructor
References LteMacQueue().
Member Function Documentation
◆ pushBack()
|
virtual |
pushBack() inserts a new packet in the back of the queue (standard operation) only if there is enough space left
- Parameters
-
pkt packet to insert
- Returns
- false if queue is full, true on successful insertion
◆ pushFront()
|
virtual |
pushFront() inserts a new packet in the front of the queue only if there is enough space left
- Parameters
-
pkt packet to insert
- Returns
- false if queue is full, true on successful insertion
◆ popFront()
|
virtual |
popFront() extracts a packet from the front of the queue (standard operation).
- Returns
- nullptr if queue is empty, pkt on successful operation
◆ popBack()
|
virtual |
popBack() extracts a packet from the back of the queue.
- Returns
- nullptr if queue is empty, pkt on successful operation
◆ getQueueOccupancy()
|
virtual |
getQueueOccupancy() returns the occupancy of the queue (in bytes)
- Returns
- queue occupancy
◆ getQueueSize()
| int64_t getQueueSize | ( | ) | const |
getQueueSize() returns the maximum size of the queue (in bytes)
- Returns
- queue size
◆ getQueueLength()
| int getQueueLength | ( | ) | const |
getQueueLength() returns the number of packets in the queue
- Returns
- #packets in queue
◆ getHolTimestamp()
|
virtual |
getHolTimestamp() returns the timestamp of the Head Of Line (front) packet of the queue
- Returns
- Hol Timestamp (0 if queue is empty)
References LteMacQueue().
◆ isEnqueueablePacket()
|
protectedvirtual |
Check if it makes sense to enqueue this packet, i.e. whether it fits in the remaining queue space (unlimited queue if queueSize_ == 0).
Generated by