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// ===== LTE-UE-MEASUREMENTS-PIECEWISE-2 TEST SUITE ======================== //
250
251/**
252 * @ingroup lte-test
253 *
254 * @brief Test suite for generating calls to UE measurements test case
255 * ns3::LteUeMeasurementsPiecewiseTestCase2.
256 */
262
263/**
264 * @ingroup lte-test
265 *
266 * @brief Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in
267 * piecewise configuration and 240 ms report interval.
268 * Here is intenisvely test events A1 and A2. A1 event should be triggered
269 * when the serving cell becomes better than a given threshold. A2 shall
270 * be triggered when the serving cell becomes worse than threshold. A3
271 * event is triggered when the neighbour becomes offset better than the PCell.
272 * In this test UE is being transported several times during the simulation
273 * duration. Then the test checks if measurement report contains correct
274 * RSRP and RSRQ result, than if CQI info is correctly generated, if the
275 * reporting occurs at the correct time stamp in the simulation and according
276 * to the measurements configuration. It also checks if the reported values
277 * of RSRP and RSRQ are equal to expected reference values.
278 *
279 */
281{
282 public:
283 /**
284 * Constructor
285 *
286 * @param name the reference name
287 * @param config LteRrcSap::ReportConfigEutra
288 * @param expectedTime the expected time
289 * @param expectedRsrp the expected RSRP
290 */
293 std::vector<Time> expectedTime,
294 std::vector<uint8_t> expectedRsrp);
295
297
298 /**
299 * @brief Triggers when eNodeB receives measurement report from UE, then
300 * perform verification on it.
301 *
302 * The trigger is set up beforehand by connecting to the
303 * `LteUeRrc::RecvMeasurementReport` trace source.
304 *
305 * Verification consists of checking whether the report carries the right
306 * value of RSRP or not, and whether it occurs at the expected time or not.
307 *
308 * @param context the context
309 * @param imsi the IMSI
310 * @param cellId the cell ID
311 * @param rnti the RNTI
312 * @param report LteRrcSap::MeasurementReport
313 */
314 void RecvMeasurementReportCallback(std::string context,
315 uint64_t imsi,
316 uint16_t cellId,
317 uint16_t rnti,
319
320 private:
321 /**
322 * @brief Setup the simulation with the intended UE measurement reporting
323 * configuration, run it, and connect the
324 * `RecvMeasurementReportCallback` function to the
325 * `LteUeRrc::RecvMeasurementReport` trace source.
326 */
327 void DoRun() override;
328
329 /**
330 * @brief Runs at the end of the simulation, verifying that all expected
331 * measurement reports have been examined.
332 */
333 void DoTeardown() override;
334
335 /// Teleport very near function
336 void TeleportVeryNear();
337 /// Teleport near function
338 void TeleportNear();
339 /// Teleport far function
340 void TeleportFar();
341 /// Teleport very far function
342 void TeleportVeryFar();
343
344 /**
345 * @brief The active report triggering configuration.
346 */
348
349 /**
350 * @brief The list of expected time when measurement reports are received by
351 * eNodeB.
352 */
353 std::vector<Time> m_expectedTime;
354
355 /**
356 * @brief The list of expected values of RSRP (in 3GPP range unit) from the
357 * measurement reports received.
358 */
359 std::vector<uint8_t> m_expectedRsrp;
360
361 /**
362 * @brief Pointer to the element of `m_expectedTime` which is expected to
363 * occur next in the simulation.
364 */
365 std::vector<Time>::iterator m_itExpectedTime;
366
367 /**
368 * @brief Pointer to the element of `m_expectedRsrp` which is expected to
369 * occur next in the simulation.
370 */
371 std::vector<uint8_t>::iterator m_itExpectedRsrp;
372
373 /**
374 * @brief The measurement identity being tested. Measurement reports with
375 * different measurement identity (e.g. from handover algorithm) will
376 * be ignored.
377 */
379
380 Ptr<MobilityModel> m_ueMobility; ///< the mobility model
381
382}; // end of class LteUeMeasurementsPiecewiseTestCase2
383
384// ===== LTE-UE-MEASUREMENTS-PIECEWISE-3 TEST SUITE ======================== //
385
386/**
387 * @ingroup lte-test
388 *
389 * @brief Test suite for generating calls to UE measurements test case
390 * ns3::LteUeMeasurementsPiecewiseTestCase3.
391 */
397
398/**
399 * @ingroup lte-test
400 *
401 * @brief Testing UE measurements in LTE with simulation of 3 eNodeB and 1 UE in
402 * piecewise configuration and 240 ms report interval.
403 * This test is to cover a corner case using event A4, which is not
404 * covered by LteUeMeasurementsPiecewiseTestCase1 and
405 * LteUeMeasurementsPiecewiseTestCase2. In this case, we test that the UE
406 * measurements at eNB are arriving 240 ms apart. Please note, the
407 * scenario simulated is engineered to specifically test the corner case
408 * in which whenever a new neighbour fulfils the entry condition
409 * for event A4, the UE RRC calls VarMeasReportListAdd method to include
410 * the new cell id in cellsTriggeredList, and then it schedules the
411 * SendMeasurementReport for periodic reporting. However, if the UE has
412 * already started the periodic reporting, scheduling the
413 * SendMeasurementReport method again causes following buggy behaviors:
414 *
415 * 1. It generates an intermediate measurement event, which then leads
416 * to parallel intermediate measurement reports from a UE to its eNB.
417 *
418 * 2. The old EvenId is overwritten by the new EventId stored in
419 * VarMeasReportList. This makes us lose control over the old EventId
420 * and it is impossible to cancel its events later on.
421 *
422 * These buggy behaviors generated an issue reported in
423 * https://gitlab.com/nsnam/ns-3-dev/-/issues/224, where a UE try to
424 * send measurement reports after the RLF, even though all the measurement
425 * events are properly cancelled upon detecting RLF.
426 *
427 * The correct behaviour should be that if a UE has already started the
428 * periodic reporting, and once a new neighbour fulfils the entry
429 * condition, we just need to add its cell id in cellsTriggeredList,
430 * without scheduling a new periodic event.
431 *
432 */
434{
435 public:
436 /**
437 * Constructor
438 *
439 * @param name the reference name
440 * @param config LteRrcSap::ReportConfigEutra
441 * @param expectedTime the expected time
442 */
445 std::vector<Time> expectedTime);
446
448
449 /**
450 * @brief Triggers when eNodeB receives measurement report from UE, then
451 * perform verification on it.
452 *
453 * The trigger is set up beforehand by connecting to the
454 * `LteUeRrc::RecvMeasurementReport` trace source.
455 *
456 * Verification consists of checking whether the report carries the right
457 * value of RSRP or not, and whether it occurs at the expected time or not.
458 *
459 * @param context the context
460 * @param imsi the IMSI
461 * @param cellId the cell ID
462 * @param rnti the RNTI
463 * @param report LteRrcSap::MeasurementReport
464 */
465 void RecvMeasurementReportCallback(std::string context,
466 uint64_t imsi,
467 uint16_t cellId,
468 uint16_t rnti,
470
471 private:
472 /**
473 * @brief Setup the simulation with the intended UE measurement reporting
474 * configuration, run it, and connect the
475 * `RecvMeasurementReportCallback` function to the
476 * `LteUeRrc::RecvMeasurementReport` trace source.
477 */
478 void DoRun() override;
479
480 /**
481 * @brief Runs at the end of the simulation, verifying that all expected
482 * measurement reports have been examined.
483 */
484 void DoTeardown() override;
485
486 /// Teleport the eNb near function
487 void TeleportEnbNear();
488
489 /**
490 * @brief The active report triggering configuration.
491 */
493
494 /**
495 * @brief The list of expected time when measurement reports are received by
496 * eNodeB.
497 */
498 std::vector<Time> m_expectedTime;
499
500 /**
501 * @brief Pointer to the element of `m_expectedTime` which is expected to
502 * occur next in the simulation.
503 */
504 std::vector<Time>::iterator m_itExpectedTime;
505
506 /**
507 * @brief The measurement identity being tested. Measurement reports with
508 * different measurement identity (e.g. from handover algorithm) will
509 * be ignored.
510 */
512
513 Ptr<MobilityModel> m_enbMobility; ///< the mobility model
514
515}; // end of class LteUeMeasurementsPiecewiseTestCase3
516
517// ===== LTE-UE-MEASUREMENTS-HANDOVER TEST SUITE =========================== //
518
519/**
520 * @ingroup lte-test
521 *
522 * @brief Test suite for generating calls to UE measurements test case
523 * ns3::LteUeMeasurementsHandoverTestCase.
524 */
530
531/**
532 * @ingroup lte-test
533 *
534 * @brief Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in
535 * a handover configuration.
536 *
537 * The simulation will run for the specified duration, while the handover
538 * command will be issued exactly at the middle of simulation. Handover
539 * test covers four different scenarios: switch from event A1 to event A2,
540 * from event A2 to event A1, from event A3 to event A4, from event A4 to event
541 * A3, from event A2 to event A3, from event A3 to event A2, from event A4 to
542 * event A5, from event A5 to event A4. Additionally, it tests different
543 * handover threshold configurations, A2 threshold difference, A3 offset difference,
544 * A4 and A5 threshold difference. Finally, different handover is tested for
545 * different time-to-trigger (TTT) configurations.
546 *
547 */
549{
550 public:
551 /**
552 * Constructor
553 *
554 * @param name the reference name
555 * @param sourceConfigList std::list<LteRrcSap::ReportConfigEutra>
556 * @param targetConfigList std::list<LteRrcSap::ReportConfigEutra>
557 * @param expectedTime the expected time
558 * @param expectedRsrp the expected RSRP
559 * @param duration the duration
560 */
561 LteUeMeasurementsHandoverTestCase(std::string name,
562 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
563 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
564 std::vector<Time> expectedTime,
565 std::vector<uint8_t> expectedRsrp,
566 Time duration);
567
569
570 /**
571 * @brief Triggers when either one of the eNodeBs receives measurement report
572 * from UE, then perform verification on it.
573 *
574 * The trigger is set up beforehand by connecting to the
575 * `LteUeRrc::RecvMeasurementReport` trace source.
576 *
577 * Verification consists of checking whether the report carries the right
578 * value of RSRP or not, and whether it occurs at the expected time or not.
579 *
580 * @param context the context
581 * @param imsi the IMSI
582 * @param cellId the cell ID
583 * @param rnti the RNTI
584 * @param report LteRrcSap::MeasurementReport
585 */
586 void RecvMeasurementReportCallback(std::string context,
587 uint64_t imsi,
588 uint16_t cellId,
589 uint16_t rnti,
591
592 private:
593 /**
594 * @brief Setup the simulation with the intended UE measurement reporting
595 * configuration, run it, and connect the
596 * `RecvMeasurementReportCallback` function to the
597 * `LteUeRrc::RecvMeasurementReport` trace source.
598 */
599 void DoRun() override;
600
601 /**
602 * @brief Runs at the end of the simulation, verifying that all expected
603 * measurement reports have been examined.
604 */
605 void DoTeardown() override;
606
607 /**
608 * @brief The list of active report triggering configuration for the source
609 * eNodeB.
610 */
611 std::list<LteRrcSap::ReportConfigEutra> m_sourceConfigList;
612
613 /**
614 * @brief The list of active report triggering configuration for the target
615 * eNodeB.
616 */
617 std::list<LteRrcSap::ReportConfigEutra> m_targetConfigList;
618
619 /**
620 * @brief The list of expected time when measurement reports are received by
621 * eNodeB.
622 */
623 std::vector<Time> m_expectedTime;
624
625 /**
626 * @brief The list of expected values of RSRP (in 3GPP range unit) from the
627 * measurement reports received.
628 */
629 std::vector<uint8_t> m_expectedRsrp;
630
631 /**
632 * @brief Pointer to the element of `m_expectedTime` which is expected to
633 * occur next in the simulation.
634 */
635 std::vector<Time>::iterator m_itExpectedTime;
636
637 /**
638 * @brief Pointer to the element of `m_expectedRsrp` which is expected to
639 * occur next in the simulation.
640 */
641 std::vector<uint8_t>::iterator m_itExpectedRsrp;
642
643 /**
644 * @brief Duration of simulation.
645 */
647
648 /**
649 * @brief The list of measurement identities being tested in the source cell.
650 * Measurement reports with different measurement identity (e.g. from
651 * handover algorithm and ANR) will be ignored.
652 */
653 std::set<uint8_t> m_expectedSourceCellMeasId;
654
655 /**
656 * @brief The list of measurement identities being tested in the target cell.
657 * Measurement reports with different measurement identity (e.g. from
658 * handover algorithm and ANR) will be ignored.
659 */
660 std::set<uint8_t> m_expectedTargetCellMeasId;
661
662}; // end of class LteUeMeasurementsHandoverTestCase
663
664#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.