A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
LteCellSelectionTestCase Class Reference

Testing the initial cell selection procedure by UE at IDLE state in the beginning of simulation. More...

#include "lte-test-cell-selection.h"

+ Inheritance diagram for LteCellSelectionTestCase:
+ Collaboration diagram for LteCellSelectionTestCase:

Classes

struct  UeSetup_t
 A set of input parameters for setting up a UE in the simulation. More...
 

Public Member Functions

 LteCellSelectionTestCase (std::string name, bool isEpcMode, bool isIdealRrc, double interSiteDistance, std::vector< UeSetup_t > ueSetupList)
 Creates an instance of the initial cell selection test case.
 
 ~LteCellSelectionTestCase () override
 
- Public Member Functions inherited from ns3::TestCase
 TestCase (const TestCase &)=delete
 
virtual ~TestCase ()
 Destructor.
 
std::string GetName () const
 
TestCaseoperator= (const TestCase &)=delete
 

Private Member Functions

void CheckPoint (Ptr< LteUeNetDevice > ueDev, uint16_t expectedCellId1, uint16_t expectedCellId2)
 Verifies if the given UE is attached to either of the given two cells and in a CONNECTED_NORMALLY state.
 
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 InitialCellSelectionEndErrorCallback (std::string context, uint64_t imsi, uint16_t cellId)
 Initial cell selection end error callback function.
 
void InitialCellSelectionEndOkCallback (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

double m_interSiteDistance
 inter site distance
 
bool m_isEpcMode
 whether the LTE configuration in test is using EPC
 
bool m_isIdealRrc
 whether the LTE is configured to use ideal RRC
 
std::vector< LteUeRrc::Statem_lastState
 The current UE RRC state.
 
std::vector< UeSetup_tm_ueSetupList
 UE setup list.
 

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.
 
TestCaseGetParent () 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.
 

Detailed Description

Testing the initial cell selection procedure by UE at IDLE state in the beginning of simulation.

Definition at line 48 of file lte-test-cell-selection.h.

Constructor & Destructor Documentation

◆ LteCellSelectionTestCase()

LteCellSelectionTestCase::LteCellSelectionTestCase ( std::string name,
bool isEpcMode,
bool isIdealRrc,
double interSiteDistance,
std::vector< UeSetup_t > ueSetupList )

Creates an instance of the initial cell selection test case.

Parameters
namename of this test
isEpcModeset to true for setting up simulation with EPC enabled
isIdealRrcif true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol
interSiteDistancethe distance between eNodeB in meters
ueSetupLista list of UE configuration to be installed in the simulation

Definition at line 112 of file lte-test-cell-selection.cc.

References ns3::TestCase::GetName(), m_lastState, m_ueSetupList, NS_LOG_FUNCTION, and ns3::LteUeRrc::NUM_STATES.

+ Here is the call graph for this function:

◆ ~LteCellSelectionTestCase()

LteCellSelectionTestCase::~LteCellSelectionTestCase ( )
override

Definition at line 127 of file lte-test-cell-selection.cc.

References ns3::TestCase::GetName(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ CheckPoint()

void LteCellSelectionTestCase::CheckPoint ( Ptr< LteUeNetDevice > ueDev,
uint16_t expectedCellId1,
uint16_t expectedCellId2 )
private

Verifies if the given UE is attached to either of the given two cells and in a CONNECTED_NORMALLY state.

Parameters
ueDevthe UE device
expectedCellId1the first cell ID
expectedCellId2the second cell ID

Definition at line 355 of file lte-test-cell-selection.cc.

References ns3::LteUeRrc::CONNECTED_NORMALLY, m_lastState, and NS_TEST_ASSERT_MSG_EQ.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ ConnectionEstablishedCallback()

void LteCellSelectionTestCase::ConnectionEstablishedCallback ( std::string context,
uint64_t imsi,
uint16_t cellId,
uint16_t rnti )
private

Connection established callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI

Definition at line 415 of file lte-test-cell-selection.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void LteCellSelectionTestCase::DoRun ( )
overrideprivatevirtual

◆ InitialCellSelectionEndErrorCallback()

void LteCellSelectionTestCase::InitialCellSelectionEndErrorCallback ( std::string context,
uint64_t imsi,
uint16_t cellId )
private

Initial cell selection end error callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID

Definition at line 407 of file lte-test-cell-selection.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ InitialCellSelectionEndOkCallback()

void LteCellSelectionTestCase::InitialCellSelectionEndOkCallback ( std::string context,
uint64_t imsi,
uint16_t cellId )
private

Initial cell selection end ok callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID

Definition at line 399 of file lte-test-cell-selection.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ StateTransitionCallback()

void LteCellSelectionTestCase::StateTransitionCallback ( std::string context,
uint64_t imsi,
uint16_t cellId,
uint16_t rnti,
LteUeRrc::State oldState,
LteUeRrc::State newState )
private

State transition callback function.

Parameters
contextthe context string
imsithe IMSI
cellIdthe cell ID
rntithe RNTI
oldStatethe old state
newStatethe new state

Definition at line 387 of file lte-test-cell-selection.cc.

References m_lastState, and NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_interSiteDistance

double LteCellSelectionTestCase::m_interSiteDistance
private

inter site distance

Definition at line 160 of file lte-test-cell-selection.h.

Referenced by DoRun().

◆ m_isEpcMode

bool LteCellSelectionTestCase::m_isEpcMode
private

whether the LTE configuration in test is using EPC

Definition at line 158 of file lte-test-cell-selection.h.

Referenced by DoRun().

◆ m_isIdealRrc

bool LteCellSelectionTestCase::m_isIdealRrc
private

whether the LTE is configured to use ideal RRC

Definition at line 159 of file lte-test-cell-selection.h.

Referenced by DoRun().

◆ m_lastState

std::vector<LteUeRrc::State> LteCellSelectionTestCase::m_lastState
private

The current UE RRC state.

Definition at line 164 of file lte-test-cell-selection.h.

Referenced by LteCellSelectionTestCase(), CheckPoint(), and StateTransitionCallback().

◆ m_ueSetupList

std::vector<UeSetup_t> LteCellSelectionTestCase::m_ueSetupList
private

UE setup list.

Definition at line 161 of file lte-test-cell-selection.h.

Referenced by LteCellSelectionTestCase(), and DoRun().


The documentation for this class was generated from the following files: