![]() |
5G-LENA nr-v3.3-120-gdac69c56
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) | |
~NrMacSchedulerCQIManagement ()=default | |
Deconstructor. | |
void | DlCqiReported (const DlCqiInfo &info, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, uint32_t expirationTime, int8_t maxDlMcs, uint16_t bandwidthInRbgs) const |
A wideband CQI has been reported for the specified UE. | |
void | InstallGetBwpIdFn (const std::function< uint16_t()> &fn) |
Install a function to retrieve the bwp id. | |
void | InstallGetCellIdFn (const std::function< uint16_t()> &fn) |
Install a function to retrieve the cell id. | |
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. | |
void | RefreshUlCqiMaps (const std::unordered_map< uint16_t, std::shared_ptr< NrMacSchedulerUeInfo > > &m_ueMap) const |
Refresh the UL CQI for all the UE. | |
void | UlSBCQIReported (uint32_t expirationTime, uint32_t tbs, const NrMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms, const std::shared_ptr< NrMacSchedulerUeInfo > &ueInfo, const std::vector< bool > &rbgMask, uint32_t numRbPerRbg, const Ptr< const SpectrumModel > &model) const |
An UL SB CQI has been reported for the specified UE. | |
CQI management for schedulers.
The scheduler will call either DlCqiReported 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 29 of file nr-mac-scheduler-cqi-management.h.
|
delete |
NrMacSchedulerCQIManagement copy constructor (deleted)
o | other instance |
void ns3::NrMacSchedulerCQIManagement::DlCqiReported | ( | const DlCqiInfo & | info, |
const std::shared_ptr< NrMacSchedulerUeInfo > & | ueInfo, | ||
uint32_t | expirationTime, | ||
int8_t | maxDlMcs, | ||
uint16_t | bandwidthInRbgs | ||
) | 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 |
bandwidthInRbgs | number of RBGs in the channel |
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 126 of file nr-mac-scheduler-cqi-management.cc.
References ns3::DlCqiInfo::m_optPrecMat, ns3::DlCqiInfo::m_ri, ns3::DlCqiInfo::m_sbCqis, 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 84 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 91 of file nr-mac-scheduler-cqi-management.cc.
Referenced by ns3::NrMacSchedulerNs3::NrMacSchedulerNs3().
void ns3::NrMacSchedulerCQIManagement::InstallGetNrAmcDlFn | ( | const std::function< Ptr< const NrAmc >()> & | fn | ) |
Definition at line 112 of file nr-mac-scheduler-cqi-management.cc.
void ns3::NrMacSchedulerCQIManagement::InstallGetNrAmcUlFn | ( | const std::function< Ptr< const NrAmc >()> & | fn | ) |
Definition at line 119 of file nr-mac-scheduler-cqi-management.cc.
void ns3::NrMacSchedulerCQIManagement::InstallGetStartMcsDlFn | ( | const std::function< uint8_t()> & | fn | ) |
Definition at line 98 of file nr-mac-scheduler-cqi-management.cc.
void ns3::NrMacSchedulerCQIManagement::InstallGetStartMcsUlFn | ( | const std::function< uint8_t()> & | fn | ) |
Definition at line 105 of file nr-mac-scheduler-cqi-management.cc.
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 201 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 224 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< bool > & | 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 23 of file nr-mac-scheduler-cqi-management.cc.
References ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_ulCqi, and ns3::NrMacSchedulerUeInfo::CqiInfo::SB.
Referenced by ns3::NrMacSchedulerNs3::DoSchedUlCqiInfoReq().