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-handover-example");
43 main(
int argc,
char* argv[])
46 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
48 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
51 Config::SetDefault(
"ns3::SatGeoFeederPhy::QueueSize", UintegerValue(100000));
54 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
57 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
58 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(
"example-handover");
59 Ptr<SimulationHelperConf> simulationConf = CreateObject<SimulationHelperConf>();
60 simulationHelper->SetSimulationTime(Seconds(60));
61 simulationHelper->SetGwUserCount(2);
62 simulationHelper->SetUtCountPerBeam(5);
63 simulationHelper->SetUserCountPerUt(1);
64 simulationHelper->SetBeams(
"12 13 26 27 38 39");
65 simulationHelper->SetUserCountPerMobileUt(simulationConf->m_utMobileUserCount);
67 std::string mobileUtFolder =
68 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/utpositions/mobiles/scenario5";
69 Ptr<SatHelper> helper = simulationHelper->CreateSatScenario(
SatHelper::NONE, mobileUtFolder);
71 Config::SetDefault(
"ns3::CbrApplication::Interval", StringValue(
"100ms"));
72 Config::SetDefault(
"ns3::CbrApplication::PacketSize", UintegerValue(512));
81 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(
"output-attributes.xml"));
82 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
83 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Save"));
84 ConfigStore outputConfig;
85 outputConfig.ConfigureDefaults();
87 Ptr<SatStatsHelperContainer> s = simulationHelper->GetStatisticsContainer();
93 simulationHelper->EnableProgressLogs();
94 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.