31 #include "../helper/satellite-helper.h"
32 #include "../utils/satellite-env-variables.h"
34 #include "ns3/core-module.h"
35 #include "ns3/satellite-id-mapper.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>();
99 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
101 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
104 NS_TEST_ASSERT_MSG_EQ(helper->GetGwUsers().GetN(), 1,
"GW User count is not what expected!");
105 NS_TEST_ASSERT_MSG_EQ(helper->GetUtUsers().GetN(), 1,
"UT User count is not what expected!");
107 Singleton<SatEnvVariables>::Get()->DoDispose();
109 Simulator::Destroy();
132 virtual void DoRun(
void);
137 : TestCase(
"'Scenario Creation, Larger' case tests successful creation of Larger test scenario")
154 Singleton<SatIdMapper>::Get()->Reset();
157 Singleton<SatEnvVariables>::Get()->DoInitialize();
158 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
165 Ptr<SatHelper> helper = CreateObject<SatHelper>();
168 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
170 helper->CreatePredefinedScenario(SatHelper::LARGER);
173 NS_TEST_ASSERT_MSG_EQ(helper->GetGwUsers().GetN(), 1,
"GW User count is not what expected!");
174 NS_TEST_ASSERT_MSG_EQ(helper->GetUtUsers().GetN(), 5,
"UT User count is not what expected!");
176 Singleton<SatEnvVariables>::Get()->DoDispose();
178 Simulator::Destroy();
201 virtual void DoRun(
void);
206 : TestCase(
"'Scenario Creation, Full' case tests successful creation of Full test scenario")
223 Singleton<SatIdMapper>::Get()->Reset();
226 Singleton<SatEnvVariables>::Get()->DoInitialize();
227 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
234 Ptr<SatHelper> helper = CreateObject<SatHelper>();
237 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
239 helper->CreatePredefinedScenario(SatHelper::FULL);
245 NS_TEST_ASSERT_MSG_EQ(helper->GetGwUsers().GetN(), 5,
"GW User count is not what expected!");
248 NS_TEST_ASSERT_MSG_EQ(helper->GetUtUsers().GetN(),
250 "UT User count is not what expected!");
252 Singleton<SatEnvVariables>::Get()->DoDispose();
254 Simulator::Destroy();
279 virtual void DoRun(
void);
284 : TestCase(
"'Scenario Creation, User defined' case tests successful creation of User defined "
302 Singleton<SatIdMapper>::Get()->Reset();
305 Singleton<SatEnvVariables>::Get()->DoInitialize();
306 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-scenario-creation",
313 Ptr<SatHelper> helper = CreateObject<SatHelper>();
316 beamMap[std::make_pair(0, 8)] = beamInfo;
317 beamMap[std::make_pair(0, 3)] = beamInfo;
319 beamMap[std::make_pair(0, 2)] = beamInfo;
322 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
324 helper->CreateUserDefinedScenario(beamMap);
327 NS_TEST_ASSERT_MSG_EQ(helper->GetGwUsers().GetN(), 5,
"GW User count is not what expected!");
328 NS_TEST_ASSERT_MSG_EQ(helper->GetUtUsers().GetN(), 5,
"UT User count is not what expected!");
330 Singleton<SatEnvVariables>::Get()->DoDispose();
332 Simulator::Destroy();
346 : TestSuite(
"sat-scenario-creation", 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