A Discrete-Event Network Simulator
API
ArrayResponseTest Class Reference

Test case for the TwoRaySpectrumPropagationLossModel class. More...

+ Inheritance diagram for ArrayResponseTest:
+ Collaboration diagram for ArrayResponseTest:

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
 
TestCaseoperator= (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< AntennaModelm_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< AntennaModelm_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...
 
TestCaseGetParent () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ArrayResponseTest()

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.

Parameters
txAntElemthe antenna element of the TX antenna panel
rxAntElemthe antenna element of the RX antenna panel
txNumAntennasthe number of antenna elements of the TX antenna panel
rxNumAntennasthe number of antenna elements of the RX antenna panel
txPosVecthe position of the TX
rxPosVecthe position of the RX
txBearingthe bearing angle of the TX antenna panel
rxBearingthe bearing angle of the RX antenna panel
expectedGainthe theoretically expected gain for the above parameters

Definition at line 251 of file two-ray-splm-test-suite.cc.

◆ ~ArrayResponseTest()

ArrayResponseTest::~ArrayResponseTest ( )
override

Destructor.

Definition at line 276 of file two-ray-splm-test-suite.cc.

Member Function Documentation

◆ DoRun()

void ArrayResponseTest::DoRun ( void  )
overrideprivatevirtual

Member Data Documentation

◆ m_expectedGain

double ArrayResponseTest::m_expectedGain
private

the gain which is theoretically expected [db]

Definition at line 248 of file two-ray-splm-test-suite.cc.

Referenced by DoRun().

◆ m_rxAntElem

Ptr<AntennaModel> ArrayResponseTest::m_rxAntElem
private

the antenna element of the RX antenna panel

Definition at line 241 of file two-ray-splm-test-suite.cc.

Referenced by DoRun().

◆ m_rxBearing

double ArrayResponseTest::m_rxBearing
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().

◆ m_rxNumAntennas

uint16_t ArrayResponseTest::m_rxNumAntennas
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().

◆ m_rxPosVec

Vector ArrayResponseTest::m_rxPosVec
private

the position of the RX

Definition at line 245 of file two-ray-splm-test-suite.cc.

Referenced by DoRun().

◆ m_txAntElem

Ptr<AntennaModel> ArrayResponseTest::m_txAntElem
private

the antenna element of the TX antenna panel

Definition at line 240 of file two-ray-splm-test-suite.cc.

Referenced by DoRun().

◆ m_txBearing

double ArrayResponseTest::m_txBearing
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().

◆ m_txNumAntennas

uint16_t ArrayResponseTest::m_txNumAntennas
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().

◆ m_txPosVec

Vector ArrayResponseTest::m_txPosVec
private

the position of the TX

Definition at line 244 of file two-ray-splm-test-suite.cc.

Referenced by DoRun().

◆ TOLERANCE

constexpr double ArrayResponseTest::TOLERANCE {1e-8}
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().


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