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-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
21
using namespace
ns3
;
22
23
/**
24
* @brief Test suite for executing the primary cell change test cases.
25
*
26
* \sa ns3::LtePrimaryCellChangeTestCase
27
*/
28
class
LtePrimaryCellChangeTestSuite
:
public
TestSuite
29
{
30
public
:
31
LtePrimaryCellChangeTestSuite
();
32
};
33
34
/**
35
* @ingroup lte
36
*
37
* @brief Testing the handover procedure with multiple component carriers.
38
*/
39
class
LtePrimaryCellChangeTestCase
:
public
TestCase
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
62
~LtePrimaryCellChangeTestCase
()
override
;
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 */
LtePrimaryCellChangeTestCase
Testing the handover procedure with multiple component carriers.
Definition
lte-test-primary-cell-change.h:40
LtePrimaryCellChangeTestCase::LtePrimaryCellChangeTestCase
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.
Definition
lte-test-primary-cell-change.cc:98
LtePrimaryCellChangeTestCase::InitialPrimaryCellChangeEndOkCallback
void InitialPrimaryCellChangeEndOkCallback(std::string context, uint64_t imsi, uint16_t cellId)
Initial cell selection end ok callback function.
LtePrimaryCellChangeTestCase::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-primary-cell-change.cc:206
LtePrimaryCellChangeTestCase::m_rngRun
int64_t m_rngRun
rng run
Definition
lte-test-primary-cell-change.h:106
LtePrimaryCellChangeTestCase::m_sourceComponentCarrier
uint8_t m_sourceComponentCarrier
source primary component carrier
Definition
lte-test-primary-cell-change.h:108
LtePrimaryCellChangeTestCase::DoRun
void DoRun() override
Setup the simulation according to the configuration set by the class constructor, run it,...
Definition
lte-test-primary-cell-change.cc:120
LtePrimaryCellChangeTestCase::~LtePrimaryCellChangeTestCase
~LtePrimaryCellChangeTestCase() override
Definition
lte-test-primary-cell-change.cc:114
LtePrimaryCellChangeTestCase::ConnectionEstablishedCallback
void ConnectionEstablishedCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connection established callback function.
Definition
lte-test-primary-cell-change.cc:218
LtePrimaryCellChangeTestCase::m_lastState
std::map< uint64_t, LteUeRrc::State > m_lastState
The current UE RRC state.
Definition
lte-test-primary-cell-change.h:112
LtePrimaryCellChangeTestCase::m_targetComponentCarrier
uint8_t m_targetComponentCarrier
target primary component carrier
Definition
lte-test-primary-cell-change.h:109
LtePrimaryCellChangeTestCase::m_isIdealRrc
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
Definition
lte-test-primary-cell-change.h:105
LtePrimaryCellChangeTestCase::m_numberOfComponentCarriers
uint8_t m_numberOfComponentCarriers
number of component carriers
Definition
lte-test-primary-cell-change.h:107
LtePrimaryCellChangeTestSuite
Test suite for executing the primary cell change test cases.
Definition
lte-test-primary-cell-change.h:29
LtePrimaryCellChangeTestSuite::LtePrimaryCellChangeTestSuite
LtePrimaryCellChangeTestSuite()
Definition
lte-test-primary-cell-change.cc:40
ns3::LteUeRrc::State
State
The states of the UE RRC entity.
Definition
lte-ue-rrc.h:89
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-primary-cell-change.h
Generated on Wed Dec 11 2024 18:20:46 for ns-3 by
1.11.0