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. | |
~ArrayResponseTest () override | |
Destructor. | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
Build the test scenario. | |
Private Attributes | |
double | m_expectedGain |
the gain which is theoretically expected [db] | |
Ptr< AntennaModel > | m_rxAntElem |
the antenna element of the RX antenna panel | |
double | m_rxBearing |
the bearing angle of the RX antenna panel [rad] | |
uint16_t | m_rxNumAntennas |
the number of antenna elements of the RX antenna panel | |
Vector | m_rxPosVec |
the position of the RX | |
Ptr< AntennaModel > | m_txAntElem |
the antenna element of the TX antenna panel | |
double | m_txBearing |
the bearing angle of the TX antenna panel [rad] | |
uint16_t | m_txNumAntennas |
the number of antenna elements of the TX antenna panel | |
Vector | m_txPosVec |
the position of the TX | |
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. | |
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. | |
Test case for the TwoRaySpectrumPropagationLossModel class.
Check that the overall array response at boresight coincides with the expected theoretical values
Definition at line 187 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 240 of file two-ray-splm-test-suite.cc.
|
override |
Destructor.
Definition at line 265 of file two-ray-splm-test-suite.cc.
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 270 of file two-ray-splm-test-suite.cc.
References ns3::CreateObject(), 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 237 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the antenna element of the RX antenna panel
Definition at line 230 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the bearing angle of the RX antenna panel [rad]
Definition at line 236 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 232 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the position of the RX
Definition at line 234 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the antenna element of the TX antenna panel
Definition at line 229 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the bearing angle of the TX antenna panel [rad]
Definition at line 235 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 231 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
the position of the TX
Definition at line 233 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 227 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().