25 #include <ns3/boolean.h>
26 #include <ns3/callback.h>
27 #include <ns3/config.h>
28 #include <ns3/double.h>
30 #include <ns3/ff-mac-scheduler.h>
31 #include <ns3/internet-stack-helper.h>
32 #include <ns3/ipv4-address-helper.h>
33 #include <ns3/ipv4-interface-container.h>
34 #include <ns3/ipv4-static-routing-helper.h>
36 #include <ns3/lte-common.h>
37 #include <ns3/lte-enb-net-device.h>
38 #include <ns3/lte-enb-phy.h>
39 #include <ns3/lte-enb-rrc.h>
40 #include <ns3/lte-helper.h>
41 #include <ns3/lte-ue-net-device.h>
42 #include <ns3/lte-ue-phy.h>
43 #include <ns3/lte-ue-rrc.h>
44 #include <ns3/mobility-helper.h>
45 #include <ns3/net-device-container.h>
46 #include <ns3/node-container.h>
47 #include <ns3/point-to-point-epc-helper.h>
48 #include <ns3/point-to-point-helper.h>
49 #include <ns3/simulator.h>
50 #include <ns3/string.h>
66 uint8_t componentCarrierId)
87 :
TestSuite(
"lte-ue-measurements", SYSTEM)
104 TestCase::EXTENSIVE);
112 TestCase::EXTENSIVE);
120 TestCase::EXTENSIVE);
128 TestCase::EXTENSIVE);
136 TestCase::EXTENSIVE);
144 TestCase::EXTENSIVE);
152 TestCase::EXTENSIVE);
160 TestCase::EXTENSIVE);
168 TestCase::EXTENSIVE);
184 TestCase::EXTENSIVE);
192 TestCase::EXTENSIVE);
200 TestCase::EXTENSIVE);
208 TestCase::EXTENSIVE);
216 TestCase::EXTENSIVE);
224 TestCase::EXTENSIVE);
232 TestCase::EXTENSIVE);
255 m_rsrpDbmUeServingCell(rsrpDbmUe1),
256 m_rsrpDbmUeNeighborCell(rsrpDbmUe2),
257 m_rsrqDbUeServingCell(rsrqDbUe1),
258 m_rsrqDbUeNeighborCell(rsrqDbUe2)
260 NS_LOG_INFO(
"Test UE Measurements d1 = " << d1 <<
" m. and d2 = " << d2 <<
" m.");
303 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
304 positionAlloc->Add(Vector(
m_d2,
m_d1, 0.0));
305 positionAlloc->Add(Vector(0.0,
m_d1, 0.0));
306 positionAlloc->Add(Vector(
m_d2, 0.0, 0.0));
308 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
309 mobility.SetPositionAllocator(positionAlloc);
323 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
324 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
333 "/NodeList/2/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
335 Config::Connect(
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
339 "/NodeList/3/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
341 Config::Connect(
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
345 Simulator::Stop(
Seconds(0.800));
348 Simulator::Destroy();
364 NS_LOG_DEBUG(
"UE serving cellId " << cellId <<
" Rxed RSRP " << rsrp <<
" thr "
372 NS_LOG_DEBUG(
"UE neighbor cellId " << cellId <<
" Rxed RSRP " << rsrp <<
" thr "
394 this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI "
410 this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI "
433 operator<<(std::vector<Time>& v,
const uint64_t& ms)
443 std::vector<uint8_t>&
444 operator<<(std::vector<uint8_t>& v,
const uint8_t& range)
455 :
TestSuite(
"lte-ue-measurements-piecewise-1", SYSTEM)
457 std::vector<Time> expectedTime;
458 std::vector<uint8_t> expectedRsrp;
464 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
465 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
470 expectedTime.clear();
471 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280 << 1400
472 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
473 expectedRsrp.clear();
474 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51 << 47 << 47
477 "Piecewise test case 1 - Event A1 with very low threshold",
481 TestCase::EXTENSIVE);
485 expectedTime.clear();
486 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000 << 2120;
487 expectedRsrp.clear();
488 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57 << 57;
490 "Piecewise test case 1 - Event A1 with normal threshold",
494 TestCase::EXTENSIVE);
498 expectedTime.clear();
499 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064 << 2184;
500 expectedRsrp.clear();
501 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57 << 57;
503 "Piecewise test case 1 - Event A1 with short time-to-trigger",
511 expectedTime.clear();
512 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
513 expectedRsrp.clear();
514 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
516 "Piecewise test case 1 - Event A1 with long time-to-trigger",
520 TestCase::EXTENSIVE);
524 expectedTime.clear();
525 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
526 expectedRsrp.clear();
527 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
529 "Piecewise test case 1 - Event A1 with super time-to-trigger",
533 TestCase::EXTENSIVE);
538 expectedTime.clear();
539 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480 << 2200;
540 expectedRsrp.clear();
541 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51 << 67;
552 expectedTime.clear();
553 expectedRsrp.clear();
555 "Piecewise test case 1 - Event A1 with very high threshold",
559 TestCase::TAKES_FOREVER);
564 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
566 expectedTime.clear();
567 expectedRsrp.clear();
569 "Piecewise test case 1 - Event A2 with very low threshold",
573 TestCase::TAKES_FOREVER);
577 expectedTime.clear();
578 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
579 expectedRsrp.clear();
580 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
582 "Piecewise test case 1 - Event A2 with normal threshold",
590 expectedTime.clear();
591 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
592 expectedRsrp.clear();
593 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
595 "Piecewise test case 1 - Event A2 with short time-to-trigger",
599 TestCase::EXTENSIVE);
603 expectedTime.clear();
604 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
605 expectedRsrp.clear();
606 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
608 "Piecewise test case 1 - Event A2 with long time-to-trigger",
612 TestCase::TAKES_FOREVER);
616 expectedTime.clear();
617 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
618 expectedRsrp.clear();
619 expectedRsrp << 47 << 47 << 51 << 57 << 57;
621 "Piecewise test case 1 - Event A2 with super time-to-trigger",
630 expectedTime.clear();
631 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
632 expectedRsrp.clear();
633 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
639 TestCase::EXTENSIVE);
644 expectedTime.clear();
645 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280 << 1400
646 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
647 expectedRsrp.clear();
648 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51 << 47 << 47
651 "Piecewise test case 1 - Event A2 with very high threshold",
655 TestCase::EXTENSIVE);
664 expectedTime.clear();
665 expectedRsrp.clear();
669 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
675 TestCase::EXTENSIVE);
679 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
685 TestCase::EXTENSIVE);
690 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
696 TestCase::EXTENSIVE);
713 std::vector<Time> expectedTime,
714 std::vector<uint8_t> expectedRsrp)
717 m_expectedTime(expectedTime),
718 m_expectedRsrp(expectedRsrp)
725 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
769 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
770 positionAlloc->Add(Vector(100.0, 0.0, 0.0));
772 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
773 mobility.SetPositionAllocator(positionAlloc);
803 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
847 Simulator::Stop(
Seconds(2.201));
849 Simulator::Destroy();
890 "Report should not have neighboring cells information");
896 "Reporting should not have occurred at "
914 "Reporting should not have occurred at this time");
917 "The RSRP observed differs with the reference RSRP");
959 :
TestSuite(
"lte-ue-measurements-piecewise-2", SYSTEM)
961 std::vector<Time> expectedTime;
962 std::vector<uint8_t> expectedRsrp;
973 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
974 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
979 expectedTime.clear();
980 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
981 expectedRsrp.clear();
982 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
984 "Piecewise test case 2 - Event A1 with very low threshold",
988 TestCase::EXTENSIVE);
992 expectedTime.clear();
993 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
994 expectedRsrp.clear();
995 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
997 "Piecewise test case 2 - Event A1 with normal threshold",
1001 TestCase::TAKES_FOREVER);
1005 expectedTime.clear();
1006 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
1007 expectedRsrp.clear();
1008 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
1014 TestCase::EXTENSIVE);
1019 expectedTime.clear();
1020 expectedRsrp.clear();
1022 "Piecewise test case 2 - Event A1 with very high threshold",
1026 TestCase::TAKES_FOREVER);
1031 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1033 expectedTime.clear();
1034 expectedRsrp.clear();
1036 "Piecewise test case 2 - Event A2 with very low threshold",
1040 TestCase::TAKES_FOREVER);
1044 expectedTime.clear();
1045 expectedTime << 800 << 1400 << 1640 << 1880;
1046 expectedRsrp.clear();
1047 expectedRsrp << 52 << 56 << 52 << 56;
1049 "Piecewise test case 2 - Event A2 with normal threshold",
1053 TestCase::TAKES_FOREVER);
1057 expectedTime.clear();
1058 expectedTime << 800 << 1600 << 1840 << 2080;
1059 expectedRsrp.clear();
1060 expectedRsrp << 52 << 52 << 56 << 59;
1066 TestCase::EXTENSIVE);
1071 expectedTime.clear();
1072 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1073 expectedRsrp.clear();
1074 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1076 "Piecewise test case 2 - Event A2 with very high threshold",
1080 TestCase::TAKES_FOREVER);
1085 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1088 expectedTime.clear();
1089 expectedTime << 800 << 1600;
1090 expectedRsrp.clear();
1091 expectedRsrp << 52 << 52;
1093 "Piecewise test case 2 - Event A3 with positive offset",
1101 expectedTime.clear();
1102 expectedTime << 800 << 1400 << 1640 << 1880;
1103 expectedRsrp.clear();
1104 expectedRsrp << 52 << 56 << 52 << 56;
1110 TestCase::EXTENSIVE);
1114 expectedTime.clear();
1115 expectedTime << 960 << 1560 << 1800 << 2040;
1116 expectedRsrp.clear();
1117 expectedRsrp << 52 << 56 << 56 << 59;
1119 "Piecewise test case 2 - Event A3 with short time-to-trigger",
1123 TestCase::EXTENSIVE);
1127 expectedTime.clear();
1128 expectedTime << 1720 << 1960 << 2200;
1129 expectedRsrp.clear();
1130 expectedRsrp << 52 << 56 << 72;
1132 "Piecewise test case 2 - Event A3 with super time-to-trigger",
1142 expectedTime.clear();
1143 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
1144 expectedRsrp.clear();
1145 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
1157 expectedTime.clear();
1158 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
1159 expectedRsrp.clear();
1160 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
1162 "Piecewise test case 2 - Event A3 with negative offset",
1166 TestCase::EXTENSIVE);
1171 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1174 expectedTime.clear();
1175 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1176 expectedRsrp.clear();
1177 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1179 "Piecewise test case 2 - Event A4 with very low threshold",
1187 expectedTime.clear();
1188 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1189 expectedRsrp.clear();
1190 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1192 "Piecewise test case 2 - Event A4 with normal threshold",
1196 TestCase::EXTENSIVE);
1200 expectedTime.clear();
1201 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
1202 expectedRsrp.clear();
1203 expectedRsrp << 63 << 52 << 56 << 56 << 59;
1205 "Piecewise test case 2 - Event A4 with short time-to-trigger",
1213 expectedTime.clear();
1214 expectedTime << 1720 << 1960 << 2200;
1215 expectedRsrp.clear();
1216 expectedRsrp << 52 << 56 << 72;
1218 "Piecewise test case 2 - Event A4 with super time-to-trigger",
1222 TestCase::TAKES_FOREVER);
1227 expectedTime.clear();
1228 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
1229 expectedRsrp.clear();
1230 expectedRsrp << 63 << 52 << 52 << 56 << 59;
1241 expectedTime.clear();
1242 expectedRsrp.clear();
1244 "Piecewise test case 2 - Event A4 with very high threshold",
1248 TestCase::TAKES_FOREVER);
1254 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1257 expectedTime.clear();
1258 expectedRsrp.clear();
1260 "Piecewise test case 2 - Event A5 with low-low threshold",
1264 TestCase::EXTENSIVE);
1269 "Piecewise test case 2 - Event A5 with low-normal threshold",
1273 TestCase::TAKES_FOREVER);
1278 "Piecewise test case 2 - Event A5 with low-high threshold",
1282 TestCase::TAKES_FOREVER);
1287 expectedTime.clear();
1288 expectedTime << 800 << 1400 << 1640 << 1880;
1289 expectedRsrp.clear();
1290 expectedRsrp << 52 << 56 << 52 << 56;
1292 "Piecewise test case 2 - Event A5 with normal-low threshold",
1296 TestCase::EXTENSIVE);
1300 expectedTime.clear();
1301 expectedTime << 800 << 1400 << 1640 << 1880;
1302 expectedRsrp.clear();
1303 expectedRsrp << 52 << 56 << 52 << 56;
1305 "Piecewise test case 2 - Event A5 with normal-normal threshold",
1309 TestCase::EXTENSIVE);
1313 expectedTime.clear();
1314 expectedTime << 960 << 1560 << 1800 << 2040;
1315 expectedRsrp.clear();
1316 expectedRsrp << 52 << 56 << 56 << 59;
1318 "Piecewise test case 2 - Event A5 with short time-to-trigger",
1322 TestCase::TAKES_FOREVER);
1326 expectedTime.clear();
1327 expectedTime << 1720 << 1960 << 2200;
1328 expectedRsrp.clear();
1329 expectedRsrp << 52 << 56 << 72;
1331 "Piecewise test case 2 - Event A5 with super time-to-trigger",
1340 expectedTime.clear();
1341 expectedTime << 800 << 1600 << 1840 << 2080;
1342 expectedRsrp.clear();
1343 expectedRsrp << 52 << 52 << 56 << 59;
1354 expectedTime.clear();
1355 expectedRsrp.clear();
1357 "Piecewise test case 2 - Event A5 with normal-high threshold",
1361 TestCase::TAKES_FOREVER);
1366 expectedTime.clear();
1367 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1368 expectedRsrp.clear();
1369 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1371 "Piecewise test case 2 - Event A5 with high-low threshold",
1375 TestCase::EXTENSIVE);
1379 expectedTime.clear();
1380 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1381 expectedRsrp.clear();
1382 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1384 "Piecewise test case 2 - Event A5 with high-normal threshold",
1388 TestCase::TAKES_FOREVER);
1392 expectedTime.clear();
1393 expectedRsrp.clear();
1395 "Piecewise test case 2 - Event A5 with high-high threshold",
1399 TestCase::EXTENSIVE);
1416 std::vector<Time> expectedTime,
1417 std::vector<uint8_t> expectedRsrp)
1420 m_expectedTime(expectedTime),
1421 m_expectedRsrp(expectedRsrp)
1428 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
1472 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1473 positionAlloc->Add(Vector(600.0, 0.0, 0.0));
1474 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
1476 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1477 mobility.SetPositionAllocator(positionAlloc);
1499 enbRrc2->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1511 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1555 Simulator::Stop(
Seconds(2.201));
1557 Simulator::Destroy();
1575 std::string context,
1590 this <<
" Serving cellId=" << cellId
1603 "Unexpected report content");
1609 "Unexpected report content");
1615 "Report contains cgi-info, which is not supported");
1618 "Report does not contain measured RSRP result");
1621 "Report does not contain measured RSRQ result");
1622 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
1623 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
1624 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
1625 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
1626 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
1634 "Reporting should not have occurred at "
1652 "Reporting should not have occurred at this time");
1655 "The RSRP observed differs with the reference RSRP");
1698 :
TestSuite(
"lte-ue-measurements-piecewise-3", SYSTEM)
1700 std::vector<Time> expectedTime;
1715 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1716 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1721 expectedTime.clear();
1722 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1743 std::vector<Time> expectedTime)
1746 m_expectedTime(expectedTime)
1792 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1793 positionAlloc->Add(Vector(200.0, 0.0, 0.0));
1794 positionAlloc->Add(Vector(1000700.0, 0.0, 0.0));
1795 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
1797 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1798 mobility.SetPositionAllocator(positionAlloc);
1820 enbRrc2->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1822 enbRrc3->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1834 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1848 Simulator::Stop(
Seconds(2.201));
1850 Simulator::Destroy();
1867 std::string context,
1882 this <<
" Serving cellId=" << cellId
1895 "Unexpected report content");
1901 "Unexpected report content");
1906 NS_ASSERT(it.physCellId == 2 || it.physCellId == 3);
1909 "Report contains cgi-info, which is not supported");
1912 "Report does not contain measured RSRP result");
1915 "Report does not contain measured RSRQ result");
1917 this <<
" Neighbour cellId=" << it.physCellId
1918 <<
" rsrp=" << (uint16_t)it.rsrpResult <<
" ("
1919 << EutranMeasurementMapping::RsrpRange2Dbm(it.rsrpResult) <<
" dBm)"
1920 <<
" rsrq=" << (uint16_t)it.rsrqResult <<
" ("
1921 << EutranMeasurementMapping::RsrqRange2Db(it.rsrqResult) <<
" dB)");
1930 "Reporting should not have occurred at "
1941 "Reporting should not have occurred at this time");
1963 :
TestSuite(
"lte-ue-measurements-handover", SYSTEM)
1965 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1966 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1967 std::vector<Time> expectedTime;
1968 std::vector<uint8_t> expectedRsrp;
1971 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1972 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1973 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1976 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1977 sourceConfigList.push_back(sourceConfig);
1980 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1981 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1982 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1985 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1986 targetConfigList.push_back(targetConfig);
1991 sourceConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1992 targetConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1993 expectedTime.clear();
1994 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1995 expectedRsrp.clear();
1996 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
2004 TestCase::TAKES_FOREVER);
2007 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
2008 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
2009 expectedTime.clear();
2010 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
2011 expectedRsrp.clear();
2012 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
2024 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2025 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2026 sourceConfigList.front().threshold1.range = 54;
2027 sourceConfigList.front().threshold2.range = 54;
2028 sourceConfigList.front().a3Offset = 1;
2029 targetConfigList.front().threshold1.range = 54;
2030 targetConfigList.front().threshold2.range = 54;
2031 targetConfigList.front().a3Offset = 1;
2034 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2035 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2036 expectedTime.clear();
2037 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
2038 expectedRsrp.clear();
2039 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
2046 TestCase::EXTENSIVE);
2049 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2050 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2051 expectedTime.clear();
2052 expectedRsrp.clear();
2059 TestCase::TAKES_FOREVER);
2062 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2063 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2064 expectedTime.clear();
2065 expectedTime << 1200 << 1440 << 1680 << 1920;
2066 expectedRsrp.clear();
2067 expectedRsrp << 53 << 53 << 53 << 53;
2074 TestCase::TAKES_FOREVER);
2077 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2078 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2079 expectedTime.clear();
2080 expectedTime << 1200 << 1440 << 1680 << 1920;
2081 expectedRsrp.clear();
2082 expectedRsrp << 53 << 53 << 53 << 53;
2092 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2093 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2094 expectedTime.clear();
2095 expectedTime << 1200 << 1440 << 1680 << 1920;
2096 expectedRsrp.clear();
2097 expectedRsrp << 53 << 53 << 53 << 53;
2104 TestCase::EXTENSIVE);
2107 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2108 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2109 expectedTime.clear();
2110 expectedTime << 1200 << 1440 << 1680 << 1920;
2111 expectedRsrp.clear();
2112 expectedRsrp << 53 << 53 << 53 << 53;
2119 TestCase::TAKES_FOREVER);
2122 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2123 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2124 expectedTime.clear();
2125 expectedTime << 1200 << 1440 << 1680 << 1920;
2126 expectedRsrp.clear();
2127 expectedRsrp << 53 << 53 << 53 << 53;
2134 TestCase::TAKES_FOREVER);
2137 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2138 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2139 expectedTime.clear();
2140 expectedTime << 1200 << 1440 << 1680 << 1920;
2141 expectedRsrp.clear();
2142 expectedRsrp << 53 << 53 << 53 << 53;
2149 TestCase::EXTENSIVE);
2153 sourceConfigList.front().threshold1.range = 52;
2154 targetConfigList.front().threshold1.range = 56;
2157 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2158 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2159 expectedTime.clear();
2160 expectedTime << 200 << 440 << 680 << 920;
2161 expectedRsrp.clear();
2162 expectedRsrp << 55 << 55 << 55 << 55;
2170 TestCase::EXTENSIVE);
2173 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2174 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2175 expectedTime.clear();
2176 expectedTime << 1200 << 1440 << 1680 << 1920;
2177 expectedRsrp.clear();
2178 expectedRsrp << 53 << 53 << 53 << 53;
2189 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2190 sourceConfigList.front().a3Offset = -30;
2191 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2192 targetConfigList.front().a3Offset = 30;
2193 expectedTime.clear();
2194 expectedTime << 200 << 440 << 680 << 920;
2195 expectedRsrp.clear();
2196 expectedRsrp << 55 << 55 << 55 << 55;
2207 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2208 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2209 expectedTime.clear();
2210 expectedTime << 200 << 440 << 680 << 920;
2211 expectedRsrp.clear();
2212 expectedRsrp << 55 << 55 << 55 << 55;
2220 TestCase::EXTENSIVE);
2223 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2224 sourceConfigList.front().threshold2.range = 52;
2225 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2226 targetConfigList.front().threshold2.range = 56;
2227 expectedTime.clear();
2228 expectedRsrp.clear();
2236 TestCase::EXTENSIVE);
2240 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2241 sourceConfigList.front().a3Offset = 1;
2242 sourceConfigList.front().threshold1.range = 0;
2243 sourceConfigList.front().threshold2.range = 0;
2244 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2245 targetConfigList.front().a3Offset = 1;
2246 targetConfigList.front().threshold1.range = 0;
2247 targetConfigList.front().threshold2.range = 0;
2250 sourceConfigList.front().timeToTrigger = 1024;
2251 targetConfigList.front().timeToTrigger = 100;
2252 expectedTime.clear();
2253 expectedTime << 1300 << 1540 << 1780;
2254 expectedRsrp.clear();
2255 expectedRsrp << 53 << 53 << 53;
2265 sourceConfigList.front().timeToTrigger = 1024;
2266 targetConfigList.front().timeToTrigger = 640;
2267 expectedTime.clear();
2268 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
2269 expectedRsrp.clear();
2270 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
2277 TestCase::EXTENSIVE);
2293 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
2294 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
2295 std::vector<Time> expectedTime,
2296 std::vector<uint8_t> expectedRsrp,
2299 m_sourceConfigList(sourceConfigList),
2300 m_targetConfigList(targetConfigList),
2301 m_expectedTime(expectedTime),
2302 m_expectedRsrp(expectedRsrp),
2303 m_duration(duration)
2310 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
2354 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
2355 positionAlloc->Add(Vector(900.0, 0.0, 0.0));
2356 positionAlloc->Add(Vector(400.0, 0.0, 0.0));
2358 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2359 mobility.SetPositionAllocator(positionAlloc);
2368 remoteHostContainer.
Create(1);
2371 internet.Install(remoteHostContainer);
2380 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
2387 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
2410 measId = enbRrc1->AddUeMeasReportConfig(*itReportConfig).at(0);
2418 measId = enbRrc2->AddUeMeasReportConfig(*itReportConfig).at(0);
2428 for (uint32_t u = 0; u < ueNodes.
GetN(); ++u)
2445 "/NodeList/3/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2450 "/NodeList/4/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2462 Simulator::Destroy();
2480 std::string context,
2489 bool isCorrectMeasId;
2495 else if (cellId == 2)
2505 if (isCorrectMeasId)
2510 this <<
" Serving cellId=" << cellId
2523 "Unexpected report content");
2529 "Unexpected report content");
2536 "Report contains cgi-info, which is not supported");
2539 "Report does not contain measured RSRP result");
2542 "Report does not contain measured RSRQ result");
2543 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
2544 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
2545 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
2546 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
2547 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
2555 "Reporting should not have occurred at "
2573 "Reporting should not have occurred at this time");
2576 "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.
~LteUeMeasurementsHandoverTestCase() override
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.
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
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...
void DoTeardown() override
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.
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.
~LteUeMeasurementsPiecewiseTestCase1() override
void TeleportFar()
Teleport far function.
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.
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
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.
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run 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
~LteUeMeasurementsPiecewiseTestCase2() override
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.
void DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
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.
void DoRun() override
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.
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.
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 DoTeardown() override
Runs at the end of the simulation, verifying that all expected measurement reports have been examined...
void DoRun() override
Setup the simulation with the intended UE measurement reporting configuration, run it,...
~LteUeMeasurementsPiecewiseTestCase3() override
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.
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.
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
double m_rsrqDbUeServingCell
RSRQ in dBm UE 1.
double m_rsrpDbmUeServingCell
RSRP in dBm UE 1.
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.
void DoRun() override
Implementation to actually run this TestCase.
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.
~LteUeMeasurementsTestCase() override
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()
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.
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.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
keep track of a set of node pointers.
uint32_t GetN() 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() 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() const
Simulation virtual time values and global simulation resolution.
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
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.
static LteUeMeasurementsPiecewiseTestSuite2 lteUeMeasurementsPiecewiseTestSuite2
Static variable for test initialization.
static LteUeMeasurementsHandoverTestSuite lteUeMeasurementsHandoverTestSuite
Static variable for test initialization.
static LteUeMeasurementsTestSuite lteUeMeasurementsTestSuite
Static variable for test initialization.
static LteUeMeasurementsPiecewiseTestSuite1 lteUeMeasurementsPiecewiseTestSuite1
Static variable for test initialization.
static LteUeMeasurementsPiecewiseTestSuite3 lteUeMeasurementsPiecewiseTestSuite3
Static variable for test initialization.
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs &&... bargs)
Make Callbacks with varying number of bound arguments.
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Time Now()
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.
void ReportUeMeasurementsCallback(LteUeMeasurementsTestCase *testcase, std::string path, uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool servingCell, uint8_t componentCarrierId)
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.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
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.
enum ns3::LteRrcSap::ReportConfigEutra::@63 triggerType
Trigger enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@64 eventId
Event enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
enum ns3::LteRrcSap::ReportConfigEutra::@67 reportInterval
Report interval enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 triggerQuantity
Trigger type enumeration.
int8_t a3Offset
Offset value for Event A3.
uint16_t timeToTrigger
Time during which specific criteria for the event needs to be met in order to trigger a measurement r...
enum ns3::LteRrcSap::ThresholdEutra::@62 choice
Threshold enumeration.
uint8_t range
Value range used in RSRP/RSRQ threshold.