5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrMacSchedulerLCG Class Reference

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 &params)
 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.
 

Detailed Description

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.

See also
UpdateInfo

Definition at line 106 of file nr-mac-scheduler-lcg.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerLCG() [1/2]

ns3::NrMacSchedulerLCG::NrMacSchedulerLCG ( uint8_t  id)

NrMacSchedulerLCG constructor.

Parameters
idThe id of the LCG

Definition at line 50 of file nr-mac-scheduler-lcg.cc.

◆ NrMacSchedulerLCG() [2/2]

ns3::NrMacSchedulerLCG::NrMacSchedulerLCG ( const NrMacSchedulerLCG other)
delete

NrMacSchedulerLCG copy constructor (deleted)

Parameters
otherother instance

Member Function Documentation

◆ AssignedData()

void ns3::NrMacSchedulerLCG::AssignedData ( uint8_t  lcId,
uint32_t  size,
std::string  type 
)

Inform the LCG of the assigned data to a LC id.

Parameters
lcIdthe LC id to which the data was assigned
sizeamount of assigned data
typeString representing the type of allocation currently in act (DL or UL)

Definition at line 167 of file nr-mac-scheduler-lcg.cc.

◆ Contains()

bool ns3::NrMacSchedulerLCG::Contains ( uint8_t  lcId) const

Check if the LCG contains the LC id specified.

Parameters
lcIdLC ID to check for
Returns
true if the LCG contains the LC

Definition at line 58 of file nr-mac-scheduler-lcg.cc.

Referenced by Insert(), and UpdateInfo().

+ Here is the caller graph for this function:

◆ GetActiveLCIds()

std::vector< uint8_t > ns3::NrMacSchedulerLCG::GetActiveLCIds ( ) const

Get a vector of the active LC IDs.

Returns
a vector with all the LC ids in this LCG that have data

Definition at line 134 of file nr-mac-scheduler-lcg.cc.

References GetTotalSizeOfLC().

+ Here is the call graph for this function:

◆ GetLC()

std::unique_ptr< NrMacSchedulerLC > & ns3::NrMacSchedulerLCG::GetLC ( uint8_t  lcId)

Get the LC Ptr for a specific LC ID.

Parameters
lcIdLC ID
Returns
the LC Ptr for the LC ID

Definition at line 156 of file nr-mac-scheduler-lcg.cc.

References GetTotalSizeOfLC().

+ Here is the call graph for this function:

◆ GetLCId()

std::vector< uint8_t > ns3::NrMacSchedulerLCG::GetLCId ( ) const

Get a vector of LC ID.

Returns
a vector with all the LC id present in this LCG

Definition at line 122 of file nr-mac-scheduler-lcg.cc.

◆ GetQci()

uint8_t ns3::NrMacSchedulerLCG::GetQci ( uint8_t  lcId) const

Get the QoS Class Identifier of the flow.

Parameters
lcIdLC ID
Returns
the QoS Class Identifier of the flow with lcId

Definition at line 149 of file nr-mac-scheduler-lcg.cc.

◆ GetTotalSize()

uint32_t ns3::NrMacSchedulerLCG::GetTotalSize ( ) const

Get the total size of the LCG.

Returns
the total size of the LCG

Definition at line 101 of file nr-mac-scheduler-lcg.cc.

◆ GetTotalSizeOfLC()

uint32_t ns3::NrMacSchedulerLCG::GetTotalSizeOfLC ( uint8_t  lcId) const

Get TotalSize Of LC.

Parameters
lcIdLC ID
Returns
the total size of the LC

Definition at line 114 of file nr-mac-scheduler-lcg.cc.

Referenced by GetActiveLCIds(), and GetLC().

+ Here is the caller graph for this function:

◆ Insert()

bool ns3::NrMacSchedulerLCG::Insert ( LCPtr &&  lc)

Insert LC in the group.

Parameters
lcLC to insert
Returns
true if the insertion was fine (false in the case the LC already exists)

Definition at line 72 of file nr-mac-scheduler-lcg.cc.

References Contains().

+ Here is the call graph for this function:

◆ NumOfLC()

uint32_t ns3::NrMacSchedulerLCG::NumOfLC ( ) const

Get the number of LC currently in the LCG.

Returns
the number of LC

Definition at line 65 of file nr-mac-scheduler-lcg.cc.

◆ ReleaseLC()

void ns3::NrMacSchedulerLCG::ReleaseLC ( uint8_t  lcId)

Definition at line 258 of file nr-mac-scheduler-lcg.cc.

◆ UpdateInfo() [1/2]

void ns3::NrMacSchedulerLCG::UpdateInfo ( const NrMacSchedSapProvider::SchedDlRlcBufferReqParameters params)

Update the LCG with a message coming from RLC in the gNB.

Parameters
paramsmessage 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.

+ Here is the call graph for this function:

◆ UpdateInfo() [2/2]

void ns3::NrMacSchedulerLCG::UpdateInfo ( uint32_t  lcgQueueSize)

Update the LCG with just the LCG occupancy. Used in UL case when a BSR is received.

Parameters
lcgQueueSizeSum 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.


The documentation for this class was generated from the following files: