20#include <ns3/cosine-antenna-model.h>
21#include <ns3/double.h>
23#include <ns3/simulator.h>
76 double expectedGainDb,
80 void DoRun()
override;
92 std::ostringstream oss;
95 <<
", orientation=" << o <<
", maxGain=" << g <<
" dB";
103 double expectedGainDb,
105 :
TestCase(BuildNameString(a, b, o, g)),
110 m_expectedGain(expectedGainDb),
125 double actualGain = a->GetGainDb(
m_a);
132 "wrong value of the radiation pattern");
169 TestCase::Duration::QUICK);
176 TestCase::Duration::QUICK);
183 TestCase::Duration::QUICK);
190 TestCase::Duration::QUICK);
197 TestCase::Duration::QUICK);
204 TestCase::Duration::QUICK);
211 TestCase::Duration::QUICK);
218 TestCase::Duration::QUICK);
225 TestCase::Duration::QUICK);
232 TestCase::Duration::QUICK);
239 TestCase::Duration::QUICK);
248 TestCase::Duration::QUICK);
255 TestCase::Duration::QUICK);
262 TestCase::Duration::QUICK);
269 TestCase::Duration::QUICK);
276 TestCase::Duration::QUICK);
283 TestCase::Duration::QUICK);
290 TestCase::Duration::QUICK);
297 TestCase::Duration::QUICK);
304 TestCase::Duration::QUICK);
311 TestCase::Duration::QUICK);
318 TestCase::Duration::QUICK);
328 TestCase::Duration::QUICK);
335 TestCase::Duration::QUICK);
342 TestCase::Duration::QUICK);
350 TestCase::Duration::QUICK);
358 TestCase::Duration::QUICK);
365 TestCase::Duration::QUICK);
372 TestCase::Duration::QUICK);
379 TestCase::Duration::QUICK);
386 TestCase::Duration::QUICK);
393 TestCase::Duration::QUICK);
402 TestCase::Duration::QUICK);
409 TestCase::Duration::QUICK);
416 TestCase::Duration::QUICK);
424 TestCase::Duration::QUICK);
432 TestCase::Duration::QUICK);
440 TestCase::Duration::QUICK);
448 TestCase::Duration::QUICK);
455 TestCase::Duration::QUICK);
462 TestCase::Duration::QUICK);
470 TestCase::Duration::QUICK);
477 TestCase::Duration::QUICK);
484 TestCase::Duration::QUICK);
491 TestCase::Duration::QUICK);
498 TestCase::Duration::QUICK);
507 TestCase::Duration::QUICK);
514 TestCase::Duration::QUICK);
521 TestCase::Duration::QUICK);
528 TestCase::Duration::QUICK);
535 TestCase::Duration::QUICK);
542 TestCase::Duration::QUICK);
549 TestCase::Duration::QUICK);
556 TestCase::Duration::QUICK);
563 TestCase::Duration::QUICK);
572 TestCase::Duration::QUICK);
579 TestCase::Duration::QUICK);
586 TestCase::Duration::QUICK);
593 TestCase::Duration::QUICK);
600 TestCase::Duration::QUICK);
607 TestCase::Duration::QUICK);
614 TestCase::Duration::QUICK);
621 TestCase::Duration::QUICK);
629 TestCase::Duration::QUICK);
637 TestCase::Duration::QUICK);
645 TestCase::Duration::QUICK);
653 TestCase::Duration::QUICK);
660 TestCase::Duration::QUICK);
667 TestCase::Duration::QUICK);
674 TestCase::Duration::QUICK);
681 TestCase::Duration::QUICK);
688 TestCase::Duration::QUICK);
695 TestCase::Duration::QUICK);
702 TestCase::Duration::QUICK);
709 TestCase::Duration::QUICK);
716 TestCase::Duration::QUICK);
723 TestCase::Duration::QUICK);
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.
void DoRun() override
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() 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, Duration duration=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.