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