NrMcs.h Source File

Simu5G: NrMcs.h Source File
Simu5G
NrMcs.h
1//
2// Simu5G
3//
4// Copyright (C) 2019-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
5// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
6//
7// This file is part of a software released under the license included in file
8// "license.pdf". Please read LICENSE and README files before using it.
9// The above files and the present reference are part of the software itself,
10// and cannot be removed from it.
11//
12
13#ifndef _NRMCS_H_
14#define _NRMCS_H_
15
16#include "simu5g/common/LteCommon.h"
17#include "simu5g/stack/mac/amc/LteMcs.h"
18
19namespace simu5g {
20
21// This file contains MCS types and constants; MCS and ITBS tables;
22// and functions related to MCS and Tx-Modes.
23
24struct NrMcsElem
25{
26 LteMod mod_;
27 double coderate_;
28
29 NrMcsElem(LteMod mod = _QPSK, double coderate = 0.0) : mod_(mod), coderate_(coderate)
30 {
31 }
32
33};
34
39class NrMcsTable
40{
41 bool extended_;
42
43 public:
44
49 CqiElem cqiTable[MAXCQI + 1];
50
51 NrMcsElem table[CQI2ITBSSIZE];
52
53 NrMcsTable(bool extended = true);
54
55 CqiElem getCqiElem(int i)
56 {
57 return cqiTable[i];
58 }
59
60 unsigned int getMinIndex(LteMod mod);
61 unsigned int getMaxIndex(LteMod mod);
62
64 NrMcsElem& at(Tbs tbs)
65 {
66 return table[tbs];
67 }
68
69};
70
71const unsigned int TBSTABLESIZE = 94;
72extern const unsigned int nInfoToTbs[TBSTABLESIZE];
73
74} //namespace
75
76#endif
77
CqiElem cqiTable[MAXCQI+1]
Definition NrMcs.h:49
NrMcsElem & at(Tbs tbs)
MCS table seek operator.
Definition NrMcs.h:64
Definition AlertReceiver.h:24
unsigned short Tbs
Transport Block Size.
Definition LteTypes.h:137