A Discrete-Event Network Simulator
API
LteUeMeasurementsTestCase Class Reference

Test that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs. More...

#include "lte-test-ue-measurements.h"

+ Inheritance diagram for LteUeMeasurementsTestCase:
+ Collaboration diagram for LteUeMeasurementsTestCase:

Public Member Functions

 LteUeMeasurementsTestCase (std::string name, double d1, double d2, double rsrpDbmUe1, double rsrpDbmUe2, double rsrqDbUe1, double rsrqDbUe2)
 Constructor. More...
 
virtual ~LteUeMeasurementsTestCase ()
 
void RecvMeasurementReport (uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
 Reeive measurement report function. More...
 
void ReportUeMeasurements (uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
 Report UE measurements function. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
std::string GetName (void) const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

virtual void DoRun (void)
 Implementation to actually run this TestCase. More...
 

Private Attributes

double m_d1
 distance between UE and ENB node pair More...
 
double m_d2
 distance between UE and other ENB node More...
 
double m_rsrpDbmUeNeighborCell
 RSRP in dBm UE 2. More...
 
double m_rsrpDbmUeServingCell
 RSRP in dBm UE 1. More...
 
double m_rsrqDbUeNeighborCell
 RSRQ in dBm UE 2. More...
 
double m_rsrqDbUeServingCell
 RSRQ in dBm UE 1. 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 that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs.

Test that RSRP and RSRQ of the serving cell and of the neighbor cell correspond to the reference values.

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

Constructor & Destructor Documentation

◆ LteUeMeasurementsTestCase()

LteUeMeasurementsTestCase::LteUeMeasurementsTestCase ( std::string  name,
double  d1,
double  d2,
double  rsrpDbmUe1,
double  rsrpDbmUe2,
double  rsrqDbUe1,
double  rsrqDbUe2 
)

Constructor.

Parameters
namethe reference name
d1distance between UE and ENB node pair
d2distance between UE and other ENB node
rsrpDbmUe1RSRP in dBm UE 1
rsrpDbmUe2RSRP in dBm UE 2
rsrqDbUe1RSRQ in dBm UE 1
rsrqDbUe2RSRQ in dBm UE 2

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

References NS_LOG_INFO.

◆ ~LteUeMeasurementsTestCase()

LteUeMeasurementsTestCase::~LteUeMeasurementsTestCase ( )
virtual

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

Member Function Documentation

◆ DoRun()

◆ RecvMeasurementReport()

void LteUeMeasurementsTestCase::RecvMeasurementReport ( uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
LteRrcSap::MeasurementReport  meas 
)

Reeive measurement report function.

Parameters
imsithe IMSI
cellIdthe cell ID
rntithe RNTI
measLteRrcSap::MeasurementReport

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

References m_rsrpDbmUeNeighborCell, m_rsrpDbmUeServingCell, m_rsrqDbUeNeighborCell, m_rsrqDbUeServingCell, ns3::LteRrcSap::MeasResults::measResultPCell, ns3::LteRrcSap::MeasurementReport::measResults, ns3::MilliSeconds(), ns3::Now(), NS_LOG_DEBUG, NS_TEST_ASSERT_MSG_EQ, ns3::LteRrcSap::MeasResultPCell::rsrpResult, and ns3::LteRrcSap::MeasResultPCell::rsrqResult.

Referenced by RecvMeasurementReportCallback().

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

◆ ReportUeMeasurements()

void LteUeMeasurementsTestCase::ReportUeMeasurements ( uint16_t  rnti,
uint16_t  cellId,
double  rsrp,
double  rsrq,
bool  servingCell 
)

Report UE measurements function.

Parameters
rntithe RNTI
cellIdthe cell ID
rsrpthe RSRP
rsrqthe RSRQ
servingCellthe serving cell

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

References m_rsrpDbmUeNeighborCell, m_rsrpDbmUeServingCell, m_rsrqDbUeNeighborCell, m_rsrqDbUeServingCell, ns3::MilliSeconds(), ns3::Now(), NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ_TOL.

Referenced by ReportUeMeasurementsCallback().

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

Member Data Documentation

◆ m_d1

double LteUeMeasurementsTestCase::m_d1
private

distance between UE and ENB node pair

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

Referenced by DoRun().

◆ m_d2

double LteUeMeasurementsTestCase::m_d2
private

distance between UE and other ENB node

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

Referenced by DoRun().

◆ m_rsrpDbmUeNeighborCell

double LteUeMeasurementsTestCase::m_rsrpDbmUeNeighborCell
private

RSRP in dBm UE 2.

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

Referenced by RecvMeasurementReport(), and ReportUeMeasurements().

◆ m_rsrpDbmUeServingCell

double LteUeMeasurementsTestCase::m_rsrpDbmUeServingCell
private

RSRP in dBm UE 1.

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

Referenced by RecvMeasurementReport(), and ReportUeMeasurements().

◆ m_rsrqDbUeNeighborCell

double LteUeMeasurementsTestCase::m_rsrqDbUeNeighborCell
private

RSRQ in dBm UE 2.

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

Referenced by RecvMeasurementReport(), and ReportUeMeasurements().

◆ m_rsrqDbUeServingCell

double LteUeMeasurementsTestCase::m_rsrqDbUeServingCell
private

RSRQ in dBm UE 1.

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

Referenced by RecvMeasurementReport(), and ReportUeMeasurements().


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