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"
41 NS_LOG_COMPONENT_DEFINE(
"sat-cbr-full-example");
44 main(
int argc,
char* argv[])
50 uint32_t endUsersPerUt(3);
51 uint32_t utsPerBeam(3);
52 uint32_t packetSize(128);
53 std::string interval(
"1s");
54 double simLength(10.0);
56 Time appStartTime = Seconds(0.001);
59 Config::SetDefault(
"ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue(
true));
62 Config::SetDefault(
"ns3::SatHelper::PacketTraceEnabled", BooleanValue(
true));
63 Ptr<SimulationHelper> simulationHelper = CreateObject<SimulationHelper>(
"example-cbr-full");
67 cmd.AddValue(
"endUsersPerUt",
"Number of end users per UT", endUsersPerUt);
68 cmd.AddValue(
"utsPerBeam",
"Number of UTs per spot-beam", utsPerBeam);
69 cmd.AddValue(
"packetSize",
"Size of constant packet (bytes)", packetSize);
70 cmd.AddValue(
"interval",
"Interval to sent packets in seconds, (e.g. (1s)", interval);
71 cmd.AddValue(
"simLength",
"Simulation length in seconds", simLength);
72 simulationHelper->AddDefaultUiArguments(cmd);
73 cmd.Parse(argc, argv);
75 simulationHelper->SetSimulationTime(simLength);
79 Config::SetDefault(
"ns3::SatHelper::UtCount", UintegerValue(utsPerBeam));
80 Config::SetDefault(
"ns3::SatHelper::UtUsers", UintegerValue(endUsersPerUt));
84 double errorRate(0.2);
85 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkConstantErrorRate", DoubleValue(errorRate));
86 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkErrorModel", EnumValue(em));
87 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkConstantErrorRate", DoubleValue(errorRate));
88 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkErrorModel", EnumValue(em));
90 simulationHelper->LoadScenario(
"geo-33E");
96 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
101 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
102 Singleton<SatTopology>::Get()->GetUtUserNodes(),
107 NS_LOG_INFO(
"--- sat-cbr-full-example ---");
108 NS_LOG_INFO(
" Packet size in bytes: " << packetSize);
109 NS_LOG_INFO(
" Packet sending interval: " << interval);
110 NS_LOG_INFO(
" Simulation length: " << simLength);
111 NS_LOG_INFO(
" Number of UTs: " << utsPerBeam);
112 NS_LOG_INFO(
" Number of end users per UT: " << endUsersPerUt);
115 simulationHelper->RunSimulation();
@ FULL
FULL Full scenario used as base.
ErrorModel
Error model enum.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.