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> 54 #include <ns3/lte-common.h> 64 std::string path, uint16_t rnti, uint16_t cellId,
65 double rsrp,
double rsrq,
bool servingCell, uint8_t componentCarrierId)
72 std::string path, uint64_t imsi, uint16_t cellId,
84 :
TestSuite (
"lte-ue-measurements", SYSTEM)
115 double d1,
double d2,
123 m_rsrpDbmUeServingCell (rsrpDbmUe1),
124 m_rsrpDbmUeNeighborCell (rsrpDbmUe2),
125 m_rsrqDbUeServingCell (rsrqDbUe1),
126 m_rsrqDbUeNeighborCell (rsrqDbUe2)
128 NS_LOG_INFO (
"Test UE Measurements d1 = " << d1 <<
" m. and d2 = " << d2 <<
" m.");
171 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
173 positionAlloc->
Add (Vector (0.0,
m_d1, 0.0));
174 positionAlloc->
Add (Vector (
m_d2, 0.0, 0.0));
176 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
177 mobility.SetPositionAllocator (positionAlloc);
191 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
192 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
201 Config::Connect (
"/NodeList/2/DeviceList/0/LteUePhy/ReportUeMeasurements",
203 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
206 Config::Connect (
"/NodeList/3/DeviceList/0/LteUePhy/ReportUeMeasurements",
208 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
212 Simulator::Stop (
Seconds (0.800));
215 Simulator::Destroy ();
221 double rsrp,
double rsrq,
251 NS_LOG_DEBUG (
this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
265 NS_LOG_DEBUG (
this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
288 operator<< (std::vector<Time>& v,
const uint64_t& ms)
298 std::vector<uint8_t>&
299 operator<< (std::vector<uint8_t>& v,
const uint8_t& range)
311 :
TestSuite (
"lte-ue-measurements-piecewise-1", SYSTEM)
313 std::vector<Time> expectedTime;
314 std::vector<uint8_t> expectedRsrp;
320 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
321 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
326 expectedTime.clear ();
327 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
328 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
329 expectedRsrp.clear ();
330 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
331 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
333 config, expectedTime, expectedRsrp),
334 TestCase::EXTENSIVE);
338 expectedTime.clear ();
339 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000
341 expectedRsrp.clear ();
342 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57
345 config, expectedTime, expectedRsrp),
346 TestCase::EXTENSIVE);
350 expectedTime.clear ();
351 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064
353 expectedRsrp.clear ();
354 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57
357 config, expectedTime, expectedRsrp),
362 expectedTime.clear ();
363 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
364 expectedRsrp.clear ();
365 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
367 config, expectedTime, expectedRsrp),
368 TestCase::EXTENSIVE);
372 expectedTime.clear ();
373 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
374 expectedRsrp.clear ();
375 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
377 config, expectedTime, expectedRsrp),
378 TestCase::EXTENSIVE);
383 expectedTime.clear ();
384 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480
386 expectedRsrp.clear ();
387 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51
390 config, expectedTime, expectedRsrp),
396 expectedTime.clear ();
397 expectedRsrp.clear ();
399 config, expectedTime, expectedRsrp),
400 TestCase::TAKES_FOREVER);
405 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
407 expectedTime.clear ();
408 expectedRsrp.clear ();
410 config, expectedTime, expectedRsrp),
411 TestCase::TAKES_FOREVER);
415 expectedTime.clear ();
416 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
417 expectedRsrp.clear ();
418 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
420 config, expectedTime, expectedRsrp),
425 expectedTime.clear ();
426 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
427 expectedRsrp.clear ();
428 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
430 config, expectedTime, expectedRsrp),
431 TestCase::EXTENSIVE);
435 expectedTime.clear ();
436 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
437 expectedRsrp.clear ();
438 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
440 config, expectedTime, expectedRsrp),
441 TestCase::TAKES_FOREVER);
445 expectedTime.clear ();
446 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
447 expectedRsrp.clear ();
448 expectedRsrp << 47 << 47 << 51 << 57 << 57;
450 config, expectedTime, expectedRsrp),
456 expectedTime.clear ();
457 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
458 expectedRsrp.clear ();
459 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
461 config, expectedTime, expectedRsrp),
462 TestCase::EXTENSIVE);
467 expectedTime.clear ();
468 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
469 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
470 expectedRsrp.clear ();
471 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
472 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
474 config, expectedTime, expectedRsrp),
475 TestCase::EXTENSIVE);
484 expectedTime.clear ();
485 expectedRsrp.clear ();
489 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
492 config, expectedTime, expectedRsrp),
493 TestCase::EXTENSIVE);
497 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
500 config, expectedTime, expectedRsrp),
501 TestCase::EXTENSIVE);
505 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
508 config, expectedTime, expectedRsrp),
509 TestCase::EXTENSIVE);
522 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
525 m_expectedTime (expectedTime),
526 m_expectedRsrp (expectedRsrp)
533 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
554 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
578 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
579 positionAlloc->
Add (Vector (100.0, 0.0, 0.0));
581 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
582 mobility.SetPositionAllocator (positionAlloc);
596 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
613 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
648 Simulator::Stop (
Seconds (2.201));
650 Simulator::Destroy ();
660 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
667 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
679 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)" 680 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult 681 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
683 "Report should not have neighboring cells information");
685 "Unexpected report size");
689 "Reporting should not have occurred at " 701 uint16_t observedRsrp = measResults.
rsrpResult;
706 "Reporting should not have occurred at this time");
708 "The RSRP observed differs with the reference RSRP");
751 :
TestSuite (
"lte-ue-measurements-piecewise-2", SYSTEM)
753 std::vector<Time> expectedTime;
754 std::vector<uint8_t> expectedRsrp;
765 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
766 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
771 expectedTime.clear ();
772 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
773 expectedRsrp.clear ();
774 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
776 config, expectedTime, expectedRsrp),
777 TestCase::EXTENSIVE);
781 expectedTime.clear ();
782 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
783 expectedRsrp.clear ();
784 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
786 config, expectedTime, expectedRsrp),
787 TestCase::TAKES_FOREVER);
791 expectedTime.clear ();
792 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
793 expectedRsrp.clear ();
794 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
796 config, expectedTime, expectedRsrp),
797 TestCase::EXTENSIVE);
802 expectedTime.clear ();
803 expectedRsrp.clear ();
805 config, expectedTime, expectedRsrp),
806 TestCase::TAKES_FOREVER);
811 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
813 expectedTime.clear ();
814 expectedRsrp.clear ();
816 config, expectedTime, expectedRsrp),
817 TestCase::TAKES_FOREVER);
821 expectedTime.clear ();
822 expectedTime << 800 << 1400 << 1640 << 1880;
823 expectedRsrp.clear ();
824 expectedRsrp << 52 << 56 << 52 << 56;
826 config, expectedTime, expectedRsrp),
827 TestCase::TAKES_FOREVER);
831 expectedTime.clear ();
832 expectedTime << 800 << 1600 << 1840 << 2080;
833 expectedRsrp.clear ();
834 expectedRsrp << 52 << 52 << 56 << 59;
836 config, expectedTime, expectedRsrp),
837 TestCase::EXTENSIVE);
842 expectedTime.clear ();
843 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
844 expectedRsrp.clear ();
845 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
847 config, expectedTime, expectedRsrp),
848 TestCase::TAKES_FOREVER);
853 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
856 expectedTime.clear ();
857 expectedTime << 800 << 1600;
858 expectedRsrp.clear ();
859 expectedRsrp << 52 << 52;
861 config, expectedTime, expectedRsrp),
866 expectedTime.clear ();
867 expectedTime << 800 << 1400 << 1640 << 1880;
868 expectedRsrp.clear ();
869 expectedRsrp << 52 << 56 << 52 << 56;
871 config, expectedTime, expectedRsrp),
872 TestCase::EXTENSIVE);
876 expectedTime.clear ();
877 expectedTime << 960 << 1560 << 1800 << 2040;
878 expectedRsrp.clear ();
879 expectedRsrp << 52 << 56 << 56 << 59;
881 config, expectedTime, expectedRsrp),
882 TestCase::EXTENSIVE);
886 expectedTime.clear ();
887 expectedTime << 1720 << 1960 << 2200;
888 expectedRsrp.clear ();
889 expectedRsrp << 52 << 56 << 72;
891 config, expectedTime, expectedRsrp),
898 expectedTime.clear ();
899 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
900 expectedRsrp.clear ();
901 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
903 config, expectedTime, expectedRsrp),
910 expectedTime.clear ();
911 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
912 expectedRsrp.clear ();
913 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
915 config, expectedTime, expectedRsrp),
916 TestCase::EXTENSIVE);
921 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
924 expectedTime.clear ();
925 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
926 expectedRsrp.clear ();
927 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
929 config, expectedTime, expectedRsrp),
934 expectedTime.clear ();
935 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
936 expectedRsrp.clear ();
937 expectedRsrp << 63 << 52 << 56 << 52 << 56;
939 config, expectedTime, expectedRsrp),
940 TestCase::EXTENSIVE);
944 expectedTime.clear ();
945 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
946 expectedRsrp.clear ();
947 expectedRsrp << 63 << 52 << 56 << 56 << 59;
949 config, expectedTime, expectedRsrp),
954 expectedTime.clear ();
955 expectedTime << 1720 << 1960 << 2200;
956 expectedRsrp.clear ();
957 expectedRsrp << 52 << 56 << 72;
959 config, expectedTime, expectedRsrp),
960 TestCase::TAKES_FOREVER);
965 expectedTime.clear ();
966 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
967 expectedRsrp.clear ();
968 expectedRsrp << 63 << 52 << 52 << 56 << 59;
970 config, expectedTime, expectedRsrp),
976 expectedTime.clear ();
977 expectedRsrp.clear ();
979 config, expectedTime, expectedRsrp),
980 TestCase::TAKES_FOREVER);
985 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
988 expectedTime.clear ();
989 expectedRsrp.clear ();
991 config, expectedTime, expectedRsrp),
992 TestCase::EXTENSIVE);
997 config, expectedTime, expectedRsrp),
998 TestCase::TAKES_FOREVER);
1003 config, expectedTime, expectedRsrp),
1004 TestCase::TAKES_FOREVER);
1009 expectedTime.clear ();
1010 expectedTime << 800 << 1400 << 1640 << 1880;
1011 expectedRsrp.clear ();
1012 expectedRsrp << 52 << 56 << 52 << 56;
1014 config, expectedTime, expectedRsrp),
1015 TestCase::EXTENSIVE);
1019 expectedTime.clear ();
1020 expectedTime << 800 << 1400 << 1640 << 1880;
1021 expectedRsrp.clear ();
1022 expectedRsrp << 52 << 56 << 52 << 56;
1024 config, expectedTime, expectedRsrp),
1025 TestCase::EXTENSIVE);
1029 expectedTime.clear ();
1030 expectedTime << 960 << 1560 << 1800 << 2040;
1031 expectedRsrp.clear ();
1032 expectedRsrp << 52 << 56 << 56 << 59;
1034 config, expectedTime, expectedRsrp),
1035 TestCase::TAKES_FOREVER);
1039 expectedTime.clear ();
1040 expectedTime << 1720 << 1960 << 2200;
1041 expectedRsrp.clear ();
1042 expectedRsrp << 52 << 56 << 72;
1044 config, expectedTime, expectedRsrp),
1050 expectedTime.clear ();
1051 expectedTime << 800 << 1600 << 1840 << 2080;
1052 expectedRsrp.clear ();
1053 expectedRsrp << 52 << 52 << 56 << 59;
1055 config, expectedTime, expectedRsrp),
1061 expectedTime.clear ();
1062 expectedRsrp.clear ();
1064 config, expectedTime, expectedRsrp),
1065 TestCase::TAKES_FOREVER);
1070 expectedTime.clear ();
1071 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1072 expectedRsrp.clear ();
1073 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1075 config, expectedTime, expectedRsrp),
1076 TestCase::EXTENSIVE);
1080 expectedTime.clear ();
1081 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1082 expectedRsrp.clear ();
1083 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1085 config, expectedTime, expectedRsrp),
1086 TestCase::TAKES_FOREVER);
1090 expectedTime.clear ();
1091 expectedRsrp.clear ();
1093 config, expectedTime, expectedRsrp),
1094 TestCase::EXTENSIVE);
1107 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
1110 m_expectedTime (expectedTime),
1111 m_expectedRsrp (expectedRsrp)
1118 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1139 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1163 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1164 positionAlloc->
Add (Vector (600.0, 0.0, 0.0));
1165 positionAlloc->
Add (Vector (50.0, 0.0, 0.0));
1167 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1168 mobility.SetPositionAllocator (positionAlloc);
1182 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1203 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1238 Simulator::Stop (
Seconds (2.201));
1240 Simulator::Destroy ();
1250 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1257 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1269 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult 1270 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)" 1271 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult 1272 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1278 "Unexpected report content");
1283 "Unexpected report content");
1284 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1288 "Report contains cgi-info, which is not supported");
1290 "Report does not contain measured RSRP result");
1292 "Report does not contain measured RSRQ result");
1293 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1294 <<
" rsrp=" << (uint16_t) it->rsrpResult
1295 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)" 1296 <<
" rsrq=" << (uint16_t) it->rsrqResult
1297 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1304 "Reporting should not have occurred at " 1316 uint16_t observedRsrp = measResults.
rsrpResult;
1321 "Reporting should not have occurred at this time");
1323 "The RSRP observed differs with the reference RSRP");
1367 :
TestSuite (
"lte-ue-measurements-handover", SYSTEM)
1369 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1370 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1371 std::vector<Time> expectedTime;
1372 std::vector<uint8_t> expectedRsrp;
1375 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1376 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1377 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1380 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1381 sourceConfigList.push_back (sourceConfig);
1384 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1385 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1386 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1389 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1390 targetConfigList.push_back (targetConfig);
1395 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1396 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1397 expectedTime.clear ();
1398 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1399 expectedRsrp.clear ();
1400 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1402 sourceConfigList, targetConfigList,
1403 expectedTime, expectedRsrp,
1405 TestCase::TAKES_FOREVER);
1408 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1409 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1410 expectedTime.clear ();
1411 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1412 expectedRsrp.clear ();
1413 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
1415 sourceConfigList, targetConfigList,
1416 expectedTime, expectedRsrp,
1422 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1423 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1424 sourceConfigList.front ().threshold1.range = 54;
1425 sourceConfigList.front ().threshold2.range = 54;
1426 sourceConfigList.front ().a3Offset = 1;
1427 targetConfigList.front ().threshold1.range = 54;
1428 targetConfigList.front ().threshold2.range = 54;
1429 targetConfigList.front ().a3Offset = 1;
1432 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1433 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1434 expectedTime.clear ();
1435 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
1436 expectedRsrp.clear ();
1437 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
1439 sourceConfigList, targetConfigList,
1440 expectedTime, expectedRsrp,
1442 TestCase::EXTENSIVE);
1445 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1446 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1447 expectedTime.clear ();
1448 expectedRsrp.clear ();
1450 sourceConfigList, targetConfigList,
1451 expectedTime, expectedRsrp,
1453 TestCase::TAKES_FOREVER);
1456 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1457 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1458 expectedTime.clear ();
1459 expectedTime << 1200 << 1440 << 1680 << 1920;
1460 expectedRsrp.clear ();
1461 expectedRsrp << 53 << 53 << 53 << 53;
1463 sourceConfigList, targetConfigList,
1464 expectedTime, expectedRsrp,
1466 TestCase::TAKES_FOREVER);
1469 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1470 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1471 expectedTime.clear ();
1472 expectedTime << 1200 << 1440 << 1680 << 1920;
1473 expectedRsrp.clear ();
1474 expectedRsrp << 53 << 53 << 53 << 53;
1476 sourceConfigList, targetConfigList,
1477 expectedTime, expectedRsrp,
1482 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1483 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1484 expectedTime.clear ();
1485 expectedTime << 1200 << 1440 << 1680 << 1920;
1486 expectedRsrp.clear ();
1487 expectedRsrp << 53 << 53 << 53 << 53;
1489 sourceConfigList, targetConfigList,
1490 expectedTime, expectedRsrp,
1492 TestCase::EXTENSIVE);
1495 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1496 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1497 expectedTime.clear ();
1498 expectedTime << 1200 << 1440 << 1680 << 1920;
1499 expectedRsrp.clear ();
1500 expectedRsrp << 53 << 53 << 53 << 53;
1502 sourceConfigList, targetConfigList,
1503 expectedTime, expectedRsrp,
1505 TestCase::TAKES_FOREVER);
1508 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1509 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1510 expectedTime.clear ();
1511 expectedTime << 1200 << 1440 << 1680 << 1920;
1512 expectedRsrp.clear ();
1513 expectedRsrp << 53 << 53 << 53 << 53;
1515 sourceConfigList, targetConfigList,
1516 expectedTime, expectedRsrp,
1518 TestCase::TAKES_FOREVER);
1521 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1522 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1523 expectedTime.clear ();
1524 expectedTime << 1200 << 1440 << 1680 << 1920;
1525 expectedRsrp.clear ();
1526 expectedRsrp << 53 << 53 << 53 << 53;
1528 sourceConfigList, targetConfigList,
1529 expectedTime, expectedRsrp,
1531 TestCase::EXTENSIVE);
1535 sourceConfigList.front ().threshold1.range = 52;
1536 targetConfigList.front ().threshold1.range = 56;
1539 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1540 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1541 expectedTime.clear ();
1542 expectedTime << 200 << 440 << 680 << 920;
1543 expectedRsrp.clear ();
1544 expectedRsrp << 55 << 55 << 55 << 55;
1546 sourceConfigList, targetConfigList,
1547 expectedTime, expectedRsrp,
1549 TestCase::EXTENSIVE);
1552 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1553 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1554 expectedTime.clear ();
1555 expectedTime << 1200 << 1440 << 1680 << 1920;
1556 expectedRsrp.clear ();
1557 expectedRsrp << 53 << 53 << 53 << 53;
1559 sourceConfigList, targetConfigList,
1560 expectedTime, expectedRsrp,
1565 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1566 sourceConfigList.front ().a3Offset = -30;
1567 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1568 targetConfigList.front ().a3Offset = 30;
1569 expectedTime.clear ();
1570 expectedTime << 200 << 440 << 680 << 920;
1571 expectedRsrp.clear ();
1572 expectedRsrp << 55 << 55 << 55 << 55;
1574 sourceConfigList, targetConfigList,
1575 expectedTime, expectedRsrp,
1580 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1581 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1582 expectedTime.clear ();
1583 expectedTime << 200 << 440 << 680 << 920;
1584 expectedRsrp.clear ();
1585 expectedRsrp << 55 << 55 << 55 << 55;
1587 sourceConfigList, targetConfigList,
1588 expectedTime, expectedRsrp,
1590 TestCase::EXTENSIVE);
1593 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1594 sourceConfigList.front ().threshold2.range = 52;
1595 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1596 targetConfigList.front ().threshold2.range = 56;
1597 expectedTime.clear ();
1598 expectedRsrp.clear ();
1600 sourceConfigList, targetConfigList,
1601 expectedTime, expectedRsrp,
1603 TestCase::EXTENSIVE);
1607 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1608 sourceConfigList.front ().a3Offset = 1;
1609 sourceConfigList.front ().threshold1.range = 0;
1610 sourceConfigList.front ().threshold2.range = 0;
1611 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1612 targetConfigList.front ().a3Offset = 1;
1613 targetConfigList.front ().threshold1.range = 0;
1614 targetConfigList.front ().threshold2.range = 0;
1617 sourceConfigList.front ().timeToTrigger = 1024;
1618 targetConfigList.front ().timeToTrigger = 100;
1619 expectedTime.clear ();
1620 expectedTime << 1300 << 1540 << 1780;
1621 expectedRsrp.clear ();
1622 expectedRsrp << 53 << 53 << 53;
1624 sourceConfigList, targetConfigList,
1625 expectedTime, expectedRsrp,
1630 sourceConfigList.front ().timeToTrigger = 1024;
1631 targetConfigList.front ().timeToTrigger = 640;
1632 expectedTime.clear ();
1633 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
1634 expectedRsrp.clear ();
1635 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
1637 sourceConfigList, targetConfigList,
1638 expectedTime, expectedRsrp,
1640 TestCase::EXTENSIVE);
1653 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
1654 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
1655 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
1658 m_sourceConfigList (sourceConfigList),
1659 m_targetConfigList (targetConfigList),
1660 m_expectedTime (expectedTime),
1661 m_expectedRsrp (expectedRsrp),
1662 m_duration (duration)
1669 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1692 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1715 positionAlloc->
Add (Vector (0.0, 0.0, 0.0));
1716 positionAlloc->
Add (Vector (900.0, 0.0, 0.0));
1717 positionAlloc->
Add (Vector (400.0, 0.0, 0.0));
1719 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1720 mobility.SetPositionAllocator (positionAlloc);
1725 Ptr<Node> pgw = epcHelper->GetPgwNode ();
1729 remoteHostContainer.
Create (1);
1732 internet.
Install (remoteHostContainer);
1741 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1765 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
1789 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
1794 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
1804 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1809 Config::Connect (
"/NodeList/2/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1815 ueDevs.
Get (0), enbDevs.
Get (0), enbDevs.
Get (1));
1820 Simulator::Destroy ();
1830 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1837 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1843 bool isCorrectMeasId;
1849 else if (cellId == 2)
1859 if (isCorrectMeasId)
1864 <<
" rsrp=" << (uint16_t) measResults.
rsrpResult 1865 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (measResults.
rsrpResult) <<
" dBm)" 1866 <<
" rsrq=" << (uint16_t) measResults.
rsrqResult 1867 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (measResults.
rsrqResult) <<
" dB)");
1873 "Unexpected report content");
1878 "Unexpected report content");
1879 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1884 "Report contains cgi-info, which is not supported");
1886 "Report does not contain measured RSRP result");
1888 "Report does not contain measured RSRQ result");
1889 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1890 <<
" rsrp=" << (uint16_t) it->rsrpResult
1891 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)" 1892 <<
" rsrq=" << (uint16_t) it->rsrqResult
1893 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1900 "Reporting should not have occurred at " 1912 uint16_t observedRsrp = measResults.
rsrpResult;
1917 "Reporting should not have occurred at this time");
1919 "The RSRP observed differs with the reference RSRP");
void TeleportVeryNear()
Teleport very near function.
void TeleportNear()
Teleport near function.
enum ns3::LteRrcSap::ThresholdEutra::@63 choice
Threshold enumeration.
Ptr< MobilityModel > m_ueMobility
the mobility model
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
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...
MeasurementReport structure.
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<Ipv4> 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.
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
void ReportUeMeasurementsCallback(LteUeMeasurementsTestCase *testcase, std::string path, uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell, uint8_t componentCarrierId)
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.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it...
Build a set of PointToPointNetDevice objects.
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration.
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.
void TeleportVeryFar()
Teleport very far function.
Class for representing data rates.
uint8_t rsrpResult
RSRP result.
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...
Test that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs...
double m_rsrpDbmUeNeighborCell
RSRP in dBm UE 2.
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
Hold variables of type enum.
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsHandoverTestCase.
MeasResults measResults
measure results
AttributeValue implementation for Time.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
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::@68 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
double m_rsrqDbUeServingCell
RSRQ in dBm UE 1.
void TeleportNear()
Teleport near function.
#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...
void Connect(std::string path, const CallbackBase &cb)
void TeleportVeryFar()
Teleport far function.
LteUeMeasurementsPiecewiseTestCase1(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Constructor.
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
Access to the IPv4 forwarding table, interfaces, and configuration.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
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)
Reeive measurement report function.
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.
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.
bool haveMeasResultNeighCells
have measure result neighbor cells
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
virtual ~LteUeMeasurementsTestCase()
double m_d2
distance between UE and other ENB node
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)
Constructor.
double m_rsrqDbUeNeighborCell
RSRQ in dBm UE 2.
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...
void TeleportFar()
Teleport far function.
LteUeMeasurementsPiecewiseTestSuite1()
void TeleportVeryNear()
Teleport very near function.
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)
Constructor.
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.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
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
RSRP in dBm UE 1.
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in a handover configuration...
Ptr< MobilityModel > m_ueMobility
the mobility model
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...
std::string GetName(void) const
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.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
#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 SetDefault(std::string name, const AttributeValue &value)
double m_d1
distance between UE and ENB node pair
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)
Report UE measurements function.
LteUeMeasurementsHandoverTestSuite()
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
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)
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 TeleportFar()
Teleport far function.
uint8_t rsrqResult
RSRQ result.
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.
static LteUeMeasurementsHandoverTestSuite lteUeMeasurementsHandoverTestSuite
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 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)
Constructor.
enum ns3::LteRrcSap::ReportConfigEutra::@64 triggerType
Trigger enumeration.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
ThresholdEutra threshold2
Threshold for event A5.