23 #include <ns3/double.h>
24 #include <ns3/parabolic-antenna-model.h>
25 #include <ns3/simulator.h>
62 static std::string BuildNameString (
Angles a,
double b,
double o,
double g);
76 virtual void DoRun (
void);
88 std::ostringstream oss;
90 <<
", beamdwidth=" << b <<
"deg"
91 <<
", orientation=" << o
92 <<
", maxAttenuation=" << g <<
" dB";
98 :
TestCase (BuildNameString (a, b, o, g)),
103 m_expectedGain (expectedGainDb),
117 double actualGain = a->GetGainDb (
m_a);
144 :
TestSuite (
"parabolic-antenna-model", UNIT)
ParabolicAntennaModel Test.
static std::string BuildNameString(Angles a, double b, double o, double g)
Build the test name.
ParabolicAntennaModelGainTestCondition m_cond
Test condition.
double m_expectedGain
Expected gain.
ParabolicAntennaModelTestCase(Angles a, double b, double o, double g, double expectedGainDb, ParabolicAntennaModelGainTestCondition cond)
Constructor.
virtual void DoRun(void)
Implementation to actually run this TestCase.
ParabolicAntennaModel TestSuite.
ParabolicAntennaModelTestSuite()
Class holding the azimuth and inclination angles of spherical coordinates.
double GetInclination(void) const
Getter for inclination angle.
double GetAzimuth(void) 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.