22 #include "ns3/applications-module.h"
23 #include "ns3/config-store-module.h"
24 #include "ns3/core-module.h"
25 #include "ns3/internet-module.h"
26 #include "ns3/network-module.h"
27 #include "ns3/satellite-module.h"
28 #include "ns3/traffic-module.h"
40 NS_LOG_COMPONENT_DEFINE(
"sat-gw-handover-example");
43 main(
int argc,
char* argv[])
46 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
48 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
51 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::QueueSize", UintegerValue(100000));
53 Config::SetDefault(
"ns3::SatHelper::HandoversEnabled", BooleanValue(
true));
54 Config::SetDefault(
"ns3::SatHandoverModule::NumberClosestSats", UintegerValue(2));
56 Config::SetDefault(
"ns3::SatGwMac::DisableSchedulingIfNoDeviceConnected", BooleanValue(
true));
57 Config::SetDefault(
"ns3::SatOrbiterMac::DisableSchedulingIfNoDeviceConnected",
61 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
64 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
65 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(
"example-gw-handover");
66 Ptr<SimulationHelperConf> simulationConf = CreateObject<SimulationHelperConf>();
67 simulationHelper->SetSimulationTime(Seconds(100));
68 simulationHelper->SetGwUserCount(1);
69 simulationHelper->SetUserCountPerUt(1);
70 std::set<uint32_t> beamSetAll = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
71 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
72 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
73 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
74 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72};
75 simulationHelper->SetBeamSet(beamSetAll);
76 simulationHelper->SetUserCountPerMobileUt(simulationConf->m_utMobileUserCount);
78 simulationHelper->LoadScenario(
"constellation-leo-2-satellites");
82 Singleton<SatTopology>::Get()->PrintTopology(std::cout);
84 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
89 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
90 Singleton<SatTopology>::Get()->GetUtUserNodes(),
95 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
100 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
101 Singleton<SatTopology>::Get()->GetUtUserNodes(),
107 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(
"output-attributes.xml"));
108 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
109 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Save"));
110 ConfigStore outputConfig;
111 outputConfig.ConfigureDefaults();
113 Ptr<SatStatsHelperContainer> s = simulationHelper->GetStatisticsContainer();
124 simulationHelper->EnableProgressLogs();
125 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.