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. | |
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 | |
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. | |
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. | |
Verifying that a handover failure occurs due to various causes.
Handover failure cases dealt with in this test include the below.
Definition at line 51 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 83 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 197 of file test-lte-handover-failure.cc.
References ns3::Config::Connect(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::TestCase::GetName(), ns3::RngSeedManager::GetRun(), ns3::RngSeedManager::GetSeed(), HandoverFailureJoining(), HandoverFailureLeaving(), HandoverFailureMaxRach(), HandoverFailureNoPreamble(), ns3::InternetStackHelper::Install(), ns3::MobilityHelper::Install(), ns3::TypeId::LookupByName(), m_handoverJoiningTimeout, m_handoverLeavingTimeout, m_handoverTime, m_numberOfRaPreambles, m_preambleTransMax, m_raResponseWindowSize, m_simulationDuration, m_targeteNodeBPosition, m_useIdealRrc, 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 352 of file test-lte-handover-failure.cc.
References m_hasHandoverFailureOccurred, 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 332 of file test-lte-handover-failure.cc.
References m_hasHandoverFailureOccurred, and 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 342 of file test-lte-handover-failure.cc.
References m_hasHandoverFailureOccurred, and 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 312 of file test-lte-handover-failure.cc.
References m_hasHandoverFailureOccurred, and 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 322 of file test-lte-handover-failure.cc.
References m_hasHandoverFailureOccurred, and 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 299 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 189 of file test-lte-handover-failure.cc.
Referenced by DoRun().
|
private |
handover leaving timeout duration at source eNodeB
Definition at line 190 of file test-lte-handover-failure.cc.
Referenced by DoRun().
|
private |
|
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().
|
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().
|
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().
|
private |
window length for reception of RAR
Definition at line 188 of file test-lte-handover-failure.cc.
Referenced by DoRun().
|
private |
the simulation duration
Definition at line 184 of file test-lte-handover-failure.cc.
Referenced by DoRun().
|
private |
position of the target eNodeB
Definition at line 191 of file test-lte-handover-failure.cc.
Referenced by DoRun().
|
private |