A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~ArrayResponseTest () override
 Destructor.
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (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< AntennaModelm_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< AntennaModelm_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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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

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 ( )
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: