A Discrete-Event Network Simulator
API
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. More...
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor. More...
 
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. More...
 
void DoTeardown () override
 Called at the end of simulation and verifies that a handover and a handover failure has occurred in the simulation. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Private Attributes

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

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 61 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 93 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 358 of file test-lte-handover-failure.cc.

References 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 338 of file test-lte-handover-failure.cc.

References 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 348 of file test-lte-handover-failure.cc.

References 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 318 of file test-lte-handover-failure.cc.

References 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 328 of file test-lte-handover-failure.cc.

References 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 305 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 199 of file test-lte-handover-failure.cc.

◆ m_handoverLeavingTimeout

Time LteHandoverFailureTestCase::m_handoverLeavingTimeout
private

handover leaving timeout duration at source eNodeB

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

◆ m_handoverTime

Time LteHandoverFailureTestCase::m_handoverTime
private

handover time

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

◆ m_hasHandoverFailureOccurred

bool LteHandoverFailureTestCase::m_hasHandoverFailureOccurred
private

has handover failure occurred in simulation

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

◆ m_numberOfRaPreambles

uint8_t LteHandoverFailureTestCase::m_numberOfRaPreambles
private

number of random access preambles for contention based RACH process

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

◆ m_preambleTransMax

uint8_t LteHandoverFailureTestCase::m_preambleTransMax
private

max number of RACH preambles possible from UE to eNodeB

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

◆ m_raResponseWindowSize

uint8_t LteHandoverFailureTestCase::m_raResponseWindowSize
private

window length for reception of RAR

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

◆ m_simulationDuration

Time LteHandoverFailureTestCase::m_simulationDuration
private

the simulation duration

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

◆ m_targeteNodeBPosition

uint16_t LteHandoverFailureTestCase::m_targeteNodeBPosition
private

position of the target eNodeB

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

◆ m_useIdealRrc

bool LteHandoverFailureTestCase::m_useIdealRrc
private

use ideal RRC?

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


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