A Discrete-Event Network Simulator
API
ThreeGppSpectrumPropagationLossModelTest Class Reference

Test case for the ThreeGppSpectrumPropagationLossModelTest class. More...

+ Inheritance diagram for ThreeGppSpectrumPropagationLossModelTest:
+ Collaboration diagram for ThreeGppSpectrumPropagationLossModelTest:

Public Member Functions

 ThreeGppSpectrumPropagationLossModelTest ()
 Constructor. More...
 
virtual ~ThreeGppSpectrumPropagationLossModelTest ()
 Destructor. More...
 
- Public Member Functions inherited from ns3::TestCase
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< ThreeGppAntennaArrayModel > thisAntenna, Ptr< NetDevice > otherDevice, Ptr< ThreeGppAntennaArrayModel > 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

- 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 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 344 of file three-gpp-channel-test-suite.cc.

Constructor & Destructor Documentation

◆ ThreeGppSpectrumPropagationLossModelTest()

ThreeGppSpectrumPropagationLossModelTest::ThreeGppSpectrumPropagationLossModelTest ( )

Constructor.

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

◆ ~ThreeGppSpectrumPropagationLossModelTest()

ThreeGppSpectrumPropagationLossModelTest::~ThreeGppSpectrumPropagationLossModelTest ( )
virtual

Destructor.

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

Member Function Documentation

◆ ArePsdEqual()

bool ThreeGppSpectrumPropagationLossModelTest::ArePsdEqual ( Ptr< SpectrumValue first,
Ptr< SpectrumValue second 
)
staticprivate

Checks if two PSDs are equal.

Parameters
firstthe first PSD
secondthe second PSD
Returns
true if first and second are equal, false otherwise

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

Referenced by CheckLongTermUpdate(), and DoRun().

+ Here is the caller graph for this function:

◆ CheckLongTermUpdate()

void ThreeGppSpectrumPropagationLossModelTest::CheckLongTermUpdate ( Ptr< ThreeGppSpectrumPropagationLossModel lossModel,
Ptr< SpectrumValue txPsd,
Ptr< MobilityModel txMob,
Ptr< MobilityModel rxMob,
Ptr< SpectrumValue rxPsdOld 
)
private

Test of the long term component is correctly updated when the channel matrix is recomputed.

Parameters
lossModelthe ThreeGppSpectrumPropagationLossModel object used to compute the rx PSD
txPsdthe PSD of the transmitted signal
txMobthe mobility model of the tx device
rxMobthe mobility model of the rx device
rxPsdOldthe previously received PSD

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

References ArePsdEqual(), ns3::ThreeGppSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(), 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:

◆ DoBeamforming()

void ThreeGppSpectrumPropagationLossModelTest::DoBeamforming ( Ptr< NetDevice thisDevice,
Ptr< ThreeGppAntennaArrayModel thisAntenna,
Ptr< NetDevice otherDevice,
Ptr< ThreeGppAntennaArrayModel otherAntenna 
)
private

Points the beam of thisDevice towards otherDevice.

Parameters
thisDevicethe device to configure
thisAntennathe antenna object associated to thisDevice
otherDevicethe device to communicate with
otherAntennathe antenna object associated to otherDevice

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

References ns3::ThreeGppAntennaArrayModel::GetElementLocation(), ns3::NetDevice::GetNode(), ns3::ThreeGppAntennaArrayModel::GetNumberOfElements(), ns3::Object::GetObject(), GetPosition(), ns3::Angles::phi, ns3::ThreeGppAntennaArrayModel::SetBeamformingVector(), and ns3::Angles::theta.

Referenced by DoRun().

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

◆ DoRun()


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