22 #include "ns3/applications-module.h"
23 #include "ns3/core-module.h"
24 #include "ns3/internet-module.h"
25 #include "ns3/network-module.h"
26 #include "ns3/satellite-module.h"
27 #include "ns3/traffic-module.h"
59 NS_LOG_COMPONENT_DEFINE(
"sat-random-access-dynamic-load-control-example");
62 main(
int argc,
char* argv[])
65 uint32_t endUsersPerUt(1);
66 uint32_t utsPerBeam(30);
67 uint32_t packetSize(20);
68 Time interval(Seconds(0.01));
69 Time simLength(Seconds(5.00));
70 Time appStartTime = Seconds(0.01);
73 LogComponentEnable(
"sat-random-access-dynamic-load-control-example", LOG_LEVEL_INFO);
76 LogComponentEnable(
"SatPhyRxCarrier", LOG_LEVEL_INFO);
78 LogComponentEnable(
"SatNcc", LOG_LEVEL_INFO);
81 auto sh = CreateObject<SimulationHelper>(
"example-random-access-dynamic-load-control");
82 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
86 cmd.AddValue(
"endUsersPerUt",
"Number of end users per UT", endUsersPerUt);
87 cmd.AddValue(
"utsPerBeam",
"Number of UTs per spot-beam", utsPerBeam);
88 sh->AddDefaultUiArguments(cmd);
89 cmd.Parse(argc, argv);
93 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkErrorModel", EnumValue(em));
94 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkErrorModel", EnumValue(em));
98 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
100 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_ConstantAssignmentProvided",
101 BooleanValue(
false));
102 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_ConstantAssignmentProvided",
103 BooleanValue(
false));
104 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
105 BooleanValue(
false));
106 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_RbdcAllowed",
107 BooleanValue(
false));
108 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_RbdcAllowed",
109 BooleanValue(
false));
110 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_RbdcAllowed",
111 BooleanValue(
false));
112 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
113 BooleanValue(
false));
114 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_VolumeAllowed",
115 BooleanValue(
false));
116 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_VolumeAllowed",
117 BooleanValue(
false));
118 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_VolumeAllowed",
119 BooleanValue(
false));
120 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
121 BooleanValue(
false));
124 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
128 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceModel",
132 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
136 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
false));
139 Config::SetDefault(
"ns3::SatPhyRxCarrierConf::EnableRandomAccessDynamicLoadControl",
142 "ns3::SatPhyRxCarrierConf::RandomAccessAverageNormalizedOfferedLoadMeasurementWindowSize",
146 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MaximumUniquePayloadPerBlock",
148 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MaximumConsecutiveBlockAccessed",
150 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_MinimumIdleBlock",
152 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_BackOffTimeInMilliSeconds",
154 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_BackOffProbability",
156 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_HighLoadBackOffProbability",
158 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::RaService0_NumberOfInstances",
161 "ns3::SatLowerLayerServiceConf::RaService0_AverageNormalizedOfferedLoadThreshold",
163 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DefaultControlRandomizationInterval",
164 TimeValue(MilliSeconds(100)));
165 Config::SetDefault(
"ns3::SatRandomAccessConf::CrdsaSignalingOverheadInBytes", UintegerValue(5));
166 Config::SetDefault(
"ns3::SatRandomAccessConf::SlottedAlohaSignalingOverheadInBytes",
173 sh->SetSimulationTime(simLength);
174 sh->SetUserCountPerUt(endUsersPerUt);
175 sh->SetUtCountPerBeam(utsPerBeam);
176 sh->SetBeamSet({beamId});
177 sh->CreateSatScenario();
179 Config::SetDefault(
"ns3::CbrApplication::Interval", TimeValue(interval));
180 Config::SetDefault(
"ns3::CbrApplication::PacketSize", UintegerValue(packetSize));
185 simLength + Seconds(1),
188 NS_LOG_INFO(
"--- Cbr-user-defined-example ---");
189 NS_LOG_INFO(
" Packet size in bytes: " << packetSize);
190 NS_LOG_INFO(
" Packet sending interval: " << interval.GetSeconds());
191 NS_LOG_INFO(
" Simulation length: " << simLength.GetSeconds());
192 NS_LOG_INFO(
" Number of UTs: " << utsPerBeam);
193 NS_LOG_INFO(
" Number of end users per UT: " << endUsersPerUt);
@ RA_MODEL_RCS2_SPECIFICATION
ErrorModel
Error model enum.
@ RA_COLLISION_CHECK_AGAINST_SINR
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.