Test case for the ThreeGppSpectrumPropagationLossModelTest class. More...
Public Member Functions | |
ThreeGppSpectrumPropagationLossModelTest () | |
Constructor. | |
~ThreeGppSpectrumPropagationLossModelTest () 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 | CheckLongTermUpdate (const CheckLongTermUpdateParams ¶ms) |
Test of the long term component is correctly updated when the channel matrix is recomputed. | |
void | DoBeamforming (Ptr< NetDevice > thisDevice, Ptr< PhasedArrayModel > thisAntenna, Ptr< NetDevice > otherDevice, Ptr< PhasedArrayModel > otherAntenna) |
Points the beam of thisDevice towards otherDevice. | |
void | DoRun () override |
Build the test scenario. | |
Static Private Member Functions | |
static bool | ArePsdEqual (Ptr< SpectrumValue > first, Ptr< SpectrumValue > second) |
Checks if two PSDs are equal. | |
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 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 465 of file three-gpp-channel-test-suite.cc.
ThreeGppSpectrumPropagationLossModelTest::ThreeGppSpectrumPropagationLossModelTest | ( | ) |
Constructor.
Definition at line 513 of file three-gpp-channel-test-suite.cc.
|
override |
Destructor.
Definition at line 518 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 540 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.
params | a structure that contains the set of parameters needed by CheckLongTermUpdate in order to perform calculations |
Definition at line 556 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 523 of file three-gpp-channel-test-suite.cc.
Referenced by DoRun().
|
overrideprivatevirtual |
Build the test scenario.
Implements ns3::TestCase.
Definition at line 570 of file three-gpp-channel-test-suite.cc.
References ns3::Node::AddDevice(), ns3::Object::AggregateObject(), ArePsdEqual(), CheckLongTermUpdate(), ns3::NodeContainer::Create(), ns3::SpectrumValue5MhzFactory::CreateTxPowerSpectralDensity(), ns3::Simulator::Destroy(), DoBeamforming(), ns3::NodeContainer::Get(), ns3::MilliSeconds(), nodes, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::Schedule(), and ns3::Config::SetDefault().