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"
42 NS_LOG_COMPONENT_DEFINE(
"sat-handover-example");
45 main(
int argc,
char* argv[])
48 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
50 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
53 Config::SetDefault(
"ns3::SatOrbiterFeederPhy::QueueSize", UintegerValue(100000));
55 Config::SetDefault(
"ns3::SatHelper::HandoversEnabled", BooleanValue(
true));
56 Config::SetDefault(
"ns3::SatHandoverModule::NumberClosestSats", UintegerValue(2));
58 Config::SetDefault(
"ns3::SatGwMac::DisableSchedulingIfNoDeviceConnected", BooleanValue(
true));
59 Config::SetDefault(
"ns3::SatOrbiterMac::DisableSchedulingIfNoDeviceConnected",
63 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
66 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
67 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(
"example-handover");
68 Ptr<SimulationHelperConf> simulationConf = CreateObject<SimulationHelperConf>();
69 simulationHelper->SetSimulationTime(Seconds(100));
70 simulationHelper->SetGwUserCount(1);
71 simulationHelper->SetUserCountPerUt(1);
72 simulationHelper->SetBeamSet({0, 20, 21, 22, 32, 33, 34, 35, 36, 37, 44, 45, 46,
73 47, 53, 54, 55, 56, 59, 60, 61, 66, 67, 68, 71, 72});
74 simulationHelper->SetUserCountPerMobileUt(simulationConf->m_utMobileUserCount);
76 simulationHelper->LoadScenario(
"constellation-eutelsat-geo-2-sats-handovers");
78 std::string mobileUtFolder = Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
79 "/additional-input/utpositions/mobiles/scenario6";
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();
137 simulationHelper->EnableProgressLogs();
138 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.