Test case for the ThreeGppChannelModel class. More...
Public Member Functions | |
| ThreeGppChannelMatrixUpdateTest (uint32_t txAntennaElements=2, uint32_t rxAntennaElements=4, uint32_t txPorts=1, uint32_t rxPorts=1) | |
| Constructor. | |
| ~ThreeGppChannelMatrixUpdateTest () override | |
| Destructor. | |
| Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| Caller graph was not generated because of its size. | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Build the test scenario. | |
| void | MoveRxAndComputerSnr (Ptr< ThreeGppChannelModel > channelModel, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< PhasedArrayModel > txAntenna, Ptr< PhasedArrayModel > rxAntenna, bool update) |
| This method first slightly moves the user and then calculates the channel matrix. | |
Private Attributes | |
| Ptr< const ThreeGppChannelModel::ChannelMatrix > | m_currentChannel |
| used by DoGetChannel to store the current channel matrix | |
| bool | m_initialized {false} |
| tracks whether previous matrix snapshot is set | |
| ComplexMatrixArray | m_previousChannelMatrix |
| snapshot of previous channel matrix | |
| uint32_t | m_rxAntennaElements {4} |
| number of rows and columns of rx antenna array | |
| uint32_t | m_rxPorts {1} |
| number of horizontal and vertical ports of rx antenna array | |
| uint32_t | m_txAntennaElements {4} |
| number of rows and columns of tx antenna array | |
| uint32_t | m_txPorts {1} |
| number of horizontal and vertical ports of tx antenna array | |
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... | |
| 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 ThreeGppChannelModel class.
It checks if the channel realizations are correctly updated during the simulation.
Definition at line 282 of file three-gpp-channel-test-suite.cc.
| ThreeGppChannelMatrixUpdateTest::ThreeGppChannelMatrixUpdateTest | ( | uint32_t | txAntennaElements = 2, |
| uint32_t | rxAntennaElements = 4, | ||
| uint32_t | txPorts = 1, | ||
| uint32_t | rxPorts = 1 ) |
Constructor.
| txAntennaElements | the number of rows and columns of the antenna array of the transmitter |
| rxAntennaElements | the number of rows and columns of the antenna array of |
| txPorts | the number of vertical and horizontal ports of the antenna array of the transmitter |
| rxPorts | the number of vertical and horizontal ports of the antenna array of the receiver |
Definition at line 340 of file three-gpp-channel-test-suite.cc.
References ns3::TestCase::TestCase(), m_rxAntennaElements, m_rxPorts, m_txAntennaElements, and m_txPorts.
|
override |
Destructor.
Definition at line 352 of file three-gpp-channel-test-suite.cc.
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 405 of file three-gpp-channel-test-suite.cc.
References ns3::CreateObject(), ns3::CreateObjectWithAttributes(), ns3::Simulator::Destroy(), m_currentChannel, m_initialized, m_previousChannelMatrix, m_rxAntennaElements, m_rxPorts, m_txAntennaElements, m_txPorts, ns3::MilliSeconds(), MoveRxAndComputerSnr(), nodes, ns3::Simulator::Run(), and ns3::Simulator::Schedule().
|
private |
This method first slightly moves the user and then calculates the channel matrix.
This function is used for channel matrix computation at different time instants and to check if whether the channel matrix is updated following the updatePeriod configuration.
| channelModel | the ThreeGppChannelModel object used to generate the channel matrix |
| txMob | the mobility model of the first node |
| rxMob | the mobility model of the second node |
| txAntenna | the antenna object associated to the first node |
| rxAntenna | the antenna object associated to the second node |
| update | whether if the channel matrix should be updated or not |
Definition at line 357 of file three-gpp-channel-test-suite.cc.
References m_currentChannel, m_initialized, m_previousChannelMatrix, ns3::Simulator::Now(), and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
private |
used by DoGetChannel to store the current channel matrix
Definition at line 331 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun(), and MoveRxAndComputerSnr().
|
private |
tracks whether previous matrix snapshot is set
Definition at line 332 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun(), and MoveRxAndComputerSnr().
|
private |
snapshot of previous channel matrix
Definition at line 333 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun(), and MoveRxAndComputerSnr().
|
private |
number of rows and columns of rx antenna array
Definition at line 335 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppChannelMatrixUpdateTest(), and DoRun().
|
private |
number of horizontal and vertical ports of rx antenna array
Definition at line 337 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppChannelMatrixUpdateTest(), and DoRun().
|
private |
number of rows and columns of tx antenna array
Definition at line 334 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppChannelMatrixUpdateTest(), and DoRun().
|
private |
number of horizontal and vertical ports of tx antenna array
Definition at line 336 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppChannelMatrixUpdateTest(), and DoRun().