5G-LENA
nr-v3.0-25-g90be5d1
The 5G/NR module for the ns-3 simulator
|
The representation of an user for any Mac scheduler. More...
#include "nr-mac-scheduler-ue-info.h"
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 NrMacHarqVector & | GetDlHarqVector (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 NrMacHarqVector & | GetUlHarqVector (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, LCGPtr > | m_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, LCGPtr > | m_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... | |
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.
Definition at line 53 of file nr-mac-scheduler-ue-info.h.
ns3::NrMacSchedulerUeInfo::NrMacSchedulerUeInfo | ( | uint16_t | rnti, |
BeamId | beamId, | ||
const GetRbPerRbgFn & | fn | ||
) |
Create a new UE representation.
rnti | the RNTI of the UE |
beamId | the BeamID of the UE (can be updated later) |
Definition at line 16 of file nr-mac-scheduler-ue-info.cc.
|
static |
GetDlHarqVector.
ue | UE pointer from which obtain the value |
Definition at line 82 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerNs3::DoSchedDlTriggerReq().
|
static |
GetDlLCG.
ue | UE pointer from which obtain the value |
Definition at line 70 of file nr-mac-scheduler-ue-info.cc.
|
static |
GetDlMcs.
ue | UE pointer from which obtain the value |
Definition at line 52 of file nr-mac-scheduler-ue-info.cc.
|
static |
GetDlRBG.
ue | UE pointer from which obtain the value |
Definition at line 28 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().
|
static |
GetDlSym.
ue | UE pointer from which obtain the value |
Definition at line 40 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().
|
static |
GetDlTBS.
ue | UE pointer from which obtain the value |
Definition at line 64 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerTdma::AssignDLRBG().
|
protected |
Retrieve the number of RB per RBG.
Definition at line 163 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerUeInfoPF::CalculatePotentialTPutDl(), ns3::NrMacSchedulerUeInfoQos::CalculatePotentialTPutDl(), ns3::NrMacSchedulerUeInfoPF::CalculatePotentialTPutUl(), ns3::NrMacSchedulerUeInfoQos::CalculatePotentialTPutUl(), UpdateDlMetric(), and UpdateUlMetric().
|
static |
GetUlHarqVector.
ue | UE pointer from which obtain the value |
Definition at line 88 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerNs3::DoSchedUlTriggerReq().
|
static |
GetUlLCG.
ue | UE pointer from which obtain the value |
Definition at line 76 of file nr-mac-scheduler-ue-info.cc.
|
static |
GetUlMcs.
ue | UE pointer from which obtain the value |
Definition at line 58 of file nr-mac-scheduler-ue-info.cc.
|
static |
GetUlRBG.
ue | UE pointer from which obtain the value |
Definition at line 34 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().
|
static |
GetUlSym.
ue | UE pointer from which obtain the value |
Definition at line 46 of file nr-mac-scheduler-ue-info.cc.
Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().
|
inlinestatic |
GetUlTBS.
ue | UE pointer from which obtain the value |
Definition at line 123 of file nr-mac-scheduler-ue-info.h.
Referenced by ns3::NrMacSchedulerTdma::AssignULRBG().
|
static |
Prints information related to the QCI of a UEs LC.
ue | UE for which we want to print the LC info |
lcgId | The logical channel group ID |
lcId | The logical channel ID |
qci | The QCI of this LC |
P | The priority associated to the QCI of this LC |
Definition at line 94 of file nr-mac-scheduler-ue-info.cc.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
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().
uint32_t ns3::NrMacSchedulerUeInfo::m_dlTbSize {0} |
DL Transport Block Size, depends on MCS and RBG, updated in UpdateDlMetric()
Definition at line 258 of file nr-mac-scheduler-ue-info.h.
Referenced by ResetDlMetric(), ResetDlSchedInfo(), UpdateDlMetric(), ns3::NrMacSchedulerUeInfoPF::UpdateDlPFMetric(), and ns3::NrMacSchedulerUeInfoQos::UpdateDlQosMetric().
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().
uint32_t ns3::NrMacSchedulerUeInfo::m_ulTbSize {0} |
UL Transport Block Size, depends on MCS and RBG, updated in UpdateDlMetric()
Definition at line 260 of file nr-mac-scheduler-ue-info.h.
Referenced by ResetUlMetric(), ResetUlSchedInfo(), UpdateUlMetric(), ns3::NrMacSchedulerUeInfoPF::UpdateUlPFMetric(), and ns3::NrMacSchedulerUeInfoQos::UpdateUlQosMetric().