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"
43 NS_LOG_COMPONENT_DEFINE(
"sat-fwd-link-beam-hopping-example");
46 main(
int argc,
char* argv[])
48 uint32_t endUsersPerUt(1);
49 Time simLength(Seconds(3.0));
52 std::string simulationName(
"sat-fwd-link-beam-hopping-example");
53 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(simulationName);
57 cmd.AddValue(
"simTime",
"Length of simulation", simLength);
58 cmd.AddValue(
"scaleDown",
59 "Scale down the bandwidth to see differences with less traffic",
61 simulationHelper->AddDefaultUiArguments(cmd);
62 cmd.Parse(argc, argv);
64 simulationHelper->SetDefaultValues();
65 simulationHelper->SetUserCountPerUt(endUsersPerUt);
66 simulationHelper->ConfigureFwdLinkBeamHopping();
69 Config::SetDefault(
"ns3::SatConf::FwdCarrierAllocatedBandwidth", DoubleValue(1e+08));
71 simulationHelper->SetSimulationTime(simLength.GetSeconds());
74 simulationHelper->SetBeams(
"1 2 3 4 11 12 13 14 25 26 27 28 40 41");
75 std::map<uint32_t, uint32_t> utsInBeam = {{1, 30},
91 for (
const auto& it : utsInBeam)
93 simulationHelper->SetUtCountPerBeam(it.first, it.second);
96 simulationHelper->LoadScenario(
"geo-33E-beam-hopping");
99 simulationHelper->CreateSatScenario();
102 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
107 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
108 Singleton<SatTopology>::Get()->GetUtUserNodes(),
113 auto stats = simulationHelper->GetStatisticsContainer();
120 simulationHelper->EnableProgressLogs();
121 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.