21 #include "ns3/applications-module.h"
22 #include "ns3/core-module.h"
23 #include "ns3/internet-module.h"
24 #include "ns3/network-module.h"
25 #include "ns3/satellite-module.h"
26 #include "ns3/traffic-module.h"
55 NS_LOG_COMPONENT_DEFINE(
"sat-trace-input-fading-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-input-fading";
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);
81 simulationHelper->SetOutputTag(scenario);
83 Singleton<SatIdMapper>::Get()->EnableMapPrint(
true);
85 if (scenario ==
"larger")
89 else if (scenario ==
"full")
95 LogComponentEnable(
"CbrApplication", LOG_LEVEL_INFO);
96 LogComponentEnable(
"PacketSink", LOG_LEVEL_INFO);
97 LogComponentEnable(
"sat-trace-input-fading-example", LOG_LEVEL_INFO);
98 LogComponentEnable(
"SatInputFileStreamTimeDoubleContainer", LOG_LEVEL_INFO);
101 simulationHelper->SetSimulationTime(Seconds(11));
109 simulationHelper->LoadScenario(
"geo-33E");
112 simulationHelper->CreateSatScenario(satScenario);
114 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
119 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
120 Singleton<SatTopology>::Get()->GetUtUserNodes(),
125 simulationHelper->GetTrafficHelper()->AddCbrTraffic(
130 NodeContainer(Singleton<SatTopology>::Get()->GetGwUserNode(0)),
131 Singleton<SatTopology>::Get()->GetUtUserNodes(),
136 NS_LOG_INFO(
"--- Trace-input-fading-example ---");
137 NS_LOG_INFO(
" Scenario used: " << scenario);
138 NS_LOG_INFO(
" PacketSize: " << packetSize);
139 NS_LOG_INFO(
" Interval: " << interval);
142 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.