5#include "ns3/applications-module.h"
6#include "ns3/core-module.h"
7#include "ns3/ipv4-global-routing-helper.h"
9#include "ns3/mobility-module.h"
10#include "ns3/nr-module.h"
11#include "ns3/nr-point-to-point-epc-helper.h"
12#include "ns3/point-to-point-helper.h"
45NS_LOG_COMPONENT_DEFINE(
"CttcErrorModelComparisonExample");
48main(
int argc,
char* argv[])
50 std::string errorModel =
"ns3::NrEesmCcT1";
52 CommandLine cmd(__FILE__);
54 cmd.AddValue(
"errorModelType",
55 "Error model type: ns3::NrEesmCcT1, ns3::NrEesmCcT2, ns3::NrEesmIrT1, "
56 "ns3::NrEesmIrT2, ns3::NrLteMiErrorModel",
59 cmd.Parse(argc, argv);
64 Config::SetDefault(
"ns3::NrAmc::ErrorModelType", TypeIdValue(TypeId::LookupByName(errorModel)));
68 const uint8_t numerology = 4;
69 const uint32_t bandwidth = 100e6;
70 const uint32_t numRbsInBandwidth = bandwidth / (15e3 * std::pow(2, numerology) * 12);
72 Ptr<NrAmc> amc = CreateObject<NrAmc>();
76 for (uint32_t mcs = 0; mcs <= amc->GetMaxMcs(); ++mcs)
80 ss <<
"\nResults for DL (UL only in NR case): MCS " << mcs <<
". TBS in 1 RB: ["
81 << amc->CalculateTbSize(mcs, rank, 1) <<
"] bytes. TBS in 1 sym: ["
82 << amc->CalculateTbSize(mcs, rank, numRbsInBandwidth) <<
"] bytes.";
86 std::cout <<
"NUMEROLOGY 4, 100e6 BANDWIDTH, Error Model: ";
87 std::cout << errorModel <<
". Results: " << std::endl;
88 std::cout << tbs << std::endl;
@ ShannonModel
Shannon based model (very conservative)