NrAmc.h Source File

Simu5G: NrAmc.h Source File
Simu5G
NrAmc.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 _NRAMC_H_
14#define _NRAMC_H_
15
16#include "simu5g/common/LteDefs.h"
17#include "simu5g/stack/mac/amc/LteAmc.h"
18#include "simu5g/stack/mac/amc/NrMcs.h"
19
20namespace simu5g {
21
27class NrAmc : public LteAmc
28{
29 virtual unsigned int getSymbolsPerSlot(GHz carrierFrequency, Direction dir);
30 virtual unsigned int getResourceElementsPerBlock(unsigned int symbolsPerSlot);
31 virtual unsigned int getResourceElements(unsigned int blocks, unsigned int symbolsPerSlot);
32 virtual unsigned int computeTbsFromNinfo(double nInfo, double coderate);
33
34 virtual unsigned int computeCodewordTbs(UserTxParams *info, Codeword cw, Direction dir, unsigned int numRe);
35
36 protected:
37 // NR MCS-table routing seam: the base services DL/UL directly and routes
38 // any other (D2D) direction here. The base rejects it; NrAmcD2D overrides.
39 virtual NrMcsTable *getNrMcsTableForDirection(Direction dir);
40
41 public:
42
43 NrMcsTable dlNrMcsTable_; // TODO tables for UL and DL should be different
44 NrMcsTable ulNrMcsTable_;
45
46 NrAmc() {}
47
48 virtual NrMcsElem getMcsElemPerCqi(Cqi cqi, const Direction dir);
49
50 unsigned int computeBitsOnNRbs(MacNodeId id, Band b, unsigned int blocks, const Direction dir, GHz carrierFrequency) override;
51 unsigned int computeBitsOnNRbs(MacNodeId id, Band b, Codeword cw, unsigned int blocks, const Direction dir, GHz carrierFrequency) override;
52 unsigned int computeBitsPerRbBackground(Cqi cqi, const Direction dir, GHz carrierFrequency) override;
53
54};
55
56} //namespace
57
58#endif
59
Definition NrMcs.h:40
Definition AlertReceiver.h:24
unsigned short Band
Logical band.
Definition LteTypes.h:140
unsigned short Codeword
Codeword.
Definition LteCommon.h:202
unsigned short Cqi
Channel Quality Indicator.
Definition LteTypes.h:133