A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-ue-measurements.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 * Nicola Baldo <nbaldo@cttc.es>
8 * Marco Miozzo <mmiozzo@cttc.es>
9 * adapt lte-test-interference.cc to lte-ue-measurements.cc
10 * Budiarto Herman <budiarto.herman@magister.fi>
11 */
12
13#ifndef LTE_TEST_UE_MEASUREMENTS_H
14#define LTE_TEST_UE_MEASUREMENTS_H
15
16#include "ns3/lte-rrc-sap.h"
17#include "ns3/nstime.h"
18#include "ns3/test.h"
19
20#include <list>
21#include <set>
22#include <vector>
23
24namespace ns3
25{
26
27class MobilityModel;
28
29}
30
31using namespace ns3;
32
33// ===== LTE-UE-MEASUREMENTS TEST SUITE ==================================== //
34
35/**
36 * @ingroup lte-test
37 *
38 * @brief Test that UE Measurements (see 36.214) calculation works fine in a
39 * multi-cell interference scenario.
40 */
42{
43 public:
45};
46
47/**
48 * @ingroup lte-test
49 *
50 * @brief Test that UE measurements calculation works properly in a scenario
51 * with 2 eNodeBs and 2UEs. Test that RSRP and RSRQ of the serving cell and of
52 * the neighbor cell correspond to the reference values.
53 */
55{
56 public:
57 /**
58 * Constructor
59 *
60 * @param name the reference name
61 * @param d1 distance between UE and ENB node pair
62 * @param d2 distance between UE and other ENB node
63 * @param rsrpDbmUe1 RSRP in dBm UE 1
64 * @param rsrpDbmUe2 RSRP in dBm UE 2
65 * @param rsrqDbUe1 RSRQ in dBm UE 1
66 * @param rsrqDbUe2 RSRQ in dBm UE 2
67 */
68 LteUeMeasurementsTestCase(std::string name,
69 double d1,
70 double d2,
71 double rsrpDbmUe1,
72 double rsrpDbmUe2,
73 double rsrqDbUe1,
74 double rsrqDbUe2);
76
77 /**
78 * Report UE measurements function
79 * @param rnti the RNTI
80 * @param cellId the cell ID
81 * @param rsrp the RSRP
82 * @param rsrq the RSRQ
83 * @param servingCell the serving cell
84 */
85 void ReportUeMeasurements(uint16_t rnti,
86 uint16_t cellId,
87 double rsrp,
88 double rsrq,
89 bool servingCell);
90
91 /**
92 * Reeive measurement report function
93 * @param imsi the IMSI
94 * @param cellId the cell ID
95 * @param rnti the RNTI
96 * @param meas LteRrcSap::MeasurementReport
97 */
98 void RecvMeasurementReport(uint64_t imsi,
99 uint16_t cellId,
100 uint16_t rnti,
102
103 private:
104 void DoRun() override;
105
106 double m_d1; ///< distance between UE and ENB node pair
107 double m_d2; ///< distance between UE and other ENB node
108 double m_rsrpDbmUeServingCell; ///< RSRP in dBm UE 1
109 double m_rsrpDbmUeNeighborCell; ///< RSRP in dBm UE 2
110 double m_rsrqDbUeServingCell; ///< RSRQ in dBm UE 1
111 double m_rsrqDbUeNeighborCell; ///< RSRQ in dBm UE 2
112};
113
114// ===== LTE-UE-MEASUREMENTS-PIECEWISE-1 TEST SUITE ======================== //
115
116/**
117 * @ingroup lte-test
118 *
119 * @brief Test suite for generating calls to UE measurements test case
120 * ns3::LteUeMeasurementsPiecewiseTestCase1.
121 */
127
128/**
129 * @ingroup lte-test
130 *
131 * @brief Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in
132 * piecewise configuration and 120 ms report interval. During the simulation
133 * the placement of UE is being changed several times. Four different
134 * cases are considered: UE is very near to eNodeB, UE is near to eNodeB,
135 * UE is far from eNodeB and UE is very far from eNodeB. Test checks
136 * if the measurements correspond to the real conditions of the UE, i.e.
137 * when the signal from serving cell becomes weak, the measurements should
138 * also start to correspond to the new channel conditions. Additionally, it
139 * is checked if UE detects some neighboring signal, if it does the test
140 * fails because there is no neighbor in this configuration. Also, test
141 * checks if the reporting occurs at intervals that it should according to
142 * the measurements configuration. If it occurs in some different time
143 * stamp the test will fail.
144 */
146{
147 public:
148 /**
149 * Constructor
150 *
151 * @param name the reference name
152 * @param config LteRrcSap::ReportConfigEutra
153 * @param expectedTime the expected time
154 * @param expectedRsrp the expected RSRP
155 */
158 std::vector<Time> expectedTime,
159 std::vector<uint8_t> expectedRsrp);
160
162
163 /**
164 * @brief Triggers when eNodeB receives measurement report from UE, then
165 * perform verification on it.
166 *
167 * The trigger is set up beforehand by connecting to the
168 * `LteUeRrc::RecvMeasurementReport` trace source.
169 *
170 * Verification consists of checking whether the report carries the right
171 * value of RSRP or not, and whether it occurs at the expected time or not.
172 *
173 * @param context the context
174 * @param imsi the IMSI
175 * @param cellId the cell ID
176 * @param rnti the RNTI
177 * @param report LteRrcSap::MeasurementReport
178 */
179 void RecvMeasurementReportCallback(std::string context,
180 uint64_t imsi,
181 uint16_t cellId,
182 uint16_t rnti,
184
185 private:
186 /**
187 * @brief Setup the simulation with the intended UE measurement reporting
188 * configuration, run it, and connect the
189 * `RecvMeasurementReportCallback` function to the
190 * `LteUeRrc::RecvMeasurementReport` trace source.
191 */
192 void DoRun() override;
193
194 /**
195 * @brief Runs at the end of the simulation, verifying that all expected
196 * measurement reports have been examined.
197 */
198 void DoTeardown() override;
199
200 /// Teleport very near function
201 void TeleportVeryNear();
202 /// Teleport near function
203 void TeleportNear();
204 /// Teleport far function
205 void TeleportFar();
206 /// Teleport far function
207 void TeleportVeryFar();
208
209 /**
210 * @brief The active report triggering configuration.
211 */
213
214 /**
215 * @brief The list of expected time when measurement reports are received by
216 * eNodeB.
217 */
218 std::vector<Time> m_expectedTime;
219
220 /**
221 * @brief The list of expected values of RSRP (in 3GPP range unit) from the
222 * measurement reports received.
223 */
224 std::vector<uint8_t> m_expectedRsrp;
225
226 /**
227 * @brief Pointer to the element of `m_expectedTime` which is expected to
228 * occur next in the simulation.
229 */
230 std::vector<Time>::iterator m_itExpectedTime;
231
232 /**
233 * @brief Pointer to the element of `m_expectedRsrp` which is expected to
234 * occur next in the simulation.
235 */
236 std::vector<uint8_t>::iterator m_itExpectedRsrp;
237
238 /**
239 * @brief The measurement identity being tested. Measurement reports with
240 * different measurement identity (e.g. from handover algorithm) will
241 * be ignored.
242 */
244
245 Ptr<MobilityModel> m_ueMobility; ///< the mobility model
246
247 // end of class LteUeMeasurementsPiecewiseTestCase1
248};
249
250// ===== LTE-UE-MEASUREMENTS-PIECEWISE-2 TEST SUITE ======================== //
251
252/**
253 * @ingroup lte-test
254 *
255 * @brief Test suite for generating calls to UE measurements test case
256 * ns3::LteUeMeasurementsPiecewiseTestCase2.
257 */
263
264/**
265 * @ingroup lte-test
266 *
267 * @brief Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in
268 * piecewise configuration and 240 ms report interval.
269 * Here is intenisvely test events A1 and A2. A1 event should be triggered
270 * when the serving cell becomes better than a given threshold. A2 shall
271 * be triggered when the serving cell becomes worse than threshold. A3
272 * event is triggered when the neighbour becomes offset better than the PCell.
273 * In this test UE is being transported several times during the simulation
274 * duration. Then the test checks if measurement report contains correct
275 * RSRP and RSRQ result, than if CQI info is correctly generated, if the
276 * reporting occurs at the correct time stamp in the simulation and according
277 * to the measurements configuration. It also checks if the reported values
278 * of RSRP and RSRQ are equal to expected reference values.
279 *
280 */
282{
283 public:
284 /**
285 * Constructor
286 *
287 * @param name the reference name
288 * @param config LteRrcSap::ReportConfigEutra
289 * @param expectedTime the expected time
290 * @param expectedRsrp the expected RSRP
291 */
294 std::vector<Time> expectedTime,
295 std::vector<uint8_t> expectedRsrp);
296
298
299 /**
300 * @brief Triggers when eNodeB receives measurement report from UE, then
301 * perform verification on it.
302 *
303 * The trigger is set up beforehand by connecting to the
304 * `LteUeRrc::RecvMeasurementReport` trace source.
305 *
306 * Verification consists of checking whether the report carries the right
307 * value of RSRP or not, and whether it occurs at the expected time or not.
308 *
309 * @param context the context
310 * @param imsi the IMSI
311 * @param cellId the cell ID
312 * @param rnti the RNTI
313 * @param report LteRrcSap::MeasurementReport
314 */
315 void RecvMeasurementReportCallback(std::string context,
316 uint64_t imsi,
317 uint16_t cellId,
318 uint16_t rnti,
320
321 private:
322 /**
323 * @brief Setup the simulation with the intended UE measurement reporting
324 * configuration, run it, and connect the
325 * `RecvMeasurementReportCallback` function to the
326 * `LteUeRrc::RecvMeasurementReport` trace source.
327 */
328 void DoRun() override;
329
330 /**
331 * @brief Runs at the end of the simulation, verifying that all expected
332 * measurement reports have been examined.
333 */
334 void DoTeardown() override;
335
336 /// Teleport very near function
337 void TeleportVeryNear();
338 /// Teleport near function
339 void TeleportNear();
340 /// Teleport far function
341 void TeleportFar();
342 /// Teleport very far function
343 void TeleportVeryFar();
344
345 /**
346 * @brief The active report triggering configuration.
347 */
349
350 /**
351 * @brief The list of expected time when measurement reports are received by
352 * eNodeB.
353 */
354 std::vector<Time> m_expectedTime;
355
356 /**
357 * @brief The list of expected values of RSRP (in 3GPP range unit) from the
358 * measurement reports received.
359 */
360 std::vector<uint8_t> m_expectedRsrp;
361
362 /**
363 * @brief Pointer to the element of `m_expectedTime` which is expected to
364 * occur next in the simulation.
365 */
366 std::vector<Time>::iterator m_itExpectedTime;
367
368 /**
369 * @brief Pointer to the element of `m_expectedRsrp` which is expected to
370 * occur next in the simulation.
371 */
372 std::vector<uint8_t>::iterator m_itExpectedRsrp;
373
374 /**
375 * @brief The measurement identity being tested. Measurement reports with
376 * different measurement identity (e.g. from handover algorithm) will
377 * be ignored.
378 */
380
381 Ptr<MobilityModel> m_ueMobility; ///< the mobility model
382
383 // end of class LteUeMeasurementsPiecewiseTestCase2
384};
385
386// ===== LTE-UE-MEASUREMENTS-PIECEWISE-3 TEST SUITE ======================== //
387
388/**
389 * @ingroup lte-test
390 *
391 * @brief Test suite for generating calls to UE measurements test case
392 * ns3::LteUeMeasurementsPiecewiseTestCase3.
393 */
399
400/**
401 * @ingroup lte-test
402 *
403 * @brief Testing UE measurements in LTE with simulation of 3 eNodeB and 1 UE in
404 * piecewise configuration and 240 ms report interval.
405 * This test is to cover a corner case using event A4, which is not
406 * covered by LteUeMeasurementsPiecewiseTestCase1 and
407 * LteUeMeasurementsPiecewiseTestCase2. In this case, we test that the UE
408 * measurements at eNB are arriving 240 ms apart. Please note, the
409 * scenario simulated is engineered to specifically test the corner case
410 * in which whenever a new neighbour fulfils the entry condition
411 * for event A4, the UE RRC calls VarMeasReportListAdd method to include
412 * the new cell id in cellsTriggeredList, and then it schedules the
413 * SendMeasurementReport for periodic reporting. However, if the UE has
414 * already started the periodic reporting, scheduling the
415 * SendMeasurementReport method again causes following buggy behaviors:
416 *
417 * 1. It generates an intermediate measurement event, which then leads
418 * to parallel intermediate measurement reports from a UE to its eNB.
419 *
420 * 2. The old EvenId is overwritten by the new EventId stored in
421 * VarMeasReportList. This makes us lose control over the old EventId
422 * and it is impossible to cancel its events later on.
423 *
424 * These buggy behaviors generated an issue reported in
425 * https://gitlab.com/nsnam/ns-3-dev/-/issues/224, where a UE try to
426 * send measurement reports after the RLF, even though all the measurement
427 * events are properly cancelled upon detecting RLF.
428 *
429 * The correct behaviour should be that if a UE has already started the
430 * periodic reporting, and once a new neighbour fulfils the entry
431 * condition, we just need to add its cell id in cellsTriggeredList,
432 * without scheduling a new periodic event.
433 *
434 */
436{
437 public:
438 /**
439 * Constructor
440 *
441 * @param name the reference name
442 * @param config LteRrcSap::ReportConfigEutra
443 * @param expectedTime the expected time
444 */
447 std::vector<Time> expectedTime);
448
450
451 /**
452 * @brief Triggers when eNodeB receives measurement report from UE, then
453 * perform verification on it.
454 *
455 * The trigger is set up beforehand by connecting to the
456 * `LteUeRrc::RecvMeasurementReport` trace source.
457 *
458 * Verification consists of checking whether the report carries the right
459 * value of RSRP or not, and whether it occurs at the expected time or not.
460 *
461 * @param context the context
462 * @param imsi the IMSI
463 * @param cellId the cell ID
464 * @param rnti the RNTI
465 * @param report LteRrcSap::MeasurementReport
466 */
467 void RecvMeasurementReportCallback(std::string context,
468 uint64_t imsi,
469 uint16_t cellId,
470 uint16_t rnti,
472
473 private:
474 /**
475 * @brief Setup the simulation with the intended UE measurement reporting
476 * configuration, run it, and connect the
477 * `RecvMeasurementReportCallback` function to the
478 * `LteUeRrc::RecvMeasurementReport` trace source.
479 */
480 void DoRun() override;
481
482 /**
483 * @brief Runs at the end of the simulation, verifying that all expected
484 * measurement reports have been examined.
485 */
486 void DoTeardown() override;
487
488 /// Teleport the eNb near function
489 void TeleportEnbNear();
490
491 /**
492 * @brief The active report triggering configuration.
493 */
495
496 /**
497 * @brief The list of expected time when measurement reports are received by
498 * eNodeB.
499 */
500 std::vector<Time> m_expectedTime;
501
502 /**
503 * @brief Pointer to the element of `m_expectedTime` which is expected to
504 * occur next in the simulation.
505 */
506 std::vector<Time>::iterator m_itExpectedTime;
507
508 /**
509 * @brief The measurement identity being tested. Measurement reports with
510 * different measurement identity (e.g. from handover algorithm) will
511 * be ignored.
512 */
514
515 Ptr<MobilityModel> m_enbMobility; ///< the mobility model
516
517 // end of class LteUeMeasurementsPiecewiseTestCase3
518};
519
520// ===== LTE-UE-MEASUREMENTS-HANDOVER TEST SUITE =========================== //
521
522/**
523 * @ingroup lte-test
524 *
525 * @brief Test suite for generating calls to UE measurements test case
526 * ns3::LteUeMeasurementsHandoverTestCase.
527 */
533
534/**
535 * @ingroup lte-test
536 *
537 * @brief Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in
538 * a handover configuration.
539 *
540 * The simulation will run for the specified duration, while the handover
541 * command will be issued exactly at the middle of simulation. Handover
542 * test covers four different scenarios: switch from event A1 to event A2,
543 * from event A2 to event A1, from event A3 to event A4, from event A4 to event
544 * A3, from event A2 to event A3, from event A3 to event A2, from event A4 to
545 * event A5, from event A5 to event A4. Additionally, it tests different
546 * handover threshold configurations, A2 threshold difference, A3 offset difference,
547 * A4 and A5 threshold difference. Finally, different handover is tested for
548 * different time-to-trigger (TTT) configurations.
549 *
550 */
552{
553 public:
554 /**
555 * Constructor
556 *
557 * @param name the reference name
558 * @param sourceConfigList std::list<LteRrcSap::ReportConfigEutra>
559 * @param targetConfigList std::list<LteRrcSap::ReportConfigEutra>
560 * @param expectedTime the expected time
561 * @param expectedRsrp the expected RSRP
562 * @param duration the duration
563 */
564 LteUeMeasurementsHandoverTestCase(std::string name,
565 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
566 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
567 std::vector<Time> expectedTime,
568 std::vector<uint8_t> expectedRsrp,
569 Time duration);
570
572
573 /**
574 * @brief Triggers when either one of the eNodeBs receives measurement report
575 * from UE, then perform verification on it.
576 *
577 * The trigger is set up beforehand by connecting to the
578 * `LteUeRrc::RecvMeasurementReport` trace source.
579 *
580 * Verification consists of checking whether the report carries the right
581 * value of RSRP or not, and whether it occurs at the expected time or not.
582 *
583 * @param context the context
584 * @param imsi the IMSI
585 * @param cellId the cell ID
586 * @param rnti the RNTI
587 * @param report LteRrcSap::MeasurementReport
588 */
589 void RecvMeasurementReportCallback(std::string context,
590 uint64_t imsi,
591 uint16_t cellId,
592 uint16_t rnti,
594
595 private:
596 /**
597 * @brief Setup the simulation with the intended UE measurement reporting
598 * configuration, run it, and connect the
599 * `RecvMeasurementReportCallback` function to the
600 * `LteUeRrc::RecvMeasurementReport` trace source.
601 */
602 void DoRun() override;
603
604 /**
605 * @brief Runs at the end of the simulation, verifying that all expected
606 * measurement reports have been examined.
607 */
608 void DoTeardown() override;
609
610 /**
611 * @brief The list of active report triggering configuration for the source
612 * eNodeB.
613 */
614 std::list<LteRrcSap::ReportConfigEutra> m_sourceConfigList;
615
616 /**
617 * @brief The list of active report triggering configuration for the target
618 * eNodeB.
619 */
620 std::list<LteRrcSap::ReportConfigEutra> m_targetConfigList;
621
622 /**
623 * @brief The list of expected time when measurement reports are received by
624 * eNodeB.
625 */
626 std::vector<Time> m_expectedTime;
627
628 /**
629 * @brief The list of expected values of RSRP (in 3GPP range unit) from the
630 * measurement reports received.
631 */
632 std::vector<uint8_t> m_expectedRsrp;
633
634 /**
635 * @brief Pointer to the element of `m_expectedTime` which is expected to
636 * occur next in the simulation.
637 */
638 std::vector<Time>::iterator m_itExpectedTime;
639
640 /**
641 * @brief Pointer to the element of `m_expectedRsrp` which is expected to
642 * occur next in the simulation.
643 */
644 std::vector<uint8_t>::iterator m_itExpectedRsrp;
645
646 /**
647 * @brief Duration of simulation.
648 */
650
651 /**
652 * @brief The list of measurement identities being tested in the source cell.
653 * Measurement reports with different measurement identity (e.g. from
654 * handover algorithm and ANR) will be ignored.
655 */
656 std::set<uint8_t> m_expectedSourceCellMeasId;
657
658 /**
659 * @brief The list of measurement identities being tested in the target cell.
660 * Measurement reports with different measurement identity (e.g. from
661 * handover algorithm and ANR) will be ignored.
662 */
663 std::set<uint8_t> m_expectedTargetCellMeasId;
664
665}; // end of class LteUeMeasurementsHandoverTestCase
666
667#endif /* LTE_TEST_UE_MEASUREMENTS_H */
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in a handover configuration.
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
std::list< LteRrcSap::ReportConfigEutra > m_sourceConfigList
The list of active report triggering configuration for the source eNodeB.
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
std::set< uint8_t > m_expectedTargetCellMeasId
The list of measurement identities being tested in the target cell.
LteUeMeasurementsHandoverTestCase(std::string name, std::list< LteRrcSap::ReportConfigEutra > sourceConfigList, std::list< LteRrcSap::ReportConfigEutra > targetConfigList, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp, Time duration)
Constructor.
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when either one of the eNodeBs receives measurement report from UE, then perform verificatio...
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
std::list< LteRrcSap::ReportConfigEutra > m_targetConfigList
The list of active report triggering configuration for the target eNodeB.
std::set< uint8_t > m_expectedSourceCellMeasId
The list of measurement identities being tested in the source cell.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsHandoverTestCase.
Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in piecewise configuration and 12...
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
uint8_t m_expectedMeasId
The measurement identity being tested.
LteUeMeasurementsPiecewiseTestCase1(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Constructor.
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
Ptr< MobilityModel > m_ueMobility
the mobility model
void TeleportVeryNear()
Teleport very near function.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when eNodeB receives measurement report from UE, then perform verification on it.
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in piecewise configuration and 24...
Ptr< MobilityModel > m_ueMobility
the mobility model
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
void TeleportVeryNear()
Teleport very near function.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
LteUeMeasurementsPiecewiseTestCase2(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Constructor.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when eNodeB receives measurement report from UE, then perform verification on it.
void TeleportVeryFar()
Teleport very far function.
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
uint8_t m_expectedMeasId
The measurement identity being tested.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
Testing UE measurements in LTE with simulation of 3 eNodeB and 1 UE in piecewise configuration and 24...
Ptr< MobilityModel > m_enbMobility
the mobility model
LteUeMeasurementsPiecewiseTestCase3(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime)
Constructor.
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when eNodeB receives measurement report from UE, then perform verification on it.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
uint8_t m_expectedMeasId
The measurement identity being tested.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
void TeleportEnbNear()
Teleport the eNb near function.
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase1...
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase2...
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase3...
Test that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs.
double m_d1
distance between UE and ENB node pair
double m_rsrqDbUeServingCell
RSRQ in dBm UE 1.
double m_rsrpDbmUeServingCell
RSRP in dBm UE 1.
LteUeMeasurementsTestCase(std::string name, double d1, double d2, double rsrpDbmUe1, double rsrpDbmUe2, double rsrqDbUe1, double rsrqDbUe2)
Constructor.
void ReportUeMeasurements(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
Report UE measurements function.
void DoRun() override
Implementation to actually run this TestCase.
double m_rsrqDbUeNeighborCell
RSRQ in dBm UE 2.
double m_d2
distance between UE and other ENB node
double m_rsrpDbmUeNeighborCell
RSRP in dBm UE 2.
void RecvMeasurementReport(uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
Reeive measurement report function.
Test that UE Measurements (see 36.214) calculation works fine in a multi-cell interference scenario.
Keep track of the current position and velocity of an object.
Smart pointer class similar to boost::intrusive_ptr.
encapsulates test code
Definition test.h:1050
A suite of tests to run.
Definition test.h:1267
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MeasurementReport structure.
Specifies criteria for triggering of an E-UTRA measurement reporting event.