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. | |
~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 | 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. | |
void | AddTestCase (TestCase *testCase, TestDuration 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 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 145 of file lte-test-radio-link-failure.cc.
References ns3::TestCase::GetName(), m_lastState, m_numOfInSyncIndications, m_numOfOutOfSyncIndications, m_radioLinkFailureDetected, NS_LOG_FUNCTION, and ns3::LteUeRrc::NUM_STATES.
|
override |
Definition at line 170 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 129 of file lte-test-radio-link-failure.cc.
|
private |
Check connected function.
ueDevice | the UE device |
enbDevices | the ENB devices |
Definition at line 455 of file lte-test-radio-link-failure.cc.
References ns3::ObjectPtrContainerValue::Begin(), ns3::NetDeviceContainer::Begin(), ns3::UeManager::CONNECTED_NORMALLY, ns3::LteUeRrc::CONNECTED_NORMALLY, ns3::ObjectPtrContainerValue::End(), ns3::NetDeviceContainer::End(), ns3::ObjectPtrContainerValue::GetN(), 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 541 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().
|
private |
Check if the UE exist at the eNB.
rnti | the RNTI of the UE |
enbDevice | the eNB device |
Definition at line 581 of file lte-test-radio-link-failure.cc.
References 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 604 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 613 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 628 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 176 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::NodeContainer::Create(), ns3::TestCase::CreateTempDirFilename(), ns3::Simulator::Destroy(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Ipv4Address::GetAny(), ns3::TestCase::GetName(), ns3::Object::GetObject(), ns3::Ipv4StaticRoutingHelper::GetStaticRouting(), ns3::UdpClientHelper::Install(), ns3::PointToPointHelper::Install(), ns3::PacketSinkHelper::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::UdpClientHelper::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), and UeStateTransitionCallback().
|
private |
Jump away function.
UeJumpAwayPositionList | A list of positions where UE would jump |
Definition at line 446 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 637 of file lte-test-radio-link-failure.cc.
References m_numOfInSyncIndications, m_numOfOutOfSyncIndications, and NS_LOG_FUNCTION.
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 656 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().
|
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 592 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().