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.");
170 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
190 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
191 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
211 Config::Connect (
"/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
213 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
226 Config::Connect (
"/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
228 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
232 Simulator::Stop (Seconds (0.800));
235 Simulator::Destroy ();
241 double rsrp,
double rsrq,
271 NS_LOG_DEBUG (
this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
285 NS_LOG_DEBUG (
this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
308 operator<< (std::vector<Time>& v,
const uint64_t& ms)
318 std::vector<uint8_t>&
319 operator<< (std::vector<uint8_t>& v,
const uint8_t& range)
331 :
TestSuite (
"lte-ue-measurements-piecewise-1", SYSTEM)
333 std::vector<Time> expectedTime;
334 std::vector<uint8_t> expectedRsrp;
340 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
341 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
346 expectedTime.clear ();
347 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
348 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
349 expectedRsrp.clear ();
350 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
351 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
353 config, expectedTime, expectedRsrp),
354 TestCase::EXTENSIVE);
358 expectedTime.clear ();
359 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000
361 expectedRsrp.clear ();
362 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57
365 config, expectedTime, expectedRsrp),
366 TestCase::EXTENSIVE);
370 expectedTime.clear ();
371 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064
373 expectedRsrp.clear ();
374 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57
377 config, expectedTime, expectedRsrp),
382 expectedTime.clear ();
383 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
384 expectedRsrp.clear ();
385 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
387 config, expectedTime, expectedRsrp),
388 TestCase::EXTENSIVE);
392 expectedTime.clear ();
393 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
394 expectedRsrp.clear ();
395 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
397 config, expectedTime, expectedRsrp),
398 TestCase::EXTENSIVE);
403 expectedTime.clear ();
404 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480
406 expectedRsrp.clear ();
407 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51
410 config, expectedTime, expectedRsrp),
416 expectedTime.clear ();
417 expectedRsrp.clear ();
419 config, expectedTime, expectedRsrp),
420 TestCase::TAKES_FOREVER);
425 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
427 expectedTime.clear ();
428 expectedRsrp.clear ();
430 config, expectedTime, expectedRsrp),
431 TestCase::TAKES_FOREVER);
435 expectedTime.clear ();
436 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
437 expectedRsrp.clear ();
438 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
440 config, expectedTime, expectedRsrp),
445 expectedTime.clear ();
446 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
447 expectedRsrp.clear ();
448 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
450 config, expectedTime, expectedRsrp),
451 TestCase::EXTENSIVE);
455 expectedTime.clear ();
456 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
457 expectedRsrp.clear ();
458 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
460 config, expectedTime, expectedRsrp),
461 TestCase::TAKES_FOREVER);
465 expectedTime.clear ();
466 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
467 expectedRsrp.clear ();
468 expectedRsrp << 47 << 47 << 51 << 57 << 57;
470 config, expectedTime, expectedRsrp),
476 expectedTime.clear ();
477 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
478 expectedRsrp.clear ();
479 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
481 config, expectedTime, expectedRsrp),
482 TestCase::EXTENSIVE);
487 expectedTime.clear ();
488 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
489 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
490 expectedRsrp.clear ();
491 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
492 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
494 config, expectedTime, expectedRsrp),
495 TestCase::EXTENSIVE);
504 expectedTime.clear ();
505 expectedRsrp.clear ();
509 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
512 config, expectedTime, expectedRsrp),
513 TestCase::EXTENSIVE);
517 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
520 config, expectedTime, expectedRsrp),
521 TestCase::EXTENSIVE);
525 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
528 config, expectedTime, expectedRsrp),
529 TestCase::EXTENSIVE);
542 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
545 m_expectedTime (expectedTime),
546 m_expectedRsrp (expectedRsrp)
553 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
574 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
595 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
596 positionAlloc->
Add (
Vector (100.0, 0.0, 0.0));
613 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
630 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
643 Simulator::Schedule (MilliSeconds (301),
645 Simulator::Schedule (MilliSeconds (401),
647 Simulator::Schedule (MilliSeconds (601),
649 Simulator::Schedule (MilliSeconds (801),
651 Simulator::Schedule (MilliSeconds (1001),
653 Simulator::Schedule (MilliSeconds (1201),
655 Simulator::Schedule (MilliSeconds (1401),
657 Simulator::Schedule (MilliSeconds (1601),
659 Simulator::Schedule (MilliSeconds (1801),
661 Simulator::Schedule (MilliSeconds (2001),
665 Simulator::Stop (Seconds (2.201));
667 Simulator::Destroy ();
677 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
684 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
696 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
697 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
698 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
700 "Report should not have neighboring cells information");
702 "Unexpected report size");
706 "Reporting should not have occurred at "
718 uint16_t observedRsrp = measResults.
rsrpResult;
723 "Reporting should not have occurred at this time");
725 "The RSRP observed differs with the reference RSRP");
768 :
TestSuite (
"lte-ue-measurements-piecewise-2", SYSTEM)
770 std::vector<Time> expectedTime;
771 std::vector<uint8_t> expectedRsrp;
782 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
783 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
788 expectedTime.clear ();
789 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
790 expectedRsrp.clear ();
791 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
793 config, expectedTime, expectedRsrp),
794 TestCase::EXTENSIVE);
798 expectedTime.clear ();
799 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
800 expectedRsrp.clear ();
801 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
803 config, expectedTime, expectedRsrp),
804 TestCase::TAKES_FOREVER);
808 expectedTime.clear ();
809 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
810 expectedRsrp.clear ();
811 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
813 config, expectedTime, expectedRsrp),
814 TestCase::EXTENSIVE);
819 expectedTime.clear ();
820 expectedRsrp.clear ();
822 config, expectedTime, expectedRsrp),
823 TestCase::TAKES_FOREVER);
828 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
830 expectedTime.clear ();
831 expectedRsrp.clear ();
833 config, expectedTime, expectedRsrp),
834 TestCase::TAKES_FOREVER);
838 expectedTime.clear ();
839 expectedTime << 800 << 1400 << 1640 << 1880;
840 expectedRsrp.clear ();
841 expectedRsrp << 52 << 56 << 52 << 56;
843 config, expectedTime, expectedRsrp),
844 TestCase::TAKES_FOREVER);
848 expectedTime.clear ();
849 expectedTime << 800 << 1600 << 1840 << 2080;
850 expectedRsrp.clear ();
851 expectedRsrp << 52 << 52 << 56 << 59;
853 config, expectedTime, expectedRsrp),
854 TestCase::EXTENSIVE);
859 expectedTime.clear ();
860 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
861 expectedRsrp.clear ();
862 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
864 config, expectedTime, expectedRsrp),
865 TestCase::TAKES_FOREVER);
870 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
873 expectedTime.clear ();
874 expectedTime << 800 << 1600;
875 expectedRsrp.clear ();
876 expectedRsrp << 52 << 52;
878 config, expectedTime, expectedRsrp),
883 expectedTime.clear ();
884 expectedTime << 800 << 1400 << 1640 << 1880;
885 expectedRsrp.clear ();
886 expectedRsrp << 52 << 56 << 52 << 56;
888 config, expectedTime, expectedRsrp),
889 TestCase::EXTENSIVE);
893 expectedTime.clear ();
894 expectedTime << 960 << 1560 << 1800 << 2040;
895 expectedRsrp.clear ();
896 expectedRsrp << 52 << 56 << 56 << 59;
898 config, expectedTime, expectedRsrp),
899 TestCase::EXTENSIVE);
903 expectedTime.clear ();
904 expectedTime << 1720 << 1960 << 2200;
905 expectedRsrp.clear ();
906 expectedRsrp << 52 << 56 << 72;
908 config, expectedTime, expectedRsrp),
915 expectedTime.clear ();
916 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
917 expectedRsrp.clear ();
918 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
920 config, expectedTime, expectedRsrp),
927 expectedTime.clear ();
928 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
929 expectedRsrp.clear ();
930 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
932 config, expectedTime, expectedRsrp),
933 TestCase::EXTENSIVE);
938 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
941 expectedTime.clear ();
942 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
943 expectedRsrp.clear ();
944 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
946 config, expectedTime, expectedRsrp),
951 expectedTime.clear ();
952 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
953 expectedRsrp.clear ();
954 expectedRsrp << 63 << 52 << 56 << 52 << 56;
956 config, expectedTime, expectedRsrp),
957 TestCase::EXTENSIVE);
961 expectedTime.clear ();
962 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
963 expectedRsrp.clear ();
964 expectedRsrp << 63 << 52 << 56 << 56 << 59;
966 config, expectedTime, expectedRsrp),
971 expectedTime.clear ();
972 expectedTime << 1720 << 1960 << 2200;
973 expectedRsrp.clear ();
974 expectedRsrp << 52 << 56 << 72;
976 config, expectedTime, expectedRsrp),
977 TestCase::TAKES_FOREVER);
982 expectedTime.clear ();
983 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
984 expectedRsrp.clear ();
985 expectedRsrp << 63 << 52 << 52 << 56 << 59;
987 config, expectedTime, expectedRsrp),
993 expectedTime.clear ();
994 expectedRsrp.clear ();
996 config, expectedTime, expectedRsrp),
997 TestCase::TAKES_FOREVER);
1002 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1005 expectedTime.clear ();
1006 expectedRsrp.clear ();
1008 config, expectedTime, expectedRsrp),
1009 TestCase::EXTENSIVE);
1014 config, expectedTime, expectedRsrp),
1015 TestCase::TAKES_FOREVER);
1020 config, expectedTime, expectedRsrp),
1021 TestCase::TAKES_FOREVER);
1026 expectedTime.clear ();
1027 expectedTime << 800 << 1400 << 1640 << 1880;
1028 expectedRsrp.clear ();
1029 expectedRsrp << 52 << 56 << 52 << 56;
1031 config, expectedTime, expectedRsrp),
1032 TestCase::EXTENSIVE);
1036 expectedTime.clear ();
1037 expectedTime << 800 << 1400 << 1640 << 1880;
1038 expectedRsrp.clear ();
1039 expectedRsrp << 52 << 56 << 52 << 56;
1041 config, expectedTime, expectedRsrp),
1042 TestCase::EXTENSIVE);
1046 expectedTime.clear ();
1047 expectedTime << 960 << 1560 << 1800 << 2040;
1048 expectedRsrp.clear ();
1049 expectedRsrp << 52 << 56 << 56 << 59;
1051 config, expectedTime, expectedRsrp),
1052 TestCase::TAKES_FOREVER);
1056 expectedTime.clear ();
1057 expectedTime << 1720 << 1960 << 2200;
1058 expectedRsrp.clear ();
1059 expectedRsrp << 52 << 56 << 72;
1061 config, expectedTime, expectedRsrp),
1067 expectedTime.clear ();
1068 expectedTime << 800 << 1600 << 1840 << 2080;
1069 expectedRsrp.clear ();
1070 expectedRsrp << 52 << 52 << 56 << 59;
1072 config, expectedTime, expectedRsrp),
1078 expectedTime.clear ();
1079 expectedRsrp.clear ();
1081 config, expectedTime, expectedRsrp),
1082 TestCase::TAKES_FOREVER);
1087 expectedTime.clear ();
1088 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1089 expectedRsrp.clear ();
1090 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1092 config, expectedTime, expectedRsrp),
1093 TestCase::EXTENSIVE);
1097 expectedTime.clear ();
1098 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1099 expectedRsrp.clear ();
1100 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1102 config, expectedTime, expectedRsrp),
1103 TestCase::TAKES_FOREVER);
1107 expectedTime.clear ();
1108 expectedRsrp.clear ();
1110 config, expectedTime, expectedRsrp),
1111 TestCase::EXTENSIVE);
1124 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
1127 m_expectedTime (expectedTime),
1128 m_expectedRsrp (expectedRsrp)
1135 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1156 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1177 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
1178 positionAlloc->
Add (
Vector (600.0, 0.0, 0.0));
1179 positionAlloc->
Add (
Vector (50.0, 0.0, 0.0));
1196 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1217 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1230 Simulator::Schedule (MilliSeconds (301),
1232 Simulator::Schedule (MilliSeconds (401),
1234 Simulator::Schedule (MilliSeconds (601),
1236 Simulator::Schedule (MilliSeconds (801),
1238 Simulator::Schedule (MilliSeconds (1001),
1240 Simulator::Schedule (MilliSeconds (1201),
1242 Simulator::Schedule (MilliSeconds (1401),
1244 Simulator::Schedule (MilliSeconds (1601),
1246 Simulator::Schedule (MilliSeconds (1801),
1248 Simulator::Schedule (MilliSeconds (2001),
1252 Simulator::Stop (Seconds (2.201));
1254 Simulator::Destroy ();
1264 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1271 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1283 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1284 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1285 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1286 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1292 "Unexpected report content");
1297 "Unexpected report content");
1298 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1302 "Report contains cgi-info, which is not supported");
1304 "Report does not contain measured RSRP result");
1306 "Report does not contain measured RSRQ result");
1307 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1308 <<
" rsrp=" << (uint16_t) it->rsrpResult
1309 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1310 <<
" rsrq=" << (uint16_t) it->rsrqResult
1311 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1318 "Reporting should not have occurred at "
1330 uint16_t observedRsrp = measResults.
rsrpResult;
1335 "Reporting should not have occurred at this time");
1337 "The RSRP observed differs with the reference RSRP");
1381 :
TestSuite (
"lte-ue-measurements-handover", SYSTEM)
1383 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1384 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1385 std::vector<Time> expectedTime;
1386 std::vector<uint8_t> expectedRsrp;
1389 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1390 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1391 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1394 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1395 sourceConfigList.push_back (sourceConfig);
1398 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1399 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1400 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1403 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1404 targetConfigList.push_back (targetConfig);
1409 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1410 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1411 expectedTime.clear ();
1412 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1413 expectedRsrp.clear ();
1414 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1416 sourceConfigList, targetConfigList,
1417 expectedTime, expectedRsrp,
1419 TestCase::TAKES_FOREVER);
1422 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1423 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1424 expectedTime.clear ();
1425 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1426 expectedRsrp.clear ();
1427 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
1429 sourceConfigList, targetConfigList,
1430 expectedTime, expectedRsrp,
1436 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1437 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1438 sourceConfigList.front ().threshold1.range = 54;
1439 sourceConfigList.front ().threshold2.range = 54;
1440 sourceConfigList.front ().a3Offset = 1;
1441 targetConfigList.front ().threshold1.range = 54;
1442 targetConfigList.front ().threshold2.range = 54;
1443 targetConfigList.front ().a3Offset = 1;
1446 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1447 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1448 expectedTime.clear ();
1449 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
1450 expectedRsrp.clear ();
1451 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
1453 sourceConfigList, targetConfigList,
1454 expectedTime, expectedRsrp,
1456 TestCase::EXTENSIVE);
1459 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1460 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1461 expectedTime.clear ();
1462 expectedRsrp.clear ();
1464 sourceConfigList, targetConfigList,
1465 expectedTime, expectedRsrp,
1467 TestCase::TAKES_FOREVER);
1470 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1471 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1472 expectedTime.clear ();
1473 expectedTime << 1200 << 1440 << 1680 << 1920;
1474 expectedRsrp.clear ();
1475 expectedRsrp << 53 << 53 << 53 << 53;
1477 sourceConfigList, targetConfigList,
1478 expectedTime, expectedRsrp,
1480 TestCase::TAKES_FOREVER);
1483 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1484 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1485 expectedTime.clear ();
1486 expectedTime << 1200 << 1440 << 1680 << 1920;
1487 expectedRsrp.clear ();
1488 expectedRsrp << 53 << 53 << 53 << 53;
1490 sourceConfigList, targetConfigList,
1491 expectedTime, expectedRsrp,
1496 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1497 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1498 expectedTime.clear ();
1499 expectedTime << 1200 << 1440 << 1680 << 1920;
1500 expectedRsrp.clear ();
1501 expectedRsrp << 53 << 53 << 53 << 53;
1503 sourceConfigList, targetConfigList,
1504 expectedTime, expectedRsrp,
1506 TestCase::EXTENSIVE);
1509 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1510 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1511 expectedTime.clear ();
1512 expectedTime << 1200 << 1440 << 1680 << 1920;
1513 expectedRsrp.clear ();
1514 expectedRsrp << 53 << 53 << 53 << 53;
1516 sourceConfigList, targetConfigList,
1517 expectedTime, expectedRsrp,
1519 TestCase::TAKES_FOREVER);
1522 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1523 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1524 expectedTime.clear ();
1525 expectedTime << 1200 << 1440 << 1680 << 1920;
1526 expectedRsrp.clear ();
1527 expectedRsrp << 53 << 53 << 53 << 53;
1529 sourceConfigList, targetConfigList,
1530 expectedTime, expectedRsrp,
1532 TestCase::TAKES_FOREVER);
1535 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1536 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1537 expectedTime.clear ();
1538 expectedTime << 1200 << 1440 << 1680 << 1920;
1539 expectedRsrp.clear ();
1540 expectedRsrp << 53 << 53 << 53 << 53;
1542 sourceConfigList, targetConfigList,
1543 expectedTime, expectedRsrp,
1545 TestCase::EXTENSIVE);
1549 sourceConfigList.front ().threshold1.range = 52;
1550 targetConfigList.front ().threshold1.range = 56;
1553 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1554 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1555 expectedTime.clear ();
1556 expectedTime << 200 << 440 << 680 << 920;
1557 expectedRsrp.clear ();
1558 expectedRsrp << 55 << 55 << 55 << 55;
1560 sourceConfigList, targetConfigList,
1561 expectedTime, expectedRsrp,
1563 TestCase::EXTENSIVE);
1566 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1567 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1568 expectedTime.clear ();
1569 expectedTime << 1200 << 1440 << 1680 << 1920;
1570 expectedRsrp.clear ();
1571 expectedRsrp << 53 << 53 << 53 << 53;
1573 sourceConfigList, targetConfigList,
1574 expectedTime, expectedRsrp,
1579 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1580 sourceConfigList.front ().a3Offset = -30;
1581 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1582 targetConfigList.front ().a3Offset = 30;
1583 expectedTime.clear ();
1584 expectedTime << 200 << 440 << 680 << 920;
1585 expectedRsrp.clear ();
1586 expectedRsrp << 55 << 55 << 55 << 55;
1588 sourceConfigList, targetConfigList,
1589 expectedTime, expectedRsrp,
1594 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1595 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1596 expectedTime.clear ();
1597 expectedTime << 200 << 440 << 680 << 920;
1598 expectedRsrp.clear ();
1599 expectedRsrp << 55 << 55 << 55 << 55;
1601 sourceConfigList, targetConfigList,
1602 expectedTime, expectedRsrp,
1604 TestCase::EXTENSIVE);
1607 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1608 sourceConfigList.front ().threshold2.range = 52;
1609 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1610 targetConfigList.front ().threshold2.range = 56;
1611 expectedTime.clear ();
1612 expectedRsrp.clear ();
1614 sourceConfigList, targetConfigList,
1615 expectedTime, expectedRsrp,
1617 TestCase::EXTENSIVE);
1621 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1622 sourceConfigList.front ().a3Offset = 1;
1623 sourceConfigList.front ().threshold1.range = 0;
1624 sourceConfigList.front ().threshold2.range = 0;
1625 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1626 targetConfigList.front ().a3Offset = 1;
1627 targetConfigList.front ().threshold1.range = 0;
1628 targetConfigList.front ().threshold2.range = 0;
1631 sourceConfigList.front ().timeToTrigger = 1024;
1632 targetConfigList.front ().timeToTrigger = 100;
1633 expectedTime.clear ();
1634 expectedTime << 1300 << 1540 << 1780;
1635 expectedRsrp.clear ();
1636 expectedRsrp << 53 << 53 << 53;
1638 sourceConfigList, targetConfigList,
1639 expectedTime, expectedRsrp,
1644 sourceConfigList.front ().timeToTrigger = 1024;
1645 targetConfigList.front ().timeToTrigger = 640;
1646 expectedTime.clear ();
1647 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
1648 expectedRsrp.clear ();
1649 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
1651 sourceConfigList, targetConfigList,
1652 expectedTime, expectedRsrp,
1654 TestCase::EXTENSIVE);
1667 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
1668 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
1669 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
1672 m_sourceConfigList (sourceConfigList),
1673 m_targetConfigList (targetConfigList),
1674 m_expectedTime (expectedTime),
1675 m_expectedRsrp (expectedRsrp),
1676 m_duration (duration)
1683 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1706 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1725 positionAlloc->
Add (
Vector (0.0, 0.0, 0.0));
1726 positionAlloc->
Add (
Vector (900.0, 0.0, 0.0));
1727 positionAlloc->
Add (
Vector (400.0, 0.0, 0.0));
1735 Ptr<Node> pgw = epcHelper->GetPgwNode ();
1739 remoteHostContainer.
Create (1);
1742 internet.
Install (remoteHostContainer);
1751 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1775 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
1799 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1804 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1814 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1819 Config::Connect (
"/NodeList/2/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1825 ueDevs.
Get (0), enbDevs.
Get (0), enbDevs.
Get (1));
1830 Simulator::Destroy ();
1840 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1847 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1853 bool isCorrectMeasId;
1859 else if (cellId == 2)
1869 if (isCorrectMeasId)
1874 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1875 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1876 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1877 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1883 "Unexpected report content");
1888 "Unexpected report content");
1889 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1894 "Report contains cgi-info, which is not supported");
1896 "Report does not contain measured RSRP result");
1898 "Report does not contain measured RSRQ result");
1899 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1900 <<
" rsrp=" << (uint16_t) it->rsrpResult
1901 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1902 <<
" rsrq=" << (uint16_t) it->rsrqResult
1903 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1910 "Reporting should not have occurred at "
1922 uint16_t observedRsrp = measResults.
rsrpResult;
1927 "Reporting should not have occurred at this time");
1929 "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 "...
Time MilliSeconds(uint64_t ms)
create ns3::Time instances in units of milliseconds.
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)
Build bound Callbacks which take varying numbers of arguments, and potentially returning a value...
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...
enum ns3::LteRrcSap::ReportConfigEutra::@72 eventId
Choice of E-UTRA event triggered reporting criteria.
#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.
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...
enum ns3::LteRrcSap::ReportConfigEutra::@76 reportInterval
Indicates the interval between periodical reports.
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.
hold 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)
enum ns3::LteRrcSap::ReportConfigEutra::@71 triggerType
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.
enum ns3::LteRrcSap::ThresholdEutra::@70 choice
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...
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
enum ns3::LteRrcSap::ReportConfigEutra::@74 triggerQuantity
The quantities used to evaluate the triggering condition for the event, see 3GPP TS 36...
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
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.
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...
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.
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.
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
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.