A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~LteUeMeasurementsTestCase () override
 
void RecvMeasurementReport (uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
 Reeive measurement report function.
 
void ReportUeMeasurements (uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
 Report UE measurements function.
 
- 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 DoRun () override
 Implementation to actually run this TestCase.
 

Private Attributes

double m_d1
 distance between UE and ENB node pair
 
double m_d2
 distance between UE and other ENB node
 
double m_rsrpDbmUeNeighborCell
 RSRP in dBm UE 2.
 
double m_rsrpDbmUeServingCell
 RSRP in dBm UE 1.
 
double m_rsrqDbUeNeighborCell
 RSRQ in dBm UE 2.
 
double m_rsrqDbUeServingCell
 RSRQ in dBm UE 1.
 

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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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 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 65 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 245 of file lte-test-ue-measurements.cc.

References NS_LOG_INFO.

◆ ~LteUeMeasurementsTestCase()

LteUeMeasurementsTestCase::~LteUeMeasurementsTestCase ( )
override

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

Member Function Documentation

◆ DoRun()

void LteUeMeasurementsTestCase::DoRun ( )
overrideprivatevirtual

Implementation to actually run this TestCase.

Subclasses should override this method to conduct their tests.

Implements ns3::TestCase.

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

References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), ns3::EpsBearer::GBR_CONV_VOICE, ns3::NetDeviceContainer::Get(), ns3::TestCase::GetName(), m_d1, m_d2, ns3::MakeBoundCallback(), NS_LOG_INFO, ns3::LteAmc::PiroEW2010, ns3::FfMacScheduler::PUSCH_UL_CQI, RecvMeasurementReportCallback(), ReportUeMeasurementsCallback(), ns3::Simulator::Run(), ns3::Seconds(), ns3::Config::SetDefault(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ 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 382 of file lte-test-ue-measurements.cc.

References ns3::EutranMeasurementMapping::Db2RsrqRange(), ns3::EutranMeasurementMapping::Dbm2RsrpRange(), m_rsrpDbmUeNeighborCell, m_rsrpDbmUeServingCell, m_rsrqDbUeNeighborCell, m_rsrqDbUeServingCell, ns3::LteRrcSap::MeasResults::measResultPCell, ns3::LteRrcSap::MeasurementReport::measResults, ns3::MilliSeconds(), ns3::Simulator::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 352 of file lte-test-ue-measurements.cc.

References m_rsrpDbmUeNeighborCell, m_rsrpDbmUeServingCell, m_rsrqDbUeNeighborCell, m_rsrqDbUeServingCell, ns3::MilliSeconds(), ns3::Simulator::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 117 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 118 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 120 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 119 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 122 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 121 of file lte-test-ue-measurements.h.

Referenced by RecvMeasurementReport(), and ReportUeMeasurements().


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