Testing the cell reselection procedure by UE at IDLE state. More...
#include "lte-test-radio-link-failure.h"
Inheritance diagram for LteRadioLinkFailureTestCase:
Collaboration diagram for LteRadioLinkFailureTestCase: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. | |
| ~LteRadioLinkFailureTestCase () override | |
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 | |
| std::string | BuildNameString (uint32_t numEnbs, uint32_t numUes, bool isIdealRrc) |
| Builds the test name string based on provided parameter values. | |
| void | CheckConnected (Ptr< NetDevice > ueDevice, NetDeviceContainer enbDevices) |
| Check connected function. | |
| void | CheckIdle (Ptr< NetDevice > ueDevice, NetDeviceContainer enbDevices) |
| Check if the UE is in idle state. | |
| bool | CheckUeExistAtEnb (uint16_t rnti, Ptr< NetDevice > enbDevice) |
| Check if the UE exist at the eNB. | |
| void | ConnectionEstablishedEnbCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
| Connection established at eNodeB callback function. | |
| void | ConnectionEstablishedUeCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
| Connection established at UE callback function. | |
| 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. | |
| void | DoRun () override |
| Setup the simulation according to the configuration set by the class constructor, run it, and verify the result. | |
| void | JumpAway (Vector UeJumpAwayPositionList) |
| Jump away function. | |
| 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. | |
| 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. | |
| void | UeStateTransitionCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState) |
| State transition callback function. | |
Private Attributes | |
| std::vector< Time > | m_checkConnectedList |
| the time at which UEs should have an active RRC connection | |
| std::vector< Vector > | m_enbPositionList |
| Position of the eNodeBs. | |
| bool | m_isIdealRrc |
| whether the LTE is configured to use ideal RRC | |
| LteUeRrc::State | m_lastState |
| The current UE RRC state. | |
| uint32_t | m_numEnbs |
| number of eNodeBs | |
| uint32_t | m_numOfInSyncIndications |
| number of in-sync indications detected | |
| uint32_t | m_numOfOutOfSyncIndications |
| number of out-of-sync indications detected | |
| uint32_t | m_numUes |
| number of UEs | |
| bool | m_radioLinkFailureDetected |
| true if radio link fails | |
| Time | m_simTime |
| simulation time | |
| Vector | m_ueJumpAwayPosition |
| Position where the UE(s) would jump. | |
| Ptr< MobilityModel > | m_ueMobility |
| UE mobility model. | |
| std::vector< Vector > | m_uePositionList |
| Position of the UEs. | |
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... | |
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. | |
Testing the cell reselection procedure by UE at IDLE state.
Definition at line 47 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 133 of file lte-test-radio-link-failure.cc.
References ns3::TestCase::TestCase(), BuildNameString(), ns3::TestCase::GetName(), m_checkConnectedList, m_enbPositionList, m_isIdealRrc, m_lastState, m_numEnbs, m_numOfInSyncIndications, m_numOfOutOfSyncIndications, m_numUes, m_radioLinkFailureDetected, m_simTime, m_ueJumpAwayPosition, m_uePositionList, NS_LOG_FUNCTION, and ns3::LteUeRrc::NUM_STATES.
Here is the call graph for this function:
|
override |
Definition at line 158 of file lte-test-radio-link-failure.cc.
References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.
Here is the call graph for this 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 117 of file lte-test-radio-link-failure.cc.
Referenced by LteRadioLinkFailureTestCase().
Here is the caller graph for this function:
|
private |
Check connected function.
| ueDevice | the UE device |
| enbDevices | the ENB devices |
Definition at line 439 of file lte-test-radio-link-failure.cc.
References ns3::NetDeviceContainer::Begin(), ns3::ObjectPtrContainerValue::Begin(), ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::UeManager::CONNECTED_NORMALLY, ns3::NetDeviceContainer::End(), ns3::ObjectPtrContainerValue::End(), ns3::ObjectPtrContainerValue::GetN(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_NE.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check if the UE is in idle state.
| ueDevice | the UE device |
| enbDevices | the ENB devices |
Definition at line 523 of file lte-test-radio-link-failure.cc.
References CheckUeExistAtEnb(), ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), ns3::LteUeRrc::IDLE_CELL_SEARCH, NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check if the UE exist at the eNB.
| rnti | the RNTI of the UE |
| enbDevice | the eNB device |
Definition at line 563 of file lte-test-radio-link-failure.cc.
References ns3::DynamicCast(), NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.
Referenced by CheckIdle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Connection established at eNodeB callback function.
| context | the context string |
| imsi | the IMSI |
| cellId | the cell ID |
| rnti | the RNTI |
Definition at line 586 of file lte-test-radio-link-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
Connection established at UE callback function.
| context | the context string |
| imsi | the IMSI |
| cellId | the cell ID |
| rnti | the RNTI |
Definition at line 595 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().
Here is the caller graph for this function:
|
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 610 of file lte-test-radio-link-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
Here is the caller graph for this function:
|
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 164 of file lte-test-radio-link-failure.cc.
References ns3::ApplicationContainer::Add(), ns3::Time::As(), ns3::Ipv4AddressHelper::Assign(), CheckConnected(), CheckIdle(), ns3::Config::Connect(), ConnectionEstablishedEnbCallback(), ConnectionEstablishedUeCallback(), ConnectionReleaseAtEnbCallback(), ns3::Create(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::TestCase::CreateTempDirFilename(), ns3::Simulator::Destroy(), ns3::DataRateValue::Get(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::DataRate::GetBitRate(), ns3::TestCase::GetName(), ns3::Object::GetObject(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::ApplicationHelper::Install(), ns3::PointToPointHelper::Install(), JumpAway(), ns3::EpcTft::PacketFilter::localPortEnd, ns3::EpcTft::PacketFilter::localPortStart, ns3::TypeId::LookupByName(), m_checkConnectedList, m_enbPositionList, m_isIdealRrc, m_numEnbs, m_numUes, m_radioLinkFailureDetected, m_simTime, m_ueJumpAwayPosition, m_ueMobility, m_uePositionList, ns3::MakeCallback(), ns3::EpsBearer::NGBR_IMS, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_TEST_ASSERT_MSG_EQ, packetSize, PhySyncDetectionCallback(), ns3::LteAmc::PiroEW2010, RadioLinkFailureCallback(), ns3::EpcTft::PacketFilter::remotePortEnd, ns3::EpcTft::PacketFilter::remotePortStart, ns3::Simulator::Run(), ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::ApplicationHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::TestCase::SetDataDir(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), and UeStateTransitionCallback().
Here is the call graph for this function:
|
private |
Jump away function.
| UeJumpAwayPositionList | A list of positions where UE would jump |
Definition at line 430 of file lte-test-radio-link-failure.cc.
References m_ueMobility, and NS_LOG_FUNCTION.
Referenced by DoRun().
Here is the caller graph for this function:
|
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 619 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, and NS_LOG_FUNCTION.
Referenced by DoRun().
Here is the caller graph for this function:
|
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 638 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, m_radioLinkFailureDetected, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, and NS_TEST_ASSERT_MSG_LT.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 574 of file lte-test-radio-link-failure.cc.
References m_lastState, and NS_LOG_FUNCTION.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
the time at which UEs should have an active RRC connection
Definition at line 206 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
Position of the eNodeBs.
Definition at line 204 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
whether the LTE is configured to use ideal RRC
Definition at line 202 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
The current UE RRC state.
Definition at line 210 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and UeStateTransitionCallback().
|
private |
number of eNodeBs
Definition at line 199 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
number of in-sync indications detected
Definition at line 213 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 214 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), ConnectionEstablishedUeCallback(), PhySyncDetectionCallback(), and RadioLinkFailureCallback().
|
private |
number of UEs
Definition at line 200 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
true if radio link fails
Definition at line 212 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), DoRun(), and RadioLinkFailureCallback().
|
private |
simulation time
Definition at line 201 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
Position where the UE(s) would jump.
Definition at line 207 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().
|
private |
UE mobility model.
Definition at line 215 of file lte-test-radio-link-failure.h.
Referenced by DoRun(), and JumpAway().
|
private |
Position of the UEs.
Definition at line 203 of file lte-test-radio-link-failure.h.
Referenced by LteRadioLinkFailureTestCase(), and DoRun().