Test case for the ThreeGppSpectrumPropagationLossModelTest class. More...
Public Member Functions | |
ThreeGppSpectrumPropagationLossModelTest () | |
Constructor. More... | |
virtual | ~ThreeGppSpectrumPropagationLossModelTest () |
Destructor. More... | |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
void | CheckLongTermUpdate (Ptr< ThreeGppSpectrumPropagationLossModel > lossModel, Ptr< SpectrumValue > txPsd, Ptr< MobilityModel > txMob, Ptr< MobilityModel > rxMob, Ptr< SpectrumValue > rxPsdOld) |
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... | |
virtual void | DoRun (void) |
Build the test scenario. More... | |
Static Private Member Functions | |
static bool | ArePsdEqual (Ptr< SpectrumValue > first, Ptr< SpectrumValue > second) |
Checks if two PSDs are equal. More... | |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
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 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... | |
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 356 of file three-gpp-channel-test-suite.cc.
ThreeGppSpectrumPropagationLossModelTest::ThreeGppSpectrumPropagationLossModelTest | ( | ) |
Constructor.
Definition at line 405 of file three-gpp-channel-test-suite.cc.
|
virtual |
Destructor.
Definition at line 410 of file three-gpp-channel-test-suite.cc.
|
staticprivate |
Checks if two PSDs are equal.
first | the first PSD |
second | the second PSD |
Definition at line 428 of file three-gpp-channel-test-suite.cc.
Referenced by CheckLongTermUpdate(), and DoRun().
|
private |
Test of the long term component is correctly updated when the channel matrix is recomputed.
lossModel | the ThreeGppSpectrumPropagationLossModel object used to compute the rx PSD |
txPsd | the PSD of the transmitted signal |
txMob | the mobility model of the tx device |
rxMob | the mobility model of the rx device |
rxPsdOld | the previously received PSD |
Definition at line 443 of file three-gpp-channel-test-suite.cc.
References ArePsdEqual(), and NS_TEST_ASSERT_MSG_EQ.
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 415 of file three-gpp-channel-test-suite.cc.
References GetPosition().
Referenced by DoRun().
|
privatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 450 of file three-gpp-channel-test-suite.cc.
References ArePsdEqual(), CheckLongTermUpdate(), ns3::WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity(), DoBeamforming(), ns3::MilliSeconds(), first::nodes, NS_TEST_ASSERT_MSG_EQ, ns3::Config::SetDefault(), and ns3::MobilityModel::SetPosition().