Test measurement-based handover to secondary cell. More...
Public Member Functions | |
LteSecondaryCellHandoverTestCase (std::string name, bool useIdealRrc) | |
Creates an instance of the measurement-based secondary cell handover test case. More... | |
void | ShutdownCell (uint32_t cellId) |
Shutdown cellId by reducing its power to 1 dBm. More... | |
void | UeHandoverStartCallback (uint64_t imsi, uint16_t sourceCellId, uint16_t rnti, uint16_t targetCellId) |
Callback method indicating start of UE handover. 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. More... | |
void | DoTeardown () override |
Verify that handover has occurred during the simulation. More... | |
Private Attributes | |
bool | m_hasUeHandoverStarted |
true if UE started handover More... | |
uint8_t | m_numberOfComponentCarriers |
Number of component carriers. More... | |
Ptr< LteEnbNetDevice > | m_sourceEnbDev |
Source eNB device. More... | |
bool | m_useIdealRrc |
whether LTE is configured to 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... | |
Test measurement-based handover to secondary cell.
Definition at line 46 of file lte-test-secondary-cell-handover.cc.
LteSecondaryCellHandoverTestCase::LteSecondaryCellHandoverTestCase | ( | std::string | name, |
bool | useIdealRrc | ||
) |
Creates an instance of the measurement-based secondary cell handover test case.
name | name of the test case |
useIdealRrc | if true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol |
Definition at line 95 of file lte-test-secondary-cell-handover.cc.
|
overrideprivatevirtual |
Run a simulation.
Implements ns3::TestCase.
Definition at line 122 of file lte-test-secondary-cell-handover.cc.
References ns3::LteEnbNetDevice::GetCellId(), ns3::TestCase::GetName(), ns3::FriisSpectrumPropagationLossModel::GetTypeId(), nsclick-simple-lan::internet, m_numberOfComponentCarriers, m_sourceEnbDev, m_useIdealRrc, ns3::MakeCallback(), ns3::MilliSeconds(), third::mobility, NS_LOG_FUNCTION, ns3::Seconds(), ns3::Config::SetDefault(), ShutdownCell(), and UeHandoverStartCallback().
|
overrideprivatevirtual |
Verify that handover has occurred during the simulation.
Reimplemented from ns3::TestCase.
Definition at line 190 of file lte-test-secondary-cell-handover.cc.
References m_hasUeHandoverStarted, NS_LOG_FUNCTION, and NS_TEST_ASSERT_MSG_EQ.
void LteSecondaryCellHandoverTestCase::ShutdownCell | ( | uint32_t | cellId | ) |
Shutdown cellId by reducing its power to 1 dBm.
cellId | ID of the cell to shutdown |
Definition at line 105 of file lte-test-secondary-cell-handover.cc.
References ns3::LteEnbNetDevice::GetPhy(), m_sourceEnbDev, and third::phy.
Referenced by DoRun().
void LteSecondaryCellHandoverTestCase::UeHandoverStartCallback | ( | uint64_t | imsi, |
uint16_t | sourceCellId, | ||
uint16_t | rnti, | ||
uint16_t | targetCellId | ||
) |
Callback method indicating start of UE handover.
imsi | The IMSI |
sourceCellId | The source cell ID |
rnti | The RNTI |
targetCellId | The target cell ID |
Definition at line 112 of file lte-test-secondary-cell-handover.cc.
References m_hasUeHandoverStarted, and NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
true if UE started handover
Definition at line 92 of file lte-test-secondary-cell-handover.cc.
Referenced by DoTeardown(), and UeHandoverStartCallback().
|
private |
Number of component carriers.
Definition at line 88 of file lte-test-secondary-cell-handover.cc.
Referenced by DoRun().
|
private |
Source eNB device.
Definition at line 90 of file lte-test-secondary-cell-handover.cc.
Referenced by DoRun(), and ShutdownCell().
|
private |
whether LTE is configured to use ideal RRC
Definition at line 87 of file lte-test-secondary-cell-handover.cc.
Referenced by DoRun().