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"
44 NS_LOG_COMPONENT_DEFINE(
"sat-profiling-sim-tn8");
49 std::cout <<
"Time: " << Simulator::Now().GetSeconds() <<
"s" << std::endl;
53 main(
int argc,
char* argv[])
55 uint32_t endUsersPerUt(1);
56 uint32_t utsPerBeam(1);
57 uint32_t profilingConf(0);
60 uint32_t packetSize(1280);
61 double intervalSeconds = 0.04;
64 Time appStartTime = Seconds(0.1);
67 auto simulationHelper = CreateObject<SimulationHelper>(
"example-profiling-sim-tn8");
79 cmd.AddValue(
"utsPerBeam",
"Number of UTs per spot-beam", utsPerBeam);
80 cmd.AddValue(
"profilingConf",
"Profiling configuration", profilingConf);
81 simulationHelper->AddDefaultUiArguments(cmd);
82 cmd.Parse(argc, argv);
84 Config::SetDefault(
"ns3::SatSuperframeConf0::FrameConfigType", StringValue(
"ConfigType_2"));
85 Config::SetDefault(
"ns3::SatWaveformConf::AcmEnabled", BooleanValue(
true));
87 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
89 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed", BooleanValue(
true));
90 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_MinimumServiceRate",
92 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
95 simulationHelper->LoadScenario(
"geo-33E");
98 switch (profilingConf)
103 uint32_t beamId = 18;
107 simulationHelper->SetUtCountPerBeam(utsPerBeam);
108 simulationHelper->SetUserCountPerUt(endUsersPerUt);
109 simulationHelper->SetBeamSet({beamId});
110 simulationHelper->SetSimulationTime(simLength);
111 simulationHelper->CreateSatScenario();
118 simulationHelper->SetSimulationTime(simLength);
123 NS_FATAL_ERROR(
"Invalid profiling configuration");
130 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
133 Seconds(intervalSeconds),
135 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
136 Singleton<SatTopology>::Get()->GetUtUserNodes(),
138 Seconds(simLength + 1),
144 Ptr<SatStatsHelperContainer> s = simulationHelper->GetStatisticsContainer();
155 NS_LOG_INFO(
"--- sat-profiling-sim-tn8 ---");
156 NS_LOG_INFO(
" Packet size: " << packetSize);
157 NS_LOG_INFO(
" Simulation length: " << simLength);
158 NS_LOG_INFO(
" Number of UTs: " << utsPerBeam);
159 NS_LOG_INFO(
" Number of end users per UT: " << endUsersPerUt);
165 std::stringstream filename;
166 filename <<
"tn8-profiling-output-attributes-conf-" << profilingConf <<
"-uts-" << utsPerBeam
180 while (t <= simLength)
189 simulationHelper->RunSimulation();
@ FULL
FULL Full scenario used as base.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
void TimeTickerCallback()