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"
56 NS_LOG_COMPONENT_DEFINE(
"sat-trace-input-interference-example");
59 main(
int argc,
char* argv[])
61 uint32_t packetSize = 512;
62 std::string interval =
"1s";
63 std::string scenario =
"simple";
66 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
67 std::string simulationName =
"example-trace-input-interference";
68 auto simulationHelper = CreateObject<SimulationHelper>(simulationName);
72 cmd.AddValue(
"packetSize",
"Size of constant packet (bytes)", packetSize);
73 cmd.AddValue(
"interval",
"Interval to sent packets in seconds, (e.g. (1s)", interval);
74 cmd.AddValue(
"scenario",
"Test scenario to use. (simple, larger or full", scenario);
75 simulationHelper->AddDefaultUiArguments(cmd);
76 cmd.Parse(argc, argv);
79 Config::SetDefault(
"ns3::SatGwHelper::DaRtnLinkInterferenceModel",
81 Config::SetDefault(
"ns3::SatOrbiterHelper::DaRtnLinkInterferenceModel",
83 Config::SetDefault(
"ns3::SatOrbiterHelper::DaFwdLinkInterferenceModel",
85 Config::SetDefault(
"ns3::SatUtHelper::DaFwdLinkInterferenceModel",
89 simulationHelper->SetOutputTag(scenario);
91 Singleton<SatIdMapper>::Get()->EnableMapPrint(
true);
93 if (scenario ==
"larger")
97 else if (scenario ==
"full")
103 LogComponentEnable(
"CbrApplication", LOG_LEVEL_INFO);
104 LogComponentEnable(
"PacketSink", LOG_LEVEL_INFO);
105 LogComponentEnable(
"sat-trace-input-interference-example", LOG_LEVEL_INFO);
106 LogComponentEnable(
"SatInputFileStreamTimeDoubleContainer", LOG_LEVEL_INFO);
109 simulationHelper->SetSimulationTime(Seconds(11));
117 simulationHelper->LoadScenario(
"geo-33E");
120 simulationHelper->CreateSatScenario(satScenario);
122 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
127 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
128 Singleton<SatTopology>::Get()->GetUtUserNodes(),
133 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
138 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
139 Singleton<SatTopology>::Get()->GetUtUserNodes(),
144 NS_LOG_INFO(
"--- Trace-input-interference-example ---");
145 NS_LOG_INFO(
" Scenario used: " << scenario);
146 NS_LOG_INFO(
" PacketSize: " << packetSize);
147 NS_LOG_INFO(
" Interval: " << interval);
150 simulationHelper->RunSimulation();
PreDefinedScenario_t
Values for pre-defined scenarios to be used by helper when building satellite network topology base.
@ LARGER
LARGER Larger scenario used as base.
@ FULL
FULL Full scenario used as base.
@ SIMPLE
SIMPLE Simple scenario used as base.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.