5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-scheduler-lcg.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#pragma once
6
7#include "nr-mac-sched-sap.h"
8#include "nr-phy-mac-common.h"
9
10#include "ns3/nstime.h"
11
12#include <memory>
13
14namespace ns3
15{
16
30{
31 public:
40 NrMacSchedulerLC() = delete;
56 uint32_t GetTotalSize() const;
57
58 uint32_t m_id{0};
65 uint16_t m_rlcStatusPduSize{0};
66
67 Time m_delayBudget{Time::Min()};
68 double m_PER{0.0};
69 uint8_t m_resourceType{0};
70 uint8_t m_qci{0};
71 uint8_t m_priority{0};
72 uint64_t m_eRabGuaranteedBitrateDl{UINT64_MAX};
73};
74
79typedef std::unique_ptr<NrMacSchedulerLC> LCPtr;
80
107{
108 public:
113 NrMacSchedulerLCG(uint8_t id);
118 NrMacSchedulerLCG(const NrMacSchedulerLCG& other) = delete;
124 bool Contains(uint8_t lcId) const;
129 uint32_t NumOfLC() const;
135 bool Insert(LCPtr&& lc);
155 void UpdateInfo(uint32_t lcgQueueSize);
160 uint32_t GetTotalSize() const;
161
167 uint32_t GetTotalSizeOfLC(uint8_t lcId) const;
168
173 std::vector<uint8_t> GetLCId() const;
174
179 std::vector<uint8_t> GetActiveLCIds() const;
180
186 uint8_t GetQci(uint8_t lcId) const;
187
193 std::unique_ptr<NrMacSchedulerLC>& GetLC(uint8_t lcId);
194
201 void AssignedData(uint8_t lcId, uint32_t size, std::string type);
202
203 void ReleaseLC(uint8_t lcId);
204
205 private:
206 uint8_t m_id{0};
207 std::unordered_map<uint8_t, LCPtr> m_lcMap;
208};
209
214typedef std::unique_ptr<NrMacSchedulerLCG> LCGPtr;
215
216} // namespace ns3
Represent an UE LCG (can be DL or UL)
uint32_t NumOfLC() const
Get the number of LC currently in the LCG.
bool Insert(LCPtr &&lc)
Insert LC in the group.
std::vector< uint8_t > GetActiveLCIds() const
Get a vector of the active LC IDs.
std::unique_ptr< NrMacSchedulerLC > & GetLC(uint8_t lcId)
Get the LC Ptr for a specific LC ID.
bool Contains(uint8_t lcId) const
Check if the LCG contains the LC id specified.
NrMacSchedulerLCG(const NrMacSchedulerLCG &other)=delete
NrMacSchedulerLCG copy constructor (deleted)
uint32_t GetTotalSize() const
Get the total size of the LCG.
uint8_t GetQci(uint8_t lcId) const
Get the QoS Class Identifier of the flow.
std::vector< uint8_t > GetLCId() const
Get a vector of LC ID.
void UpdateInfo(const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters &params)
Update the LCG with a message coming from RLC in the gNB.
uint32_t GetTotalSizeOfLC(uint8_t lcId) const
Get TotalSize Of LC.
void AssignedData(uint8_t lcId, uint32_t size, std::string type)
Inform the LCG of the assigned data to a LC id.
Represent a DL Logical Channel of an UE.
void Update(const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters &params)
Overwrite all the parameters with the one contained in the message.
uint8_t m_resourceType
the resource type associated with the QCI of the flow
uint64_t m_eRabGuaranteedBitrateDl
ERAB guaranteed bit rate DL.
uint32_t GetTotalSize() const
Get the total size of the LC.
double m_PER
PER of the flow.
uint8_t m_qci
QoS Class Identifier of the flow.
uint32_t m_rlcTransmissionQueueSize
The current size of the new transmission queue in byte.
NrMacSchedulerLC()=delete
NrMacSchedulerLC default constructor (deletec)
uint16_t m_rlcTransmissionQueueHolDelay
Head of line delay of new transmissions in ms.
uint16_t m_rlcRetransmissionHolDelay
Head of line delay of retransmissions in ms.
uint32_t m_rlcRetransmissionQueueSize
The current size of the retransmission queue in byte.
uint16_t m_rlcStatusPduSize
The current size of the pending STATUS message in byte.
Time m_delayBudget
Delay budget of the flow.
uint32_t m_id
ID of the LC.
uint8_t m_priority
the priority associated with the QCI of the flow 3GPP 23.203
NrMacSchedulerLC(const NrMacSchedulerLC &o)=delete
NrMacSchedulerLC copy constructor (deleted)
std::unique_ptr< NrMacSchedulerLC > LCPtr
Unique pointer to an instance of NrMacSchedulerLC.
std::unique_ptr< NrMacSchedulerLCG > LCGPtr
LCGPtr unique pointer to a LCG.
See section 4.3.4 logicalChannelConfigListElement.