A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::LteUeMeasurementsPiecewiseTestCase1 Class Reference

Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in piecewise configuration and 120 ms report interval. More...

#include <lte-test-ue-measurements.h>

+ Inheritance diagram for ns3::LteUeMeasurementsPiecewiseTestCase1:
+ Collaboration diagram for ns3::LteUeMeasurementsPiecewiseTestCase1:

Public Member Functions

 LteUeMeasurementsPiecewiseTestCase1 (std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
 
virtual ~LteUeMeasurementsPiecewiseTestCase1 ()
 
void RecvMeasurementReportCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
 Triggers when eNodeB receives measurement report from UE, then perform verification on it. More...
 
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
 

Private Member Functions

virtual void DoRun ()
 Setup the simulation with the intended UE measurement reporting configuration, run it, and connect the RecvMeasurementReportCallback function to the LteUeRrc::RecvMeasurementReport trace source. More...
 
virtual void DoTeardown ()
 Runs at the end of the simulation, verifying that all expected measurement reports have been examined. More...
 
void TeleportFar ()
 
void TeleportNear ()
 
void TeleportVeryFar ()
 
void TeleportVeryNear ()
 

Private Attributes

LteRrcSap::ReportConfigEutra m_config
 The active report triggering configuration. More...
 
uint8_t m_expectedMeasId
 The measurement identity being tested. More...
 
std::vector< uint8_t > m_expectedRsrp
 The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received. More...
 
std::vector< Timem_expectedTime
 The list of expected time when measurement reports are received by eNodeB. More...
 
std::vector< uint8_t >::iterator m_itExpectedRsrp
 Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation. More...
 
std::vector< Time >::iterator m_itExpectedTime
 Pointer to the element of m_expectedTime which is expected to occur next in the simulation. More...
 
Ptr< MobilityModelm_ueMobility
 

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)
 
void AddTestCase (TestCase *testCase) NS_DEPRECATED
 Add an individual child TestCase case to this TestCase. More...
 
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
 
std::string CreateDataDirFilename (std::string filename)
 
std::string CreateTempDirFilename (std::string filename)
 
bool GetErrorStatus (void) const NS_DEPRECATED
 
std::string GetName (void) const
 
bool IsStatusFailure (void) const
 
bool IsStatusSuccess (void) const
 
bool MustAssertOnFailure (void) const
 
bool MustContinueOnFailure (void) const
 
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
 
void SetDataDir (std::string directory)
 

Detailed Description

Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in piecewise configuration and 120 ms report interval.

Definition at line 97 of file lte-test-ue-measurements.h.

Constructor & Destructor Documentation

ns3::LteUeMeasurementsPiecewiseTestCase1::LteUeMeasurementsPiecewiseTestCase1 ( std::string  name,
LteRrcSap::ReportConfigEutra  config,
std::vector< Time expectedTime,
std::vector< uint8_t >  expectedRsrp 
)
ns3::LteUeMeasurementsPiecewiseTestCase1::~LteUeMeasurementsPiecewiseTestCase1 ( )
virtual

Definition at line 562 of file lte-test-ue-measurements.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::LteUeMeasurementsPiecewiseTestCase1::DoTeardown ( void  )
privatevirtual

Runs at the end of the simulation, verifying that all expected measurement reports have been examined.

Reimplemented from ns3::TestCase.

Definition at line 672 of file lte-test-ue-measurements.cc.

References m_expectedRsrp, m_expectedTime, m_itExpectedRsrp, m_itExpectedTime, NS_ASSERT, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

void ns3::LteUeMeasurementsPiecewiseTestCase1::RecvMeasurementReportCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
LteRrcSap::MeasurementReport  report 
)

Triggers when eNodeB receives measurement report from UE, then perform verification on it.

The trigger is set up beforehand by connecting to the LteUeRrc::RecvMeasurementReport trace source.

Verification consists of checking whether the report carries the right value of RSRP or not, and whether it occurs at the expected time or not.

Definition at line 683 of file lte-test-ue-measurements.cc.

References ns3::Time::GetMilliSeconds(), ns3::LteRrcSap::MeasResults::haveMeasResultNeighCells, m_expectedMeasId, m_expectedRsrp, m_expectedTime, m_itExpectedRsrp, m_itExpectedTime, ns3::LteRrcSap::MeasResults::measId, ns3::LteRrcSap::MeasResults::measResultListEutra, ns3::LteRrcSap::MeasurementReport::measResults, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, ns3::EutranMeasurementMapping::RsrpRange2Dbm(), ns3::LteRrcSap::MeasResults::rsrpResult, ns3::EutranMeasurementMapping::RsrqRange2Db(), and ns3::LteRrcSap::MeasResults::rsrqResult.

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMeasurementsPiecewiseTestCase1::TeleportFar ( )
private

Definition at line 747 of file lte-test-ue-measurements.cc.

References m_ueMobility, NS_LOG_FUNCTION, and ns3::MobilityModel::SetPosition().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMeasurementsPiecewiseTestCase1::TeleportNear ( )
private

Definition at line 740 of file lte-test-ue-measurements.cc.

References m_ueMobility, NS_LOG_FUNCTION, and ns3::MobilityModel::SetPosition().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMeasurementsPiecewiseTestCase1::TeleportVeryFar ( )
private

Definition at line 754 of file lte-test-ue-measurements.cc.

References m_ueMobility, NS_LOG_FUNCTION, and ns3::MobilityModel::SetPosition().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteUeMeasurementsPiecewiseTestCase1::TeleportVeryNear ( )
private

Definition at line 733 of file lte-test-ue-measurements.cc.

References m_ueMobility, NS_LOG_FUNCTION, and ns3::MobilityModel::SetPosition().

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

LteRrcSap::ReportConfigEutra ns3::LteUeMeasurementsPiecewiseTestCase1::m_config
private

The active report triggering configuration.

Definition at line 144 of file lte-test-ue-measurements.h.

Referenced by DoRun().

uint8_t ns3::LteUeMeasurementsPiecewiseTestCase1::m_expectedMeasId
private

The measurement identity being tested.

Measurement reports with different measurement identity (e.g. from handover algorithm) will be ignored.

Definition at line 175 of file lte-test-ue-measurements.h.

Referenced by DoRun(), and RecvMeasurementReportCallback().

std::vector<uint8_t> ns3::LteUeMeasurementsPiecewiseTestCase1::m_expectedRsrp
private

The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.

Definition at line 156 of file lte-test-ue-measurements.h.

Referenced by DoTeardown(), LteUeMeasurementsPiecewiseTestCase1(), and RecvMeasurementReportCallback().

std::vector<Time> ns3::LteUeMeasurementsPiecewiseTestCase1::m_expectedTime
private

The list of expected time when measurement reports are received by eNodeB.

Definition at line 150 of file lte-test-ue-measurements.h.

Referenced by DoTeardown(), LteUeMeasurementsPiecewiseTestCase1(), and RecvMeasurementReportCallback().

std::vector<uint8_t>::iterator ns3::LteUeMeasurementsPiecewiseTestCase1::m_itExpectedRsrp
private

Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.

Definition at line 168 of file lte-test-ue-measurements.h.

Referenced by DoTeardown(), LteUeMeasurementsPiecewiseTestCase1(), and RecvMeasurementReportCallback().

std::vector<Time>::iterator ns3::LteUeMeasurementsPiecewiseTestCase1::m_itExpectedTime
private

Pointer to the element of m_expectedTime which is expected to occur next in the simulation.

Definition at line 162 of file lte-test-ue-measurements.h.

Referenced by DoTeardown(), LteUeMeasurementsPiecewiseTestCase1(), and RecvMeasurementReportCallback().

Ptr<MobilityModel> ns3::LteUeMeasurementsPiecewiseTestCase1::m_ueMobility
private

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