Verifying that a handover failure occurs due to various causes. More...
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 |
TestCase & | operator= (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... | |
TestCase * | GetParent () 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... | |
Verifying that a handover failure occurs due to various causes.
Handover failure cases dealt with in this test include the below.
Definition at line 61 of file test-lte-handover-failure.cc.
|
inline |
Constructor.
name | the name of the test case, to be displayed in the test result |
useIdealRrc | if true, use the ideal RRC |
handoverTime | the time of handover |
simulationDuration | duration of the simulation |
numberOfRaPreambles | number 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 |
preambleTransMax | maximum number of random access preamble transmissions from UE to eNodeB |
raResponseWindowSize | window length for reception of random access response (RAR) |
handoverJoiningTimeout | time 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 |
handoverLeavingTimeout | time 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 |
targeteNodeBPosition | position of the target eNodeB |
Definition at line 93 of file test-lte-handover-failure.cc.
|
overrideprivatevirtual |
Run a simulation of a two eNodeB network using the parameters provided to the constructor function.
Implements ns3::TestCase.
Definition at line 207 of file test-lte-handover-failure.cc.
References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::Simulator::Destroy(), ns3::RngSeedManager::GetRun(), ns3::RngSeedManager::GetSeed(), HandoverFailureJoining(), HandoverFailureLeaving(), HandoverFailureMaxRach(), HandoverFailureNoPreamble(), ns3::MobilityHelper::Install(), ns3::InternetStackHelper::Install(), ns3::TypeId::LookupByName(), ns3::MakeCallback(), NS_LOG_INFO, ns3::Simulator::Run(), ns3::Config::SetDefault(), ns3::MobilityHelper::SetMobilityModel(), ns3::MobilityHelper::SetPositionAllocator(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::Simulator::Stop(), and UeHandoverStartCallback().
|
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.
|
private |
Handover failure callback due to handover joining timeout at target eNodeB.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
targetCellId | the target cell ID |
Definition at line 338 of file test-lte-handover-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
Handover failure callback due to handover leaving timeout at source eNodeB.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
targetCellId | the target cell ID |
Definition at line 348 of file test-lte-handover-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
Handover failure callback due to maximum RACH transmissions reached from UE to target eNodeB.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
targetCellId | the target cell ID |
Definition at line 318 of file test-lte-handover-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
Handover failure callback due to non-allocation of non-contention preamble at target eNodeB.
context | the context string |
imsi | the IMSI |
rnti | the RNTI |
targetCellId | the target cell ID |
Definition at line 328 of file test-lte-handover-failure.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
UE handover start callback function to indicate start of handover.
context | the context string |
imsi | the IMSI |
sourceCellId | the source cell ID |
rnti | the RNTI |
targetCellId | the 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().
|
private |
handover joining timeout duration at target eNodeB
Definition at line 199 of file test-lte-handover-failure.cc.
|
private |
handover leaving timeout duration at source eNodeB
Definition at line 200 of file test-lte-handover-failure.cc.
|
private |
handover time
Definition at line 193 of file test-lte-handover-failure.cc.
|
private |
has handover failure occurred in simulation
Definition at line 202 of file test-lte-handover-failure.cc.
|
private |
number of random access preambles for contention based RACH process
Definition at line 195 of file test-lte-handover-failure.cc.
|
private |
max number of RACH preambles possible from UE to eNodeB
Definition at line 197 of file test-lte-handover-failure.cc.
|
private |
window length for reception of RAR
Definition at line 198 of file test-lte-handover-failure.cc.
|
private |
the simulation duration
Definition at line 194 of file test-lte-handover-failure.cc.
|
private |
position of the target eNodeB
Definition at line 201 of file test-lte-handover-failure.cc.
|
private |
use ideal RRC?
Definition at line 192 of file test-lte-handover-failure.cc.