5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-system-test-schedulers-tdma-mr.cc
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2018 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
8
9#include "ns3/test.h"
10
11using namespace ns3;
12
31class NrSystemTestSchedulerTdmaMrSuite : public TestSuite
32{
33 public:
37 NrSystemTestSchedulerTdmaMrSuite();
38};
39
40NrSystemTestSchedulerTdmaMrSuite::NrSystemTestSchedulerTdmaMrSuite()
41 : TestSuite("nr-system-test-schedulers-tdma-mr", Type::SYSTEM)
42{
43 enum TxMode
44 {
45 DL,
46 UL,
47 DL_UL
48 };
49
50 std::list<std::string> subdivision = {
51 "Tdma",
52 };
53 std::list<std::string> scheds = {"MR"};
54 std::list<TxMode> mode = {DL, UL, DL_UL};
55 std::list<uint32_t> uesPerBeamList = {1, 2, 4, 8};
56 std::list<uint32_t> beams = {1, 2};
57 std::list<uint32_t> numerologies = {
58 0,
59 1,
60 }; // Test only num 0 and 1
61 for (const auto& num : numerologies)
62 {
63 for (const auto& subType : subdivision)
64 {
65 for (const auto& sched : scheds)
66 {
67 for (const auto& modeType : mode)
68 {
69 for (const auto& uesPerBeam : uesPerBeamList)
70 {
71 for (const auto& beam : beams)
72 {
73 std::stringstream ss;
74 std::stringstream schedName;
75 if (modeType == DL)
76 {
77 ss << "DL";
78 }
79 else if (modeType == UL)
80 {
81 ss << "UL";
82 }
83 else
84 {
85 ss << "DL_UL";
86 }
87 ss << ", Num " << num << ", " << subType << " " << sched << ", "
88 << uesPerBeam << " UE per beam, " << beam << " beam";
89 const bool isDl = modeType == DL || modeType == DL_UL;
90 const bool isUl = modeType == UL || modeType == DL_UL;
91
92 schedName << "ns3::NrMacScheduler" << subType << sched;
93
94 AddTestCase(new SystemSchedulerTest(ss.str(),
95 uesPerBeam,
96 beam,
97 num,
98 20e6,
99 isDl,
100 isUl,
101 schedName.str()),
102 Duration::QUICK);
103 }
104 }
105 }
106 }
107 }
108 }
109}
110
111// Do not forget to allocate an instance of this TestSuite
112static NrSystemTestSchedulerTdmaMrSuite mmwaveTestSuite;
Main class for testing a scheduler, system-wise.
@ DL
DL CTRL + DL DATA.
@ UL
UL DATA + UL CTRL.
This test case checks if the throughput obtained per UE is as expected for the specified scheduling l...