5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
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)
 
 ~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 &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.
 

Detailed Description

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.

See also
UlSBCQIReported
DlCqiReported

Definition at line 29 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

◆ DlCqiReported()

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.

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

+ 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 84 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 91 of file nr-mac-scheduler-cqi-management.cc.

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

+ Here is the caller graph for this function:

◆ InstallGetNrAmcDlFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetNrAmcDlFn ( const std::function< Ptr< const NrAmc >()> &  fn)

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

◆ InstallGetNrAmcUlFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetNrAmcUlFn ( const std::function< Ptr< const NrAmc >()> &  fn)

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

◆ InstallGetStartMcsDlFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetStartMcsDlFn ( const std::function< uint8_t()> &  fn)

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

◆ InstallGetStartMcsUlFn()

void ns3::NrMacSchedulerCQIManagement::InstallGetStartMcsUlFn ( const std::function< uint8_t()> &  fn)

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

◆ 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 201 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 224 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< bool > &  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 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().

+ Here is the caller graph for this function:

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