5G-LENA  nr-v3.0-29-g83cc959
The 5G/NR module for the ns-3 simulator
ns3::NrMacSchedulerCQIManagement Class Reference

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 &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. More...
 

Detailed Description

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.

See also
UlSBCQIReported
DlWBCQIReported

Definition at line 31 of file nr-mac-scheduler-cqi-management.h.

Constructor & Destructor Documentation

◆ NrMacSchedulerCQIManagement()

ns3::NrMacSchedulerCQIManagement::NrMacSchedulerCQIManagement ( const NrMacSchedulerCQIManagement o)
delete

NrMacSchedulerCQIManagement copy constructor (deleted)

Parameters
oother instance

Member Function Documentation

◆ DlSBCQIReported()

void ns3::NrMacSchedulerCQIManagement::DlSBCQIReported ( const DlCqiInfo info,
const std::shared_ptr< NrMacSchedulerUeInfo > &  ueInfo 
) const

SB CQI reported.

Parameters
infoSB CQI
ueInfoUE

NOT IMPLEMENTED

Definition at line 25 of file nr-mac-scheduler-cqi-management.cc.

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

+ Here is the caller graph for this function:

◆ DlWBCQIReported()

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.

Parameters
infoWB CQI
ueInfoUE
expirationTimeexpiration time of the CQI in number of slot
maxDlMcsmaximum 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().

+ Here is the caller graph for this function:

◆ InstallGetBwpIdFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetBwpIdFn ( const std::function< uint16_t()> &  fn)

Install a function to retrieve the bwp id.

Parameters
fnthe function

Definition at line 96 of file nr-mac-scheduler-cqi-management.cc.

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

+ Here is the caller graph for this function:

◆ InstallGetCellIdFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetCellIdFn ( const std::function< uint16_t()> &  fn)

Install a function to retrieve the cell id.

Parameters
fnthe function

Definition at line 103 of file nr-mac-scheduler-cqi-management.cc.

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

+ Here is the caller graph for this function:

◆ RefreshDlCqiMaps()

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)

Parameters
m_ueMapUE map

Definition at line 171 of file nr-mac-scheduler-cqi-management.cc.

References ns3::NrMacSchedulerUeInfo::CqiInfo::WB.

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

+ Here is the caller graph for this function:

◆ RefreshUlCqiMaps()

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)

Parameters
m_ueMapUE map

Definition at line 194 of file nr-mac-scheduler-cqi-management.cc.

References ns3::NrMacSchedulerUeInfo::CqiInfo::WB.

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

+ Here is the caller graph for this function:

◆ UlSBCQIReported()

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.

Parameters
expirationTimeexpiration time (in slot) of the CQI value
tbsTBS of the allocation
paramsparameters of the received CQI
ueInfoUE info
rbgMaskRBG mask
numRbPerRbgHow many RB do we have per RBG
modelSpectrumModel 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().

+ Here is the caller graph for this function:

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