23 #include <ns3/double.h> 24 #include <ns3/parabolic-antenna-model.h> 25 #include <ns3/simulator.h> 44 static std::string BuildNameString (
Angles a,
double b,
double o,
double g);
49 virtual void DoRun (
void);
61 std::ostringstream oss;
62 oss <<
"theta=" << a.
theta <<
" , phi=" << a.
phi 63 <<
", beamdwidth=" << b <<
"deg" 64 <<
", orientation=" << o
65 <<
", maxAttenuation=" << g <<
" dB";
71 :
TestCase (BuildNameString (a, b, o, g)),
76 m_expectedGain (expectedGainDb),
114 :
TestSuite (
"parabolic-antenna-model", UNIT)
static ParabolicAntennaModelTestSuite staticParabolicAntennaModelTestSuiteInstance
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
double DegreesToRadians(double degrees)
converts degrees to radians
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
double theta
the inclination angle in radians
virtual double GetGainDb(Angles a)
this method is expected to be re-implemented by each antenna model
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#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.
ParabolicAntennaModelTestCase(Angles a, double b, double o, double g, double expectedGainDb, ParabolicAntennaModelGainTestCondition cond)
ParabolicAntennaModelTestSuite()
ParabolicAntennaModelGainTestCondition m_cond
virtual void DoRun(void)
Implementation to actually run this TestCase.
ParabolicAntennaModelGainTestCondition
double phi
the azimuth angle in radians
#define NS_TEST_EXPECT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report if not.
struct holding the azimuth and inclination angles of spherical coordinates.
static std::string BuildNameString(Angles a, double b, double o, double g)
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.