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>
65 std::string path, uint16_t rnti, uint16_t cellId,
66 double rsrp,
double rsrq,
bool servingCell)
73 std::string path, uint64_t imsi, uint16_t cellId,
85 :
TestSuite (
"lte-ue-measurements", SYSTEM)
116 double d1,
double d2,
124 m_rsrpDbmUeServingCell (rsrpDbmUe1),
125 m_rsrpDbmUeNeighborCell (rsrpDbmUe2),
126 m_rsrqDbUeServingCell (rsrqDbUe1),
127 m_rsrqDbUeNeighborCell (rsrqDbUe2)
129 NS_LOG_INFO (
"Test UE Measurements d1 = " << d1 <<
" m. and d2 = " << d2 <<
" m.");
172 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
174 positionAlloc->
Add (Vector (0.0,
m_d1, 0.0));
175 positionAlloc->
Add (Vector (
m_d2, 0.0, 0.0));
192 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
193 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
213 Config::Connect (
"/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
215 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
228 Config::Connect (
"/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
230 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
234 Simulator::Stop (
Seconds (0.800));
237 Simulator::Destroy ();
243 double rsrp,
double rsrq,
273 NS_LOG_DEBUG (
this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
287 NS_LOG_DEBUG (
this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
310 operator<< (std::vector<Time>& v,
const uint64_t& ms)
320 std::vector<uint8_t>&
321 operator<< (std::vector<uint8_t>& v,
const uint8_t& range)
333 :
TestSuite (
"lte-ue-measurements-piecewise-1", SYSTEM)
335 std::vector<Time> expectedTime;
336 std::vector<uint8_t> expectedRsrp;
342 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
343 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
348 expectedTime.clear ();
349 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
350 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
351 expectedRsrp.clear ();
352 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
353 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
355 config, expectedTime, expectedRsrp),
356 TestCase::EXTENSIVE);
360 expectedTime.clear ();
361 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000
363 expectedRsrp.clear ();
364 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57
367 config, expectedTime, expectedRsrp),
368 TestCase::EXTENSIVE);
372 expectedTime.clear ();
373 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064
375 expectedRsrp.clear ();
376 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57
379 config, expectedTime, expectedRsrp),
384 expectedTime.clear ();
385 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
386 expectedRsrp.clear ();
387 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
389 config, expectedTime, expectedRsrp),
390 TestCase::EXTENSIVE);
394 expectedTime.clear ();
395 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
396 expectedRsrp.clear ();
397 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
399 config, expectedTime, expectedRsrp),
400 TestCase::EXTENSIVE);
405 expectedTime.clear ();
406 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480
408 expectedRsrp.clear ();
409 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51
412 config, expectedTime, expectedRsrp),
418 expectedTime.clear ();
419 expectedRsrp.clear ();
421 config, expectedTime, expectedRsrp),
422 TestCase::TAKES_FOREVER);
427 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
429 expectedTime.clear ();
430 expectedRsrp.clear ();
432 config, expectedTime, expectedRsrp),
433 TestCase::TAKES_FOREVER);
437 expectedTime.clear ();
438 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
439 expectedRsrp.clear ();
440 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
442 config, expectedTime, expectedRsrp),
447 expectedTime.clear ();
448 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
449 expectedRsrp.clear ();
450 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
452 config, expectedTime, expectedRsrp),
453 TestCase::EXTENSIVE);
457 expectedTime.clear ();
458 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
459 expectedRsrp.clear ();
460 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
462 config, expectedTime, expectedRsrp),
463 TestCase::TAKES_FOREVER);
467 expectedTime.clear ();
468 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
469 expectedRsrp.clear ();
470 expectedRsrp << 47 << 47 << 51 << 57 << 57;
472 config, expectedTime, expectedRsrp),
478 expectedTime.clear ();
479 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
480 expectedRsrp.clear ();
481 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
483 config, expectedTime, expectedRsrp),
484 TestCase::EXTENSIVE);
489 expectedTime.clear ();
490 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
491 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
492 expectedRsrp.clear ();
493 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
494 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
496 config, expectedTime, expectedRsrp),
497 TestCase::EXTENSIVE);
506 expectedTime.clear ();
507 expectedRsrp.clear ();
511 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
514 config, expectedTime, expectedRsrp),
515 TestCase::EXTENSIVE);
519 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
522 config, expectedTime, expectedRsrp),
523 TestCase::EXTENSIVE);
527 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
530 config, expectedTime, expectedRsrp),
531 TestCase::EXTENSIVE);
544 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
547 m_expectedTime (expectedTime),
548 m_expectedRsrp (expectedRsrp)
555 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
576 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
600 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
601 positionAlloc->
Add (Vector (100.0, 0.0, 0.0));
618 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
635 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
670 Simulator::Stop (
Seconds (2.201));
672 Simulator::Destroy ();
682 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
689 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
701 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
702 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
703 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
705 "Report should not have neighboring cells information");
707 "Unexpected report size");
711 "Reporting should not have occurred at "
723 uint16_t observedRsrp = measResults.
rsrpResult;
728 "Reporting should not have occurred at this time");
730 "The RSRP observed differs with the reference RSRP");
773 :
TestSuite (
"lte-ue-measurements-piecewise-2", SYSTEM)
775 std::vector<Time> expectedTime;
776 std::vector<uint8_t> expectedRsrp;
787 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
788 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
793 expectedTime.clear ();
794 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
795 expectedRsrp.clear ();
796 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
798 config, expectedTime, expectedRsrp),
799 TestCase::EXTENSIVE);
803 expectedTime.clear ();
804 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
805 expectedRsrp.clear ();
806 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
808 config, expectedTime, expectedRsrp),
809 TestCase::TAKES_FOREVER);
813 expectedTime.clear ();
814 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
815 expectedRsrp.clear ();
816 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
818 config, expectedTime, expectedRsrp),
819 TestCase::EXTENSIVE);
824 expectedTime.clear ();
825 expectedRsrp.clear ();
827 config, expectedTime, expectedRsrp),
828 TestCase::TAKES_FOREVER);
833 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
835 expectedTime.clear ();
836 expectedRsrp.clear ();
838 config, expectedTime, expectedRsrp),
839 TestCase::TAKES_FOREVER);
843 expectedTime.clear ();
844 expectedTime << 800 << 1400 << 1640 << 1880;
845 expectedRsrp.clear ();
846 expectedRsrp << 52 << 56 << 52 << 56;
848 config, expectedTime, expectedRsrp),
849 TestCase::TAKES_FOREVER);
853 expectedTime.clear ();
854 expectedTime << 800 << 1600 << 1840 << 2080;
855 expectedRsrp.clear ();
856 expectedRsrp << 52 << 52 << 56 << 59;
858 config, expectedTime, expectedRsrp),
859 TestCase::EXTENSIVE);
864 expectedTime.clear ();
865 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
866 expectedRsrp.clear ();
867 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
869 config, expectedTime, expectedRsrp),
870 TestCase::TAKES_FOREVER);
875 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
878 expectedTime.clear ();
879 expectedTime << 800 << 1600;
880 expectedRsrp.clear ();
881 expectedRsrp << 52 << 52;
883 config, expectedTime, expectedRsrp),
888 expectedTime.clear ();
889 expectedTime << 800 << 1400 << 1640 << 1880;
890 expectedRsrp.clear ();
891 expectedRsrp << 52 << 56 << 52 << 56;
893 config, expectedTime, expectedRsrp),
894 TestCase::EXTENSIVE);
898 expectedTime.clear ();
899 expectedTime << 960 << 1560 << 1800 << 2040;
900 expectedRsrp.clear ();
901 expectedRsrp << 52 << 56 << 56 << 59;
903 config, expectedTime, expectedRsrp),
904 TestCase::EXTENSIVE);
908 expectedTime.clear ();
909 expectedTime << 1720 << 1960 << 2200;
910 expectedRsrp.clear ();
911 expectedRsrp << 52 << 56 << 72;
913 config, expectedTime, expectedRsrp),
920 expectedTime.clear ();
921 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
922 expectedRsrp.clear ();
923 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
925 config, expectedTime, expectedRsrp),
932 expectedTime.clear ();
933 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
934 expectedRsrp.clear ();
935 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
937 config, expectedTime, expectedRsrp),
938 TestCase::EXTENSIVE);
943 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
946 expectedTime.clear ();
947 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
948 expectedRsrp.clear ();
949 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
951 config, expectedTime, expectedRsrp),
956 expectedTime.clear ();
957 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
958 expectedRsrp.clear ();
959 expectedRsrp << 63 << 52 << 56 << 52 << 56;
961 config, expectedTime, expectedRsrp),
962 TestCase::EXTENSIVE);
966 expectedTime.clear ();
967 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
968 expectedRsrp.clear ();
969 expectedRsrp << 63 << 52 << 56 << 56 << 59;
971 config, expectedTime, expectedRsrp),
976 expectedTime.clear ();
977 expectedTime << 1720 << 1960 << 2200;
978 expectedRsrp.clear ();
979 expectedRsrp << 52 << 56 << 72;
981 config, expectedTime, expectedRsrp),
982 TestCase::TAKES_FOREVER);
987 expectedTime.clear ();
988 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
989 expectedRsrp.clear ();
990 expectedRsrp << 63 << 52 << 52 << 56 << 59;
992 config, expectedTime, expectedRsrp),
998 expectedTime.clear ();
999 expectedRsrp.clear ();
1001 config, expectedTime, expectedRsrp),
1002 TestCase::TAKES_FOREVER);
1007 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1010 expectedTime.clear ();
1011 expectedRsrp.clear ();
1013 config, expectedTime, expectedRsrp),
1014 TestCase::EXTENSIVE);
1019 config, expectedTime, expectedRsrp),
1020 TestCase::TAKES_FOREVER);
1025 config, expectedTime, expectedRsrp),
1026 TestCase::TAKES_FOREVER);
1031 expectedTime.clear ();
1032 expectedTime << 800 << 1400 << 1640 << 1880;
1033 expectedRsrp.clear ();
1034 expectedRsrp << 52 << 56 << 52 << 56;
1036 config, expectedTime, expectedRsrp),
1037 TestCase::EXTENSIVE);
1041 expectedTime.clear ();
1042 expectedTime << 800 << 1400 << 1640 << 1880;
1043 expectedRsrp.clear ();
1044 expectedRsrp << 52 << 56 << 52 << 56;
1046 config, expectedTime, expectedRsrp),
1047 TestCase::EXTENSIVE);
1051 expectedTime.clear ();
1052 expectedTime << 960 << 1560 << 1800 << 2040;
1053 expectedRsrp.clear ();
1054 expectedRsrp << 52 << 56 << 56 << 59;
1056 config, expectedTime, expectedRsrp),
1057 TestCase::TAKES_FOREVER);
1061 expectedTime.clear ();
1062 expectedTime << 1720 << 1960 << 2200;
1063 expectedRsrp.clear ();
1064 expectedRsrp << 52 << 56 << 72;
1066 config, expectedTime, expectedRsrp),
1072 expectedTime.clear ();
1073 expectedTime << 800 << 1600 << 1840 << 2080;
1074 expectedRsrp.clear ();
1075 expectedRsrp << 52 << 52 << 56 << 59;
1077 config, expectedTime, expectedRsrp),
1083 expectedTime.clear ();
1084 expectedRsrp.clear ();
1086 config, expectedTime, expectedRsrp),
1087 TestCase::TAKES_FOREVER);
1092 expectedTime.clear ();
1093 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1094 expectedRsrp.clear ();
1095 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1097 config, expectedTime, expectedRsrp),
1098 TestCase::EXTENSIVE);
1102 expectedTime.clear ();
1103 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1104 expectedRsrp.clear ();
1105 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1107 config, expectedTime, expectedRsrp),
1108 TestCase::TAKES_FOREVER);
1112 expectedTime.clear ();
1113 expectedRsrp.clear ();
1115 config, expectedTime, expectedRsrp),
1116 TestCase::EXTENSIVE);
1129 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
1132 m_expectedTime (expectedTime),
1133 m_expectedRsrp (expectedRsrp)
1140 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1161 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1185 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1186 positionAlloc->
Add (Vector (600.0, 0.0, 0.0));
1187 positionAlloc->
Add (Vector (50.0, 0.0, 0.0));
1204 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1225 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1260 Simulator::Stop (
Seconds (2.201));
1262 Simulator::Destroy ();
1272 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1279 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1291 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1292 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1293 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1294 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1300 "Unexpected report content");
1305 "Unexpected report content");
1306 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1310 "Report contains cgi-info, which is not supported");
1312 "Report does not contain measured RSRP result");
1314 "Report does not contain measured RSRQ result");
1315 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1316 <<
" rsrp=" << (uint16_t) it->rsrpResult
1317 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1318 <<
" rsrq=" << (uint16_t) it->rsrqResult
1319 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1326 "Reporting should not have occurred at "
1338 uint16_t observedRsrp = measResults.
rsrpResult;
1343 "Reporting should not have occurred at this time");
1345 "The RSRP observed differs with the reference RSRP");
1389 :
TestSuite (
"lte-ue-measurements-handover", SYSTEM)
1391 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1392 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1393 std::vector<Time> expectedTime;
1394 std::vector<uint8_t> expectedRsrp;
1397 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1398 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1399 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1402 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1403 sourceConfigList.push_back (sourceConfig);
1406 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1407 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1408 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1411 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1412 targetConfigList.push_back (targetConfig);
1417 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1418 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1419 expectedTime.clear ();
1420 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1421 expectedRsrp.clear ();
1422 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1424 sourceConfigList, targetConfigList,
1425 expectedTime, expectedRsrp,
1427 TestCase::TAKES_FOREVER);
1430 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1431 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1432 expectedTime.clear ();
1433 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1434 expectedRsrp.clear ();
1435 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
1437 sourceConfigList, targetConfigList,
1438 expectedTime, expectedRsrp,
1444 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1445 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1446 sourceConfigList.front ().threshold1.range = 54;
1447 sourceConfigList.front ().threshold2.range = 54;
1448 sourceConfigList.front ().a3Offset = 1;
1449 targetConfigList.front ().threshold1.range = 54;
1450 targetConfigList.front ().threshold2.range = 54;
1451 targetConfigList.front ().a3Offset = 1;
1454 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1455 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1456 expectedTime.clear ();
1457 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
1458 expectedRsrp.clear ();
1459 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
1461 sourceConfigList, targetConfigList,
1462 expectedTime, expectedRsrp,
1464 TestCase::EXTENSIVE);
1467 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1468 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1469 expectedTime.clear ();
1470 expectedRsrp.clear ();
1472 sourceConfigList, targetConfigList,
1473 expectedTime, expectedRsrp,
1475 TestCase::TAKES_FOREVER);
1478 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1479 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1480 expectedTime.clear ();
1481 expectedTime << 1200 << 1440 << 1680 << 1920;
1482 expectedRsrp.clear ();
1483 expectedRsrp << 53 << 53 << 53 << 53;
1485 sourceConfigList, targetConfigList,
1486 expectedTime, expectedRsrp,
1488 TestCase::TAKES_FOREVER);
1491 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1492 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1493 expectedTime.clear ();
1494 expectedTime << 1200 << 1440 << 1680 << 1920;
1495 expectedRsrp.clear ();
1496 expectedRsrp << 53 << 53 << 53 << 53;
1498 sourceConfigList, targetConfigList,
1499 expectedTime, expectedRsrp,
1504 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1505 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1506 expectedTime.clear ();
1507 expectedTime << 1200 << 1440 << 1680 << 1920;
1508 expectedRsrp.clear ();
1509 expectedRsrp << 53 << 53 << 53 << 53;
1511 sourceConfigList, targetConfigList,
1512 expectedTime, expectedRsrp,
1514 TestCase::EXTENSIVE);
1517 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1518 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1519 expectedTime.clear ();
1520 expectedTime << 1200 << 1440 << 1680 << 1920;
1521 expectedRsrp.clear ();
1522 expectedRsrp << 53 << 53 << 53 << 53;
1524 sourceConfigList, targetConfigList,
1525 expectedTime, expectedRsrp,
1527 TestCase::TAKES_FOREVER);
1530 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1531 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1532 expectedTime.clear ();
1533 expectedTime << 1200 << 1440 << 1680 << 1920;
1534 expectedRsrp.clear ();
1535 expectedRsrp << 53 << 53 << 53 << 53;
1537 sourceConfigList, targetConfigList,
1538 expectedTime, expectedRsrp,
1540 TestCase::TAKES_FOREVER);
1543 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1544 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1545 expectedTime.clear ();
1546 expectedTime << 1200 << 1440 << 1680 << 1920;
1547 expectedRsrp.clear ();
1548 expectedRsrp << 53 << 53 << 53 << 53;
1550 sourceConfigList, targetConfigList,
1551 expectedTime, expectedRsrp,
1553 TestCase::EXTENSIVE);
1557 sourceConfigList.front ().threshold1.range = 52;
1558 targetConfigList.front ().threshold1.range = 56;
1561 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1562 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1563 expectedTime.clear ();
1564 expectedTime << 200 << 440 << 680 << 920;
1565 expectedRsrp.clear ();
1566 expectedRsrp << 55 << 55 << 55 << 55;
1568 sourceConfigList, targetConfigList,
1569 expectedTime, expectedRsrp,
1571 TestCase::EXTENSIVE);
1574 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1575 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1576 expectedTime.clear ();
1577 expectedTime << 1200 << 1440 << 1680 << 1920;
1578 expectedRsrp.clear ();
1579 expectedRsrp << 53 << 53 << 53 << 53;
1581 sourceConfigList, targetConfigList,
1582 expectedTime, expectedRsrp,
1587 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1588 sourceConfigList.front ().a3Offset = -30;
1589 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1590 targetConfigList.front ().a3Offset = 30;
1591 expectedTime.clear ();
1592 expectedTime << 200 << 440 << 680 << 920;
1593 expectedRsrp.clear ();
1594 expectedRsrp << 55 << 55 << 55 << 55;
1596 sourceConfigList, targetConfigList,
1597 expectedTime, expectedRsrp,
1602 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1603 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1604 expectedTime.clear ();
1605 expectedTime << 200 << 440 << 680 << 920;
1606 expectedRsrp.clear ();
1607 expectedRsrp << 55 << 55 << 55 << 55;
1609 sourceConfigList, targetConfigList,
1610 expectedTime, expectedRsrp,
1612 TestCase::EXTENSIVE);
1615 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1616 sourceConfigList.front ().threshold2.range = 52;
1617 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1618 targetConfigList.front ().threshold2.range = 56;
1619 expectedTime.clear ();
1620 expectedRsrp.clear ();
1622 sourceConfigList, targetConfigList,
1623 expectedTime, expectedRsrp,
1625 TestCase::EXTENSIVE);
1629 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1630 sourceConfigList.front ().a3Offset = 1;
1631 sourceConfigList.front ().threshold1.range = 0;
1632 sourceConfigList.front ().threshold2.range = 0;
1633 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1634 targetConfigList.front ().a3Offset = 1;
1635 targetConfigList.front ().threshold1.range = 0;
1636 targetConfigList.front ().threshold2.range = 0;
1639 sourceConfigList.front ().timeToTrigger = 1024;
1640 targetConfigList.front ().timeToTrigger = 100;
1641 expectedTime.clear ();
1642 expectedTime << 1300 << 1540 << 1780;
1643 expectedRsrp.clear ();
1644 expectedRsrp << 53 << 53 << 53;
1646 sourceConfigList, targetConfigList,
1647 expectedTime, expectedRsrp,
1652 sourceConfigList.front ().timeToTrigger = 1024;
1653 targetConfigList.front ().timeToTrigger = 640;
1654 expectedTime.clear ();
1655 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
1656 expectedRsrp.clear ();
1657 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
1659 sourceConfigList, targetConfigList,
1660 expectedTime, expectedRsrp,
1662 TestCase::EXTENSIVE);
1675 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
1676 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
1677 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
1680 m_sourceConfigList (sourceConfigList),
1681 m_targetConfigList (targetConfigList),
1682 m_expectedTime (expectedTime),
1683 m_expectedRsrp (expectedRsrp),
1684 m_duration (duration)
1691 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1714 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1737 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1738 positionAlloc->
Add (Vector (900.0, 0.0, 0.0));
1739 positionAlloc->
Add (Vector (400.0, 0.0, 0.0));
1747 Ptr<Node> pgw = epcHelper->GetPgwNode ();
1751 remoteHostContainer.
Create (1);
1754 internet.
Install (remoteHostContainer);
1763 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1787 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
1811 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1816 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1826 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1831 Config::Connect (
"/NodeList/2/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1837 ueDevs.
Get (0), enbDevs.
Get (0), enbDevs.
Get (1));
1842 Simulator::Destroy ();
1852 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1859 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1865 bool isCorrectMeasId;
1871 else if (cellId == 2)
1881 if (isCorrectMeasId)
1886 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult
1887 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)"
1888 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult
1889 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1895 "Unexpected report content");
1900 "Unexpected report content");
1901 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1906 "Report contains cgi-info, which is not supported");
1908 "Report does not contain measured RSRP result");
1910 "Report does not contain measured RSRQ result");
1911 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1912 <<
" rsrp=" << (uint16_t) it->rsrpResult
1913 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1914 <<
" rsrq=" << (uint16_t) it->rsrqResult
1915 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1922 "Reporting should not have occurred at "
1934 uint16_t observedRsrp = measResults.
rsrpResult;
1939 "Reporting should not have occurred at this time");
1941 "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.
AttributeValue implementation for Boolean.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB 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.
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...
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.
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...
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)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
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)
Set the type of scheduler to be used by eNodeB devices.
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.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
AttributeValue implementation for 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...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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 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.
AttributeValue implementation for DataRate.
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 Add(Vector v)
Add a position to the list of positions.
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()
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
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...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
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)
Set a single attribute, raising fatal errors if unsuccessful.
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
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.