31 #include "ns3/core-module.h"
32 #include "ns3/satellite-env-variables.h"
33 #include "ns3/satellite-helper.h"
34 #include "ns3/satellite-id-mapper.h"
35 #include "ns3/satellite-topology.h"
36 #include "ns3/simulator.h"
37 #include "ns3/singleton.h"
38 #include "ns3/string.h"
63 virtual void DoRun(
void);
68 : TestCase(
"'Scenario Creation, Simple' case tests successful creation of Simple test scenario")
85 Singleton<SatIdMapper>::Get()->Reset();
88 Singleton<SatEnvVariables>::Get()->DoInitialize();
89 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
96 Ptr<SatHelper> helper = CreateObject<SatHelper>(
97 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E");
100 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
102 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
105 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetGwUserNodes().GetN(),
107 "GW User count is not what expected!");
108 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetNUtUserNodes(),
110 "UT User count is not what expected!");
112 Singleton<SatEnvVariables>::Get()->DoDispose();
114 Simulator::Destroy();
137 virtual void DoRun(
void);
142 : TestCase(
"'Scenario Creation, Larger' case tests successful creation of Larger test scenario")
159 Singleton<SatIdMapper>::Get()->Reset();
162 Singleton<SatEnvVariables>::Get()->DoInitialize();
163 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
170 Ptr<SatHelper> helper = CreateObject<SatHelper>(
171 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E");
174 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
176 helper->CreatePredefinedScenario(SatHelper::LARGER);
179 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetGwUserNodes().GetN(),
181 "GW User count is not what expected!");
182 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetNUtUserNodes(),
184 "UT User count is not what expected!");
186 Singleton<SatEnvVariables>::Get()->DoDispose();
188 Simulator::Destroy();
211 virtual void DoRun(
void);
216 : TestCase(
"'Scenario Creation, Full' case tests successful creation of Full test scenario")
233 Singleton<SatIdMapper>::Get()->Reset();
236 Singleton<SatEnvVariables>::Get()->DoInitialize();
237 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
244 Ptr<SatHelper> helper = CreateObject<SatHelper>(
245 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E");
248 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
250 helper->CreatePredefinedScenario(SatHelper::FULL);
256 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetGwUserNodes().GetN(),
258 "GW User count is not what expected!");
261 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetNUtUserNodes(),
263 "UT User count is not what expected!");
265 Singleton<SatEnvVariables>::Get()->DoDispose();
267 Simulator::Destroy();
292 virtual void DoRun(
void);
297 : TestCase(
"'Scenario Creation, User defined' case tests successful creation of User defined "
315 Singleton<SatIdMapper>::Get()->Reset();
318 Singleton<SatEnvVariables>::Get()->DoInitialize();
319 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
326 Ptr<SatHelper> helper = CreateObject<SatHelper>(
327 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E");
330 beamMap[std::make_pair(0, 8)] = beamInfo;
331 beamMap[std::make_pair(0, 3)] = beamInfo;
333 beamMap[std::make_pair(0, 2)] = beamInfo;
336 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
338 helper->CreateUserDefinedScenario(beamMap);
341 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetGwUserNodes().GetN(),
343 "GW User count is not what expected!");
344 NS_TEST_ASSERT_MSG_EQ(Singleton<SatTopology>::Get()->GetNUtUserNodes(),
346 "UT User count is not what expected!");
348 Singleton<SatEnvVariables>::Get()->DoDispose();
350 Simulator::Destroy();
364 : TestSuite(
"sat-scenario-creation", Type::SYSTEM)
'Scenario Creation, Full' test case implementation, id: sc-3 / TN4.
virtual ~ScenarioCreationFull()
'Scenario Creation, Larger' test case implementation, id: sc-2 / TN4.
virtual ~ScenarioCreationLarger()
'Scenario Creation, Simple' test case implementation, id: sc-1 / TN4.
virtual ~ScenarioCreationSimple()
ScenarioCreationTestSuite()
'Scenario Creation, User Defined' test case implementation, id: tbd / TN4.
virtual ~ScenarioCreationUser()
Class that holds information for each beam regarding UTs and their users camped in each beam.
void AppendUt(uint32_t userCount)
Appends new UT to end of the list with given user count for the appended UT.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
static ScenarioCreationTestSuite scenarioCreationTestSuite