20 #include <ns3/double.h>
22 #include <ns3/parabolic-antenna-model.h>
23 #include <ns3/simulator.h>
62 static std::string BuildNameString(
Angles a,
double b,
double o,
double g);
76 double expectedGainDb,
80 void DoRun()
override;
93 std::ostringstream oss;
96 <<
", orientation=" << o <<
", maxAttenuation=" << g <<
" dB";
105 double expectedGainDb,
107 :
TestCase(BuildNameString(a, b, o, g)),
112 m_expectedGain(expectedGainDb),
126 double actualGain = a->GetGainDb(
m_a);
133 "wrong value of the radiation pattern");
155 :
TestSuite(
"parabolic-antenna-model", UNIT)
ParabolicAntennaModel Test.
static std::string BuildNameString(Angles a, double b, double o, double g)
Build the test name.
void DoRun() override
Implementation to actually run this TestCase.
ParabolicAntennaModelGainTestCondition m_cond
Test condition.
double m_expectedGain
Expected gain.
ParabolicAntennaModelTestCase(Angles a, double b, double o, double g, double expectedGainDb, ParabolicAntennaModelGainTestCondition cond)
Constructor.
ParabolicAntennaModel TestSuite.
ParabolicAntennaModelTestSuite()
Class holding the azimuth and inclination angles of spherical coordinates.
double GetInclination() const
Getter for inclination angle.
double GetAzimuth() const
Getter for azimuth angle.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
ParabolicAntennaModelGainTestCondition
Test condition (equal to or less than)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_TEST_EXPECT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report if not.
#define NS_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double DegreesToRadians(double degrees)
converts degrees to radians
static ParabolicAntennaModelTestSuite g_staticParabolicAntennaModelTestSuiteInstance
Static variable for test initialization.