5G-LENA nr-v3.0-32-g83aee33
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/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2022 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef SYSTEM_SCHEDULER_TEST_QOS_H
8#define SYSTEM_SCHEDULER_TEST_QOS_H
9
10#include <ns3/ptr.h>
11#include <ns3/test.h>
12
13namespace ns3
14{
15
16class Packet;
17
48class SystemSchedulerTestQos : public TestCase
49{
50 public:
62 SystemSchedulerTestQos(uint32_t ueNumPergNb,
63 uint32_t numerology,
64 double bw1,
65 bool isDownlink,
66 bool isUplink,
67 double p1,
68 double p2,
69 uint32_t priorityTrafficScenario,
70 const std::string& schedulerType);
74 ~SystemSchedulerTestQos() override;
75
76 private:
77 void DoRun() override;
78 void CountPkts(Ptr<const Packet> pkt);
79
80 uint32_t m_ueNumPergNb;
81 uint32_t m_numerology;
82 double m_bw1;
83 bool m_isDownlink;
84 bool m_isUplink;
85 double m_p1;
86 double m_p2;
87 uint32_t m_priorityTrafficScenario;
88 std::string m_schedulerType;
89 bool verbose{false};
90};
91
106class NrSystemTestSchedulerQosSuite : public TestSuite
107{
108 public:
113};
114
116 : TestSuite("nr-system-test-schedulers-qos", Type::SYSTEM)
117{
118 std::list<std::string> subdivision = {"Tdma", "Ofdma"};
119 std::string type = {"Qos"};
120 std::list<std::string> mode = {"DL", "UL"};
121 std::list<uint32_t> numUesPerGnbList = {2, 4};
122 std::list<uint32_t> numerologies = {0, 1};
123 double qciP1 = {20};
124 double qciP2 = {68};
125 std::list<uint32_t> priorityTrafficScenarioList = {0};
126
127 for (const auto& modeType : mode)
128 {
129 for (const auto& subType : subdivision)
130 {
131 for (const auto& num : numerologies)
132 {
133 for (const auto& uesPerGnb : numUesPerGnbList)
134 {
135 for (const auto& priorityTrafficScenario : priorityTrafficScenarioList)
136 {
137 const bool isDl = modeType == "DL" || modeType == "DL_UL";
138 const bool isUl = modeType == "UL" || modeType == "DL_UL";
139
140 std::stringstream schedName;
141 schedName << "ns3::NrMacScheduler" << subType << type;
142
143 AddTestCase(new SystemSchedulerTestQos(uesPerGnb,
144 num,
145 5e6,
146 isDl,
147 isUl,
148 qciP1,
149 qciP2,
150 priorityTrafficScenario,
151 schedName.str()),
152 Duration::QUICK);
153 }
154 }
155 }
156 }
157 }
158}
159
160static NrSystemTestSchedulerQosSuite nrSystemTestSchedulerQosSuite;
161
162} // namespace ns3
163#endif // SYSTEM_SCHEDULER_TEST_QOS_H
The QoS scheduler system test suite.
Main class for testing a scheduler, system-wise.
~SystemSchedulerTestQos() override
~SystemSchedulerTestQos