A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
lte-test-secondary-cell-selection.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 Alexander Krotov
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Alexander Krotov <krotov@iitp.ru>
7
*
8
*/
9
10
#ifndef LTE_TEST_SECONDARY_CELL_SELECTION_H
11
#define LTE_TEST_SECONDARY_CELL_SELECTION_H
12
13
#include <ns3/lte-ue-rrc.h>
14
#include <ns3/node-container.h>
15
#include <ns3/nstime.h>
16
#include <ns3/test.h>
17
#include <ns3/vector.h>
18
19
#include <vector>
20
21
using namespace
ns3
;
22
23
/**
24
* \ingroup lte-test
25
*
26
* \brief Test suite for executing the secondary cell selection test cases.
27
*
28
* Checks that if multiple component carriers are defined for an eNB, that
29
* UEs can connect to each of these component carriers, not just the primary
30
*
31
* \sa ns3::LteSecondaryCellSelectionTestCase
32
*/
33
class
LteSecondaryCellSelectionTestSuite
:
public
TestSuite
34
{
35
public
:
36
LteSecondaryCellSelectionTestSuite
();
37
};
38
39
/**
40
* \ingroup lte-test
41
*
42
* \brief Testing the initial cell selection procedure by UE at IDLE state in
43
* the beginning of simulation with multiple component carriers.
44
*/
45
class
LteSecondaryCellSelectionTestCase
:
public
TestCase
46
{
47
public
:
48
/**
49
* \brief Creates an instance of the initial cell selection test case.
50
* \param name name of this test
51
* \param isIdealRrc if true, simulation uses Ideal RRC protocol, otherwise
52
* simulation uses Real RRC protocol
53
* \param rngRun the number of run to be used by the random number generator
54
* \param numberOfComponentCarriers number of component carriers
55
*/
56
LteSecondaryCellSelectionTestCase
(std::string name,
57
bool
isIdealRrc,
58
uint64_t rngRun,
59
uint8_t numberOfComponentCarriers);
60
61
~LteSecondaryCellSelectionTestCase
()
override
;
62
63
private
:
64
/**
65
* \brief Setup the simulation according to the configuration set by the
66
* class constructor, run it, and verify the result.
67
*/
68
void
DoRun
()
override
;
69
70
/**
71
* \brief State transition callback function
72
* \param context the context string
73
* \param imsi the IMSI
74
* \param cellId the cell ID
75
* \param rnti the RNTI
76
* \param oldState the old state
77
* \param newState the new state
78
*/
79
void
StateTransitionCallback
(std::string context,
80
uint64_t imsi,
81
uint16_t cellId,
82
uint16_t rnti,
83
LteUeRrc::State
oldState,
84
LteUeRrc::State
newState);
85
/**
86
* \brief Initial cell selection end ok callback function
87
* \param context the context string
88
* \param imsi the IMSI
89
* \param cellId the cell ID
90
*/
91
void
InitialSecondaryCellSelectionEndOkCallback
(std::string context,
92
uint64_t imsi,
93
uint16_t cellId);
94
/**
95
* \brief Connection established callback function
96
* \param context the context string
97
* \param imsi the IMSI
98
* \param cellId the cell ID
99
* \param rnti the RNTI
100
*/
101
void
ConnectionEstablishedCallback
(std::string context,
102
uint64_t imsi,
103
uint16_t cellId,
104
uint16_t rnti);
105
106
bool
m_isIdealRrc
;
///< whether the LTE is configured to use ideal RRC
107
uint64_t
m_rngRun
;
///< rng run
108
uint8_t
m_numberOfComponentCarriers
;
///< number of component carriers
109
110
/// The current UE RRC state.
111
std::map<uint64_t, LteUeRrc::State>
m_lastState
;
112
113
};
// end of class LteSecondaryCellSelectionTestCase
114
115
#endif
/* LTE_TEST_SECONDARY_CELL_SELECTION_H */
LteSecondaryCellSelectionTestCase
Testing the initial cell selection procedure by UE at IDLE state in the beginning of simulation with ...
Definition
lte-test-secondary-cell-selection.h:46
LteSecondaryCellSelectionTestCase::StateTransitionCallback
void StateTransitionCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState)
State transition callback function.
Definition
lte-test-secondary-cell-selection.cc:169
LteSecondaryCellSelectionTestCase::m_isIdealRrc
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
Definition
lte-test-secondary-cell-selection.h:106
LteSecondaryCellSelectionTestCase::m_rngRun
uint64_t m_rngRun
rng run
Definition
lte-test-secondary-cell-selection.h:107
LteSecondaryCellSelectionTestCase::m_numberOfComponentCarriers
uint8_t m_numberOfComponentCarriers
number of component carriers
Definition
lte-test-secondary-cell-selection.h:108
LteSecondaryCellSelectionTestCase::InitialSecondaryCellSelectionEndOkCallback
void InitialSecondaryCellSelectionEndOkCallback(std::string context, uint64_t imsi, uint16_t cellId)
Initial cell selection end ok callback function.
LteSecondaryCellSelectionTestCase::m_lastState
std::map< uint64_t, LteUeRrc::State > m_lastState
The current UE RRC state.
Definition
lte-test-secondary-cell-selection.h:111
LteSecondaryCellSelectionTestCase::ConnectionEstablishedCallback
void ConnectionEstablishedCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connection established callback function.
Definition
lte-test-secondary-cell-selection.cc:182
LteSecondaryCellSelectionTestCase::~LteSecondaryCellSelectionTestCase
~LteSecondaryCellSelectionTestCase() override
Definition
lte-test-secondary-cell-selection.cc:82
LteSecondaryCellSelectionTestCase::LteSecondaryCellSelectionTestCase
LteSecondaryCellSelectionTestCase(std::string name, bool isIdealRrc, uint64_t rngRun, uint8_t numberOfComponentCarriers)
Creates an instance of the initial cell selection test case.
Definition
lte-test-secondary-cell-selection.cc:69
LteSecondaryCellSelectionTestCase::DoRun
void DoRun() override
Setup the simulation according to the configuration set by the class constructor, run it,...
Definition
lte-test-secondary-cell-selection.cc:88
LteSecondaryCellSelectionTestSuite
Test suite for executing the secondary cell selection test cases.
Definition
lte-test-secondary-cell-selection.h:34
LteSecondaryCellSelectionTestSuite::LteSecondaryCellSelectionTestSuite
LteSecondaryCellSelectionTestSuite()
Definition
lte-test-secondary-cell-selection.cc:40
ns3::LteUeRrc::State
State
The states of the UE RRC entity.
Definition
lte-ue-rrc.h:88
ns3::TestCase
encapsulates test code
Definition
test.h:1050
ns3::TestSuite
A suite of tests to run.
Definition
test.h:1267
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
test
lte-test-secondary-cell-selection.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0