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

Verifying that a handover failure occurs due to various causes. More...

+ Inheritance diagram for LteHandoverFailureTestCase:
+ Collaboration diagram for LteHandoverFailureTestCase:

Public Member Functions

 LteHandoverFailureTestCase (std::string name, bool useIdealRrc, Time handoverTime, Time simulationDuration, uint8_t numberOfRaPreambles, uint8_t preambleTransMax, uint8_t raResponseWindowSize, Time handoverJoiningTimeout, Time handoverLeavingTimeout, uint16_t targeteNodeBPosition)
 Constructor.
 
- 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

void DoRun () override
 Run a simulation of a two eNodeB network using the parameters provided to the constructor function.
 
void DoTeardown () override
 Called at the end of simulation and verifies that a handover and a handover failure has occurred in the simulation.
 
void HandoverFailureJoining (std::string context, uint64_t imsi, uint16_t rnti, uint16_t targetCellId)
 Handover failure callback due to handover joining timeout at target eNodeB.
 
void HandoverFailureLeaving (std::string context, uint64_t imsi, uint16_t rnti, uint16_t targetCellId)
 Handover failure callback due to handover leaving timeout at source eNodeB.
 
void HandoverFailureMaxRach (std::string context, uint64_t imsi, uint16_t rnti, uint16_t targetCellId)
 Handover failure callback due to maximum RACH transmissions reached from UE to target eNodeB.
 
void HandoverFailureNoPreamble (std::string context, uint64_t imsi, uint16_t rnti, uint16_t targetCellId)
 Handover failure callback due to non-allocation of non-contention preamble at target eNodeB.
 
void UeHandoverStartCallback (std::string context, uint64_t imsi, uint16_t sourceCellId, uint16_t rnti, uint16_t targetCellId)
 UE handover start callback function to indicate start of handover.
 

Private Attributes

Time m_handoverJoiningTimeout
 handover joining timeout duration at target eNodeB
 
Time m_handoverLeavingTimeout
 handover leaving timeout duration at source eNodeB
 
Time m_handoverTime
 handover time
 
bool m_hasHandoverFailureOccurred
 has handover failure occurred in simulation
 
uint8_t m_numberOfRaPreambles
 number of random access preambles for contention based RACH process
 
uint8_t m_preambleTransMax
 max number of RACH preambles possible from UE to eNodeB
 
uint8_t m_raResponseWindowSize
 window length for reception of RAR
 
Time m_simulationDuration
 the simulation duration
 
uint16_t m_targeteNodeBPosition
 position of the target eNodeB
 
bool m_useIdealRrc
 use ideal RRC?
 

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.
 
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

Verifying that a handover failure occurs due to various causes.

Handover failure cases dealt with in this test include the below.

  1. Handover failure due to max random access channel (RACH) attempts from UE to target eNodeB
  2. Handover failure due to non-allocation of non-contention preamble to UE at target eNodeB
  3. Handover failure due to HANDOVER JOINING timeout (3 cases)
  4. Handover failure due to HANDOVER LEAVING timeout (3 cases)
See also
ns3::LteHandoverFailureTestCase

Definition at line 51 of file test-lte-handover-failure.cc.

Constructor & Destructor Documentation

◆ LteHandoverFailureTestCase()

LteHandoverFailureTestCase::LteHandoverFailureTestCase ( std::string name,
bool useIdealRrc,
Time handoverTime,
Time simulationDuration,
uint8_t numberOfRaPreambles,
uint8_t preambleTransMax,
uint8_t raResponseWindowSize,
Time handoverJoiningTimeout,
Time handoverLeavingTimeout,
uint16_t targeteNodeBPosition )
inline

Constructor.

Parameters
namethe name of the test case, to be displayed in the test result
useIdealRrcif true, use the ideal RRC
handoverTimethe time of handover
simulationDurationduration of the simulation
numberOfRaPreamblesnumber of random access preambles available for contention based RACH process number of non-contention preambles available for handover = (64 - numberRaPreambles) as numberOfRaPreambles out of the max 64 are reserved contention based RACH process
preambleTransMaxmaximum number of random access preamble transmissions from UE to eNodeB
raResponseWindowSizewindow length for reception of random access response (RAR)
handoverJoiningTimeouttime before which RRC RECONFIGURATION COMPLETE must be received at target eNodeB after it receives a handover request Else, the UE context is destroyed in the RRC. Timeout can occur before different stages as below. i. Reception of RRC CONNECTION RECONFIGURATION at source eNodeB ii. Non-contention random access procedure from UE to target eNodeB iii. Reception of RRC CONNECTION RECONFIGURATION COMPLETE at target eNodeB
handoverLeavingTimeouttime before which source eNodeB must receive a UE context release from target eNodeB or RRC CONNECTION RESTABLISHMENT from UE after issuing a handover request Else, the UE context is destroyed in the RRC. Timeout can occur before any of the cases in HANDOVER JOINING TIMEOUT
targeteNodeBPositionposition of the target eNodeB

Definition at line 83 of file test-lte-handover-failure.cc.

Member Function Documentation

◆ DoRun()

◆ DoTeardown()

void LteHandoverFailureTestCase::DoTeardown ( )
overrideprivatevirtual

Called at the end of simulation and verifies that a handover and a handover failure has occurred in the simulation.

Reimplemented from ns3::TestCase.

Definition at line 352 of file test-lte-handover-failure.cc.

References m_hasHandoverFailureOccurred, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.

◆ HandoverFailureJoining()

void LteHandoverFailureTestCase::HandoverFailureJoining ( std::string context,
uint64_t imsi,
uint16_t rnti,
uint16_t targetCellId )
private

Handover failure callback due to handover joining timeout at target eNodeB.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
targetCellIdthe target cell ID

Definition at line 332 of file test-lte-handover-failure.cc.

References m_hasHandoverFailureOccurred, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ HandoverFailureLeaving()

void LteHandoverFailureTestCase::HandoverFailureLeaving ( std::string context,
uint64_t imsi,
uint16_t rnti,
uint16_t targetCellId )
private

Handover failure callback due to handover leaving timeout at source eNodeB.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
targetCellIdthe target cell ID

Definition at line 342 of file test-lte-handover-failure.cc.

References m_hasHandoverFailureOccurred, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ HandoverFailureMaxRach()

void LteHandoverFailureTestCase::HandoverFailureMaxRach ( std::string context,
uint64_t imsi,
uint16_t rnti,
uint16_t targetCellId )
private

Handover failure callback due to maximum RACH transmissions reached from UE to target eNodeB.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
targetCellIdthe target cell ID

Definition at line 312 of file test-lte-handover-failure.cc.

References m_hasHandoverFailureOccurred, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ HandoverFailureNoPreamble()

void LteHandoverFailureTestCase::HandoverFailureNoPreamble ( std::string context,
uint64_t imsi,
uint16_t rnti,
uint16_t targetCellId )
private

Handover failure callback due to non-allocation of non-contention preamble at target eNodeB.

Parameters
contextthe context string
imsithe IMSI
rntithe RNTI
targetCellIdthe target cell ID

Definition at line 322 of file test-lte-handover-failure.cc.

References m_hasHandoverFailureOccurred, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ UeHandoverStartCallback()

void LteHandoverFailureTestCase::UeHandoverStartCallback ( std::string context,
uint64_t imsi,
uint16_t sourceCellId,
uint16_t rnti,
uint16_t targetCellId )
private

UE handover start callback function to indicate start of handover.

Parameters
contextthe context string
imsithe IMSI
sourceCellIdthe source cell ID
rntithe RNTI
targetCellIdthe target cell ID

Definition at line 299 of file test-lte-handover-failure.cc.

References NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_handoverJoiningTimeout

Time LteHandoverFailureTestCase::m_handoverJoiningTimeout
private

handover joining timeout duration at target eNodeB

Definition at line 189 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_handoverLeavingTimeout

Time LteHandoverFailureTestCase::m_handoverLeavingTimeout
private

handover leaving timeout duration at source eNodeB

Definition at line 190 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_handoverTime

Time LteHandoverFailureTestCase::m_handoverTime
private

handover time

Definition at line 183 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_hasHandoverFailureOccurred

bool LteHandoverFailureTestCase::m_hasHandoverFailureOccurred
private

has handover failure occurred in simulation

Definition at line 192 of file test-lte-handover-failure.cc.

Referenced by DoTeardown(), HandoverFailureJoining(), HandoverFailureLeaving(), HandoverFailureMaxRach(), and HandoverFailureNoPreamble().

◆ m_numberOfRaPreambles

uint8_t LteHandoverFailureTestCase::m_numberOfRaPreambles
private

number of random access preambles for contention based RACH process

Definition at line 185 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_preambleTransMax

uint8_t LteHandoverFailureTestCase::m_preambleTransMax
private

max number of RACH preambles possible from UE to eNodeB

Definition at line 187 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_raResponseWindowSize

uint8_t LteHandoverFailureTestCase::m_raResponseWindowSize
private

window length for reception of RAR

Definition at line 188 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_simulationDuration

Time LteHandoverFailureTestCase::m_simulationDuration
private

the simulation duration

Definition at line 184 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_targeteNodeBPosition

uint16_t LteHandoverFailureTestCase::m_targeteNodeBPosition
private

position of the target eNodeB

Definition at line 191 of file test-lte-handover-failure.cc.

Referenced by DoRun().

◆ m_useIdealRrc

bool LteHandoverFailureTestCase::m_useIdealRrc
private

use ideal RRC?

Definition at line 182 of file test-lte-handover-failure.cc.

Referenced by DoRun().


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