Test case for the ThreeGppSpectrumPropagationLossModelTest class. More...
Public Member Functions | |
ThreeGppSpectrumPropagationLossModelTest (uint32_t txAntennaElements=4, uint32_t rxAntennaElements=4, uint32_t txPorts=1, uint32_t rxPorts=1) | |
Constructor. More... | |
~ThreeGppSpectrumPropagationLossModelTest () override | |
Destructor. More... | |
Public Member Functions inherited from ns3::TestCase | |
TestCase (const TestCase &)=delete | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | CheckLongTermUpdate (const CheckLongTermUpdateParams ¶ms) |
Test of the long term component is correctly updated when the channel matrix is recomputed. More... | |
void | DoBeamforming (Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice, Ptr< PhasedArrayModel > otherAntenna) |
Points the beam of thisDevice towards otherDevice. More... | |
void | DoRun () override |
Build the test scenario. More... | |
Private Attributes | |
uint32_t | m_rxAntennaElements {4} |
number of rows and columns of rx antenna array More... | |
uint32_t | m_rxPorts {1} |
number of horizontal and vertical ports of rx antenna array More... | |
uint32_t | m_txAntennaElements {4} |
number of rows and columns of tx antenna array More... | |
uint32_t | m_txPorts {1} |
number of horizontal and vertical ports of tx antenna array 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... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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... | |
Test case for the ThreeGppSpectrumPropagationLossModelTest class.
1) checks if the long term components for the direct and the reverse link are the same 2) checks if the long term component is updated when changing the beamforming vectors 3) checks if the long term is updated when changing the channel matrix
Definition at line 527 of file three-gpp-channel-test-suite.cc.
ThreeGppSpectrumPropagationLossModelTest::ThreeGppSpectrumPropagationLossModelTest | ( | uint32_t | txAntennaElements = 4 , |
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 the receiver |
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 582 of file three-gpp-channel-test-suite.cc.
References m_rxAntennaElements, m_rxPorts, m_txAntennaElements, and m_txPorts.
|
override |
Destructor.
Definition at line 595 of file three-gpp-channel-test-suite.cc.
|
private |
Test of the long term component is correctly updated when the channel matrix is recomputed.
params | a structure that contains the set of parameters needed by CheckLongTermUpdate in order to perform calculations |
Definition at line 617 of file three-gpp-channel-test-suite.cc.
References NS_TEST_ASSERT_MSG_EQ, and two-ray-to-three-gpp-ch-calibration::params.
Referenced by DoRun().
|
private |
Points the beam of thisDevice towards otherDevice.
thisDevice | the device to configure |
thisAntenna | the antenna object associated to thisDevice |
otherDevice | the device to communicate with |
otherAntenna | the antenna object associated to otherDevice |
Definition at line 600 of file three-gpp-channel-test-suite.cc.
References ns3::PhasedArrayModel::GetBeamformingVector(), and ns3::PhasedArrayModel::SetBeamformingVector().
Referenced by DoRun().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 631 of file three-gpp-channel-test-suite.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), CheckLongTermUpdate(), ns3::SpectrumValue::Copy(), ns3::NodeContainer::Create(), ns3::SpectrumValue5MhzFactory::CreateTxPowerSpectralDensity(), DoBeamforming(), ns3::ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(), ns3::NodeContainer::Get(), ns3::PhasedArrayModel::GetBeamformingVector(), m_rxAntennaElements, m_rxPorts, m_txAntennaElements, m_txPorts, ns3::MilliSeconds(), nodes, NS_TEST_ASSERT_MSG_EQ, two-ray-to-three-gpp-ch-calibration::params, ns3::SpectrumSignalParameters::psd, ns3::PhasedArrayModel::SetBeamformingVector(), ns3::ThreeGppSpectrumPropagationLossModel::SetChannelModelAttribute(), ns3::Config::SetDefault(), and ns3::MobilityModel::SetPosition().
|
private |
number of rows and columns of rx antenna array
Definition at line 577 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppSpectrumPropagationLossModelTest(), and DoRun().
|
private |
number of horizontal and vertical ports of rx antenna array
Definition at line 579 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppSpectrumPropagationLossModelTest(), and DoRun().
|
private |
number of rows and columns of tx antenna array
Definition at line 576 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppSpectrumPropagationLossModelTest(), and DoRun().
|
private |
number of horizontal and vertical ports of tx antenna array
Definition at line 578 of file three-gpp-channel-test-suite.cc.
Referenced by ThreeGppSpectrumPropagationLossModelTest(), and DoRun().