A Discrete-Event Network Simulator
API
ThreeGppChannelMatrixUpdateTest Class Reference

Test case for the ThreeGppChannelModel class. More...

+ Inheritance diagram for ThreeGppChannelMatrixUpdateTest:
+ Collaboration diagram for ThreeGppChannelMatrixUpdateTest:

Public Member Functions

 ThreeGppChannelMatrixUpdateTest ()
 Constructor. More...
 
virtual ~ThreeGppChannelMatrixUpdateTest ()
 Destructor. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (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. More...
 
virtual void DoRun (void)
 Build the test scenario. More...
 

Private Attributes

Ptr< const ThreeGppChannelModel::ChannelMatrix > m_currentChannel
 used by DoGetChannel to store the current channel matrix 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

Test case for the ThreeGppChannelModel class.

It checks if the channel realizations are correctly updated during the simulation.

Definition at line 218 of file three-gpp-channel-test-suite.cc.

Constructor & Destructor Documentation

◆ ThreeGppChannelMatrixUpdateTest()

ThreeGppChannelMatrixUpdateTest::ThreeGppChannelMatrixUpdateTest ( )

Constructor.

Definition at line 252 of file three-gpp-channel-test-suite.cc.

◆ ~ThreeGppChannelMatrixUpdateTest()

ThreeGppChannelMatrixUpdateTest::~ThreeGppChannelMatrixUpdateTest ( )
virtual

Destructor.

Definition at line 257 of file three-gpp-channel-test-suite.cc.

Member Function Documentation

◆ DoGetChannel()

void ThreeGppChannelMatrixUpdateTest::DoGetChannel ( Ptr< ThreeGppChannelModel channelModel,
Ptr< MobilityModel txMob,
Ptr< MobilityModel rxMob,
Ptr< PhasedArrayModel txAntenna,
Ptr< PhasedArrayModel rxAntenna,
bool  update 
)
private

This method is used to schedule the channel matrix computation at different time instants and to check if it correctly updated.

Parameters
channelModelthe ThreeGppChannelModel object used to generate the channel matrix
txMobthe mobility model of the first node
rxMobthe mobility model of the second node
txAntennathe antenna object associated to the first node
rxAntennathe antenna object associated to the second node
updatewhether if the channel matrix should be updated or not

Definition at line 262 of file three-gpp-channel-test-suite.cc.

References m_currentChannel, ns3::Now(), and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

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

◆ DoRun()

void ThreeGppChannelMatrixUpdateTest::DoRun ( void  )
privatevirtual

Build the test scenario.

Implements ns3::TestCase.

Definition at line 281 of file three-gpp-channel-test-suite.cc.

References DoGetChannel(), ns3::MilliSeconds(), first::nodes, and ns3::MobilityModel::SetPosition().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_currentChannel

Ptr<const ThreeGppChannelModel::ChannelMatrix> ThreeGppChannelMatrixUpdateTest::m_currentChannel
private

used by DoGetChannel to store the current channel matrix

Definition at line 249 of file three-gpp-channel-test-suite.cc.

Referenced by DoGetChannel().


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