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. | |
void | ShutdownCell (uint32_t cellId) |
Shutdown cellId by reducing its power to 1 dBm. | |
void | UeHandoverStartCallback (uint64_t imsi, uint16_t sourceCellId, uint16_t rnti, uint16_t targetCellId) |
Callback method indicating start of UE handover. | |
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. | |
void | DoTeardown () override |
Verify that handover has occurred during the simulation. | |
Private Attributes | |
bool | m_hasUeHandoverStarted |
true if UE started handover | |
uint8_t | m_numberOfComponentCarriers |
Number of component carriers. | |
Ptr< LteEnbNetDevice > | m_sourceEnbDev |
Source eNB device. | |
bool | m_useIdealRrc |
whether LTE is configured to 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. | |
Test measurement-based handover to secondary cell.
Definition at line 35 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 84 of file lte-test-secondary-cell-handover.cc.
|
overrideprivatevirtual |
Run a simulation.
Implements ns3::TestCase.
Definition at line 111 of file lte-test-secondary-cell-handover.cc.
References ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::TestCase::GetName(), ns3::FriisSpectrumPropagationLossModel::GetTypeId(), m_numberOfComponentCarriers, m_sourceEnbDev, m_useIdealRrc, ns3::MakeCallback(), ns3::MilliSeconds(), NS_LOG_FUNCTION, ns3::Simulator::Run(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::Config::SetDefault(), ShutdownCell(), ns3::Simulator::Stop(), and UeHandoverStartCallback().
|
overrideprivatevirtual |
Verify that handover has occurred during the simulation.
Reimplemented from ns3::TestCase.
Definition at line 179 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 94 of file lte-test-secondary-cell-handover.cc.
References m_sourceEnbDev.
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 101 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 81 of file lte-test-secondary-cell-handover.cc.
Referenced by DoTeardown(), and UeHandoverStartCallback().
|
private |
Number of component carriers.
Definition at line 77 of file lte-test-secondary-cell-handover.cc.
Referenced by DoRun().
|
private |
Source eNB device.
Definition at line 79 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 76 of file lte-test-secondary-cell-handover.cc.
Referenced by DoRun().