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.");
170 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
171 positionAlloc->Add (Vector (
m_d2,
m_d1, 0.0));
172 positionAlloc->Add (Vector (0.0,
m_d1, 0.0));
173 positionAlloc->Add (Vector (
m_d2, 0.0, 0.0));
175 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
176 mobility.SetPositionAllocator (positionAlloc);
190 lteHelper->
Attach (ueDevs1, enbDevs.
Get (0));
191 lteHelper->
Attach (ueDevs2, enbDevs.
Get (1));
200 Config::Connect (
"/NodeList/2/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
202 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
205 Config::Connect (
"/NodeList/3/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
207 Config::Connect (
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
211 Simulator::Stop (
Seconds (0.800));
214 Simulator::Destroy ();
220 double rsrp,
double rsrq,
250 NS_LOG_DEBUG (
this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
264 NS_LOG_DEBUG (
this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI " << rnti
287 operator<< (std::vector<Time>& v,
const uint64_t& ms)
297 std::vector<uint8_t>&
298 operator<< (std::vector<uint8_t>& v,
const uint8_t& range)
310 :
TestSuite (
"lte-ue-measurements-piecewise-1", SYSTEM)
312 std::vector<Time> expectedTime;
313 std::vector<uint8_t> expectedRsrp;
319 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
320 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
325 expectedTime.clear ();
326 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
327 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
328 expectedRsrp.clear ();
329 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
330 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
332 config, expectedTime, expectedRsrp),
333 TestCase::EXTENSIVE);
337 expectedTime.clear ();
338 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000
340 expectedRsrp.clear ();
341 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57
344 config, expectedTime, expectedRsrp),
345 TestCase::EXTENSIVE);
349 expectedTime.clear ();
350 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064
352 expectedRsrp.clear ();
353 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57
356 config, expectedTime, expectedRsrp),
361 expectedTime.clear ();
362 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
363 expectedRsrp.clear ();
364 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
366 config, expectedTime, expectedRsrp),
367 TestCase::EXTENSIVE);
371 expectedTime.clear ();
372 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
373 expectedRsrp.clear ();
374 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
376 config, expectedTime, expectedRsrp),
377 TestCase::EXTENSIVE);
382 expectedTime.clear ();
383 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480
385 expectedRsrp.clear ();
386 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51
389 config, expectedTime, expectedRsrp),
395 expectedTime.clear ();
396 expectedRsrp.clear ();
398 config, expectedTime, expectedRsrp),
399 TestCase::TAKES_FOREVER);
404 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
406 expectedTime.clear ();
407 expectedRsrp.clear ();
409 config, expectedTime, expectedRsrp),
410 TestCase::TAKES_FOREVER);
414 expectedTime.clear ();
415 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
416 expectedRsrp.clear ();
417 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
419 config, expectedTime, expectedRsrp),
424 expectedTime.clear ();
425 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
426 expectedRsrp.clear ();
427 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
429 config, expectedTime, expectedRsrp),
430 TestCase::EXTENSIVE);
434 expectedTime.clear ();
435 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
436 expectedRsrp.clear ();
437 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
439 config, expectedTime, expectedRsrp),
440 TestCase::TAKES_FOREVER);
444 expectedTime.clear ();
445 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
446 expectedRsrp.clear ();
447 expectedRsrp << 47 << 47 << 51 << 57 << 57;
449 config, expectedTime, expectedRsrp),
455 expectedTime.clear ();
456 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
457 expectedRsrp.clear ();
458 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
460 config, expectedTime, expectedRsrp),
461 TestCase::EXTENSIVE);
466 expectedTime.clear ();
467 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280
468 << 1400 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
469 expectedRsrp.clear ();
470 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57
471 << 51 << 51 << 47 << 47 << 51 << 57 << 57;
473 config, expectedTime, expectedRsrp),
474 TestCase::EXTENSIVE);
483 expectedTime.clear ();
484 expectedRsrp.clear ();
488 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
491 config, expectedTime, expectedRsrp),
492 TestCase::EXTENSIVE);
496 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
499 config, expectedTime, expectedRsrp),
500 TestCase::EXTENSIVE);
504 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
507 config, expectedTime, expectedRsrp),
508 TestCase::EXTENSIVE);
521 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
524 m_expectedTime (expectedTime),
525 m_expectedRsrp (expectedRsrp)
532 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
553 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
577 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
578 positionAlloc->Add (Vector (100.0, 0.0, 0.0));
580 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
581 mobility.SetPositionAllocator (positionAlloc);
595 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
612 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
647 Simulator::Stop (
Seconds (2.201));
649 Simulator::Destroy ();
666 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
682 "Report should not have neighboring cells information");
684 "Unexpected report size");
688 "Reporting should not have occurred at "
705 "Reporting should not have occurred at this time");
707 "The RSRP observed differs with the reference RSRP");
750 :
TestSuite (
"lte-ue-measurements-piecewise-2", SYSTEM)
752 std::vector<Time> expectedTime;
753 std::vector<uint8_t> expectedRsrp;
764 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
765 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
770 expectedTime.clear ();
771 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
772 expectedRsrp.clear ();
773 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
775 config, expectedTime, expectedRsrp),
776 TestCase::EXTENSIVE);
780 expectedTime.clear ();
781 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
782 expectedRsrp.clear ();
783 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
785 config, expectedTime, expectedRsrp),
786 TestCase::TAKES_FOREVER);
790 expectedTime.clear ();
791 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
792 expectedRsrp.clear ();
793 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
795 config, expectedTime, expectedRsrp),
796 TestCase::EXTENSIVE);
801 expectedTime.clear ();
802 expectedRsrp.clear ();
804 config, expectedTime, expectedRsrp),
805 TestCase::TAKES_FOREVER);
810 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
812 expectedTime.clear ();
813 expectedRsrp.clear ();
815 config, expectedTime, expectedRsrp),
816 TestCase::TAKES_FOREVER);
820 expectedTime.clear ();
821 expectedTime << 800 << 1400 << 1640 << 1880;
822 expectedRsrp.clear ();
823 expectedRsrp << 52 << 56 << 52 << 56;
825 config, expectedTime, expectedRsrp),
826 TestCase::TAKES_FOREVER);
830 expectedTime.clear ();
831 expectedTime << 800 << 1600 << 1840 << 2080;
832 expectedRsrp.clear ();
833 expectedRsrp << 52 << 52 << 56 << 59;
835 config, expectedTime, expectedRsrp),
836 TestCase::EXTENSIVE);
841 expectedTime.clear ();
842 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
843 expectedRsrp.clear ();
844 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
846 config, expectedTime, expectedRsrp),
847 TestCase::TAKES_FOREVER);
852 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
855 expectedTime.clear ();
856 expectedTime << 800 << 1600;
857 expectedRsrp.clear ();
858 expectedRsrp << 52 << 52;
860 config, expectedTime, expectedRsrp),
865 expectedTime.clear ();
866 expectedTime << 800 << 1400 << 1640 << 1880;
867 expectedRsrp.clear ();
868 expectedRsrp << 52 << 56 << 52 << 56;
870 config, expectedTime, expectedRsrp),
871 TestCase::EXTENSIVE);
875 expectedTime.clear ();
876 expectedTime << 960 << 1560 << 1800 << 2040;
877 expectedRsrp.clear ();
878 expectedRsrp << 52 << 56 << 56 << 59;
880 config, expectedTime, expectedRsrp),
881 TestCase::EXTENSIVE);
885 expectedTime.clear ();
886 expectedTime << 1720 << 1960 << 2200;
887 expectedRsrp.clear ();
888 expectedRsrp << 52 << 56 << 72;
890 config, expectedTime, expectedRsrp),
897 expectedTime.clear ();
898 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
899 expectedRsrp.clear ();
900 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
902 config, expectedTime, expectedRsrp),
909 expectedTime.clear ();
910 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
911 expectedRsrp.clear ();
912 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
914 config, expectedTime, expectedRsrp),
915 TestCase::EXTENSIVE);
920 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
923 expectedTime.clear ();
924 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
925 expectedRsrp.clear ();
926 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
928 config, expectedTime, expectedRsrp),
933 expectedTime.clear ();
934 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
935 expectedRsrp.clear ();
936 expectedRsrp << 63 << 52 << 56 << 52 << 56;
938 config, expectedTime, expectedRsrp),
939 TestCase::EXTENSIVE);
943 expectedTime.clear ();
944 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
945 expectedRsrp.clear ();
946 expectedRsrp << 63 << 52 << 56 << 56 << 59;
948 config, expectedTime, expectedRsrp),
953 expectedTime.clear ();
954 expectedTime << 1720 << 1960 << 2200;
955 expectedRsrp.clear ();
956 expectedRsrp << 52 << 56 << 72;
958 config, expectedTime, expectedRsrp),
959 TestCase::TAKES_FOREVER);
964 expectedTime.clear ();
965 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
966 expectedRsrp.clear ();
967 expectedRsrp << 63 << 52 << 52 << 56 << 59;
969 config, expectedTime, expectedRsrp),
975 expectedTime.clear ();
976 expectedRsrp.clear ();
978 config, expectedTime, expectedRsrp),
979 TestCase::TAKES_FOREVER);
984 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
987 expectedTime.clear ();
988 expectedRsrp.clear ();
990 config, expectedTime, expectedRsrp),
991 TestCase::EXTENSIVE);
996 config, expectedTime, expectedRsrp),
997 TestCase::TAKES_FOREVER);
1002 config, expectedTime, expectedRsrp),
1003 TestCase::TAKES_FOREVER);
1008 expectedTime.clear ();
1009 expectedTime << 800 << 1400 << 1640 << 1880;
1010 expectedRsrp.clear ();
1011 expectedRsrp << 52 << 56 << 52 << 56;
1013 config, expectedTime, expectedRsrp),
1014 TestCase::EXTENSIVE);
1018 expectedTime.clear ();
1019 expectedTime << 800 << 1400 << 1640 << 1880;
1020 expectedRsrp.clear ();
1021 expectedRsrp << 52 << 56 << 52 << 56;
1023 config, expectedTime, expectedRsrp),
1024 TestCase::EXTENSIVE);
1028 expectedTime.clear ();
1029 expectedTime << 960 << 1560 << 1800 << 2040;
1030 expectedRsrp.clear ();
1031 expectedRsrp << 52 << 56 << 56 << 59;
1033 config, expectedTime, expectedRsrp),
1034 TestCase::TAKES_FOREVER);
1038 expectedTime.clear ();
1039 expectedTime << 1720 << 1960 << 2200;
1040 expectedRsrp.clear ();
1041 expectedRsrp << 52 << 56 << 72;
1043 config, expectedTime, expectedRsrp),
1049 expectedTime.clear ();
1050 expectedTime << 800 << 1600 << 1840 << 2080;
1051 expectedRsrp.clear ();
1052 expectedRsrp << 52 << 52 << 56 << 59;
1054 config, expectedTime, expectedRsrp),
1060 expectedTime.clear ();
1061 expectedRsrp.clear ();
1063 config, expectedTime, expectedRsrp),
1064 TestCase::TAKES_FOREVER);
1069 expectedTime.clear ();
1070 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1071 expectedRsrp.clear ();
1072 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1074 config, expectedTime, expectedRsrp),
1075 TestCase::EXTENSIVE);
1079 expectedTime.clear ();
1080 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1081 expectedRsrp.clear ();
1082 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1084 config, expectedTime, expectedRsrp),
1085 TestCase::TAKES_FOREVER);
1089 expectedTime.clear ();
1090 expectedRsrp.clear ();
1092 config, expectedTime, expectedRsrp),
1093 TestCase::EXTENSIVE);
1106 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp)
1109 m_expectedTime (expectedTime),
1110 m_expectedRsrp (expectedRsrp)
1117 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1138 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1162 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1163 positionAlloc->Add (Vector (600.0, 0.0, 0.0));
1164 positionAlloc->Add (Vector (50.0, 0.0, 0.0));
1166 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1167 mobility.SetPositionAllocator (positionAlloc);
1181 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1191 enbRrc2->SetAttribute (
"AdmitHandoverRequest",
BooleanValue (
false));
1202 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1237 Simulator::Stop (
Seconds (2.201));
1239 Simulator::Destroy ();
1256 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1277 "Unexpected report content");
1282 "Unexpected report content");
1283 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1287 "Report contains cgi-info, which is not supported");
1289 "Report does not contain measured RSRP result");
1291 "Report does not contain measured RSRQ result");
1292 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
1293 <<
" rsrp=" << (uint16_t) it->rsrpResult
1294 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
1295 <<
" rsrq=" << (uint16_t) it->rsrqResult
1296 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
1303 "Reporting should not have occurred at "
1320 "Reporting should not have occurred at this time");
1322 "The RSRP observed differs with the reference RSRP");
1366 :
TestSuite (
"lte-ue-measurements-piecewise-3", SYSTEM)
1368 std::vector<Time> expectedTime;
1383 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1384 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1389 expectedTime.clear ();
1390 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1393 config, expectedTime),TestCase::QUICK);
1405 std::vector<Time> expectedTime)
1408 m_expectedTime (expectedTime)
1429 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1455 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1456 positionAlloc->Add (Vector (200.0, 0.0, 0.0));
1457 positionAlloc->Add (Vector (1000700.0, 0.0, 0.0));
1458 positionAlloc->Add (Vector (50.0, 0.0, 0.0));
1460 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1461 mobility.SetPositionAllocator (positionAlloc);
1475 EnumValue (FfMacScheduler::PUSCH_UL_CQI));
1485 enbRrc2->SetAttribute (
"AdmitHandoverRequest",
BooleanValue (
false));
1487 enbRrc3->SetAttribute (
"AdmitHandoverRequest",
BooleanValue (
false));
1498 Config::Connect (
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1512 Simulator::Stop (
Seconds (2.201));
1514 Simulator::Destroy ();
1524 "Reporting should have occurred at " <<
m_itExpectedTime->GetSeconds () <<
"s");
1529 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
1550 "Unexpected report content");
1555 "Unexpected report content");
1556 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
1560 NS_ASSERT (it.physCellId == 2 || it.physCellId == 3);
1562 "Report contains cgi-info, which is not supported");
1564 "Report does not contain measured RSRP result");
1566 "Report does not contain measured RSRQ result");
1567 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it.physCellId
1568 <<
" rsrp=" << (uint16_t) it.rsrpResult
1569 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it.rsrpResult) <<
" dBm)"
1570 <<
" rsrq=" << (uint16_t) it.rsrqResult
1571 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it.rsrqResult) <<
" dB)");
1579 "Reporting should not have occurred at "
1590 "Reporting should not have occurred at this time");
1613 :
TestSuite (
"lte-ue-measurements-handover", SYSTEM)
1615 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1616 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1617 std::vector<Time> expectedTime;
1618 std::vector<uint8_t> expectedRsrp;
1621 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1622 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1623 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1626 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1627 sourceConfigList.push_back (sourceConfig);
1630 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1631 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1632 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1635 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1636 targetConfigList.push_back (targetConfig);
1641 sourceConfigList.front ().
reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1642 targetConfigList.front ().
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1643 expectedTime.clear ();
1644 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1645 expectedRsrp.clear ();
1646 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1648 sourceConfigList, targetConfigList,
1649 expectedTime, expectedRsrp,
1651 TestCase::TAKES_FOREVER);
1654 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1655 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1656 expectedTime.clear ();
1657 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1658 expectedRsrp.clear ();
1659 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
1661 sourceConfigList, targetConfigList,
1662 expectedTime, expectedRsrp,
1668 sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1669 targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1670 sourceConfigList.front ().threshold1.range = 54;
1671 sourceConfigList.front ().threshold2.range = 54;
1672 sourceConfigList.front ().a3Offset = 1;
1673 targetConfigList.front ().threshold1.range = 54;
1674 targetConfigList.front ().threshold2.range = 54;
1675 targetConfigList.front ().a3Offset = 1;
1678 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1679 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1680 expectedTime.clear ();
1681 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
1682 expectedRsrp.clear ();
1683 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
1685 sourceConfigList, targetConfigList,
1686 expectedTime, expectedRsrp,
1688 TestCase::EXTENSIVE);
1691 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1692 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1693 expectedTime.clear ();
1694 expectedRsrp.clear ();
1696 sourceConfigList, targetConfigList,
1697 expectedTime, expectedRsrp,
1699 TestCase::TAKES_FOREVER);
1702 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1703 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1704 expectedTime.clear ();
1705 expectedTime << 1200 << 1440 << 1680 << 1920;
1706 expectedRsrp.clear ();
1707 expectedRsrp << 53 << 53 << 53 << 53;
1709 sourceConfigList, targetConfigList,
1710 expectedTime, expectedRsrp,
1712 TestCase::TAKES_FOREVER);
1715 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1716 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1717 expectedTime.clear ();
1718 expectedTime << 1200 << 1440 << 1680 << 1920;
1719 expectedRsrp.clear ();
1720 expectedRsrp << 53 << 53 << 53 << 53;
1722 sourceConfigList, targetConfigList,
1723 expectedTime, expectedRsrp,
1728 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1729 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1730 expectedTime.clear ();
1731 expectedTime << 1200 << 1440 << 1680 << 1920;
1732 expectedRsrp.clear ();
1733 expectedRsrp << 53 << 53 << 53 << 53;
1735 sourceConfigList, targetConfigList,
1736 expectedTime, expectedRsrp,
1738 TestCase::EXTENSIVE);
1741 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1742 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1743 expectedTime.clear ();
1744 expectedTime << 1200 << 1440 << 1680 << 1920;
1745 expectedRsrp.clear ();
1746 expectedRsrp << 53 << 53 << 53 << 53;
1748 sourceConfigList, targetConfigList,
1749 expectedTime, expectedRsrp,
1751 TestCase::TAKES_FOREVER);
1754 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1755 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1756 expectedTime.clear ();
1757 expectedTime << 1200 << 1440 << 1680 << 1920;
1758 expectedRsrp.clear ();
1759 expectedRsrp << 53 << 53 << 53 << 53;
1761 sourceConfigList, targetConfigList,
1762 expectedTime, expectedRsrp,
1764 TestCase::TAKES_FOREVER);
1767 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1768 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1769 expectedTime.clear ();
1770 expectedTime << 1200 << 1440 << 1680 << 1920;
1771 expectedRsrp.clear ();
1772 expectedRsrp << 53 << 53 << 53 << 53;
1774 sourceConfigList, targetConfigList,
1775 expectedTime, expectedRsrp,
1777 TestCase::EXTENSIVE);
1781 sourceConfigList.front ().threshold1.range = 52;
1782 targetConfigList.front ().threshold1.range = 56;
1785 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1786 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1787 expectedTime.clear ();
1788 expectedTime << 200 << 440 << 680 << 920;
1789 expectedRsrp.clear ();
1790 expectedRsrp << 55 << 55 << 55 << 55;
1792 sourceConfigList, targetConfigList,
1793 expectedTime, expectedRsrp,
1795 TestCase::EXTENSIVE);
1798 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1799 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1800 expectedTime.clear ();
1801 expectedTime << 1200 << 1440 << 1680 << 1920;
1802 expectedRsrp.clear ();
1803 expectedRsrp << 53 << 53 << 53 << 53;
1805 sourceConfigList, targetConfigList,
1806 expectedTime, expectedRsrp,
1811 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1812 sourceConfigList.front ().a3Offset = -30;
1813 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1814 targetConfigList.front ().a3Offset = 30;
1815 expectedTime.clear ();
1816 expectedTime << 200 << 440 << 680 << 920;
1817 expectedRsrp.clear ();
1818 expectedRsrp << 55 << 55 << 55 << 55;
1820 sourceConfigList, targetConfigList,
1821 expectedTime, expectedRsrp,
1826 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1827 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1828 expectedTime.clear ();
1829 expectedTime << 200 << 440 << 680 << 920;
1830 expectedRsrp.clear ();
1831 expectedRsrp << 55 << 55 << 55 << 55;
1833 sourceConfigList, targetConfigList,
1834 expectedTime, expectedRsrp,
1836 TestCase::EXTENSIVE);
1839 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1840 sourceConfigList.front ().threshold2.range = 52;
1841 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1842 targetConfigList.front ().threshold2.range = 56;
1843 expectedTime.clear ();
1844 expectedRsrp.clear ();
1846 sourceConfigList, targetConfigList,
1847 expectedTime, expectedRsrp,
1849 TestCase::EXTENSIVE);
1853 sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1854 sourceConfigList.front ().a3Offset = 1;
1855 sourceConfigList.front ().threshold1.range = 0;
1856 sourceConfigList.front ().threshold2.range = 0;
1857 targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1858 targetConfigList.front ().a3Offset = 1;
1859 targetConfigList.front ().threshold1.range = 0;
1860 targetConfigList.front ().threshold2.range = 0;
1863 sourceConfigList.front ().timeToTrigger = 1024;
1864 targetConfigList.front ().timeToTrigger = 100;
1865 expectedTime.clear ();
1866 expectedTime << 1300 << 1540 << 1780;
1867 expectedRsrp.clear ();
1868 expectedRsrp << 53 << 53 << 53;
1870 sourceConfigList, targetConfigList,
1871 expectedTime, expectedRsrp,
1876 sourceConfigList.front ().timeToTrigger = 1024;
1877 targetConfigList.front ().timeToTrigger = 640;
1878 expectedTime.clear ();
1879 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
1880 expectedRsrp.clear ();
1881 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
1883 sourceConfigList, targetConfigList,
1884 expectedTime, expectedRsrp,
1886 TestCase::EXTENSIVE);
1899 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
1900 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
1901 std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
1904 m_sourceConfigList (sourceConfigList),
1905 m_targetConfigList (targetConfigList),
1906 m_expectedTime (expectedTime),
1907 m_expectedRsrp (expectedRsrp),
1908 m_duration (duration)
1915 NS_FATAL_ERROR (
"Vectors of expected results are not of the same size");
1938 StringValue (
"ns3::FriisSpectrumPropagationLossModel"));
1961 positionAlloc->Add (Vector (0.0, 0.0, 0.0));
1962 positionAlloc->Add (Vector (900.0, 0.0, 0.0));
1963 positionAlloc->Add (Vector (400.0, 0.0, 0.0));
1965 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
1966 mobility.SetPositionAllocator (positionAlloc);
1975 remoteHostContainer.
Create (1);
1978 internet.
Install (remoteHostContainer);
1987 ipv4h.
SetBase (
"1.0.0.0",
"255.0.0.0");
1993 remoteHostStaticRouting->AddNetworkRouteTo (
Ipv4Address (
"7.0.0.0"),
Ipv4Mask (
"255.0.0.0"), 1);
2011 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
2018 measId = enbRrc1->AddUeMeasReportConfig (*itReportConfig).at (0);
2025 measId = enbRrc2->AddUeMeasReportConfig (*itReportConfig).at (0);
2035 for (uint32_t u = 0; u < ueNodes.
GetN (); ++u)
2050 Config::Connect (
"/NodeList/3/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2055 Config::Connect (
"/NodeList/4/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2061 ueDevs.
Get (0), enbDevs.
Get (0), enbDevs.
Get (1));
2066 Simulator::Destroy ();
2083 std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
2089 bool isCorrectMeasId;
2095 else if (cellId == 2)
2105 if (isCorrectMeasId)
2119 "Unexpected report content");
2124 "Unexpected report content");
2125 std::list<LteRrcSap::MeasResultEutra>::iterator it = measResults.
measResultListEutra.begin ();
2130 "Report contains cgi-info, which is not supported");
2132 "Report does not contain measured RSRP result");
2134 "Report does not contain measured RSRQ result");
2135 NS_LOG_DEBUG (
this <<
" Neighbour cellId=" << it->physCellId
2136 <<
" rsrp=" << (uint16_t) it->rsrpResult
2137 <<
" (" << EutranMeasurementMapping::RsrpRange2Dbm (it->rsrpResult) <<
" dBm)"
2138 <<
" rsrq=" << (uint16_t) it->rsrqResult
2139 <<
" (" << EutranMeasurementMapping::RsrqRange2Db (it->rsrqResult) <<
" dB)");
2146 "Reporting should not have occurred at "
2163 "Reporting should not have occurred at this time");
2165 "The RSRP observed differs with the reference RSRP");
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in a handover configuration.
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
std::list< LteRrcSap::ReportConfigEutra > m_sourceConfigList
The list of active report triggering configuration for the source eNodeB.
virtual ~LteUeMeasurementsHandoverTestCase()
std::set< uint8_t > m_expectedTargetCellMeasId
The list of measurement identities being tested in the target cell.
LteUeMeasurementsHandoverTestCase(std::string name, std::list< LteRrcSap::ReportConfigEutra > sourceConfigList, std::list< LteRrcSap::ReportConfigEutra > targetConfigList, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp, Time duration)
Constructor.
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when either one of the eNodeBs receives measurement report from UE, then perform verificatio...
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
Time m_duration
Duration of simulation.
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
std::list< LteRrcSap::ReportConfigEutra > m_targetConfigList
The list of active report triggering configuration for the target eNodeB.
std::set< uint8_t > m_expectedSourceCellMeasId
The list of measurement identities being tested in the source cell.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it,...
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsHandoverTestCase.
LteUeMeasurementsHandoverTestSuite()
Testing UE measurements in LTE with simulation of 1 eNodeB and 1 UE in piecewise configuration and 12...
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
void TeleportVeryFar()
Teleport far function.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
uint8_t m_expectedMeasId
The measurement identity being tested.
LteUeMeasurementsPiecewiseTestCase1(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Constructor.
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
virtual ~LteUeMeasurementsPiecewiseTestCase1()
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it,...
void TeleportFar()
Teleport far function.
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
Ptr< MobilityModel > m_ueMobility
the mobility model
void TeleportVeryNear()
Teleport very near function.
void TeleportNear()
Teleport near function.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when eNodeB receives measurement report from UE, then perform verification on it.
Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in piecewise configuration and 24...
Ptr< MobilityModel > m_ueMobility
the mobility model
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
void TeleportVeryNear()
Teleport very near function.
std::vector< uint8_t > m_expectedRsrp
The list of expected values of RSRP (in 3GPP range unit) from the measurement reports received.
LteUeMeasurementsPiecewiseTestCase2(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime, std::vector< uint8_t > expectedRsrp)
Constructor.
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
void TeleportFar()
Teleport far function.
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it,...
void RecvMeasurementReportCallback(std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
Triggers when eNodeB receives measurement report from UE, then perform verification on it.
void TeleportVeryFar()
Teleport very far function.
void TeleportNear()
Teleport near function.
virtual ~LteUeMeasurementsPiecewiseTestCase2()
std::vector< uint8_t >::iterator m_itExpectedRsrp
Pointer to the element of m_expectedRsrp which is expected to occur next in the simulation.
uint8_t m_expectedMeasId
The measurement identity being tested.
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.
Testing UE measurements in LTE with simulation of 3 eNodeB and 1 UE in piecewise configuration and 24...
Ptr< MobilityModel > m_enbMobility
the mobility model
LteUeMeasurementsPiecewiseTestCase3(std::string name, LteRrcSap::ReportConfigEutra config, std::vector< Time > expectedTime)
Constructor.
void 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.
virtual ~LteUeMeasurementsPiecewiseTestCase3()
virtual void DoRun()
Setup the simulation with the intended UE measurement reporting configuration, run it,...
LteRrcSap::ReportConfigEutra m_config
The active report triggering configuration.
uint8_t m_expectedMeasId
The measurement identity being tested.
std::vector< Time > m_expectedTime
The list of expected time when measurement reports are received by eNodeB.
void TeleportEnbNear()
Teleport the eNb near function.
std::vector< Time >::iterator m_itExpectedTime
Pointer to the element of m_expectedTime which is expected to occur next in the simulation.
virtual void DoTeardown()
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase1...
LteUeMeasurementsPiecewiseTestSuite1()
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase2...
LteUeMeasurementsPiecewiseTestSuite2()
Test suite for generating calls to UE measurements test case ns3::LteUeMeasurementsPiecewiseTestCase3...
LteUeMeasurementsPiecewiseTestSuite3()
Test that UE measurements calculation works properly in a scenario with 2 eNodeBs and 2UEs.
double m_d1
distance between UE and ENB node pair
virtual ~LteUeMeasurementsTestCase()
double m_rsrqDbUeServingCell
RSRQ in dBm UE 1.
double m_rsrpDbmUeServingCell
RSRP in dBm UE 1.
virtual void DoRun(void)
Implementation to actually run this TestCase.
LteUeMeasurementsTestCase(std::string name, double d1, double d2, double rsrpDbmUe1, double rsrpDbmUe2, double rsrqDbUe1, double rsrqDbUe2)
Constructor.
void ReportUeMeasurements(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell)
Report UE measurements function.
double m_rsrqDbUeNeighborCell
RSRQ in dBm UE 2.
double m_d2
distance between UE and other ENB node
double m_rsrpDbmUeNeighborCell
RSRP in dBm UE 2.
void RecvMeasurementReport(uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
Reeive measurement report function.
Test that UE Measurements (see 36.214) calculation works fine in a multi-cell interference scenario.
LteUeMeasurementsTestSuite()
AttributeValue implementation for Boolean.
Class for representing data rates.
AttributeValue implementation for DataRate.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold variables of type enum.
This class contains the specification of EPS Bearers.
aggregate IP/TCP/UDP functionality to existing Nodes.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ipv4 addresses are stored in host order in this class.
Access to the IPv4 forwarding table, interfaces, and configuration.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
a class to represent an Ipv4 address mask
Helper class that adds ns3::Ipv4StaticRouting objects.
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...
The eNodeB device implementation.
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 ...
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
void HandoverRequest(Time hoTime, Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, Ptr< NetDevice > targetEnbDev)
Manually trigger an X2-based handover.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
void SetPosition(const Vector &position)
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
virtual Ipv4Address GetUeDefaultGatewayAddress()
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
uint32_t GetN(void) const
Get the number of Ptr<Node> stored in this container.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
NetDeviceContainer Install(NodeContainer c)
Hold variables of type string.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
std::string GetName(void) const
Simulation virtual time values and global simulation resolution.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
std::ostream & operator<<(std::ostream &os, TypeId tid)
Output streamer.
Hold an unsigned integer type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
void SetDefault(std::string name, const AttributeValue &value)
void Connect(std::string path, const CallbackBase &cb)
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
#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.
#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...
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
static LteUeMeasurementsPiecewiseTestSuite2 lteUeMeasurementsPiecewiseTestSuite2
void ReportUeMeasurementsCallback(LteUeMeasurementsTestCase *testcase, std::string path, uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell, uint8_t componentCarrierId)
static LteUeMeasurementsHandoverTestSuite lteUeMeasurementsHandoverTestSuite
static LteUeMeasurementsTestSuite lteUeMeasurementsTestSuite
static LteUeMeasurementsPiecewiseTestSuite1 lteUeMeasurementsPiecewiseTestSuite1
static LteUeMeasurementsPiecewiseTestSuite3 lteUeMeasurementsPiecewiseTestSuite3
void RecvMeasurementReportCallback(LteUeMeasurementsTestCase *testcase, std::string path, uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport meas)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
uint8_t rsrqResult
the RSRQ result
uint8_t rsrpResult
the RSRP result
bool haveMeasResultNeighCells
have measure result neighbor cells
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
MeasResultPCell measResultPCell
measurement result primary cell
MeasurementReport structure.
MeasResults measResults
measure results
Specifies criteria for triggering of an E-UTRA measurement reporting event.
bool reportOnLeave
Indicates whether or not the UE shall initiate the measurement reporting procedure when the leaving c...
uint8_t hysteresis
Parameter used within the entry and leave condition of an event triggered reporting condition....
ThresholdEutra threshold2
Threshold for event A5.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
enum ns3::LteRrcSap::ReportConfigEutra::@67 triggerQuantity
Trigger type enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@69 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 triggerType
Trigger enumeration.
int8_t a3Offset
Offset value for Event A3. An integer between -30 and 30. The actual value is (value * 0....
uint16_t timeToTrigger
Time during which specific criteria for the event needs to be met in order to trigger a measurement r...
uint8_t range
Value range used in RSRP/RSRQ threshold.
enum ns3::LteRrcSap::ThresholdEutra::@64 choice
Threshold enumeration.