24 #include <ns3/simulator.h>
26 #include <ns3/callback.h>
27 #include <ns3/config.h>
28 #include <ns3/string.h>
29 #include <ns3/double.h>
31 #include <ns3/boolean.h>
33 #include <ns3/mobility-helper.h>
34 #include <ns3/lte-helper.h>
35 #include <ns3/point-to-point-epc-helper.h>
36 #include <ns3/internet-stack-helper.h>
37 #include <ns3/point-to-point-helper.h>
38 #include <ns3/ipv4-address-helper.h>
39 #include <ns3/ipv4-static-routing-helper.h>
41 #include <ns3/node-container.h>
42 #include <ns3/net-device-container.h>
43 #include <ns3/ipv4-interface-container.h>
45 #include <ns3/ff-mac-scheduler.h>
46 #include <ns3/lte-enb-net-device.h>
47 #include <ns3/lte-enb-phy.h>
48 #include <ns3/lte-enb-rrc.h>
49 #include <ns3/lte-ue-net-device.h>
50 #include <ns3/lte-ue-phy.h>
51 #include <ns3/lte-ue-rrc.h>
55 #include <ns3/lte-common.h>
66 std::string path, uint16_t rnti, uint16_t cellId,
67 double rsrp,
double rsrq,
bool servingCell)
74 std::string path, uint64_t imsi, uint16_t cellId,
86 :
TestSuite (
"lte-ue-measurements", SYSTEM)
117 double d1,
double d2,
125 m_rsrpDbmUeServingCell (rsrpDbmUe1),
126 m_rsrpDbmUeNeighborCell (rsrpDbmUe2),
127 m_rsrqDbUeServingCell (rsrqDbUe1),
128 m_rsrqDbUeNeighborCell (rsrqDbUe2)
130 NS_LOG_INFO (
"Test UE Measurements d1 = " << d1 <<
" m. and d2 = " << d2 <<
" m.");
173 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
193 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
194 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
214 Config::Connect (
"/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
216 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
229 Config::Connect (
"/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
231 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
235 Simulator::Stop (
Seconds (0.800));
238 Simulator::Destroy ();
244 double rsrp,
double rsrq,
274 NS_LOG_DEBUG (
this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
288 NS_LOG_DEBUG (
this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
311 operator<< (std::vector<Time>& v,
const uint64_t& ms)
321 std::vector<uint8_t>&
322 operator<< (std::vector<uint8_t>& v,
const uint8_t& range)
334 :
TestSuite (
"lte-ue-measurements-piecewise-1", SYSTEM)
336 std::vector<Time> expectedTime;
337 std::vector<uint8_t> expectedRsrp;
343 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
344 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
349 expectedTime.clear ();
350 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
351 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
352 expectedRsrp.clear ();
353 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
354 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
356 config, expectedTime, expectedRsrp),
357 TestCase::EXTENSIVE);
361 expectedTime.clear ();
362 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000
364 expectedRsrp.clear ();
365 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57
368 config, expectedTime, expectedRsrp),
369 TestCase::EXTENSIVE);
373 expectedTime.clear ();
374 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064
376 expectedRsrp.clear ();
377 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57
380 config, expectedTime, expectedRsrp),
385 expectedTime.clear ();
386 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
387 expectedRsrp.clear ();
388 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
390 config, expectedTime, expectedRsrp),
391 TestCase::EXTENSIVE);
395 expectedTime.clear ();
396 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
397 expectedRsrp.clear ();
398 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
400 config, expectedTime, expectedRsrp),
401 TestCase::EXTENSIVE);
406 expectedTime.clear ();
407 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480
409 expectedRsrp.clear ();
410 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51
413 config, expectedTime, expectedRsrp),
419 expectedTime.clear ();
420 expectedRsrp.clear ();
422 config, expectedTime, expectedRsrp),
423 TestCase::TAKES_FOREVER);
428 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
430 expectedTime.clear ();
431 expectedRsrp.clear ();
433 config, expectedTime, expectedRsrp),
434 TestCase::TAKES_FOREVER);
438 expectedTime.clear ();
439 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
440 expectedRsrp.clear ();
441 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
443 config, expectedTime, expectedRsrp),
448 expectedTime.clear ();
449 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
450 expectedRsrp.clear ();
451 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
453 config, expectedTime, expectedRsrp),
454 TestCase::EXTENSIVE);
458 expectedTime.clear ();
459 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
460 expectedRsrp.clear ();
461 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
463 config, expectedTime, expectedRsrp),
464 TestCase::TAKES_FOREVER);
468 expectedTime.clear ();
469 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
470 expectedRsrp.clear ();
471 expectedRsrp << 47 << 47 << 51 << 57 << 57;
473 config, expectedTime, expectedRsrp),
479 expectedTime.clear ();
480 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
481 expectedRsrp.clear ();
482 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
484 config, expectedTime, expectedRsrp),
485 TestCase::EXTENSIVE);
490 expectedTime.clear ();
491 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
492 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
493 expectedRsrp.clear ();
494 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
495 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
497 config, expectedTime, expectedRsrp),
498 TestCase::EXTENSIVE);
507 expectedTime.clear ();
508 expectedRsrp.clear ();
512 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
515 config, expectedTime, expectedRsrp),
516 TestCase::EXTENSIVE);
520 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
523 config, expectedTime, expectedRsrp),
524 TestCase::EXTENSIVE);
528 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
531 config, expectedTime, expectedRsrp),
532 TestCase::EXTENSIVE);
545 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
548 m_expectedTime (expectedTime),
549 m_expectedRsrp (expectedRsrp)
556 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
577 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
601 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
602 positionAlloc->
Add (
Vector (100.0, 0.0, 0.0));
619 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
636 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
671 Simulator::Stop (
Seconds (2.201));
673 Simulator::Destroy ();
683 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
690 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
702 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
703 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
704 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
706 "Report should not have neighboring cells information");
708 "Unexpected report size");
712 "Reporting should not have occurred at "
724 uint16_t observedRsrp = measResults.
rsrpResult;
729 "Reporting should not have occurred at this time");
731 "The RSRP observed differs with the reference RSRP");
774 :
TestSuite (
"lte-ue-measurements-piecewise-2", SYSTEM)
776 std::vector<Time> expectedTime;
777 std::vector<uint8_t> expectedRsrp;
788 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
789 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
794 expectedTime.clear ();
795 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
796 expectedRsrp.clear ();
797 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
799 config, expectedTime, expectedRsrp),
800 TestCase::EXTENSIVE);
804 expectedTime.clear ();
805 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
806 expectedRsrp.clear ();
807 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
809 config, expectedTime, expectedRsrp),
810 TestCase::TAKES_FOREVER);
814 expectedTime.clear ();
815 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
816 expectedRsrp.clear ();
817 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
819 config, expectedTime, expectedRsrp),
820 TestCase::EXTENSIVE);
825 expectedTime.clear ();
826 expectedRsrp.clear ();
828 config, expectedTime, expectedRsrp),
829 TestCase::TAKES_FOREVER);
834 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
836 expectedTime.clear ();
837 expectedRsrp.clear ();
839 config, expectedTime, expectedRsrp),
840 TestCase::TAKES_FOREVER);
844 expectedTime.clear ();
845 expectedTime << 800 << 1400 << 1640 << 1880;
846 expectedRsrp.clear ();
847 expectedRsrp << 52 << 56 << 52 << 56;
849 config, expectedTime, expectedRsrp),
850 TestCase::TAKES_FOREVER);
854 expectedTime.clear ();
855 expectedTime << 800 << 1600 << 1840 << 2080;
856 expectedRsrp.clear ();
857 expectedRsrp << 52 << 52 << 56 << 59;
859 config, expectedTime, expectedRsrp),
860 TestCase::EXTENSIVE);
865 expectedTime.clear ();
866 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
867 expectedRsrp.clear ();
868 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
870 config, expectedTime, expectedRsrp),
871 TestCase::TAKES_FOREVER);
876 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
879 expectedTime.clear ();
880 expectedTime << 800 << 1600;
881 expectedRsrp.clear ();
882 expectedRsrp << 52 << 52;
884 config, expectedTime, expectedRsrp),
889 expectedTime.clear ();
890 expectedTime << 800 << 1400 << 1640 << 1880;
891 expectedRsrp.clear ();
892 expectedRsrp << 52 << 56 << 52 << 56;
894 config, expectedTime, expectedRsrp),
895 TestCase::EXTENSIVE);
899 expectedTime.clear ();
900 expectedTime << 960 << 1560 << 1800 << 2040;
901 expectedRsrp.clear ();
902 expectedRsrp << 52 << 56 << 56 << 59;
904 config, expectedTime, expectedRsrp),
905 TestCase::EXTENSIVE);
909 expectedTime.clear ();
910 expectedTime << 1720 << 1960 << 2200;
911 expectedRsrp.clear ();
912 expectedRsrp << 52 << 56 << 72;
914 config, expectedTime, expectedRsrp),
921 expectedTime.clear ();
922 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
923 expectedRsrp.clear ();
924 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
926 config, expectedTime, expectedRsrp),
933 expectedTime.clear ();
934 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
935 expectedRsrp.clear ();
936 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
938 config, expectedTime, expectedRsrp),
939 TestCase::EXTENSIVE);
944 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
947 expectedTime.clear ();
948 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
949 expectedRsrp.clear ();
950 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
952 config, expectedTime, expectedRsrp),
957 expectedTime.clear ();
958 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
959 expectedRsrp.clear ();
960 expectedRsrp << 63 << 52 << 56 << 52 << 56;
962 config, expectedTime, expectedRsrp),
963 TestCase::EXTENSIVE);
967 expectedTime.clear ();
968 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
969 expectedRsrp.clear ();
970 expectedRsrp << 63 << 52 << 56 << 56 << 59;
972 config, expectedTime, expectedRsrp),
977 expectedTime.clear ();
978 expectedTime << 1720 << 1960 << 2200;
979 expectedRsrp.clear ();
980 expectedRsrp << 52 << 56 << 72;
982 config, expectedTime, expectedRsrp),
983 TestCase::TAKES_FOREVER);
988 expectedTime.clear ();
989 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
990 expectedRsrp.clear ();
991 expectedRsrp << 63 << 52 << 52 << 56 << 59;
993 config, expectedTime, expectedRsrp),
999 expectedTime.clear ();
1000 expectedRsrp.clear ();
1002 config, expectedTime, expectedRsrp),
1003 TestCase::TAKES_FOREVER);
1008 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1011 expectedTime.clear ();
1012 expectedRsrp.clear ();
1014 config, expectedTime, expectedRsrp),
1015 TestCase::EXTENSIVE);
1020 config, expectedTime, expectedRsrp),
1021 TestCase::TAKES_FOREVER);
1026 config, expectedTime, expectedRsrp),
1027 TestCase::TAKES_FOREVER);
1032 expectedTime.clear ();
1033 expectedTime << 800 << 1400 << 1640 << 1880;
1034 expectedRsrp.clear ();
1035 expectedRsrp << 52 << 56 << 52 << 56;
1037 config, expectedTime, expectedRsrp),
1038 TestCase::EXTENSIVE);
1042 expectedTime.clear ();
1043 expectedTime << 800 << 1400 << 1640 << 1880;
1044 expectedRsrp.clear ();
1045 expectedRsrp << 52 << 56 << 52 << 56;
1047 config, expectedTime, expectedRsrp),
1048 TestCase::EXTENSIVE);
1052 expectedTime.clear ();
1053 expectedTime << 960 << 1560 << 1800 << 2040;
1054 expectedRsrp.clear ();
1055 expectedRsrp << 52 << 56 << 56 << 59;
1057 config, expectedTime, expectedRsrp),
1058 TestCase::TAKES_FOREVER);
1062 expectedTime.clear ();
1063 expectedTime << 1720 << 1960 << 2200;
1064 expectedRsrp.clear ();
1065 expectedRsrp << 52 << 56 << 72;
1067 config, expectedTime, expectedRsrp),
1073 expectedTime.clear ();
1074 expectedTime << 800 << 1600 << 1840 << 2080;
1075 expectedRsrp.clear ();
1076 expectedRsrp << 52 << 52 << 56 << 59;
1078 config, expectedTime, expectedRsrp),
1084 expectedTime.clear ();
1085 expectedRsrp.clear ();
1087 config, expectedTime, expectedRsrp),
1088 TestCase::TAKES_FOREVER);
1093 expectedTime.clear ();
1094 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1095 expectedRsrp.clear ();
1096 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1098 config, expectedTime, expectedRsrp),
1099 TestCase::EXTENSIVE);
1103 expectedTime.clear ();
1104 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1105 expectedRsrp.clear ();
1106 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1108 config, expectedTime, expectedRsrp),
1109 TestCase::TAKES_FOREVER);
1113 expectedTime.clear ();
1114 expectedRsrp.clear ();
1116 config, expectedTime, expectedRsrp),
1117 TestCase::EXTENSIVE);
1130 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
1133 m_expectedTime (expectedTime),
1134 m_expectedRsrp (expectedRsrp)
1141 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1162 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1186 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
1187 positionAlloc->
Add (
Vector (600.0, 0.0, 0.0));
1188 positionAlloc->
Add (
Vector (50.0, 0.0, 0.0));
1205 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1226 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1261 Simulator::Stop (
Seconds (2.201));
1263 Simulator::Destroy ();
1273 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1280 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1292 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1293 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1294 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1295 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1301 "Unexpected report content");
1306 "Unexpected report content");
1307 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1311 "Report contains cgi-info, which is not supported");
1313 "Report does not contain measured RSRP result");
1315 "Report does not contain measured RSRQ result");
1316 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1317 <<
" rsrp=" << (uint16_t) it->rsrpResult
1318 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1319 <<
" rsrq=" << (uint16_t) it->rsrqResult
1320 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1327 "Reporting should not have occurred at "
1339 uint16_t observedRsrp = measResults.
rsrpResult;
1344 "Reporting should not have occurred at this time");
1346 "The RSRP observed differs with the reference RSRP");
1390 :
TestSuite (
"lte-ue-measurements-handover", SYSTEM)
1392 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1393 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1394 std::vector<Time> expectedTime;
1395 std::vector<uint8_t> expectedRsrp;
1398 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1399 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1400 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1403 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1404 sourceConfigList.push_back (sourceConfig);
1407 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1408 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1409 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1412 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1413 targetConfigList.push_back (targetConfig);
1418 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1419 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1420 expectedTime.clear ();
1421 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1422 expectedRsrp.clear ();
1423 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1425 sourceConfigList, targetConfigList,
1426 expectedTime, expectedRsrp,
1428 TestCase::TAKES_FOREVER);
1431 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1432 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1433 expectedTime.clear ();
1434 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1435 expectedRsrp.clear ();
1436 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
1438 sourceConfigList, targetConfigList,
1439 expectedTime, expectedRsrp,
1445 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1446 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1447 sourceConfigList.front ().threshold1.range = 54;
1448 sourceConfigList.front ().threshold2.range = 54;
1449 sourceConfigList.front ().a3Offset = 1;
1450 targetConfigList.front ().threshold1.range = 54;
1451 targetConfigList.front ().threshold2.range = 54;
1452 targetConfigList.front ().a3Offset = 1;
1455 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1456 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1457 expectedTime.clear ();
1458 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
1459 expectedRsrp.clear ();
1460 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
1462 sourceConfigList, targetConfigList,
1463 expectedTime, expectedRsrp,
1465 TestCase::EXTENSIVE);
1468 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1469 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1470 expectedTime.clear ();
1471 expectedRsrp.clear ();
1473 sourceConfigList, targetConfigList,
1474 expectedTime, expectedRsrp,
1476 TestCase::TAKES_FOREVER);
1479 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1480 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1481 expectedTime.clear ();
1482 expectedTime << 1200 << 1440 << 1680 << 1920;
1483 expectedRsrp.clear ();
1484 expectedRsrp << 53 << 53 << 53 << 53;
1486 sourceConfigList, targetConfigList,
1487 expectedTime, expectedRsrp,
1489 TestCase::TAKES_FOREVER);
1492 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1493 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1494 expectedTime.clear ();
1495 expectedTime << 1200 << 1440 << 1680 << 1920;
1496 expectedRsrp.clear ();
1497 expectedRsrp << 53 << 53 << 53 << 53;
1499 sourceConfigList, targetConfigList,
1500 expectedTime, expectedRsrp,
1505 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1506 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1507 expectedTime.clear ();
1508 expectedTime << 1200 << 1440 << 1680 << 1920;
1509 expectedRsrp.clear ();
1510 expectedRsrp << 53 << 53 << 53 << 53;
1512 sourceConfigList, targetConfigList,
1513 expectedTime, expectedRsrp,
1515 TestCase::EXTENSIVE);
1518 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1519 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1520 expectedTime.clear ();
1521 expectedTime << 1200 << 1440 << 1680 << 1920;
1522 expectedRsrp.clear ();
1523 expectedRsrp << 53 << 53 << 53 << 53;
1525 sourceConfigList, targetConfigList,
1526 expectedTime, expectedRsrp,
1528 TestCase::TAKES_FOREVER);
1531 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1532 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1533 expectedTime.clear ();
1534 expectedTime << 1200 << 1440 << 1680 << 1920;
1535 expectedRsrp.clear ();
1536 expectedRsrp << 53 << 53 << 53 << 53;
1538 sourceConfigList, targetConfigList,
1539 expectedTime, expectedRsrp,
1541 TestCase::TAKES_FOREVER);
1544 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1545 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1546 expectedTime.clear ();
1547 expectedTime << 1200 << 1440 << 1680 << 1920;
1548 expectedRsrp.clear ();
1549 expectedRsrp << 53 << 53 << 53 << 53;
1551 sourceConfigList, targetConfigList,
1552 expectedTime, expectedRsrp,
1554 TestCase::EXTENSIVE);
1558 sourceConfigList.front ().threshold1.range = 52;
1559 targetConfigList.front ().threshold1.range = 56;
1562 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1563 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1564 expectedTime.clear ();
1565 expectedTime << 200 << 440 << 680 << 920;
1566 expectedRsrp.clear ();
1567 expectedRsrp << 55 << 55 << 55 << 55;
1569 sourceConfigList, targetConfigList,
1570 expectedTime, expectedRsrp,
1572 TestCase::EXTENSIVE);
1575 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1576 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1577 expectedTime.clear ();
1578 expectedTime << 1200 << 1440 << 1680 << 1920;
1579 expectedRsrp.clear ();
1580 expectedRsrp << 53 << 53 << 53 << 53;
1582 sourceConfigList, targetConfigList,
1583 expectedTime, expectedRsrp,
1588 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1589 sourceConfigList.front ().a3Offset = -30;
1590 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1591 targetConfigList.front ().a3Offset = 30;
1592 expectedTime.clear ();
1593 expectedTime << 200 << 440 << 680 << 920;
1594 expectedRsrp.clear ();
1595 expectedRsrp << 55 << 55 << 55 << 55;
1597 sourceConfigList, targetConfigList,
1598 expectedTime, expectedRsrp,
1603 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1604 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1605 expectedTime.clear ();
1606 expectedTime << 200 << 440 << 680 << 920;
1607 expectedRsrp.clear ();
1608 expectedRsrp << 55 << 55 << 55 << 55;
1610 sourceConfigList, targetConfigList,
1611 expectedTime, expectedRsrp,
1613 TestCase::EXTENSIVE);
1616 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1617 sourceConfigList.front ().threshold2.range = 52;
1618 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1619 targetConfigList.front ().threshold2.range = 56;
1620 expectedTime.clear ();
1621 expectedRsrp.clear ();
1623 sourceConfigList, targetConfigList,
1624 expectedTime, expectedRsrp,
1626 TestCase::EXTENSIVE);
1630 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1631 sourceConfigList.front ().a3Offset = 1;
1632 sourceConfigList.front ().threshold1.range = 0;
1633 sourceConfigList.front ().threshold2.range = 0;
1634 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1635 targetConfigList.front ().a3Offset = 1;
1636 targetConfigList.front ().threshold1.range = 0;
1637 targetConfigList.front ().threshold2.range = 0;
1640 sourceConfigList.front ().timeToTrigger = 1024;
1641 targetConfigList.front ().timeToTrigger = 100;
1642 expectedTime.clear ();
1643 expectedTime << 1300 << 1540 << 1780;
1644 expectedRsrp.clear ();
1645 expectedRsrp << 53 << 53 << 53;
1647 sourceConfigList, targetConfigList,
1648 expectedTime, expectedRsrp,
1653 sourceConfigList.front ().timeToTrigger = 1024;
1654 targetConfigList.front ().timeToTrigger = 640;
1655 expectedTime.clear ();
1656 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
1657 expectedRsrp.clear ();
1658 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
1660 sourceConfigList, targetConfigList,
1661 expectedTime, expectedRsrp,
1663 TestCase::EXTENSIVE);
1676 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
1677 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
1678 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
1681 m_sourceConfigList (sourceConfigList),
1682 m_targetConfigList (targetConfigList),
1683 m_expectedTime (expectedTime),
1684 m_expectedRsrp (expectedRsrp),
1685 m_duration (duration)
1692 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1715 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1738 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
1739 positionAlloc->
Add (
Vector (900.0, 0.0, 0.0));
1740 positionAlloc->
Add (
Vector (400.0, 0.0, 0.0));
1748 Ptr<Node> pgw = epcHelper->GetPgwNode ();
1752 remoteHostContainer.
Create (1);
1755 internet.
Install (remoteHostContainer);
1764 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1788 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
1812 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1817 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1827 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1832 Config::Connect (
"/NodeList/2/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1838 ueDevs.
Get (0), enbDevs.
Get (0), enbDevs.
Get (1));
1843 Simulator::Destroy ();
1853 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1860 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1866 bool isCorrectMeasId;
1872 else if (cellId == 2)
1882 if (isCorrectMeasId)
1887 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1888 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1889 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1890 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1896 "Unexpected report content");
1901 "Unexpected report content");
1902 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1907 "Report contains cgi-info, which is not supported");
1909 "Report does not contain measured RSRP result");
1911 "Report does not contain measured RSRQ result");
1912 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1913 <<
" rsrp=" << (uint16_t) it->rsrpResult
1914 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1915 <<
" rsrq=" << (uint16_t) it->rsrqResult
1916 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1923 "Reporting should not have occurred at "
1935 uint16_t observedRsrp = measResults.
rsrpResult;
1940 "Reporting should not have occurred at this time");
1942 "The RSRP observed differs with the reference RSRP");
Ptr< MobilityModel > m_ueMobility
Simulation virtual time values and global simulation resolution.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint8_t m_expectedMeasId
The measurement identity being tested.
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in piecewise configuration and 24...
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
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...
holds a vector of std::pair of Ptr and interface index.
void SetDefaultRoute(Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a default route to the static routing table.
std::list< LteRrcSap::ReportConfigEutra > m_sourceConfigList
The list of active report triggering configuration for the source eNodeB.
hold variables of type string
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition...
void HandoverRequest(Time hoTime, Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, Ptr< NetDevice > targetEnbDev)
Manually trigger an X2-based handover of a UE between two eNBs at a specific simulation time...
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
std::list< MeasResultEutra > measResultListEutra
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
aggregate IP/TCP/UDP functionality to existing Nodes.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
fatal error handling
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it...
Build a set of PointToPointNetDevice objects.
void Connect(std::string path, const CallbackBase &cb)
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Call ActivateDataRadioBearer (ueDevice, bearer) for each UE device in a given set.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
static LteUeMeasurementsPiecewiseTestSuite2 lteUeMeasurementsPiecewiseTestSuite2
virtual ~LteUeMeasurementsPiecewiseTestCase2()
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received...
Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in piecewise configuration and 12...
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...
Test that UE Measurements (see 36.214) calculation works fine in a multi-cell interference scenario...
void SetSchedulerType(std::string type)
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
Class for representing data rates.
Keep track of the current position and velocity of an object.
This class contains the specification of EPS Bearers.
std::set< uint8_t > m_expectedTargetCellMeasId
The list of measurement identities being tested in the target cell.
uint8_t AddUeMeasReportConfig(LteRrcSap::ReportConfigEutra config)
Add a new UE measurement reporting configuration.
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it...
double m_rsrpDbmUeNeighborCell
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
static LteUeMeasurementsTestSuite lteUeMeasurementsTestSuite
void ReportUeMeasurementsCallback(LteUeMeasurementsTestCase *testcase, std::string path, uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
hold variables of type 'enum'
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsHandoverTestCase.
Attribute for objects of type ns3::Time.
Hold an unsigned integer type.
LteUeMeasurementsPiecewiseTestSuite2()
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
set an attribute for the scheduler to be created
virtual ~LteUeMeasurementsPiecewiseTestCase1()
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
holds a vector of ns3::NetDevice pointers
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received...
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
double m_rsrqDbUeServingCell
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
LteUeMeasurementsPiecewiseTestCase1(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Access to the Ipv4 forwarding table, interfaces, and configuration.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
Time m_duration
Duration of simulation.
void RecvMeasurementReport(uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
void SetDefault(std::string name, const AttributeValue &value)
bool reportOnLeave
Indicates whether or not the UE shall initiate the measurement reporting procedure when the leaving c...
keep track of a set of node pointers.
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 >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
bool haveMeasResultNeighCells
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
enum ns3::LteRrcSap::ReportConfigEutra::@73 eventId
Choice of E-UTRA event triggered reporting criteria.
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
virtual ~LteUeMeasurementsTestCase()
uint8_t range
Value range used in RSRP/RSRQ threshold.
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)
double m_rsrqDbUeNeighborCell
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase1...
virtual void DoRun(void)
Implementation to actually run this TestCase.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received...
LteUeMeasurementsPiecewiseTestSuite1()
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
void SetPosition(const Vector &position)
std::list< LteRrcSap::ReportConfigEutra > m_targetConfigList
The list of active report triggering configuration for the target eNodeB.
LteUeMeasurementsTestCase(std::string name, double d1, double d2, double rsrpDbmUe1, double rsrpDbmUe2, double rsrqDbUe1, double rsrqDbUe2)
int8_t a3Offset
Offset value for Event A3. An integer between -30 and 30. The actual value is (value * 0...
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
static LteUeMeasurementsPiecewiseTestSuite1 lteUeMeasurementsPiecewiseTestSuite1
Helper class used to assign positions and mobility models to nodes.
void AddNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface, uint32_t metric=0)
Add a network route to the static routing table.
double m_rsrpDbmUeServingCell
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in a handover configuration...
Ptr< MobilityModel > m_ueMobility
enum ns3::LteRrcSap::ReportConfigEutra::@77 reportInterval
Indicates the interval between periodical reports.
Ipv4 addresses are stored in host order in this class.
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
std::set< uint8_t > m_expectedSourceCellMeasId
The list of measurement identities being tested in the source cell.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
uint8_t m_expectedMeasId
The measurement identity being tested.
Helper class that adds ns3::Ipv4StaticRouting objects.
hold objects of type ns3::DataRate
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
enum ns3::LteRrcSap::ReportConfigEutra::@75 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
Time Seconds(double value)
Construct a Time in the indicated unit.
void ReportUeMeasurements(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
LteUeMeasurementsHandoverTestSuite()
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(LteUeMeasurementsTestCase *testcase, std::string path, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
std::string GetName(void) const
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase2...
LteUeMeasurementsTestSuite()
virtual ~LteUeMeasurementsHandoverTestCase()
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 Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
enum ns3::LteRrcSap::ThresholdEutra::@71 choice
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Hold a floating point type.
enum ns3::LteRrcSap::ReportConfigEutra::@72 triggerType
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
uint16_t timeToTrigger
Time during which specific criteria for the event needs to be met in order to trigger a measurement r...
void SetAttribute(std::string name, const AttributeValue &value)
The eNodeB device implementation.
Ptr< T > GetObject(void) const
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
static LteUeMeasurementsHandoverTestSuite lteUeMeasurementsHandoverTestSuite
The LtePhy models the physical layer of LTE.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
LteUeMeasurementsPiecewiseTestCase2(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
ThresholdEutra threshold2
Threshold for event A5.
The LteUeNetDevice class implements the UE net device.