5G-LENA nr-v4.0-29-g6d8085cd
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
system-scheduler-test-qos.h
Go to the documentation of this file.
1// Copyright (c) 2022 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef SYSTEM_SCHEDULER_TEST_QOS_H
6#define SYSTEM_SCHEDULER_TEST_QOS_H
7
8#include "ns3/ptr.h"
9#include "ns3/test.h"
10
11namespace ns3
12{
13
14class Packet;
15
46class SystemSchedulerTestQos : public TestCase
47{
48 public:
60 SystemSchedulerTestQos(uint32_t ueNumPergNb,
61 uint32_t numerology,
62 double bw1,
63 bool isDownlink,
64 bool isUplink,
65 double p1,
66 double p2,
67 uint32_t priorityTrafficScenario,
68 const std::string& schedulerType);
72 ~SystemSchedulerTestQos() override;
73
74 private:
75 void DoRun() override;
76 void CountPkts(Ptr<const Packet> pkt);
77
78 uint32_t m_ueNumPergNb;
79 uint32_t m_numerology;
80 double m_bw1;
81 bool m_isDownlink;
82 bool m_isUplink;
83 double m_p1;
84 double m_p2;
85 uint32_t m_priorityTrafficScenario;
86 std::string m_schedulerType;
87 bool verbose{false};
88};
89
104class NrSystemTestSchedulerQosSuite : public TestSuite
105{
106 public:
111};
112
114 : TestSuite("nr-system-test-schedulers-qos", Type::SYSTEM)
115{
116 std::list<std::string> subdivision = {"Tdma", "Ofdma"};
117 std::string type = {"Qos"};
118 std::list<std::string> mode = {"DL", "UL"};
119 std::list<uint32_t> numUesPerGnbList = {2, 4};
120 std::list<uint32_t> numerologies = {0, 1};
121 double qciP1 = {20};
122 double qciP2 = {68};
123 std::list<uint32_t> priorityTrafficScenarioList = {0};
124
125 for (const auto& modeType : mode)
126 {
127 for (const auto& subType : subdivision)
128 {
129 for (const auto& num : numerologies)
130 {
131 for (const auto& uesPerGnb : numUesPerGnbList)
132 {
133 for (const auto& priorityTrafficScenario : priorityTrafficScenarioList)
134 {
135 const bool isDl = modeType == "DL" || modeType == "DL_UL";
136 const bool isUl = modeType == "UL" || modeType == "DL_UL";
137
138 std::stringstream schedName;
139 schedName << "ns3::NrMacScheduler" << subType << type;
140
141 AddTestCase(new SystemSchedulerTestQos(uesPerGnb,
142 num,
143 5e6,
144 isDl,
145 isUl,
146 qciP1,
147 qciP2,
148 priorityTrafficScenario,
149 schedName.str()),
150 Duration::QUICK);
151 }
152 }
153 }
154 }
155 }
156}
157
158static NrSystemTestSchedulerQosSuite nrSystemTestSchedulerQosSuite;
159
160} // namespace ns3
161#endif // SYSTEM_SCHEDULER_TEST_QOS_H
The QoS scheduler system test suite.
Main class for testing a scheduler, system-wise.
~SystemSchedulerTestQos() override
~SystemSchedulerTestQos