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

Test to check if the shadowing fading is correctly computed. More...

+ Inheritance diagram for ThreeGppShadowingTestCase:
+ Collaboration diagram for ThreeGppShadowingTestCase:

Classes

struct  TestVector
 Struct containing the parameters for each test. More...
 

Public Member Functions

 ThreeGppShadowingTestCase ()
 
 ~ThreeGppShadowingTestCase () override
 
- 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 ChangeChannelCondition (Ptr< ChannelConditionModel > ccm)
 Change the channel condition model.
 
void DoRun () override
 Implementation to actually run this TestCase.
 
void EvaluateLoss (Ptr< MobilityModel > a, Ptr< MobilityModel > b, uint8_t testNum)
 Compute the propagation loss.
 
void RunTest (uint16_t testNum, std::string propagationLossModelType, double hBs, double hUt, double distance, bool shadowingEnabled)
 Run the experiment.
 

Private Attributes

Ptr< ThreeGppPropagationLossModelm_lossModel
 the propagation loss model
 
std::map< uint16_t, std::vector< double > > m_results
 used to store the test results
 
TestVectors< TestVectorm_testVectors
 array containing all the test vectors
 

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 to check if the shadowing fading is correctly computed.

Definition at line 994 of file three-gpp-propagation-loss-model-test-suite.cc.

Constructor & Destructor Documentation

◆ ThreeGppShadowingTestCase()

ThreeGppShadowingTestCase::ThreeGppShadowingTestCase ( )

◆ ~ThreeGppShadowingTestCase()

ThreeGppShadowingTestCase::~ThreeGppShadowingTestCase ( )
override

Member Function Documentation

◆ ChangeChannelCondition()

void ThreeGppShadowingTestCase::ChangeChannelCondition ( Ptr< ChannelConditionModel > ccm)
private

Change the channel condition model.

Parameters
ccmthe new ChannelConditionModel

Definition at line 1072 of file three-gpp-propagation-loss-model-test-suite.cc.

References m_lossModel.

Referenced by RunTest().

+ Here is the caller graph for this function:

◆ DoRun()

void ThreeGppShadowingTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

Definition at line 1148 of file three-gpp-propagation-loss-model-test-suite.cc.

References ThreeGppShadowingTestCase::TestVector::m_distance, ThreeGppShadowingTestCase::TestVector::m_hBs, ThreeGppShadowingTestCase::TestVector::m_hUt, ThreeGppShadowingTestCase::TestVector::m_propagationLossModelType, m_results, ThreeGppShadowingTestCase::TestVector::m_shadowingStdLos, ThreeGppShadowingTestCase::TestVector::m_shadowingStdNlos, m_testVectors, NS_TEST_EXPECT_MSG_EQ_TOL, and RunTest().

+ Here is the call graph for this function:

◆ EvaluateLoss()

void ThreeGppShadowingTestCase::EvaluateLoss ( Ptr< MobilityModel > a,
Ptr< MobilityModel > b,
uint8_t testNum )
private

Compute the propagation loss.

Parameters
athe first mobility model
bthe second mobility model
testNumthe index of the experiment

Definition at line 1065 of file three-gpp-propagation-loss-model-test-suite.cc.

References m_lossModel, and m_results.

Referenced by RunTest().

+ Here is the caller graph for this function:

◆ RunTest()

void ThreeGppShadowingTestCase::RunTest ( uint16_t testNum,
std::string propagationLossModelType,
double hBs,
double hUt,
double distance,
bool shadowingEnabled )
private

Run the experiment.

Parameters
testNumthe index of the experiment
propagationLossModelTypethe type id of the propagation loss model to be used
hBsthe BS height in meters
hUtthe UT height in meters
distancethe initial distance between the BS and the UT
shadowingEnabledtrue if shadowging must be enabled

Definition at line 1078 of file three-gpp-propagation-loss-model-test-suite.cc.

References ns3::Object::AggregateObject(), ChangeChannelCondition(), ns3::NodeContainer::Create(), ns3::ObjectFactory::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), EvaluateLoss(), ns3::NodeContainer::Get(), m_lossModel, m_results, ns3::MilliSeconds(), nodes, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::ObjectBase::SetAttribute().

Referenced by DoRun().

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

Member Data Documentation

◆ m_lossModel

Ptr<ThreeGppPropagationLossModel> ThreeGppShadowingTestCase::m_lossModel
private

the propagation loss model

Definition at line 1050 of file three-gpp-propagation-loss-model-test-suite.cc.

Referenced by ChangeChannelCondition(), EvaluateLoss(), and RunTest().

◆ m_results

std::map<uint16_t , std::vector<double> > ThreeGppShadowingTestCase::m_results
private

used to store the test results

Definition at line 1052 of file three-gpp-propagation-loss-model-test-suite.cc.

Referenced by DoRun(), EvaluateLoss(), and RunTest().

◆ m_testVectors

TestVectors<TestVector> ThreeGppShadowingTestCase::m_testVectors
private

array containing all the test vectors

Definition at line 1049 of file three-gpp-propagation-loss-model-test-suite.cc.

Referenced by DoRun().


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