A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
LteRadioLinkFailureTestCase Class Reference

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
 
TestCaseoperator= (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< Timem_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< MobilityModelm_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...
 
using instead = Duration
 
- Static Public Attributes inherited from ns3::TestCase
static constexpr auto EXTENSIVE = Duration::EXTENSIVE
 
static constexpr auto QUICK = Duration::QUICK
 
static constexpr auto 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.
 
TestCaseGetParent () 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.
 

Detailed Description

Testing the cell reselection procedure by UE at IDLE state.

Definition at line 58 of file lte-test-radio-link-failure.h.

Constructor & Destructor Documentation

◆ LteRadioLinkFailureTestCase()

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.

Parameters
numEnbsnumber of eNodeBs
numUesnumber of UEs
simTimethe simulation time
isIdealRrcif true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol
uePositionListPosition of the UEs
enbPositionListPosition of the eNodeBs
ueJumpAwayPositionVector holding the UE jump away coordinates
checkConnectedListthe 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, NS_LOG_FUNCTION, and ns3::LteUeRrc::NUM_STATES.

+ Here is the call graph for this function:

◆ ~LteRadioLinkFailureTestCase()

LteRadioLinkFailureTestCase::~LteRadioLinkFailureTestCase ( )
override

Definition at line 169 of file lte-test-radio-link-failure.cc.

References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ BuildNameString()

std::string LteRadioLinkFailureTestCase::BuildNameString ( uint32_t  numEnbs,
uint32_t  numUes,
bool  isIdealRrc 
)
private

Builds the test name string based on provided parameter values.

Parameters
numEnbsthe number of eNB nodes
numUesthe number of UE nodes
isIdealRrcTrue if the Ideal RRC protocol is used
Returns
the name string

Definition at line 128 of file lte-test-radio-link-failure.cc.

◆ CheckConnected()

void LteRadioLinkFailureTestCase::CheckConnected ( Ptr< NetDevice ueDevice,
NetDeviceContainer  enbDevices 
)
private

Check connected function.

Parameters
ueDevicethe UE device
enbDevicesthe ENB devices

Definition at line 450 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckIdle()

void LteRadioLinkFailureTestCase::CheckIdle ( Ptr< NetDevice ueDevice,
NetDeviceContainer  enbDevices 
)
private

Check if the UE is in idle state.

Parameters
ueDevicethe UE device
enbDevicesthe ENB devices

Definition at line 534 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:

◆ CheckUeExistAtEnb()

bool LteRadioLinkFailureTestCase::CheckUeExistAtEnb ( uint16_t  rnti,
Ptr< NetDevice enbDevice 
)
private

Check if the UE exist at the eNB.

Parameters
rntithe RNTI of the UE
enbDevicethe eNB device
Returns
true if the UE exist at the eNB, otherwise false

Definition at line 574 of file lte-test-radio-link-failure.cc.

References NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

Referenced by CheckIdle().

+ Here is the caller graph for this function:

◆ ConnectionEstablishedEnbCallback()

void LteRadioLinkFailureTestCase::ConnectionEstablishedEnbCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

Connection established at eNodeB callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI

Definition at line 597 of file lte-test-radio-link-failure.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ ConnectionEstablishedUeCallback()

void LteRadioLinkFailureTestCase::ConnectionEstablishedUeCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

Connection established at UE callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe 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().

+ Here is the caller graph for this function:

◆ ConnectionReleaseAtEnbCallback()

void LteRadioLinkFailureTestCase::ConnectionReleaseAtEnbCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

This callback function is executed when UE context is removed at eNodeB.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI

Definition at line 621 of file lte-test-radio-link-failure.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void LteRadioLinkFailureTestCase::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::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::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::Config::SetDefault(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), and UeStateTransitionCallback().

+ Here is the call graph for this function:

◆ JumpAway()

void LteRadioLinkFailureTestCase::JumpAway ( Vector  UeJumpAwayPositionList)
private

Jump away function.

Parameters
UeJumpAwayPositionListA 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PhySyncDetectionCallback()

void LteRadioLinkFailureTestCase::PhySyncDetectionCallback ( std::string  context,
uint64_t  imsi,
uint16_t  rnti,
uint16_t  cellId,
std::string  type,
uint8_t  count 
)
private

This callback function is executed when UE RRC receives an in-sync or out-of-sync indication.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
cellIdthe cell ID
typein-sync or out-of-sync indication
countthe 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, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ RadioLinkFailureCallback()

void LteRadioLinkFailureTestCase::RadioLinkFailureCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti 
)
private

This callback function is executed when radio link failure is detected.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
cellIdthe cell ID

Definition at line 649 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:

◆ UeStateTransitionCallback()

void LteRadioLinkFailureTestCase::UeStateTransitionCallback ( std::string  context,
uint64_t  imsi,
uint16_t  cellId,
uint16_t  rnti,
LteUeRrc::State  oldState,
LteUeRrc::State  newState 
)
private

State transition callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI
oldStatethe old state
newStatethe new state

Definition at line 585 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:

Member Data Documentation

◆ m_checkConnectedList

std::vector<Time> LteRadioLinkFailureTestCase::m_checkConnectedList
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().

◆ m_enbPositionList

std::vector<Vector> LteRadioLinkFailureTestCase::m_enbPositionList
private

Position of the eNodeBs.

Definition at line 215 of file lte-test-radio-link-failure.h.

Referenced by DoRun().

◆ m_isIdealRrc

bool LteRadioLinkFailureTestCase::m_isIdealRrc
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().

◆ m_lastState

LteUeRrc::State LteRadioLinkFailureTestCase::m_lastState
private

The current UE RRC state.

Definition at line 221 of file lte-test-radio-link-failure.h.

Referenced by LteRadioLinkFailureTestCase(), and UeStateTransitionCallback().

◆ m_numEnbs

uint32_t LteRadioLinkFailureTestCase::m_numEnbs
private

number of eNodeBs

Definition at line 210 of file lte-test-radio-link-failure.h.

Referenced by DoRun().

◆ m_numOfInSyncIndications

uint32_t LteRadioLinkFailureTestCase::m_numOfInSyncIndications
private

◆ m_numOfOutOfSyncIndications

uint32_t LteRadioLinkFailureTestCase::m_numOfOutOfSyncIndications
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().

◆ m_numUes

uint32_t LteRadioLinkFailureTestCase::m_numUes
private

number of UEs

Definition at line 211 of file lte-test-radio-link-failure.h.

Referenced by DoRun().

◆ m_radioLinkFailureDetected

bool LteRadioLinkFailureTestCase::m_radioLinkFailureDetected
private

true if radio link fails

Definition at line 223 of file lte-test-radio-link-failure.h.

Referenced by LteRadioLinkFailureTestCase(), DoRun(), and RadioLinkFailureCallback().

◆ m_simTime

Time LteRadioLinkFailureTestCase::m_simTime
private

simulation time

Definition at line 212 of file lte-test-radio-link-failure.h.

Referenced by DoRun().

◆ m_ueJumpAwayPosition

Vector LteRadioLinkFailureTestCase::m_ueJumpAwayPosition
private

Position where the UE(s) would jump.

Definition at line 218 of file lte-test-radio-link-failure.h.

Referenced by DoRun().

◆ m_ueMobility

Ptr<MobilityModel> LteRadioLinkFailureTestCase::m_ueMobility
private

UE mobility model.

Definition at line 226 of file lte-test-radio-link-failure.h.

Referenced by DoRun(), and JumpAway().

◆ m_uePositionList

std::vector<Vector> LteRadioLinkFailureTestCase::m_uePositionList
private

Position of the UEs.

Definition at line 214 of file lte-test-radio-link-failure.h.

Referenced by DoRun().


The documentation for this class was generated from the following files: