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. | |
~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 |
TestCase & | operator= (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... | |
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. | |
TestCase * | GetParent () 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. | |
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 54 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 234 of file lte-test-ue-measurements.cc.
References NS_LOG_INFO.
|
override |
Definition at line 252 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 257 of file lte-test-ue-measurements.cc.
References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::CreateObject(), 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().
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 371 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().
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 341 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().
|
private |
distance between UE and ENB node pair
Definition at line 106 of file lte-test-ue-measurements.h.
Referenced by DoRun().
|
private |
distance between UE and other ENB node
Definition at line 107 of file lte-test-ue-measurements.h.
Referenced by DoRun().
|
private |
RSRP in dBm UE 2.
Definition at line 109 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRP in dBm UE 1.
Definition at line 108 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRQ in dBm UE 2.
Definition at line 111 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().
|
private |
RSRQ in dBm UE 1.
Definition at line 110 of file lte-test-ue-measurements.h.
Referenced by RecvMeasurementReport(), and ReportUeMeasurements().