5G-LENA
nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
|
CQI management for schedulers. More...
#include "nr-mac-scheduler-cqi-management.h"
Public Member Functions | |
NrMacSchedulerCQIManagement ()=default | |
NrMacSchedulerCQIManagement default constructor. | |
NrMacSchedulerCQIManagement (const NrMacSchedulerCQIManagement &o)=delete | |
NrMacSchedulerCQIManagement copy constructor (deleted) More... | |
~NrMacSchedulerCQIManagement ()=default | |
Deconstructor. | |
void | DlSBCQIReported (const DlCqiInfo &info, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo) const |
SB CQI reported. More... | |
void | DlWBCQIReported (const DlCqiInfo &info, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t expirationTime, int8_t maxDlMcs) const |
A wideband CQI has been reported for the specified UE. More... | |
void | InstallGetBwpIdFn (const std::function< uint16_t()> &fn) |
Install a function to retrieve the bwp id. More... | |
void | InstallGetCellIdFn (const std::function< uint16_t()> &fn) |
Install a function to retrieve the cell id. More... | |
void | InstallGetNrAmcDlFn (const std::function< Ptr< const NrAmc >()> &fn) |
void | InstallGetNrAmcUlFn (const std::function< Ptr< const NrAmc >()> &fn) |
void | InstallGetStartMcsDlFn (const std::function< uint8_t()> &fn) |
void | InstallGetStartMcsUlFn (const std::function< uint8_t()> &fn) |
void | RefreshDlCqiMaps (const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo >> &m_ueMap) const |
Refresh the DL CQI for all the UE. More... | |
void | RefreshUlCqiMaps (const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo >> &m_ueMap) const |
Refresh the UL CQI for all the UE. More... | |
void | UlSBCQIReported (uint32_t expirationTime, uint32_t tbs, const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, const std::vector< uint8_t > &rbgMask, uint32_t numRbPerRbg, const Ptr< const SpectrumModel > &model) const |
An UL SB CQI has been reported for the specified UE. More... | |
CQI management for schedulers.
The scheduler will call either DlWBCQIReported or DlSBCQIReported to calculate a new DL MCS. For UL, only the method UlSBCQIReported is implemented, and it is a bit more complicated. For any detail, check the respective documentation.
Definition at line 31 of file nr-mac-scheduler-cqi-management.h.
|
delete |
NrMacSchedulerCQIManagement copy constructor (deleted)
o | other instance |
void ns3::NrMacSchedulerCQIManagement::DlSBCQIReported | ( | const DlCqiInfo & | info, |
const std::shared_ptr< NrMacSchedulerUeInfo > & | ueInfo | ||
) | const |
SB CQI reported.
info | SB CQI |
ueInfo | UE |
NOT IMPLEMENTED
Definition at line 25 of file nr-mac-scheduler-cqi-management.cc.
Referenced by ns3::NrMacSchedulerNs3::DoSchedDlCqiInfoReq().
void ns3::NrMacSchedulerCQIManagement::DlWBCQIReported | ( | const DlCqiInfo & | info, |
const std::shared_ptr< NrMacSchedulerUeInfo > & | ueInfo, | ||
uint32_t | expirationTime, | ||
int8_t | maxDlMcs | ||
) | const |
A wideband CQI has been reported for the specified UE.
info | WB CQI |
ueInfo | UE |
expirationTime | expiration time of the CQI in number of slot |
maxDlMcs | maximum DL MCS index |
Store the CQI information inside the m_dlCqi value of the UE, and then calculate the corresponding MCS through NrAmc. The information is contained in the structure CqiInfo, so no need to make calculation here.
Definition at line 138 of file nr-mac-scheduler-cqi-management.cc.
References ns3::DlCqiInfo::m_optPrecMat, ns3::DlCqiInfo::m_ri, ns3::DlCqiInfo::m_wbCqi, and ns3::NrMacSchedulerUeInfo::CqiInfo::WB.
Referenced by ns3::NrMacSchedulerNs3::DoSchedDlCqiInfoReq().
void ns3::NrMacSchedulerCQIManagement::InstallGetBwpIdFn | ( | const std::function< uint16_t()> & | fn | ) |
Install a function to retrieve the bwp id.
fn | the function |
Definition at line 96 of file nr-mac-scheduler-cqi-management.cc.
Referenced by ns3::NrMacSchedulerNs3::NrMacSchedulerNs3().
void ns3::NrMacSchedulerCQIManagement::InstallGetCellIdFn | ( | const std::function< uint16_t()> & | fn | ) |
Install a function to retrieve the cell id.
fn | the function |
Definition at line 103 of file nr-mac-scheduler-cqi-management.cc.
Referenced by ns3::NrMacSchedulerNs3::NrMacSchedulerNs3().
void ns3::NrMacSchedulerCQIManagement::RefreshDlCqiMaps | ( | const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo >> & | m_ueMap | ) | const |
Refresh the DL CQI for all the UE.
This method should be called every slot. Decrement the validity counter DL CQI, and if a CQI expires, reset its value to the default (MCS 0)
m_ueMap | UE map |
Definition at line 171 of file nr-mac-scheduler-cqi-management.cc.
References ns3::NrMacSchedulerUeInfo::CqiInfo::WB.
Referenced by ns3::NrMacSchedulerNs3::DoSchedDlTriggerReq().
void ns3::NrMacSchedulerCQIManagement::RefreshUlCqiMaps | ( | const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo >> & | m_ueMap | ) | const |
Refresh the UL CQI for all the UE.
This method should be called every slot. Decrement the validity counter UL CQI, and if a CQI expires, reset its value to the default (MCS 0)
m_ueMap | UE map |
Definition at line 194 of file nr-mac-scheduler-cqi-management.cc.
References ns3::NrMacSchedulerUeInfo::CqiInfo::WB.
Referenced by ns3::NrMacSchedulerNs3::DoSchedUlTriggerReq().
void ns3::NrMacSchedulerCQIManagement::UlSBCQIReported | ( | uint32_t | expirationTime, |
uint32_t | tbs, | ||
const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters & | params, | ||
const std::shared_ptr< NrMacSchedulerUeInfo > & | ueInfo, | ||
const std::vector< uint8_t > & | rbgMask, | ||
uint32_t | numRbPerRbg, | ||
const Ptr< const SpectrumModel > & | model | ||
) | const |
An UL SB CQI has been reported for the specified UE.
expirationTime | expiration time (in slot) of the CQI value |
tbs | TBS of the allocation |
params | parameters of the received CQI |
ueInfo | UE info |
rbgMask | RBG mask |
numRbPerRbg | How many RB do we have per RBG |
model | SpectrumModel to calculate the CQI |
To calculate the UL MCS, is necessary to remember the allocation done to be able to retrieve the number of symbols and the TBS assigned. This is done inside the class NrMacSchedulerNs3, and here we assume correct parameters as input.
From a vector of SINR (along the entire band) a SpectrumValue is calculated and then passed as input to NrAmc::CreateCqiFeedbackWbTdma. From this function, we have as a result an updated value of CQI, as well as an updated version of MCS for the UL.
Definition at line 35 of file nr-mac-scheduler-cqi-management.cc.
References ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_ulCqi, and ns3::NrMacSchedulerUeInfo::CqiInfo::SB.
Referenced by ns3::NrMacSchedulerNs3::DoSchedUlCqiInfoReq().