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

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

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

+ Inheritance diagram for LteSecondaryCellSelectionTestCase:
+ Collaboration diagram for LteSecondaryCellSelectionTestCase:

Public Member Functions

 LteSecondaryCellSelectionTestCase (std::string name, bool isIdealRrc, uint64_t rngRun, uint8_t numberOfComponentCarriers)
 Creates an instance of the initial cell selection test case.
 
 ~LteSecondaryCellSelectionTestCase () 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 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 InitialSecondaryCellSelectionEndOkCallback (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::Statem_lastState
 The current UE RRC state.
 
uint8_t m_numberOfComponentCarriers
 number of component carriers
 
uint64_t m_rngRun
 rng run
 

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 with multiple component carriers.

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

Constructor & Destructor Documentation

◆ LteSecondaryCellSelectionTestCase()

LteSecondaryCellSelectionTestCase::LteSecondaryCellSelectionTestCase ( std::string name,
bool isIdealRrc,
uint64_t rngRun,
uint8_t numberOfComponentCarriers )

Creates an instance of the initial cell selection test case.

Parameters
namename of this test
isIdealRrcif true, simulation uses Ideal RRC protocol, otherwise simulation uses Real RRC protocol
rngRunthe number of run to be used by the random number generator
numberOfComponentCarriersnumber of component carriers

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

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

+ Here is the call graph for this function:

◆ ~LteSecondaryCellSelectionTestCase()

LteSecondaryCellSelectionTestCase::~LteSecondaryCellSelectionTestCase ( )
override

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

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

+ Here is the call graph for this function:

Member Function Documentation

◆ ConnectionEstablishedCallback()

void LteSecondaryCellSelectionTestCase::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 182 of file lte-test-secondary-cell-selection.cc.

References NS_LOG_FUNCTION.

Referenced by DoRun().

+ Here is the caller graph for this function:

◆ DoRun()

void LteSecondaryCellSelectionTestCase::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 88 of file lte-test-secondary-cell-selection.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, ns3::MakeCallback(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_TEST_ASSERT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), ns3::Config::SetGlobal(), StateTransitionCallback(), and ns3::Simulator::Stop().

+ Here is the call graph for this function:

◆ InitialSecondaryCellSelectionEndOkCallback()

void LteSecondaryCellSelectionTestCase::InitialSecondaryCellSelectionEndOkCallback ( 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

◆ StateTransitionCallback()

void LteSecondaryCellSelectionTestCase::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 169 of file lte-test-secondary-cell-selection.cc.

References m_lastState, NS_LOG_FUNCTION, and ns3::LteUeRrc::ToString().

Referenced by DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_isIdealRrc

bool LteSecondaryCellSelectionTestCase::m_isIdealRrc
private

whether the LTE is configured to use ideal RRC

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

Referenced by DoRun().

◆ m_lastState

std::map<uint64_t, LteUeRrc::State> LteSecondaryCellSelectionTestCase::m_lastState
private

The current UE RRC state.

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

Referenced by DoRun(), and StateTransitionCallback().

◆ m_numberOfComponentCarriers

uint8_t LteSecondaryCellSelectionTestCase::m_numberOfComponentCarriers
private

number of component carriers

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

Referenced by DoRun().

◆ m_rngRun

uint64_t LteSecondaryCellSelectionTestCase::m_rngRun
private

rng run

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

Referenced by DoRun().


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