A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-primary-cell-change.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_PRIMARY_CELL_CHANGE_H
22#define LTE_TEST_PRIMARY_CELL_CHANGE_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
32using namespace ns3;
33
34/**
35 * \brief Test suite for executing the primary cell change test cases.
36 *
37 * \sa ns3::LtePrimaryCellChangeTestCase
38 */
40{
41 public:
43};
44
45/**
46 * \ingroup lte
47 *
48 * \brief Testing the handover procedure with multiple component carriers.
49 */
51{
52 public:
53 /**
54 * \brief Creates an instance of the initial cell selection test case.
55 * \param name name of this test
56 * \param isIdealRrc if true, simulation uses Ideal RRC protocol, otherwise
57 * simulation uses Real RRC protocol
58 * \param rngRun the number of run to be used by the random number generator
59 * \param numberOfComponentCarriers number of component carriers
60 * \param sourceComponentCarrier source component carrier
61 * \param targetComponentCarrier target component carrier
62 *
63 * If sourceComponentCarrier or targetComponentCarrier is greater than
64 * number of component carriers, it identifies component carrier on second eNB.
65 */
66 LtePrimaryCellChangeTestCase(std::string name,
67 bool isIdealRrc,
68 int64_t rngRun,
69 uint8_t numberOfComponentCarriers,
70 uint8_t sourceComponentCarrier,
71 uint8_t targetComponentCarrier);
72
74
75 private:
76 /**
77 * \brief Setup the simulation according to the configuration set by the
78 * class constructor, run it, and verify the result.
79 */
80 void DoRun() override;
81
82 /**
83 * \brief State transition callback function
84 * \param context the context string
85 * \param imsi the IMSI
86 * \param cellId the cell ID
87 * \param rnti the RNTI
88 * \param oldState the old state
89 * \param newState the new state
90 */
91 void StateTransitionCallback(std::string context,
92 uint64_t imsi,
93 uint16_t cellId,
94 uint16_t rnti,
95 LteUeRrc::State oldState,
96 LteUeRrc::State newState);
97 /**
98 * \brief Initial cell selection end ok callback function
99 * \param context the context string
100 * \param imsi the IMSI
101 * \param cellId the cell ID
102 */
103 void InitialPrimaryCellChangeEndOkCallback(std::string context, uint64_t imsi, uint16_t cellId);
104 /**
105 * \brief Connection established callback function
106 * \param context the context string
107 * \param imsi the IMSI
108 * \param cellId the cell ID
109 * \param rnti the RNTI
110 */
111 void ConnectionEstablishedCallback(std::string context,
112 uint64_t imsi,
113 uint16_t cellId,
114 uint16_t rnti);
115
116 bool m_isIdealRrc; ///< whether the LTE is configured to use ideal RRC
117 int64_t m_rngRun; ///< rng run
118 uint8_t m_numberOfComponentCarriers; ///< number of component carriers
119 uint8_t m_sourceComponentCarrier; ///< source primary component carrier
120 uint8_t m_targetComponentCarrier; ///< target primary component carrier
121
122 /// The current UE RRC state.
123 std::map<uint64_t, LteUeRrc::State> m_lastState;
124
125}; // end of class LtePrimaryCellChangeTestCase
126
127#endif /* LTE_TEST_PRIMARY_CELL_CHANGE_H */
Testing the handover procedure with multiple component carriers.
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.
uint8_t m_sourceComponentCarrier
source primary component carrier
void DoRun() override
Setup the simulation according to the configuration set by the class constructor, run it,...
void ConnectionEstablishedCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connection established callback function.
std::map< uint64_t, LteUeRrc::State > m_lastState
The current UE RRC state.
uint8_t m_targetComponentCarrier
target primary component carrier
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
uint8_t m_numberOfComponentCarriers
number of component carriers
Test suite for executing the primary cell change test cases.
State
The states of the UE RRC entity.
Definition: lte-ue-rrc.h:99
encapsulates test code
Definition: test.h:1061
A suite of tests to run.
Definition: test.h:1268
Every class exported by the ns3 library is enclosed in the ns3 namespace.