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"
55 NS_LOG_COMPONENT_DEFINE(
"sat-trace-output-example");
58 main(
int argc,
char* argv[])
60 uint32_t packetSize = 512;
61 std::string interval =
"1s";
62 std::string scenario =
"simple";
65 Config::SetDefault(
"ns3::SatHelper::ScenarioCreationTraceEnabled", BooleanValue(
true));
66 std::string simulationName =
"example-trace-output";
67 auto simulationHelper = CreateObject<SimulationHelper>(simulationName);
71 cmd.AddValue(
"packetSize",
"Size of constant packet (bytes)", packetSize);
72 cmd.AddValue(
"interval",
"Interval to sent packets in seconds, (e.g. (1s)", interval);
73 cmd.AddValue(
"scenario",
"Test scenario to use. (simple, larger or full", scenario);
74 simulationHelper->AddDefaultUiArguments(cmd);
75 cmd.Parse(argc, argv);
78 Config::SetDefault(
"ns3::SatChannel::RxPowerCalculationMode",
80 Config::SetDefault(
"ns3::SatChannel::EnableRxPowerOutputTrace", BooleanValue(
true));
84 Config::SetDefault(
"ns3::SatChannel::EnableFadingOutputTrace", BooleanValue(
true));
87 Config::SetDefault(
"ns3::SatGwHelper::DaRtnLinkInterferenceModel",
89 Config::SetDefault(
"ns3::SatGeoHelper::DaRtnLinkInterferenceModel",
91 Config::SetDefault(
"ns3::SatGeoHelper::DaFwdLinkInterferenceModel",
93 Config::SetDefault(
"ns3::SatUtHelper::DaFwdLinkInterferenceModel",
95 Config::SetDefault(
"ns3::SatPhyRxCarrierConf::EnableIntfOutputTrace", BooleanValue(
true));
98 Config::SetDefault(
"ns3::SatPhyRxCarrier::EnableCompositeSinrOutputTrace", BooleanValue(
true));
101 simulationHelper->SetOutputTag(scenario);
110 Singleton<SatIdMapper>::Get()->EnableMapPrint(
true);
112 if (scenario ==
"larger")
116 else if (scenario ==
"full")
122 LogComponentEnable(
"CbrApplication", LOG_LEVEL_INFO);
123 LogComponentEnable(
"PacketSink", LOG_LEVEL_INFO);
124 LogComponentEnable(
"sat-trace-output-example", LOG_LEVEL_INFO);
127 simulationHelper->SetSimulationTime(Seconds(11));
137 simulationHelper->CreateSatScenario(satScenario);
139 Config::SetDefault(
"ns3::CbrApplication::Interval", TimeValue(Time(interval)));
140 Config::SetDefault(
"ns3::CbrApplication::PacketSize", UintegerValue(packetSize));
156 NS_LOG_INFO(
"--- Trace-output-example ---");
157 NS_LOG_INFO(
" Scenario used: " << scenario);
158 NS_LOG_INFO(
" PacketSize: " << packetSize);
159 NS_LOG_INFO(
" Interval: " << interval);
162 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.