5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-system-test-schedulers-ofdma-pf.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
32class NrSystemTestSchedulerOfdmaPfSuite : public TestSuite
33{
34 public:
38 NrSystemTestSchedulerOfdmaPfSuite();
39};
40
41NrSystemTestSchedulerOfdmaPfSuite::NrSystemTestSchedulerOfdmaPfSuite()
42 : TestSuite("nr-system-test-schedulers-ofdma-pf", Type::SYSTEM)
43{
44 enum TxMode
45 {
46 DL,
47 UL,
48 DL_UL
49 };
50
51 std::list<std::string> subdivision = {
52 "Ofdma",
53 };
54 std::list<std::string> scheds = {"PF"};
55 std::list<TxMode> mode = {DL, UL, DL_UL};
56 std::list<uint32_t> uesPerBeamList = {1, 2, 4, 8};
57 std::list<uint32_t> beams = {1, 2};
58 std::list<uint32_t> numerologies = {
59 0,
60 1,
61 }; // Test only num 0 and 1
62
63 for (const auto& num : numerologies)
64 {
65 for (const auto& subType : subdivision)
66 {
67 for (const auto& sched : scheds)
68 {
69 for (const auto& modeType : mode)
70 {
71 for (const auto& uesPerBeam : uesPerBeamList)
72 {
73 for (const auto& beam : beams)
74 {
75 std::stringstream ss;
76 std::stringstream schedName;
77 if (modeType == DL)
78 {
79 ss << "DL";
80 }
81 else if (modeType == UL)
82 {
83 ss << "UL";
84 }
85 else
86 {
87 ss << "DL_UL";
88 }
89 ss << ", Num " << num << ", " << subType << " " << sched << ", "
90 << uesPerBeam << " UE per beam, " << beam << " beam";
91 const bool isDl = modeType == DL || modeType == DL_UL;
92 const bool isUl = modeType == UL || modeType == DL_UL;
93
94 schedName << "ns3::NrMacScheduler" << subType << sched;
95
96 AddTestCase(new SystemSchedulerTest(ss.str(),
97 uesPerBeam,
98 beam,
99 num,
100 20e6,
101 isDl,
102 isUl,
103 schedName.str()),
104 Duration::QUICK);
105 }
106 }
107 }
108 }
109 }
110 }
111}
112
113// Do not forget to allocate an instance of this TestSuite
114static NrSystemTestSchedulerOfdmaPfSuite 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...