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
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Alexander Krotov <krotov@iitp.ru>
18
*
19
*/
20
21
#ifndef LTE_TEST_SECONDARY_CELL_SELECTION_H
22
#define LTE_TEST_SECONDARY_CELL_SELECTION_H
23
24
#include <ns3/lte-ue-rrc.h>
25
#include <ns3/node-container.h>
26
#include <ns3/nstime.h>
27
#include <ns3/test.h>
28
#include <ns3/vector.h>
29
30
#include <vector>
31
32
using namespace
ns3
;
33
34
/**
35
* \ingroup lte-test
36
*
37
* \brief Test suite for executing the secondary cell selection test cases.
38
*
39
* Checks that if multiple component carriers are defined for an eNB, that
40
* UEs can connect to each of these component carriers, not just the primary
41
*
42
* \sa ns3::LteSecondaryCellSelectionTestCase
43
*/
44
class
LteSecondaryCellSelectionTestSuite
:
public
TestSuite
45
{
46
public
:
47
LteSecondaryCellSelectionTestSuite
();
48
};
49
50
/**
51
* \ingroup lte-test
52
*
53
* \brief Testing the initial cell selection procedure by UE at IDLE state in
54
* the beginning of simulation with multiple component carriers.
55
*/
56
class
LteSecondaryCellSelectionTestCase
:
public
TestCase
57
{
58
public
:
59
/**
60
* \brief Creates an instance of the initial cell selection test case.
61
* \param name name of this test
62
* \param isIdealRrc if true, simulation uses Ideal RRC protocol, otherwise
63
* simulation uses Real RRC protocol
64
* \param rngRun the number of run to be used by the random number generator
65
* \param numberOfComponentCarriers number of component carriers
66
*/
67
LteSecondaryCellSelectionTestCase
(std::string name,
68
bool
isIdealRrc,
69
uint64_t rngRun,
70
uint8_t numberOfComponentCarriers);
71
72
~LteSecondaryCellSelectionTestCase
()
override
;
73
74
private
:
75
/**
76
* \brief Setup the simulation according to the configuration set by the
77
* class constructor, run it, and verify the result.
78
*/
79
void
DoRun
()
override
;
80
81
/**
82
* \brief State transition callback function
83
* \param context the context string
84
* \param imsi the IMSI
85
* \param cellId the cell ID
86
* \param rnti the RNTI
87
* \param oldState the old state
88
* \param newState the new state
89
*/
90
void
StateTransitionCallback
(std::string context,
91
uint64_t imsi,
92
uint16_t cellId,
93
uint16_t rnti,
94
LteUeRrc::State
oldState,
95
LteUeRrc::State
newState);
96
/**
97
* \brief Initial cell selection end ok callback function
98
* \param context the context string
99
* \param imsi the IMSI
100
* \param cellId the cell ID
101
*/
102
void
InitialSecondaryCellSelectionEndOkCallback
(std::string context,
103
uint64_t imsi,
104
uint16_t cellId);
105
/**
106
* \brief Connection established callback function
107
* \param context the context string
108
* \param imsi the IMSI
109
* \param cellId the cell ID
110
* \param rnti the RNTI
111
*/
112
void
ConnectionEstablishedCallback
(std::string context,
113
uint64_t imsi,
114
uint16_t cellId,
115
uint16_t rnti);
116
117
bool
m_isIdealRrc
;
///< whether the LTE is configured to use ideal RRC
118
uint64_t
m_rngRun
;
///< rng run
119
uint8_t
m_numberOfComponentCarriers
;
///< number of component carriers
120
121
/// The current UE RRC state.
122
std::map<uint64_t, LteUeRrc::State>
m_lastState
;
123
124
};
// end of class LteSecondaryCellSelectionTestCase
125
126
#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:57
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:180
LteSecondaryCellSelectionTestCase::m_isIdealRrc
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
Definition:
lte-test-secondary-cell-selection.h:117
LteSecondaryCellSelectionTestCase::m_rngRun
uint64_t m_rngRun
rng run
Definition:
lte-test-secondary-cell-selection.h:118
LteSecondaryCellSelectionTestCase::m_numberOfComponentCarriers
uint8_t m_numberOfComponentCarriers
number of component carriers
Definition:
lte-test-secondary-cell-selection.h:119
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:122
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:193
LteSecondaryCellSelectionTestCase::~LteSecondaryCellSelectionTestCase
~LteSecondaryCellSelectionTestCase() override
Definition:
lte-test-secondary-cell-selection.cc:93
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:99
LteSecondaryCellSelectionTestSuite
Test suite for executing the secondary cell selection test cases.
Definition:
lte-test-secondary-cell-selection.h:45
LteSecondaryCellSelectionTestSuite::LteSecondaryCellSelectionTestSuite
LteSecondaryCellSelectionTestSuite()
Definition:
lte-test-secondary-cell-selection.cc:51
ns3::LteUeRrc::State
State
The states of the UE RRC entity.
Definition:
lte-ue-rrc.h:99
ns3::TestCase
encapsulates test code
Definition:
test.h:1061
ns3::TestSuite
A suite of tests to run.
Definition:
test.h:1273
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 Tue May 28 2024 23:37:54 for ns-3 by
1.9.6