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"
37 NS_LOG_COMPONENT_DEFINE(
"sat-logon-example");
40 main(
int argc,
char* argv[])
43 uint32_t endUsersPerUt = 1;
44 uint32_t utsPerBeam = 10;
46 uint32_t packetSize = 512;
47 std::string interval =
"10ms";
49 double simLength = 30.0;
52 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
55 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
56 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(
"example-logon");
57 simulationHelper->SetSimulationTime(Seconds(simLength));
58 simulationHelper->EnableProgressLogs();
61 simulationHelper->SetSimulationTime(simLength);
62 simulationHelper->SetUserCountPerUt(endUsersPerUt);
63 simulationHelper->SetUtCountPerBeam(utsPerBeam);
64 simulationHelper->SetBeamSet({beamId});
67 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
69 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel",
71 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceModel",
73 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
75 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame0_RandomAccessFrame", BooleanValue(
true));
76 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame1_RandomAccessFrame", BooleanValue(
true));
77 Config::SetDefault(
"ns3::SatSuperframeConf0::Frame1_LogonFrame", BooleanValue(
true));
79 Config::SetDefault(
"ns3::SatUtMac::WindowInitLogon", TimeValue(Seconds(20)));
80 Config::SetDefault(
"ns3::SatUtMac::MaxWaitingTimeLogonResponse", TimeValue(Seconds(1)));
83 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
85 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_ConstantAssignmentProvided",
87 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_ConstantAssignmentProvided",
89 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
91 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_RbdcAllowed",
93 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_RbdcAllowed",
95 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_RbdcAllowed",
97 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
99 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_VolumeAllowed",
100 BooleanValue(
false));
101 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_VolumeAllowed",
102 BooleanValue(
false));
103 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_VolumeAllowed",
104 BooleanValue(
false));
105 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
106 BooleanValue(
false));
108 simulationHelper->LoadScenario(
"geo-33E");
110 simulationHelper->CreateSatScenario();
112 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
117 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
118 Singleton<SatTopology>::Get()->GetUtUserNodes(),
123 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
128 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
129 Singleton<SatTopology>::Get()->GetUtUserNodes(),
135 Config::SetDefault(
"ns3::ConfigStore::Filename", StringValue(
"output-attributes.xml"));
136 Config::SetDefault(
"ns3::ConfigStore::FileFormat", StringValue(
"Xml"));
137 Config::SetDefault(
"ns3::ConfigStore::Mode", StringValue(
"Save"));
138 ConfigStore outputConfig;
139 outputConfig.ConfigureDefaults();
140 simulationHelper->StoreAttributesToFile(
"output-attributes.xml");
142 Ptr<SatStatsHelperContainer> s = simulationHelper->GetStatisticsContainer();
164 simulationHelper->RunSimulation();
@ RA_COLLISION_CHECK_AGAINST_SINR
@ SUPER_FRAME_CONFIG_0
SUPER_FRAME_CONFIG_0.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.