![]() |
5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
|
Represent an UE LCG (can be DL or UL) More...
#include "nr-mac-scheduler-lcg.h"
Public Member Functions | |
NrMacSchedulerLCG (const NrMacSchedulerLCG &other)=delete | |
NrMacSchedulerLCG copy constructor (deleted) | |
NrMacSchedulerLCG (uint8_t id) | |
NrMacSchedulerLCG constructor. | |
void | AssignedData (uint8_t lcId, uint32_t size, std::string type) |
Inform the LCG of the assigned data to a LC id. | |
bool | Contains (uint8_t lcId) const |
Check if the LCG contains the LC id specified. | |
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. | |
std::vector< uint8_t > | GetLCId () const |
Get a vector of LC ID. | |
uint8_t | GetQci (uint8_t lcId) const |
Get the QoS Class Identifier of the flow. | |
uint32_t | GetTotalSize () const |
Get the total size of the LCG. | |
uint32_t | GetTotalSizeOfLC (uint8_t lcId) const |
Get TotalSize Of LC. | |
bool | Insert (LCPtr &&lc) |
Insert LC in the group. | |
uint32_t | NumOfLC () const |
Get the number of LC currently in the LCG. | |
void | ReleaseLC (uint8_t lcId) |
void | UpdateInfo (const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters ¶ms) |
Update the LCG with a message coming from RLC in the gNB. | |
void | UpdateInfo (uint32_t lcgQueueSize) |
Update the LCG with just the LCG occupancy. Used in UL case when a BSR is received. | |
Represent an UE LCG (can be DL or UL)
A Logical Channel Group has an id (represented by m_id) and can contain logical channels. The LC are stored inside an unordered map, indexed by their ID.
The LCs are inserted through the method Insert, and they can be updated with a call to UpdateInfo. The update is different in DL and UL: in UL only the sum of all components is available, while for DL there is a complete picture, thanks to all the variables defined in NrMacSchedSapProvider::SchedDlRlcBufferReqParameters.
The general usage of this class is to insert each LC, and then update the amount of bytes stored. The removal of an LC is still missing.
For what regards UL, we currently support only one LC per LCG. This comes from the fact that the BSR is reported for all the LCG, and the scheduler has no way to identify which LCID contains bytes. So, even at the cost to have a misrepresentation between the ID inside the UEs and the ID inside the scheduler, we should make sure that each LCG in UL has only one LC.
Definition at line 106 of file nr-mac-scheduler-lcg.h.
ns3::NrMacSchedulerLCG::NrMacSchedulerLCG | ( | uint8_t | id | ) |
NrMacSchedulerLCG constructor.
id | The id of the LCG |
Definition at line 50 of file nr-mac-scheduler-lcg.cc.
|
delete |
NrMacSchedulerLCG copy constructor (deleted)
other | other instance |
void ns3::NrMacSchedulerLCG::AssignedData | ( | uint8_t | lcId, |
uint32_t | size, | ||
std::string | type | ||
) |
Inform the LCG of the assigned data to a LC id.
lcId | the LC id to which the data was assigned |
size | amount of assigned data |
type | String representing the type of allocation currently in act (DL or UL) |
Definition at line 167 of file nr-mac-scheduler-lcg.cc.
bool ns3::NrMacSchedulerLCG::Contains | ( | uint8_t | lcId | ) | const |
Check if the LCG contains the LC id specified.
lcId | LC ID to check for |
Definition at line 58 of file nr-mac-scheduler-lcg.cc.
Referenced by Insert(), and UpdateInfo().
std::vector< uint8_t > ns3::NrMacSchedulerLCG::GetActiveLCIds | ( | ) | const |
Get a vector of the active LC IDs.
Definition at line 134 of file nr-mac-scheduler-lcg.cc.
References GetTotalSizeOfLC().
std::unique_ptr< NrMacSchedulerLC > & ns3::NrMacSchedulerLCG::GetLC | ( | uint8_t | lcId | ) |
Get the LC Ptr for a specific LC ID.
lcId | LC ID |
Definition at line 156 of file nr-mac-scheduler-lcg.cc.
References GetTotalSizeOfLC().
std::vector< uint8_t > ns3::NrMacSchedulerLCG::GetLCId | ( | ) | const |
Get a vector of LC ID.
Definition at line 122 of file nr-mac-scheduler-lcg.cc.
uint8_t ns3::NrMacSchedulerLCG::GetQci | ( | uint8_t | lcId | ) | const |
Get the QoS Class Identifier of the flow.
lcId | LC ID |
Definition at line 149 of file nr-mac-scheduler-lcg.cc.
uint32_t ns3::NrMacSchedulerLCG::GetTotalSize | ( | ) | const |
Get the total size of the LCG.
Definition at line 101 of file nr-mac-scheduler-lcg.cc.
uint32_t ns3::NrMacSchedulerLCG::GetTotalSizeOfLC | ( | uint8_t | lcId | ) | const |
Get TotalSize Of LC.
lcId | LC ID |
Definition at line 114 of file nr-mac-scheduler-lcg.cc.
Referenced by GetActiveLCIds(), and GetLC().
bool ns3::NrMacSchedulerLCG::Insert | ( | LCPtr && | lc | ) |
Insert LC in the group.
lc | LC to insert |
Definition at line 72 of file nr-mac-scheduler-lcg.cc.
References Contains().
uint32_t ns3::NrMacSchedulerLCG::NumOfLC | ( | ) | const |
Get the number of LC currently in the LCG.
Definition at line 65 of file nr-mac-scheduler-lcg.cc.
void ns3::NrMacSchedulerLCG::ReleaseLC | ( | uint8_t | lcId | ) |
Definition at line 258 of file nr-mac-scheduler-lcg.cc.
void ns3::NrMacSchedulerLCG::UpdateInfo | ( | const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters & | params | ) |
Update the LCG with a message coming from RLC in the gNB.
params | message from gNB RLC layer. |
The method is able to update the LC using all the information such as Retx queue, Tx queue, and the various delays.
A call to NrMacSchedulerLC::Update is performed.
Definition at line 80 of file nr-mac-scheduler-lcg.cc.
References Contains(), and ns3::NrMacSchedSapProvider::SchedDlRlcBufferReqParameters::m_logicalChannelIdentity.
void ns3::NrMacSchedulerLCG::UpdateInfo | ( | uint32_t | lcgQueueSize | ) |
Update the LCG with just the LCG occupancy. Used in UL case when a BSR is received.
lcgQueueSize | Sum of the size of all components in B |
Used in the UL case, in which only the sum of the components are available. For the LC, only the value m_rlcTransmissionQueueSize is updated.
For UL, only 1 LC per LCG is supported.
Definition at line 88 of file nr-mac-scheduler-lcg.cc.