A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
CircularApertureAntennaModelTestCase Class Reference

CircularApertureAntennaModel Test Case. More...

+ Inheritance diagram for CircularApertureAntennaModelTestCase:
+ Collaboration diagram for CircularApertureAntennaModelTestCase:

Classes

struct  TestPoint
 Description of a single test point. More...
 

Public Member Functions

 CircularApertureAntennaModelTestCase ()
 
void TestAntennaGain (TestPoint testPoint)
 Test the antenna gain for a specific parameter configuration, by comparing the antenna gain obtained using CircularApertureAntennaModel::GetGainDb and the one obtained using MATLAB.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Static Public Member Functions

static std::string BuildNameString (TestPoint testPoint)
 Generate a string containing all relevant parameters.
 

Private Member Functions

void DoRun () override
 Run the test.
 

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum class  Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto QUICK = Duration::QUICK
 Deprecated test duration simple enums.
 
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto TAKES_FOREVER = Duration::TAKES_FOREVER
 
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor.
 
void AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK)
 Add an individual child TestCase to this test suite.
 
TestCaseGetParent () const
 Get the parent of this TestCase.
 
bool IsStatusFailure () const
 Check if any tests failed.
 
bool IsStatusSuccess () const
 Check if all tests passed.
 
void SetDataDir (std::string directory)
 Set the data directory where reference trace files can be found.
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 Log the failure of this TestCase.
 
bool MustAssertOnFailure () const
 Check if this run should assert on failure.
 
bool MustContinueOnFailure () const
 Check if this run should continue on failure.
 
std::string CreateDataDirFilename (std::string filename)
 Construct the full path to a file in the data directory.
 
std::string CreateTempDirFilename (std::string filename)
 Construct the full path to a file in a temporary directory.
 

Detailed Description

CircularApertureAntennaModel Test Case.

Note: Since Clang libc++ does not support the Mathematical special functions (P0226R1) yet, this class falls back to Boost's implementation of cyl_bessel_j whenever the above standard library is in use. If neither is available in the host system, this class is not compiled.

Definition at line 34 of file test-circular-aperture-antenna.cc.

Constructor & Destructor Documentation

◆ CircularApertureAntennaModelTestCase()

CircularApertureAntennaModelTestCase::CircularApertureAntennaModelTestCase ( )

Definition at line 109 of file test-circular-aperture-antenna.cc.

Member Function Documentation

◆ BuildNameString()

std::string CircularApertureAntennaModelTestCase::BuildNameString ( TestPoint testPoint)
static

Generate a string containing all relevant parameters.

Parameters
testPointthe parameter configuration to be tested
Returns
the string containing all relevant parameters

Definition at line 115 of file test-circular-aperture-antenna.cc.

References CircularApertureAntennaModelTestCase::TestPoint::m_antennaCircularApertureRadius, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMaxGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMinGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_operatingFrequency, CircularApertureAntennaModelTestCase::TestPoint::m_testAzimuth, CircularApertureAntennaModelTestCase::TestPoint::m_testInclination, and ns3::RadiansToDegrees().

Referenced by TestAntennaGain().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

void CircularApertureAntennaModelTestCase::DoRun ( )
overrideprivatevirtual

Run the test.

Implements ns3::TestCase.

Definition at line 160 of file test-circular-aperture-antenna.cc.

References TestAntennaGain().

+ Here is the call graph for this function:

◆ TestAntennaGain()

void CircularApertureAntennaModelTestCase::TestAntennaGain ( TestPoint testPoint)

Test the antenna gain for a specific parameter configuration, by comparing the antenna gain obtained using CircularApertureAntennaModel::GetGainDb and the one obtained using MATLAB.

Parameters
testPointthe parameter configuration to be tested

Definition at line 128 of file test-circular-aperture-antenna.cc.

References BuildNameString(), ns3::CreateObjectWithAttributes(), CircularApertureAntennaModelTestCase::TestPoint::m_antennaCircularApertureRadius, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMaxGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_antennaMinGainDb, CircularApertureAntennaModelTestCase::TestPoint::m_expectedGain, CircularApertureAntennaModelTestCase::TestPoint::m_operatingFrequency, CircularApertureAntennaModelTestCase::TestPoint::m_testAzimuth, CircularApertureAntennaModelTestCase::TestPoint::m_testInclination, NS_LOG_INFO, and NS_TEST_EXPECT_MSG_EQ_TOL.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: