Test that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs. More...
#include "lte-test-ue-measurements.h"
Public Member Functions | |
LteUeMeasurementsTestCase (std::string name, double d1, double d2, double rsrpDbmUe1, double rsrpDbmUe2, double rsrqDbUe1, double rsrqDbUe2) | |
Constructor. More... | |
~LteUeMeasurementsTestCase () override | |
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 () const |
TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
void | DoRun () override |
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... | |
TestCase * | GetParent () const |
Get the parent of this TestCase. More... | |
bool | IsStatusFailure () const |
Check if any tests failed. More... | |
bool | IsStatusSuccess () 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 () const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure () 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... | |
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.
LteUeMeasurementsTestCase::LteUeMeasurementsTestCase | ( | std::string | name, |
double | d1, | ||
double | d2, | ||
double | rsrpDbmUe1, | ||
double | rsrpDbmUe2, | ||
double | rsrqDbUe1, | ||
double | rsrqDbUe2 | ||
) |
Constructor.
name | the reference name |
d1 | distance between UE and ENB node pair |
d2 | distance between UE and other ENB node |
rsrpDbmUe1 | RSRP in dBm UE 1 |
rsrpDbmUe2 | RSRP in dBm UE 2 |
rsrqDbUe1 | RSRQ in dBm UE 1 |
rsrqDbUe2 | RSRQ in dBm UE 2 |
Definition at line 245 of file lte-test-ue-measurements.cc.
References NS_LOG_INFO.
|
override |
Definition at line 263 of file lte-test-ue-measurements.cc.
|
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::LteHelper::ActivateDataRadioBearer(), ns3::LteHelper::Attach(), ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), ns3::TestCase::GetName(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), m_d1, m_d2, ns3::MakeBoundCallback(), third::mobility, NS_LOG_INFO, RecvMeasurementReportCallback(), ReportUeMeasurementsCallback(), ns3::Seconds(), ns3::ObjectBase::SetAttribute(), ns3::Config::SetDefault(), ns3::LteHelper::SetSchedulerAttribute(), and ns3::LteHelper::SetSchedulerType().
void LteUeMeasurementsTestCase::RecvMeasurementReport | ( | uint64_t | imsi, |
uint16_t | cellId, | ||
uint16_t | rnti, | ||
LteRrcSap::MeasurementReport | meas | ||
) |
Reeive measurement report function.
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
meas | LteRrcSap::MeasurementReport |
Definition at line 382 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().
void LteUeMeasurementsTestCase::ReportUeMeasurements | ( | uint16_t | rnti, |
uint16_t | cellId, | ||
double | rsrp, | ||
double | rsrq, | ||
bool | servingCell | ||
) |
Report UE measurements function.
rnti | the RNTI |
cellId | the cell ID |
rsrp | the RSRP |
rsrq | the RSRQ |
servingCell | the 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::Now(), NS_LOG_DEBUG, and NS_TEST_ASSERT_MSG_EQ_TOL.
Referenced by ReportUeMeasurementsCallback().
|
private |
distance between UE and ENB node pair
Definition at line 117 of file lte-test-ue-measurements.h.
Referenced by DoRun().
|
private |
distance between UE and other ENB node
Definition at line 118 of file lte-test-ue-measurements.h.
Referenced by DoRun().
|
private |
RSRP in dBm UE 2.
Definition at line 120 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRP in dBm UE 1.
Definition at line 119 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRQ in dBm UE 2.
Definition at line 122 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRQ in dBm UE 1.
Definition at line 121 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().