Test case for the TwoRaySpectrumPropagationLossModel class. More...
Public Member Functions | |
ArrayResponseTest (Ptr< AntennaModel > txAntElem, Ptr< AntennaModel > rxAntElem, uint16_t txNumAntennas, uint16_t rxNumAntennas, Vector txPosVec, Vector rxPosVec, double txBearing, double rxBearing, double expectedGain) | |
The constructor of the test case. More... | |
~ArrayResponseTest () override | |
Destructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
Build the test scenario. More... | |
Private Attributes | |
double | m_expectedGain |
the gain which is theoretically expected [db] More... | |
Ptr< AntennaModel > | m_rxAntElem |
the antenna element of the RX antenna panel More... | |
double | m_rxBearing |
the bearing angle of the RX antenna panel [rad] More... | |
uint16_t | m_rxNumAntennas |
the number of antenna elements of the RX antenna panel More... | |
Vector | m_rxPosVec |
the position of the RX More... | |
Ptr< AntennaModel > | m_txAntElem |
the antenna element of the TX antenna panel More... | |
double | m_txBearing |
the bearing angle of the TX antenna panel [rad] More... | |
uint16_t | m_txNumAntennas |
the number of antenna elements of the TX antenna panel More... | |
Vector | m_txPosVec |
the position of the TX More... | |
Static Private Attributes | |
static constexpr double | TOLERANCE {1e-8} |
Tolerance for testing value produced by the simulator against expected theoretical value, as a fraction of the expected value. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
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. More... | |
bool | MustAssertOnFailure () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
Test case for the TwoRaySpectrumPropagationLossModel class.
Check that the overall array response at boresight coincides with the expected theoretical values
Definition at line 198 of file two-ray-splm-test-suite.cc.
ArrayResponseTest::ArrayResponseTest | ( | Ptr< AntennaModel > | txAntElem, |
Ptr< AntennaModel > | rxAntElem, | ||
uint16_t | txNumAntennas, | ||
uint16_t | rxNumAntennas, | ||
Vector | txPosVec, | ||
Vector | rxPosVec, | ||
double | txBearing, | ||
double | rxBearing, | ||
double | expectedGain | ||
) |
The constructor of the test case.
txAntElem | the antenna element of the TX antenna panel |
rxAntElem | the antenna element of the RX antenna panel |
txNumAntennas | the number of antenna elements of the TX antenna panel |
rxNumAntennas | the number of antenna elements of the RX antenna panel |
txPosVec | the position of the TX |
rxPosVec | the position of the RX |
txBearing | the bearing angle of the TX antenna panel |
rxBearing | the bearing angle of the RX antenna panel |
expectedGain | the theoretically expected gain for the above parameters |
Definition at line 251 of file two-ray-splm-test-suite.cc.
|
override |
Destructor.
Definition at line 276 of file two-ray-splm-test-suite.cc.
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 281 of file two-ray-splm-test-suite.cc.
References m_expectedGain, m_rxAntElem, m_rxBearing, m_rxNumAntennas, m_rxPosVec, m_txAntElem, m_txBearing, m_txNumAntennas, m_txPosVec, NS_TEST_EXPECT_MSG_EQ_TOL, and TOLERANCE.
|
private |
the gain which is theoretically expected [db]
Definition at line 248 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the antenna element of the RX antenna panel
Definition at line 241 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the bearing angle of the RX antenna panel [rad]
Definition at line 247 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the number of antenna elements of the RX antenna panel
Definition at line 243 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the position of the RX
Definition at line 245 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the antenna element of the TX antenna panel
Definition at line 240 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the bearing angle of the TX antenna panel [rad]
Definition at line 246 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the number of antenna elements of the TX antenna panel
Definition at line 242 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the position of the TX
Definition at line 244 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
staticconstexprprivate |
Tolerance for testing value produced by the simulator against expected theoretical value, as a fraction of the expected value.
Definition at line 238 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().