Test case for the ThreeGppChannelModel class. More...
Public Member Functions | |
ThreeGppChannelMatrixUpdateTest () | |
Constructor. | |
~ThreeGppChannelMatrixUpdateTest () override | |
Destructor. | |
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 | DoGetChannel (Ptr< ThreeGppChannelModel > channelModel, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< PhasedArrayModel > txAntenna, Ptr< PhasedArrayModel > rxAntenna, bool update) |
This method is used to schedule the channel matrix computation at different time instants and to check if it correctly updated. | |
void | DoRun () override |
Build the test scenario. | |
Private Attributes | |
Ptr< const ThreeGppChannelModel::ChannelMatrix > | m_currentChannel |
used by DoGetChannel to store the current channel matrix | |
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. | |
void | AddTestCase (TestCase *testCase, TestDuration 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 257 of file three-gpp-channel-test-suite.cc.
ThreeGppChannelMatrixUpdateTest::ThreeGppChannelMatrixUpdateTest | ( | ) |
Constructor.
Definition at line 297 of file three-gpp-channel-test-suite.cc.
|
override |
Destructor.
Definition at line 302 of file three-gpp-channel-test-suite.cc.
|
private |
This method is used to schedule the channel matrix computation at different time instants and to check if it correctly updated.
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 307 of file three-gpp-channel-test-suite.cc.
References m_currentChannel, ns3::Simulator::Now(), and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 335 of file three-gpp-channel-test-suite.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), DoGetChannel(), ns3::NodeContainer::Get(), ns3::MilliSeconds(), nodes, ns3::Simulator::Run(), and ns3::Simulator::Schedule().
|
private |
used by DoGetChannel to store the current channel matrix
Definition at line 294 of file three-gpp-channel-test-suite.cc.
Referenced by DoGetChannel().