5G-LENA nr-v3.3-67-g8257369a
The 5G/NR module for the ns-3 simulator
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ns3::NrMacSchedulerLcAlgorithm Class Referenceabstract

This class is the interface for the creation of various scheduling algorithms for the distribution of the assigned bytes to the different LCGs/LCs of a UE. More...

#include "nr-mac-scheduler-lc-alg.h"

+ Inheritance diagram for ns3::NrMacSchedulerLcAlgorithm:
+ Collaboration diagram for ns3::NrMacSchedulerLcAlgorithm:

Classes

struct  Assignation
 Represent an assignation of bytes to a LCG/LC. More...
 

Public Member Functions

 NrMacSchedulerLcAlgorithm ()
 NrMacSchedulerLcAlgorithm constructor.
 
 ~NrMacSchedulerLcAlgorithm () override
 ~NrMacSchedulerLc deconstructor
 
virtual std::vector< AssignationAssignBytesToDlLC (const std::unordered_map< uint8_t, LCGPtr > &ueLCG, uint32_t tbs, Time slotPeriod) const =0
 Method to decide how to distribute the assigned bytes to the different LCs for the DL direction. Notice that in the DL more sophisticated algorithms can be applied since there is no limitation in the distinction among the various LCs as there is in the UL (in the UL the scheduler considers only the first created LC inside the same LCG).
 
virtual std::vector< AssignationAssignBytesToUlLC (const std::unordered_map< uint8_t, LCGPtr > &ueLCG, uint32_t tbs) const =0
 Method to decide how to distribute the assigned bytes to the different LCs for the UL direction. Notice that in the UL there is a limitation in the distinction among the various LCs since the scheduler considers only the first created LC inside the same LCG.
 
TypeId GetInstanceTypeId () const override
 Get the type ID of this instance.
 

Static Public Member Functions

static TypeId GetTypeId ()
 GetTypeId.
 

Detailed Description

This class is the interface for the creation of various scheduling algorithms for the distribution of the assigned bytes to the different LCGs/LCs of a UE.

Notice that in the past, the AssignBytesToLC was a method of NrMacSchedulerNs3. This however, did not allow other algorithms to be used for the byte distribution. For this, we have moved it to a class and defined the NrMacSchedulerLcRR as the default type so that the default distribution will be done in a Round Robin manner. Other algorithms can be included by implementing additional classes.

Moreover, we have separated the function call into DL and UL direction, due to the scheduler limitation to distinguish among the various LCs of an LCG (it considers only the first LC of an LCG). This way we can allow more sophisticated algorithms to be applied in the DL direction, while the UL can be kept simpler.

Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 56 bytes (on a 64-bit architecture).

Definition at line 36 of file nr-mac-scheduler-lc-alg.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerLcAlgorithm()

ns3::NrMacSchedulerLcAlgorithm::NrMacSchedulerLcAlgorithm ( )

NrMacSchedulerLcAlgorithm constructor.

Definition at line 15 of file nr-mac-scheduler-lc-alg.cc.

◆ ~NrMacSchedulerLcAlgorithm()

ns3::NrMacSchedulerLcAlgorithm::~NrMacSchedulerLcAlgorithm ( )
override

~NrMacSchedulerLc deconstructor

Definition at line 21 of file nr-mac-scheduler-lc-alg.cc.

Member Function Documentation

◆ AssignBytesToDlLC()

virtual std::vector< Assignation > ns3::NrMacSchedulerLcAlgorithm::AssignBytesToDlLC ( const std::unordered_map< uint8_t, LCGPtr > &  ueLCG,
uint32_t  tbs,
Time  slotPeriod 
) const
pure virtual

Method to decide how to distribute the assigned bytes to the different LCs for the DL direction. Notice that in the DL more sophisticated algorithms can be applied since there is no limitation in the distinction among the various LCs as there is in the UL (in the UL the scheduler considers only the first created LC inside the same LCG).

Parameters
ueLCGLCG of an UE
tbsTBS to divide between the LCG/LC
Returns
A vector of Assignation

Implemented in ns3::NrMacSchedulerLcQos, and ns3::NrMacSchedulerLcRR.

◆ AssignBytesToUlLC()

virtual std::vector< Assignation > ns3::NrMacSchedulerLcAlgorithm::AssignBytesToUlLC ( const std::unordered_map< uint8_t, LCGPtr > &  ueLCG,
uint32_t  tbs 
) const
pure virtual

Method to decide how to distribute the assigned bytes to the different LCs for the UL direction. Notice that in the UL there is a limitation in the distinction among the various LCs since the scheduler considers only the first created LC inside the same LCG.

Parameters
ueLCGLCG of an UE
tbsTBS to divide between the LCG/LC
Returns
A vector of Assignation

Implemented in ns3::NrMacSchedulerLcQos, and ns3::NrMacSchedulerLcRR.

◆ GetInstanceTypeId()

TypeId ns3::NrMacSchedulerLcAlgorithm::GetInstanceTypeId ( ) const
override

Get the type ID of this instance.

Returns
the Type ID of this instance

Definition at line 33 of file nr-mac-scheduler-lc-alg.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::NrMacSchedulerLcAlgorithm::GetTypeId ( )
static

GetTypeId.

Returns
The TypeId of the class

Definition at line 26 of file nr-mac-scheduler-lc-alg.cc.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

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