A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ThreeGppAntennaSetupChangedTest Class Reference

Test case for the ThreeGppChannelModel class. More...

+ Inheritance diagram for ThreeGppAntennaSetupChangedTest:
+ Collaboration diagram for ThreeGppAntennaSetupChangedTest:

Public Member Functions

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

Private Attributes

Ptr< const ThreeGppChannelModel::ChannelMatrix > m_currentChannel
 used by DoGetChannel to store the current 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...
 
- 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.
 
TestCaseGetParent () 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.
 

Detailed Description

Test case for the ThreeGppChannelModel class.

It checks if the channel realizations are correctly updated after a change in the number of antenna elements.

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

Constructor & Destructor Documentation

◆ ThreeGppAntennaSetupChangedTest()

ThreeGppAntennaSetupChangedTest::ThreeGppAntennaSetupChangedTest ( )

Constructor.

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

◆ ~ThreeGppAntennaSetupChangedTest()

ThreeGppAntennaSetupChangedTest::~ThreeGppAntennaSetupChangedTest ( )
override

Destructor.

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

Member Function Documentation

◆ DoGetChannel()

void ThreeGppAntennaSetupChangedTest::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 550 of file three-gpp-channel-test-suite.cc.

References ns3::Time::GetMilliSeconds(), ns3::MatrixBasedChannelModel::ChannelMatrix::m_channel, m_currentChannel, ns3::Simulator::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 ThreeGppAntennaSetupChangedTest::DoRun ( )
overrideprivatevirtual

Build the test scenario.

Implements ns3::TestCase.

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

References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::CreateObjectWithAttributes(), ns3::Simulator::Destroy(), DoGetChannel(), ns3::NodeContainer::Get(), m_rxAntennaElements, m_rxPorts, m_txAntennaElements, m_txPorts, ns3::MilliSeconds(), nodes, ns3::Simulator::Run(), and ns3::Simulator::Schedule().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_currentChannel

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

used by DoGetChannel to store the current channel matrix

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

Referenced by DoGetChannel().

◆ m_rxAntennaElements

uint32_t ThreeGppAntennaSetupChangedTest::m_rxAntennaElements {4}
private

number of rows and columns of rx antenna array

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

Referenced by DoRun().

◆ m_rxPorts

uint32_t ThreeGppAntennaSetupChangedTest::m_rxPorts {1}
private

number of horizontal and vertical ports of rx antenna array

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

Referenced by DoRun().

◆ m_txAntennaElements

uint32_t ThreeGppAntennaSetupChangedTest::m_txAntennaElements {4}
private

number of rows and columns of tx antenna array

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

Referenced by DoRun().

◆ m_txPorts

uint32_t ThreeGppAntennaSetupChangedTest::m_txPorts {1}
private

number of horizontal and vertical ports of tx antenna array

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

Referenced by DoRun().


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