27 #include "../model/satellite-channel.h"
28 #include "../model/satellite-fading-external-input-trace-container.h"
29 #include "../utils/satellite-env-variables.h"
32 #include "ns3/simulator.h"
33 #include "ns3/singleton.h"
35 #include "ns3/timer.h"
56 virtual void DoRun(
void);
62 : TestCase(
"Test satellite fading external input trace and container.")
74 Ptr<SatMobilityModel> mobility;
76 Ptr<SatFadingExternalInputTrace> trace =
77 Singleton<SatFadingExternalInputTraceContainer>::Get()->GetFadingTrace(nodeId,
80 double fading = trace->GetFading();
91 Singleton<SatEnvVariables>::Get()->DoInitialize();
92 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-fading-external-input-trace",
98 Singleton<SatFadingExternalInputTraceContainer>::Get()->TestFadingTraces(numUts, numGws);
99 NS_TEST_ASSERT_MSG_EQ(success,
true,
"SatChannelFadingTrace test failed");
101 double time[4] = {1.434, 40.923, 80.503, 140.3};
102 double preCalcRes[4] = {1.020, 1.008, 1.006, 1.012};
104 Simulator::Schedule(Seconds(time[0]),
108 SatEnums::RETURN_USER_CH);
109 Simulator::Schedule(Seconds(time[1]),
113 SatEnums::RETURN_FEEDER_CH);
114 Simulator::Schedule(Seconds(time[2]),
118 SatEnums::FORWARD_USER_CH);
119 Simulator::Schedule(Seconds(time[3]),
123 SatEnums::FORWARD_FEEDER_CH);
127 for (uint32_t i = 0; i < 4; ++i)
132 "Fading not within expected tolerance");
135 Simulator::Destroy();
137 Singleton<SatEnvVariables>::Get()->DoDispose();
151 : TestSuite(
"sat-fading-external-input-trace-test", Type::UNIT)
ChannelType_t
Types of channel.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.