Testing the cell reselection procedure by UE at IDLE state. More...
#include "lte-test-radio-link-failure.h"
Public Member Functions | |
LteRadioLinkFailureTestCase (uint32_t numEnbs, uint32_t numUes, Time simTime, bool isIdealRrc, std::vector< Vector > uePositionList, std::vector< Vector > enbPositionList, Vector ueJumpAwayPosition, std::vector< Time > checkConnectedList) | |
Creates an instance of the radio link failure test case. More... | |
~LteRadioLinkFailureTestCase () override | |
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 | |
std::string | BuildNameString (uint32_t numEnbs, uint32_t numUes, bool isIdealRrc) |
Builds the test name string based on provided parameter values. More... | |
void | CheckConnected (Ptr< NetDevice > ueDevice, NetDeviceContainer enbDevices) |
Check connected function. More... | |
void | CheckIdle (Ptr< NetDevice > ueDevice, NetDeviceContainer enbDevices) |
Check if the UE is in idle state. More... | |
bool | CheckUeExistAtEnb (uint16_t rnti, Ptr< NetDevice > enbDevice) |
Check if the UE exist at the eNB. More... | |
void | ConnectionEstablishedEnbCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
Connection established at eNodeB callback function. More... | |
void | ConnectionEstablishedUeCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
Connection established at UE callback function. More... | |
void | ConnectionReleaseAtEnbCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
This callback function is executed when UE context is removed at eNodeB. More... | |
void | DoRun () override |
Setup the simulation according to the configuration set by the class constructor, run it, and verify the result. More... | |
void | JumpAway (Vector UeJumpAwayPositionList) |
Jump away function. More... | |
void | PhySyncDetectionCallback (std::string context, uint64_t imsi, uint16_t rnti, uint16_t cellId, std::string type, uint8_t count) |
This callback function is executed when UE RRC receives an in-sync or out-of-sync indication. More... | |
void | RadioLinkFailureCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
This callback function is executed when radio link failure is detected. More... | |
void | UeStateTransitionCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState) |
State transition callback function. More... | |
Private Attributes | |
std::vector< Time > | m_checkConnectedList |
the time at which UEs should have an active RRC connection More... | |
std::vector< Vector > | m_enbPositionList |
Position of the eNodeBs. More... | |
bool | m_isIdealRrc |
whether the LTE is configured to use ideal RRC More... | |
LteUeRrc::State | m_lastState |
The current UE RRC state. More... | |
uint32_t | m_numEnbs |
number of eNodeBs More... | |
uint32_t | m_numOfInSyncIndications |
number of in-sync indications detected More... | |
uint32_t | m_numOfOutOfSyncIndications |
number of out-of-sync indications detected More... | |
uint32_t | m_numUes |
number of UEs More... | |
bool | m_radioLinkFailureDetected |
true if radio link fails More... | |
Time | m_simTime |
simulation time More... | |
Vector | m_ueJumpAwayPosition |
Position where the UE(s) would jump. More... | |
Ptr< MobilityModel > | m_ueMobility |
UE mobility model. More... | |
std::vector< Vector > | m_uePositionList |
Position of the UEs. 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... | |
Testing the cell reselection procedure by UE at IDLE state.
Definition at line 58 of file lte-test-radio-link-failure.h.
LteRadioLinkFailureTestCase::LteRadioLinkFailureTestCase | ( | uint32_t | numEnbs, |
uint32_t | numUes, | ||
Time | simTime, | ||
bool | isIdealRrc, | ||
std::vector< Vector > | uePositionList, | ||
std::vector< Vector > | enbPositionList, | ||
Vector | ueJumpAwayPosition, | ||
std::vector< Time > | checkConnectedList | ||
) |
Creates an instance of the radio link failure test case.
numEnbs | number of eNodeBs |
numUes | number of UEs |
simTime | the simulation time |
isIdealRrc | if true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol |
uePositionList | Position of the UEs |
enbPositionList | Position of the eNodeBs |
ueJumpAwayPosition | Vector holding the UE jump away coordinates |
checkConnectedList | the time at which UEs should have an active RRC connection |
Definition at line 144 of file lte-test-radio-link-failure.cc.
References ns3::TestCase::GetName(), m_lastState, m_numOfInSyncIndications, m_numOfOutOfSyncIndications, m_radioLinkFailureDetected, and NS_LOG_FUNCTION.
|
override |
Definition at line 169 of file lte-test-radio-link-failure.cc.
References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.
|
private |
Builds the test name string based on provided parameter values.
numEnbs | the number of eNB nodes |
numUes | the number of UE nodes |
isIdealRrc | True if the Ideal RRC protocol is used |
Definition at line 128 of file lte-test-radio-link-failure.cc.
|
private |
Check connected function.
ueDevice | the UE device |
enbDevices | the ENB devices |
Definition at line 450 of file lte-test-radio-link-failure.cc.
References ns3::ObjectPtrContainerValue::Begin(), ns3::NetDeviceContainer::Begin(), ns3::ObjectPtrContainerValue::End(), ns3::NetDeviceContainer::End(), ns3::LteEnbNetDevice::GetCellId(), ns3::LteEnbNetDevice::GetDlBandwidth(), ns3::LteEnbNetDevice::GetDlEarfcn(), ns3::ObjectPtrContainerValue::GetN(), ns3::Object::GetObject(), ns3::LteEnbNetDevice::GetRrc(), ns3::LteEnbNetDevice::GetUlBandwidth(), ns3::LteEnbNetDevice::GetUlEarfcn(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_NE.
Referenced by DoRun().
|
private |
Check if the UE is in idle state.
ueDevice | the UE device |
enbDevices | the ENB devices |
Definition at line 534 of file lte-test-radio-link-failure.cc.
References CheckUeExistAtEnb(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
private |
Check if the UE exist at the eNB.
rnti | the RNTI of the UE |
enbDevice | the eNB device |
Definition at line 574 of file lte-test-radio-link-failure.cc.
References ns3::LteEnbNetDevice::GetRrc(), NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.
Referenced by CheckIdle().
|
private |
Connection established at eNodeB callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
Definition at line 597 of file lte-test-radio-link-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
Connection established at UE callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
Definition at line 606 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
|
private |
This callback function is executed when UE context is removed at eNodeB.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
Definition at line 621 of file lte-test-radio-link-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
overrideprivatevirtual |
Setup the simulation according to the configuration set by the class constructor, run it, and verify the result.
Implements ns3::TestCase.
Definition at line 175 of file lte-test-radio-link-failure.cc.
References ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::ApplicationContainer::Add(), ns3::Time::As(), ns3::Ipv4AddressHelper::Assign(), ns3::LteHelper::AssignStreams(), ns3::NoBackhaulEpcHelper::AssignUeIpv4Address(), ns3::LteHelper::Attach(), CheckConnected(), CheckIdle(), ns3::Config::Connect(), ConnectionEstablishedEnbCallback(), ConnectionEstablishedUeCallback(), ConnectionReleaseAtEnbCallback(), ns3::NodeContainer::Create(), ns3::TestCase::CreateTempDirFilename(), ns3::LteHelper::EnableTraces(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::TestCase::GetName(), ns3::Object::GetObject(), ns3::NoBackhaulEpcHelper::GetPgwNode(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress(), ns3::UdpClientHelper::Install(), ns3::PointToPointHelper::Install(), ns3::PacketSinkHelper::Install(), ns3::LteHelper::InstallEnbDevice(), ns3::LteHelper::InstallUeDevice(), nsclick-simple-lan::internet, JumpAway(), ns3::EpcTft::PacketFilter::localPortEnd, ns3::EpcTft::PacketFilter::localPortStart, m_checkConnectedList, m_enbPositionList, m_isIdealRrc, m_numEnbs, m_numUes, m_radioLinkFailureDetected, m_simTime, m_ueJumpAwayPosition, m_ueMobility, m_uePositionList, ns3::MakeCallback(), third::mobility, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_TEST_ASSERT_MSG_EQ, packetSize, PhySyncDetectionCallback(), RadioLinkFailureCallback(), ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Seconds(), ns3::UdpClientHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::LteHelper::SetEnbDeviceAttribute(), ns3::LteHelper::SetEpcHelper(), ns3::LteHelper::SetPathlossModelAttribute(), ns3::LteHelper::SetPathlossModelType(), ns3::LteHelper::SetSchedulerType(), ns3::ApplicationContainer::Start(), and UeStateTransitionCallback().
|
private |
Jump away function.
UeJumpAwayPositionList | A list of positions where UE would jump |
Definition at line 441 of file lte-test-radio-link-failure.cc.
References m_ueMobility, NS_LOG_FUNCTION, and ns3::MobilityModel::SetPosition().
Referenced by DoRun().
|
private |
This callback function is executed when UE RRC receives an in-sync or out-of-sync indication.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
cellId | the cell ID |
type | in-sync or out-of-sync indication |
count | the number of in-sync or out-of-sync indications |
Definition at line 630 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, NS_LOG_FUNCTION, and check-style-clang-format::type.
Referenced by DoRun().
|
private |
This callback function is executed when radio link failure is detected.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
cellId | the cell ID |
Definition at line 649 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, m_radioLinkFailureDetected, ns3::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_LT.
Referenced by DoRun().
|
private |
State transition callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
oldState | the old state |
newState | the new state |
Definition at line 585 of file lte-test-radio-link-failure.cc.
References m_lastState, and NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
the time at which UEs should have an active RRC connection
Definition at line 217 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
Position of the eNodeBs.
Definition at line 215 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
whether the LTE is configured to use ideal RRC
Definition at line 213 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
The current UE RRC state.
Definition at line 221 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and UeStateTransitionCallback().
|
private |
number of eNodeBs
Definition at line 210 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
number of in-sync indications detected
Definition at line 224 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), ConnectionEstablishedUeCallback(), PhySyncDetectionCallback(), and RadioLinkFailureCallback().
|
private |
number of out-of-sync indications detected
Definition at line 225 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), ConnectionEstablishedUeCallback(), PhySyncDetectionCallback(), and RadioLinkFailureCallback().
|
private |
|
private |
true if radio link fails
Definition at line 223 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), DoRun(), and RadioLinkFailureCallback().
|
private |
simulation time
Definition at line 212 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
Position where the UE(s) would jump.
Definition at line 218 of file lte-test-radio-link-failure.h.
Referenced by DoRun().
|
private |
UE mobility model.
Definition at line 226 of file lte-test-radio-link-failure.h.
Referenced by DoRun(), and JumpAway().
|
private |
Position of the UEs.
Definition at line 214 of file lte-test-radio-link-failure.h.
Referenced by DoRun().