Testing the handover procedure with multiple component carriers. More...
#include "lte-test-primary-cell-change.h"
Public Member Functions | |
LtePrimaryCellChangeTestCase (std::string name, bool isIdealRrc, int64_t rngRun, uint8_t numberOfComponentCarriers, uint8_t sourceComponentCarrier, uint8_t targetComponentCarrier) | |
Creates an instance of the initial cell selection test case. | |
~LtePrimaryCellChangeTestCase () override | |
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 | ConnectionEstablishedCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti) |
Connection established callback function. | |
void | DoRun () override |
Setup the simulation according to the configuration set by the class constructor, run it, and verify the result. | |
void | InitialPrimaryCellChangeEndOkCallback (std::string context, uint64_t imsi, uint16_t cellId) |
Initial cell selection end ok callback function. | |
void | StateTransitionCallback (std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState) |
State transition callback function. | |
Private Attributes | |
bool | m_isIdealRrc |
whether the LTE is configured to use ideal RRC | |
std::map< uint64_t, LteUeRrc::State > | m_lastState |
The current UE RRC state. | |
uint8_t | m_numberOfComponentCarriers |
number of component carriers | |
int64_t | m_rngRun |
rng run | |
uint8_t | m_sourceComponentCarrier |
source primary component carrier | |
uint8_t | m_targetComponentCarrier |
target primary component carrier | |
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. | |
Testing the handover procedure with multiple component carriers.
Definition at line 39 of file lte-test-primary-cell-change.h.
LtePrimaryCellChangeTestCase::LtePrimaryCellChangeTestCase | ( | std::string | name, |
bool | isIdealRrc, | ||
int64_t | rngRun, | ||
uint8_t | numberOfComponentCarriers, | ||
uint8_t | sourceComponentCarrier, | ||
uint8_t | targetComponentCarrier ) |
Creates an instance of the initial cell selection test case.
name | name of this test |
isIdealRrc | if true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol |
rngRun | the number of run to be used by the random number generator |
numberOfComponentCarriers | number of component carriers |
sourceComponentCarrier | source component carrier |
targetComponentCarrier | target component carrier |
If sourceComponentCarrier or targetComponentCarrier is greater than number of component carriers, it identifies component carrier on second eNB.
Definition at line 98 of file lte-test-primary-cell-change.cc.
References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.
|
override |
Definition at line 114 of file lte-test-primary-cell-change.cc.
References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.
|
private |
Connection established callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
Definition at line 218 of file lte-test-primary-cell-change.cc.
References NS_LOG_FUNCTION.
Referenced by DoRun().
|
overrideprivatevirtual |
Setup the simulation according to the configuration set by the class constructor, run it, and verify the result.
Implements ns3::TestCase.
Definition at line 120 of file lte-test-primary-cell-change.cc.
References ns3::Config::Connect(), ns3::LteUeRrc::CONNECTED_NORMALLY, ConnectionEstablishedCallback(), ns3::NodeContainer::Create(), ns3::CreateObject(), ns3::Simulator::Destroy(), ns3::DynamicCast(), ns3::TestCase::GetName(), ns3::FriisSpectrumPropagationLossModel::GetTypeId(), m_isIdealRrc, m_lastState, m_numberOfComponentCarriers, m_rngRun, m_sourceComponentCarrier, m_targetComponentCarrier, ns3::MakeCallback(), NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), ns3::Config::SetDefault(), ns3::Config::SetGlobal(), StateTransitionCallback(), and ns3::Simulator::Stop().
|
private |
Initial cell selection end ok callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
|
private |
State transition callback function.
context | the context string |
imsi | the IMSI |
cellId | the cell ID |
rnti | the RNTI |
oldState | the old state |
newState | the new state |
Definition at line 206 of file lte-test-primary-cell-change.cc.
References m_lastState, and NS_LOG_FUNCTION.
Referenced by DoRun().
|
private |
whether the LTE is configured to use ideal RRC
Definition at line 105 of file lte-test-primary-cell-change.h.
Referenced by DoRun().
|
private |
The current UE RRC state.
Definition at line 112 of file lte-test-primary-cell-change.h.
Referenced by DoRun(), and StateTransitionCallback().
|
private |
number of component carriers
Definition at line 107 of file lte-test-primary-cell-change.h.
Referenced by DoRun().
|
private |
|
private |
source primary component carrier
Definition at line 108 of file lte-test-primary-cell-change.h.
Referenced by DoRun().
|
private |
target primary component carrier
Definition at line 109 of file lte-test-primary-cell-change.h.
Referenced by DoRun().