Test case for the TwoRaySpectrumPropagationLossModel class. More...
Inheritance diagram for OverallGainAverageTest:
Collaboration diagram for OverallGainAverageTest:Public Member Functions | |
| OverallGainAverageTest (Ptr< AntennaModel > txAntElem, Ptr< AntennaModel > rxAntElem, uint16_t txNumAntennas, uint16_t rxNumAntennas, double fc, std::string threeGppScenario) | |
| The constructor of the test case. | |
| ~OverallGainAverageTest () override | |
| Destructor. | |
| double | ComputePowerSpectralDensityOverallPower (Ptr< const SpectrumValue > psd) |
| Computes the overall power of a PSD. | |
| Ptr< SpectrumValue > | CreateTxPowerSpectralDensity (double fc) |
| Creates a PSD centered at fc, of bandwidth bw and sub-bands of width rbWidth. | |
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_fc |
| the carrier frequency | |
| Ptr< AntennaModel > | m_rxAntElem |
| the antenna element of the RX antenna panel | |
| uint16_t | m_rxNumAntennas |
| the number of antenna elements of the RX antenna panel | |
| std::string | m_threeGppScenario |
| the 3GPP scenario | |
| Ptr< AntennaModel > | m_txAntElem |
| the antenna element of the TX antenna panel | |
| uint16_t | m_txNumAntennas |
| the number of antenna elements of the TX antenna panel | |
Static Private Attributes | |
| static constexpr double | M_BW {200e6} |
| The simulation bandwidth. Results are independent from this parameter. | |
| static constexpr double | M_RB_WIDTH {1e6} |
| The width of a RB, which in turn specifies the resolution of the generated PSDs. | |
| static constexpr uint32_t | N_MEASUREMENTS {1000} |
| Number of samples to draw when estimating the average. | |
| static constexpr double | TOLERANCE {0.02} |
| Tolerance for testing average channel gain produced by the Two Ray model with respect to the 3GPP model, which serves as the reference. | |
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 | TestDuration = Duration |
| Deprecated test duration simple enums. | |
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 average overall channel gain obtained using the TwoRaySpectrumPropagationLossModel class is close (it is, after all, a simplified and performance-oriented model) to the one obtained using the ThreeGppSpectrumPropagationLossModel
Definition at line 328 of file two-ray-splm-test-suite.cc.
| OverallGainAverageTest::OverallGainAverageTest | ( | Ptr< AntennaModel > | txAntElem, |
| Ptr< AntennaModel > | rxAntElem, | ||
| uint16_t | txNumAntennas, | ||
| uint16_t | rxNumAntennas, | ||
| double | fc, | ||
| std::string | threeGppScenario | ||
| ) |
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 |
| fc | the carrier frequency |
| threeGppScenario | the 3GPP scenario |
Definition at line 403 of file two-ray-splm-test-suite.cc.
|
override |
Destructor.
Definition at line 422 of file two-ray-splm-test-suite.cc.
| double OverallGainAverageTest::ComputePowerSpectralDensityOverallPower | ( | Ptr< const SpectrumValue > | psd | ) |
Computes the overall power of a PSD.
| psd | the PSD |
Definition at line 427 of file two-ray-splm-test-suite.cc.
References ns3::Integral().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| Ptr< SpectrumValue > OverallGainAverageTest::CreateTxPowerSpectralDensity | ( | double | fc | ) |
Creates a PSD centered at fc, of bandwidth bw and sub-bands of width rbWidth.
| fc | the central frequency of the PSD |
Definition at line 433 of file two-ray-splm-test-suite.cc.
References ns3::Create(), ns3::BandInfo::fl, M_BW, and M_RB_WIDTH.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 470 of file two-ray-splm-test-suite.cc.
References ComputePowerSpectralDensityOverallPower(), ns3::Create(), ns3::NodeContainer::Create(), CreateTxPowerSpectralDensity(), ns3::NodeContainer::Get(), ns3::Object::GetObject(), m_fc, m_rxAntElem, m_rxNumAntennas, m_threeGppScenario, m_txAntElem, m_txNumAntennas, N_MEASUREMENTS, nodes, NS_TEST_EXPECT_MSG_EQ_TOL, and TOLERANCE.
Here is the call graph for this function:The simulation bandwidth. Results are independent from this parameter.
Definition at line 387 of file two-ray-splm-test-suite.cc.
Referenced by CreateTxPowerSpectralDensity().
|
private |
the carrier frequency
Definition at line 399 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
The width of a RB, which in turn specifies the resolution of the generated PSDs.
Results are independent from this parameter.
Definition at line 393 of file two-ray-splm-test-suite.cc.
Referenced by CreateTxPowerSpectralDensity().
|
private |
the antenna element of the RX antenna panel
Definition at line 396 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 398 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
|
private |
|
private |
the antenna element of the TX antenna panel
Definition at line 395 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 397 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
Number of samples to draw when estimating the average.
Definition at line 384 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().
Tolerance for testing average channel gain produced by the Two Ray model with respect to the 3GPP model, which serves as the reference.
Definition at line 381 of file two-ray-splm-test-suite.cc.
Referenced by DoRun().