UniformPlanarArray Test Case. More...
Public Member Functions | |
UniformPlanarArrayTestCase (Ptr< AntennaModel > element, uint32_t rows, uint32_t cols, double rowSpace, double colSpace, double alpha, double beta, Angles direction, double expectedGainDb) | |
The constructor of the test case. | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Static Public Member Functions | |
static std::string | BuildNameString (Ptr< AntennaModel > element, uint32_t rows, uint32_t cols, double rowSpace, double colSpace, double alpha, double beta, Angles direction) |
Generate a string containing all relevant parameters. | |
Private Member Functions | |
double | ComputeGain (Ptr< UniformPlanarArray > a) |
Compute the gain of the antenna array. | |
void | DoRun () override |
Run the test. | |
Private Attributes | |
double | m_alpha |
the bearing angle [rad] | |
double | m_beta |
the titling angle [rad] | |
uint32_t | m_cols |
the number of columns | |
double | m_colSpace |
the column spacing | |
Angles | m_direction |
the testing direction | |
Ptr< AntennaModel > | m_element |
the antenna element | |
double | m_expectedGain |
the expected antenna gain [dB] | |
uint32_t | m_rows |
the number of rows | |
double | m_rowSpace |
the row spacing | |
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. | |
TestCase * | GetParent () 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. | |
UniformPlanarArray Test Case.
Definition at line 31 of file test-uniform-planar-array.cc.
UniformPlanarArrayTestCase::UniformPlanarArrayTestCase | ( | Ptr< AntennaModel > | element, |
uint32_t | rows, | ||
uint32_t | cols, | ||
double | rowSpace, | ||
double | colSpace, | ||
double | alpha, | ||
double | beta, | ||
Angles | direction, | ||
double | expectedGainDb ) |
The constructor of the test case.
element | the antenna element |
rows | the number of rows |
cols | the number of columns |
rowSpace | the row spacing |
colSpace | the column spacing |
alpha | the bearing angle |
beta | the tilting angle |
direction | the direction |
expectedGainDb | the expected antenna gain [dB] |
Definition at line 118 of file test-uniform-planar-array.cc.
|
static |
Generate a string containing all relevant parameters.
element | the antenna element |
rows | the number of rows |
cols | the number of columns |
rowSpace | the row spacing |
colSpace | the column spacing |
alpha | the bearing angle |
beta | the tilting angle |
direction | the direction |
Definition at line 100 of file test-uniform-planar-array.cc.
References ns3::RadiansToDegrees().
Referenced by DoRun().
|
private |
Compute the gain of the antenna array.
a | the antenna array |
Definition at line 141 of file test-uniform-planar-array.cc.
References ns3::ValArray< T >::GetSize(), m_direction, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Run the test.
Implements ns3::TestCase.
Definition at line 168 of file test-uniform-planar-array.cc.
References BuildNameString(), ComputeGain(), ns3::CreateObject(), m_alpha, m_beta, m_cols, m_colSpace, m_direction, m_element, m_expectedGain, m_rows, m_rowSpace, NS_LOG_FUNCTION, and NS_TEST_EXPECT_MSG_EQ_TOL.
|
private |
the bearing angle [rad]
Definition at line 93 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the titling angle [rad]
Definition at line 94 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the number of columns
Definition at line 90 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the column spacing
Definition at line 92 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the testing direction
Definition at line 95 of file test-uniform-planar-array.cc.
Referenced by ComputeGain(), and DoRun().
|
private |
the antenna element
Definition at line 88 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the expected antenna gain [dB]
Definition at line 96 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |
the number of rows
Definition at line 89 of file test-uniform-planar-array.cc.
Referenced by DoRun().
|
private |