A Discrete-Event Network Simulator
API
UniformPlanarArrayTestCase Class Reference

UniformPlanarArray Test Case. More...

+ Inheritance diagram for UniformPlanarArrayTestCase:
+ Collaboration diagram for UniformPlanarArrayTestCase:

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. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 

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. More...
 

Private Member Functions

double ComputeGain (Ptr< UniformPlanarArray > a)
 Compute the gain of the antenna array. More...
 
virtual void DoRun (void)
 Run the test. More...
 

Private Attributes

double m_alpha
 the bearing angle [rad] More...
 
double m_beta
 the titling angle [rad] More...
 
uint32_t m_cols
 the number of columns More...
 
double m_colSpace
 the column spacing More...
 
Angles m_direction
 the testing direction More...
 
Ptr< AntennaModelm_element
 the antenna element More...
 
double m_expectedGain
 the expected antenna gain [dB] More...
 
uint32_t m_rows
 the number of rows More...
 
double m_rowSpace
 the row spacing 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 TestCsse. More...
 
bool IsStatusFailure (void) const
 Check if any tests failed. More...
 
bool IsStatusSuccess (void) 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 (void) const
 Check if this run should assert on failure. More...
 
bool MustContinueOnFailure (void) 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

UniformPlanarArray Test Case.

Definition at line 43 of file test-uniform-planar-array.cc.

Constructor & Destructor Documentation

◆ UniformPlanarArrayTestCase()

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.

Parameters
elementthe antenna element
rowsthe number of rows
colsthe number of columns
rowSpacethe row spacing
colSpacethe column spacing
alphathe bearing angle
betathe tilting angle
directionthe direction
expectedGainDbthe expected antenna gain [dB]

Definition at line 113 of file test-uniform-planar-array.cc.

Member Function Documentation

◆ BuildNameString()

std::string UniformPlanarArrayTestCase::BuildNameString ( Ptr< AntennaModel element,
uint32_t  rows,
uint32_t  cols,
double  rowSpace,
double  colSpace,
double  alpha,
double  beta,
Angles  direction 
)
static

Generate a string containing all relevant parameters.

Parameters
elementthe antenna element
rowsthe number of rows
colsthe number of columns
rowSpacethe row spacing
colSpacethe column spacing
alphathe bearing angle
betathe tilting angle
directionthe direction
Returns
the string containing all relevant parameters

Definition at line 98 of file test-uniform-planar-array.cc.

References sample-rng-plot::alpha, ns3::Object::GetInstanceTypeId(), ns3::TypeId::GetName(), and ns3::RadiansToDegrees().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ComputeGain()

double UniformPlanarArrayTestCase::ComputeGain ( Ptr< UniformPlanarArray a)
private

Compute the gain of the antenna array.

Parameters
athe antenna array
Returns
the gain of the antenna array [dB]

Definition at line 129 of file test-uniform-planar-array.cc.

References ns3::PhasedArrayModel::GetBeamformingVector(), ns3::UniformPlanarArray::GetElementFieldPattern(), ns3::UniformPlanarArray::GetNumberOfElements(), ns3::PhasedArrayModel::GetSteeringVector(), m_direction, and NS_TEST_EXPECT_MSG_EQ.

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRun()

void UniformPlanarArrayTestCase::DoRun ( void  )
privatevirtual

Member Data Documentation

◆ m_alpha

double UniformPlanarArrayTestCase::m_alpha
private

the bearing angle [rad]

Definition at line 92 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_beta

double UniformPlanarArrayTestCase::m_beta
private

the titling angle [rad]

Definition at line 93 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_cols

uint32_t UniformPlanarArrayTestCase::m_cols
private

the number of columns

Definition at line 89 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_colSpace

double UniformPlanarArrayTestCase::m_colSpace
private

the column spacing

Definition at line 91 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_direction

Angles UniformPlanarArrayTestCase::m_direction
private

the testing direction

Definition at line 94 of file test-uniform-planar-array.cc.

Referenced by ComputeGain(), and DoRun().

◆ m_element

Ptr<AntennaModel> UniformPlanarArrayTestCase::m_element
private

the antenna element

Definition at line 87 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_expectedGain

double UniformPlanarArrayTestCase::m_expectedGain
private

the expected antenna gain [dB]

Definition at line 95 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_rows

uint32_t UniformPlanarArrayTestCase::m_rows
private

the number of rows

Definition at line 88 of file test-uniform-planar-array.cc.

Referenced by DoRun().

◆ m_rowSpace

double UniformPlanarArrayTestCase::m_rowSpace
private

the row spacing

Definition at line 90 of file test-uniform-planar-array.cc.

Referenced by DoRun().


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