5G-LENA nr-v3.3-81-g75c7590d
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-system-test-schedulers-ofdma-mr.cc
Go to the documentation of this file.
1// Copyright (c) 2018 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
6
7#include "ns3/test.h"
8
9using namespace ns3;
10
30class NrSystemTestSchedulerOfdmaMrSuite : public TestSuite
31{
32 public:
36 NrSystemTestSchedulerOfdmaMrSuite();
37};
38
39NrSystemTestSchedulerOfdmaMrSuite::NrSystemTestSchedulerOfdmaMrSuite()
40 : TestSuite("nr-system-test-schedulers-ofdma-mr", Type::SYSTEM)
41{
42 enum TxMode
43 {
44 DL,
45 UL,
46 DL_UL
47 };
48
49 std::list<std::string> subdivision = {
50 "Ofdma",
51 };
52 std::list<std::string> scheds = {"MR"};
53 std::list<TxMode> mode = {DL, UL, DL_UL};
54 std::list<uint32_t> uesPerBeamList = {1, 2, 4, 8};
55 std::list<uint32_t> beams = {1, 2};
56 std::list<uint32_t> numerologies = {
57 0,
58 1,
59 }; // Test only num 0 and 1
60
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 NrSystemTestSchedulerOfdmaMrSuite 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...