22 #include "ns3/applications-module.h"
23 #include "ns3/core-module.h"
24 #include "ns3/internet-module.h"
25 #include "ns3/network-module.h"
26 #include "ns3/satellite-module.h"
27 #include "ns3/traffic-module.h"
38 NS_LOG_COMPONENT_DEFINE(
"sat-rtn-link-ra-example");
41 main(
int argc,
char* argv[])
43 uint32_t endUsersPerUt(3);
44 uint32_t utsPerBeam(3);
45 Time simLength(Seconds(50.0));
47 std::string simulationName(
"sat-rtn-link-ra-example");
48 auto simulationHelper = CreateObject<SimulationHelper>(simulationName);
52 cmd.AddValue(
"endUsersPerUt",
"Number of end users per UT", endUsersPerUt);
53 cmd.AddValue(
"utsPerBeam",
"Number of UTs per spot-beam", utsPerBeam);
54 simulationHelper->AddDefaultUiArguments(cmd);
55 cmd.Parse(argc, argv);
57 simulationHelper->SetDefaultValues();
58 simulationHelper->SetUtCountPerBeam(utsPerBeam);
59 simulationHelper->SetUserCountPerUt(endUsersPerUt);
60 simulationHelper->SetSimulationTime(simLength.GetSeconds());
61 simulationHelper->DisableAllCapacityAssignmentCategories();
62 simulationHelper->EnableCrdsa();
64 simulationHelper->SetBeams(
"1 3 5 7 9 22 24 26 28 30 44 46 48 50 59 61 70 72");
68 std::stringstream sstag;
69 sstag << simulationName <<
"UTs=" << utsPerBeam;
70 simulationHelper->SetOutputTag(sstag.str());
72 simulationHelper->LoadScenario(
"geo-33E");
75 simulationHelper->CreateSatScenario();
78 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
83 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
84 Singleton<SatTopology>::Get()->GetUtUserNodes(),
90 simulationHelper->CreateDefaultRtnLinkStats();
93 simulationHelper->EnableProgressLogs();
96 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.