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-dama-verification-sim");
45 main(
int argc,
char* argv[])
51 uint32_t endUsersPerUt(1);
52 uint32_t utsPerBeam(220);
55 uint32_t packetSize(1280);
56 double intervalSeconds = 0.005;
58 double simLength(50.0);
59 Time appStartTime = Seconds(0.1);
62 auto simulationHelper = CreateObject<SimulationHelper>(
"example-dama-verification-sim");
63 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
66 std::string pathToFile = Singleton<SatEnvVariables>::Get()->LocateFile(
67 "contrib/satellite/examples/tn9-dama-input-attributes.xml");
71 cmd.AddValue(
"utsPerBeam",
"Number of UTs per spot-beam", utsPerBeam);
72 cmd.AddValue(
"packetSize",
"Packet size in bytes", packetSize);
73 simulationHelper->AddDefaultUiArguments(cmd, pathToFile);
74 cmd.Parse(argc, argv);
77 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(pathToFile));
78 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Load"));
79 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
80 ConfigStore inputConfig;
81 inputConfig.ConfigureDefaults();
83 simulationHelper->SetUtCountPerBeam(utsPerBeam);
84 simulationHelper->SetUserCountPerUt(endUsersPerUt);
85 simulationHelper->SetSimulationTime(simLength);
86 simulationHelper->SetBeamSet({beamId});
96 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
98 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed", BooleanValue(
true));
99 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_MinimumServiceRate",
101 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
102 BooleanValue(
false));
103 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
true));
104 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotInterval", TimeValue(Seconds(1)));
106 Config::SetDefault(
"ns3::SatSuperframeConf0::FrameConfigType", StringValue(
"ConfigType_2"));
107 Config::SetDefault(
"ns3::SatWaveformConf::AcmEnabled", BooleanValue(
true));
117 Config::SetDefault(
"ns3::SatSuperframeConf0::FrameCount", UintegerValue(3));
118 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame0_AllocatedBandwidthHz",
119 DoubleValue(2.5e+07));
120 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame1_AllocatedBandwidthHz", DoubleValue(5e+07));
121 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame2_AllocatedBandwidthHz", DoubleValue(5e+07));
123 simulationHelper->LoadScenario(
"geo-33E");
126 simulationHelper->CreateSatScenario();
131 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
134 Seconds(intervalSeconds),
136 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
137 Singleton<SatTopology>::Get()->GetUtUserNodes(),
144 Ptr<SatStatsHelperContainer> s = simulationHelper->GetStatisticsContainer();
155 NS_LOG_INFO(
"--- sat-dama-verification-sim ---");
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);
179 simulationHelper->RunSimulation();
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.