A Discrete-Event Network Simulator
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
21using 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 */
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 */
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
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 */
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 */
Testing the initial cell selection procedure by UE at IDLE state in the beginning of simulation with ...
void StateTransitionCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteUeRrc::State oldState, LteUeRrc::State newState)
State transition callback function.
bool m_isIdealRrc
whether the LTE is configured to use ideal RRC
uint8_t m_numberOfComponentCarriers
number of component carriers
void InitialSecondaryCellSelectionEndOkCallback(std::string context, uint64_t imsi, uint16_t cellId)
Initial cell selection end ok callback function.
std::map< uint64_t, LteUeRrc::State > m_lastState
The current UE RRC state.
void ConnectionEstablishedCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti)
Connection established callback function.
LteSecondaryCellSelectionTestCase(std::string name, bool isIdealRrc, uint64_t rngRun, uint8_t numberOfComponentCarriers)
Creates an instance of the initial cell selection test case.
void DoRun() override
Setup the simulation according to the configuration set by the class constructor, run it,...
Test suite for executing the secondary cell selection 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.