23 #include <ns3/double.h>
24 #include <ns3/cosine-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);
87 std::ostringstream oss;
89 <<
", beamdwidth=" << b <<
"deg"
90 <<
", orientation=" << o
91 <<
", maxGain=" << g <<
" dB";
97 :
TestCase (BuildNameString (a, b, o, g)),
102 m_expectedGain (expectedGainDb),
117 double actualGain = a->GetGainDb (
m_a);
146 :
TestSuite (
"cosine-antenna-model", UNIT)
double m_expectedGain
Expected gain.
double m_b
Horizontal and Vertical Beamwidth.
CosineAntennaModelGainTestCondition m_cond
Test condition.
static std::string BuildNameString(Angles a, double b, double o, double g)
Build the test name.
virtual void DoRun(void)
Implementation to actually run this TestCase.
CosineAntennaModelTestCase(Angles a, double b, double o, double g, double expectedGainDb, CosineAntennaModelGainTestCondition cond)
Constructor.
CosineAntennaModel TestSuite.
CosineAntennaModelTestSuite()
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.
CosineAntennaModelGainTestCondition
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 CosineAntennaModelTestSuite g_staticCosineAntennaModelTestSuiteInstance
Static variable for test initialization.