LteMacBuffer.h Source File

Simu5G: LteMacBuffer.h Source File
Simu5G
LteMacBuffer.h
1//
2// Simu5G
3//
4// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
5// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
6//
7// This file is part of a software released under the license included in file
8// "license.pdf". Please read LICENSE and README files before using it.
9// The above files and the present reference are part of the software itself,
10// and cannot be removed from it.
11//
12
13#ifndef _LTE_LTEMACBUFFER_H_
14#define _LTE_LTEMACBUFFER_H_
15
16#include "simu5g/common/LteCommon.h"
17
18namespace simu5g {
19
20using namespace omnetpp;
21
22class LteMacQueue;
23
28{
29 public:
35
40 LteMacBuffer& operator=(const LteMacBuffer& queue);
41 LteMacBuffer *dup() const;
42
49 void pushBack(PacketInfo pkt);
50
57 void pushFront(PacketInfo pkt);
58
67 PacketInfo popFront();
68
76 PacketInfo popBack();
77
85 PacketInfo& front();
86
94 PacketInfo back() const;
95
102 void setProcessed(unsigned int i);
103
110 unsigned int getQueueOccupancy() const;
111
118 int getQueueLength() const;
119
124 bool isEmpty() const;
125
133 simtime_t getHolTimestamp() const;
134
142 unsigned int getProcessed() const;
143
147 const std::list<PacketInfo> *getPacketlist() const;
148
149 friend std::ostream& operator<<(std::ostream& stream, const LteMacQueue *queue);
150
151 private:
153 unsigned int processed_;
154
156 unsigned int queueOccupancy_;
157
159 int queueLength_;
160
162 std::list<PacketInfo> Queue_;
163};
164
165} //namespace
166
167#endif
168
const std::list< PacketInfo > * getPacketlist() const
PacketInfo & front()
PacketInfo popBack()
unsigned int getQueueOccupancy() const
unsigned int getProcessed() const
void setProcessed(unsigned int i)
void pushFront(PacketInfo pkt)
LteMacBuffer(const LteMacQueue &queue)
PacketInfo back() const
void pushBack(PacketInfo pkt)
bool isEmpty() const
int getQueueLength() const
PacketInfo popFront()
simtime_t getHolTimestamp() const
Queue for MAC SDU packets.
Definition LteMacQueue.h:41
Definition AlertReceiver.h:24