5G-LENA  nr-v3.0-25-g90be5d1
The 5G/NR module for the ns-3 simulator
ns3::NrMacSchedulerUeInfo Class Reference

The representation of an user for any Mac scheduler. More...

#include "nr-mac-scheduler-ue-info.h"

+ Inheritance diagram for ns3::NrMacSchedulerUeInfo:
+ Collaboration diagram for ns3::NrMacSchedulerUeInfo:

Classes

struct  CqiInfo
 Received CQI information. More...
 

Public Types

typedef std::function< NrMacHarqVector &(const UePtr &ue)> GetHarqVectorFn
 
typedef std::function< std::unordered_map< uint8_t, LCGPtr > &(const UePtr &ue)> GetLCGFn
 
typedef std::function< uint32_t()> GetRbPerRbgFn
 

Public Member Functions

 NrMacSchedulerUeInfo ()=delete
 Default Constructor (deleted)
 
 NrMacSchedulerUeInfo (uint16_t rnti, BeamId beamId, const GetRbPerRbgFn &fn)
 Create a new UE representation. More...
 
virtual ~NrMacSchedulerUeInfo ()
 ~NrMacSchedulerUeInfo deconstructor
 
virtual void ResetDlMetric ()
 ResetDlMetric. More...
 
virtual void ResetDlSchedInfo ()
 Reset DL information. More...
 
virtual void ResetUlMetric ()
 ResetUlMetric. More...
 
virtual void ResetUlSchedInfo ()
 Reset UL information. More...
 
virtual void UpdateDlMetric (const Ptr< const NrAmc > &amc)
 Update DL metrics after resources have been assigned. More...
 
virtual void UpdateUlMetric (const Ptr< const NrAmc > &amc)
 Update UL metrics after resources have been assigned. More...
 

Static Public Member Functions

static NrMacHarqVectorGetDlHarqVector (const UePtr &ue)
 GetDlHarqVector. More...
 
static std::unordered_map< uint8_t, LCGPtr > & GetDlLCG (const UePtr &ue)
 GetDlLCG. More...
 
static uint8_t & GetDlMcs (const UePtr &ue)
 GetDlMcs. More...
 
static uint32_t & GetDlRBG (const UePtr &ue)
 GetDlRBG. More...
 
static uint8_t & GetDlSym (const UePtr &ue)
 GetDlSym. More...
 
static uint32_t & GetDlTBS (const UePtr &ue)
 GetDlTBS. More...
 
static NrMacHarqVectorGetUlHarqVector (const UePtr &ue)
 GetUlHarqVector. More...
 
static std::unordered_map< uint8_t, LCGPtr > & GetUlLCG (const UePtr &ue)
 GetUlLCG. More...
 
static uint8_t & GetUlMcs (const UePtr &ue)
 GetUlMcs. More...
 
static uint32_t & GetUlRBG (const UePtr &ue)
 GetUlRBG. More...
 
static uint8_t & GetUlSym (const UePtr &ue)
 GetUlSym. More...
 
static uint32_t & GetUlTBS (const UePtr &ue)
 GetUlTBS. More...
 
static void PrintLcInfo (uint16_t ue, uint8_t lcgId, uint8_t lcId, uint8_t cqi, uint8_t P, uint8_t minP)
 Prints information related to the QCI of a UEs LC. More...
 

Public Attributes

BeamId m_beamId
 Beam ID of the UE (kept updated as much as possible by MAC)
 
CqiInfo m_dlCqi
 DL CQI information.
 
NrMacHarqVector m_dlHarq
 HARQ process vector for DL.
 
std::unordered_map< uint8_t, LCGPtrm_dlLCG
 DL LCG.
 
uint8_t m_dlMcs {0}
 DL MCS.
 
uint32_t m_dlMRBRetx {0}
 
Ptr< const ComplexMatrixArray > m_dlPrecMats {nullptr}
 DL Precoding matrices.
 
uint8_t m_dlRank {1}
 DL rank (number of MIMO layers)
 
uint32_t m_dlRBG {0}
 DL Resource Block Group assigned in this slot.
 
uint8_t m_dlSym {0}
 Number of (new data) symbols assigned in this slot.
 
uint32_t m_dlTbSize {0}
 
uint16_t m_rnti {0}
 RNTI of the UE.
 
uint32_t m_srsOffset {0}
 SRS offset.
 
uint32_t m_srsPeriodicity {0}
 SRS periodicity.
 
uint8_t m_startMcsDlUe {0}
 Starting DL MCS to be used.
 
CqiInfo m_ulCqi
 UL CQI information.
 
NrMacHarqVector m_ulHarq
 HARQ process vector for UL.
 
std::unordered_map< uint8_t, LCGPtrm_ulLCG
 UL LCG.
 
uint8_t m_ulMcs {0}
 UL MCS.
 
uint32_t m_ulMRBRetx {0}
 
Ptr< const ComplexMatrixArray > m_ulPrecMats {nullptr}
 UL Precoding matrices.
 
uint8_t m_ulRank {1}
 UL rank (number of MIMO layers)
 
uint32_t m_ulRBG {0}
 UL Resource Block Group assigned in this slot.
 
uint8_t m_ulSym {0}
 Number of (new data) symbols assigned in this slot.
 
uint32_t m_ulTbSize {0}
 

Protected Member Functions

uint32_t GetNumRbPerRbg () const
 Retrieve the number of RB per RBG. More...
 

Detailed Description

The representation of an user for any Mac scheduler.

Basic representation for an UE inside any scheduler. The class is responsible to store all the UE-related field that can be used by any scheduler.

If a scheduler needs to store additional information, it is necessary to create a subclass and store the information there. Then, the scheduler will return a pointer to a newly created instance through NrMacSchedulerNs3::CreateUeRepresentation.

The class stores information such as RBG, MCS, and CQI. Information that should be reset after each slot (such as RBG count) should be reset in the method ResetDlSchedInfo() and ResetUlSchedInfo().

When a scheduler assign new resources to the UE, it will call the method UpdateDlMetric() or UpdateUlMetric(). Make sure all the relevant information that should be updated for a correct sorting are updated there.

See also
NrMacSchedulerUeInfoRR
NrMacSchedulerUeInfoPF
NrMacSchedulerUeInfoMR

Definition at line 53 of file nr-mac-scheduler-ue-info.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerUeInfo()

ns3::NrMacSchedulerUeInfo::NrMacSchedulerUeInfo ( uint16_t  rnti,
BeamId  beamId,
const GetRbPerRbgFn &  fn 
)

Create a new UE representation.

Parameters
rntithe RNTI of the UE
beamIdthe BeamID of the UE (can be updated later)

Definition at line 16 of file nr-mac-scheduler-ue-info.cc.

Member Function Documentation

◆ GetDlHarqVector()

NrMacHarqVector & ns3::NrMacSchedulerUeInfo::GetDlHarqVector ( const UePtr &  ue)
static

GetDlHarqVector.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 82 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerNs3::DoSchedDlTriggerReq().

+ Here is the caller graph for this function:

◆ GetDlLCG()

std::unordered_map< uint8_t, LCGPtr > & ns3::NrMacSchedulerUeInfo::GetDlLCG ( const UePtr &  ue)
static

GetDlLCG.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 70 of file nr-mac-scheduler-ue-info.cc.

◆ GetDlMcs()

uint8_t & ns3::NrMacSchedulerUeInfo::GetDlMcs ( const UePtr &  ue)
static

GetDlMcs.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 52 of file nr-mac-scheduler-ue-info.cc.

◆ GetDlRBG()

uint32_t & ns3::NrMacSchedulerUeInfo::GetDlRBG ( const UePtr &  ue)
static

GetDlRBG.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 28 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().

+ Here is the caller graph for this function:

◆ GetDlSym()

uint8_t & ns3::NrMacSchedulerUeInfo::GetDlSym ( const UePtr &  ue)
static

GetDlSym.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 40 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().

+ Here is the caller graph for this function:

◆ GetDlTBS()

uint32_t & ns3::NrMacSchedulerUeInfo::GetDlTBS ( const UePtr &  ue)
static

GetDlTBS.

Parameters
ueUE pointer from which obtain the value
Returns
The TB size

Definition at line 64 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().

+ Here is the caller graph for this function:

◆ GetNumRbPerRbg()

uint32_t ns3::NrMacSchedulerUeInfo::GetNumRbPerRbg ( ) const
protected

◆ GetUlHarqVector()

NrMacHarqVector & ns3::NrMacSchedulerUeInfo::GetUlHarqVector ( const UePtr &  ue)
static

GetUlHarqVector.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 88 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerNs3::DoSchedUlTriggerReq().

+ Here is the caller graph for this function:

◆ GetUlLCG()

std::unordered_map< uint8_t, LCGPtr > & ns3::NrMacSchedulerUeInfo::GetUlLCG ( const UePtr &  ue)
static

GetUlLCG.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 76 of file nr-mac-scheduler-ue-info.cc.

◆ GetUlMcs()

uint8_t & ns3::NrMacSchedulerUeInfo::GetUlMcs ( const UePtr &  ue)
static

GetUlMcs.

Parameters
ueUE pointer from which obtain the value
Returns

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

◆ GetUlRBG()

uint32_t & ns3::NrMacSchedulerUeInfo::GetUlRBG ( const UePtr &  ue)
static

GetUlRBG.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 34 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().

+ Here is the caller graph for this function:

◆ GetUlSym()

uint8_t & ns3::NrMacSchedulerUeInfo::GetUlSym ( const UePtr &  ue)
static

GetUlSym.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 46 of file nr-mac-scheduler-ue-info.cc.

Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().

+ Here is the caller graph for this function:

◆ GetUlTBS()

static uint32_t& ns3::NrMacSchedulerUeInfo::GetUlTBS ( const UePtr &  ue)
inlinestatic

GetUlTBS.

Parameters
ueUE pointer from which obtain the value
Returns

Definition at line 123 of file nr-mac-scheduler-ue-info.h.

Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().

+ Here is the caller graph for this function:

◆ PrintLcInfo()

void ns3::NrMacSchedulerUeInfo::PrintLcInfo ( uint16_t  ue,
uint8_t  lcgId,
uint8_t  lcId,
uint8_t  cqi,
uint8_t  P,
uint8_t  minP 
)
static

Prints information related to the QCI of a UEs LC.

Parameters
ueUE for which we want to print the LC info
lcgIdThe logical channel group ID
lcIdThe logical channel ID
qciThe QCI of this LC
PThe priority associated to the QCI of this LC
Returns

Definition at line 94 of file nr-mac-scheduler-ue-info.cc.

◆ ResetDlMetric()

void ns3::NrMacSchedulerUeInfo::ResetDlMetric ( )
virtual

ResetDlMetric.

Called when the scheduler has assigned RBGs, but the sum does not arrive to a TBS > 0. The assignation is, therefore, not transformed in DCI. These RBG will not be assigned, they will be empty in the slot.

Reimplemented in ns3::NrMacSchedulerUeInfoQos, and ns3::NrMacSchedulerUeInfoPF.

Definition at line 138 of file nr-mac-scheduler-ue-info.cc.

References m_dlTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::ResetDlMetric(), and ns3::NrMacSchedulerUeInfoQos::ResetDlMetric().

+ Here is the caller graph for this function:

◆ ResetDlSchedInfo()

void ns3::NrMacSchedulerUeInfo::ResetDlSchedInfo ( )
virtual

Reset DL information.

Called after each slot. It should reset all the information that are slot-dependent.

Reimplemented in ns3::NrMacSchedulerUeInfoQos, and ns3::NrMacSchedulerUeInfoPF.

Definition at line 107 of file nr-mac-scheduler-ue-info.cc.

References m_dlMRBRetx, m_dlRBG, m_dlSym, and m_dlTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::ResetDlSchedInfo(), and ns3::NrMacSchedulerUeInfoQos::ResetDlSchedInfo().

+ Here is the caller graph for this function:

◆ ResetUlMetric()

void ns3::NrMacSchedulerUeInfo::ResetUlMetric ( )
virtual

ResetUlMetric.

Called when the scheduler has assigned RBGs, but the sum does not arrive to a TBS > 0. The assignation is, therefore, not transformed in DCI. These RBG will not be assigned, they will be empty in the slot.

Reimplemented in ns3::NrMacSchedulerUeInfoQos, and ns3::NrMacSchedulerUeInfoPF.

Definition at line 157 of file nr-mac-scheduler-ue-info.cc.

References m_ulTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::ResetUlMetric(), and ns3::NrMacSchedulerUeInfoQos::ResetUlMetric().

+ Here is the caller graph for this function:

◆ ResetUlSchedInfo()

void ns3::NrMacSchedulerUeInfo::ResetUlSchedInfo ( )
virtual

Reset UL information.

Called after each slot. It should reset all the information that are slot-dependent.

Reimplemented in ns3::NrMacSchedulerUeInfoQos, and ns3::NrMacSchedulerUeInfoPF.

Definition at line 116 of file nr-mac-scheduler-ue-info.cc.

References m_ulMRBRetx, m_ulRBG, m_ulSym, and m_ulTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::ResetUlSchedInfo(), and ns3::NrMacSchedulerUeInfoQos::ResetUlSchedInfo().

+ Here is the caller graph for this function:

◆ UpdateDlMetric()

void ns3::NrMacSchedulerUeInfo::UpdateDlMetric ( const Ptr< const NrAmc > &  amc)
virtual

Update DL metrics after resources have been assigned.

The amount of assigned resources is stored inside m_dlRBG by the scheduler.

Definition at line 125 of file nr-mac-scheduler-ue-info.cc.

References GetNumRbPerRbg(), m_dlMcs, m_dlRank, m_dlRBG, and m_dlTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::UpdateDlPFMetric(), and ns3::NrMacSchedulerUeInfoQos::UpdateDlQosMetric().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateUlMetric()

void ns3::NrMacSchedulerUeInfo::UpdateUlMetric ( const Ptr< const NrAmc > &  amc)
virtual

Update UL metrics after resources have been assigned.

The amount of assigned resources is stored inside m_ulRBG by the scheduler.

Definition at line 144 of file nr-mac-scheduler-ue-info.cc.

References GetNumRbPerRbg(), m_ulMcs, m_ulRank, m_ulRBG, and m_ulTbSize.

Referenced by ns3::NrMacSchedulerUeInfoPF::UpdateUlPFMetric(), and ns3::NrMacSchedulerUeInfoQos::UpdateUlQosMetric().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dlMRBRetx

uint32_t ns3::NrMacSchedulerUeInfo::m_dlMRBRetx {0}

MRB assigned for retx. To update the name, what is MRB is not defined

Definition at line 246 of file nr-mac-scheduler-ue-info.h.

Referenced by ResetDlSchedInfo().

◆ m_dlTbSize

uint32_t ns3::NrMacSchedulerUeInfo::m_dlTbSize {0}

◆ m_ulMRBRetx

uint32_t ns3::NrMacSchedulerUeInfo::m_ulMRBRetx {0}

MRB assigned for retx. To update the name, what is MRB is not defined

Definition at line 248 of file nr-mac-scheduler-ue-info.h.

Referenced by ResetUlSchedInfo().

◆ m_ulTbSize

uint32_t ns3::NrMacSchedulerUeInfo::m_ulTbSize {0}

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