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");
1610 std::list<LteRrcSap::MeasResultEutra>::iterator it =
1616 "Report contains cgi-info, which is not supported");
1619 "Report does not contain measured RSRP result");
1622 "Report does not contain measured RSRQ result");
1623 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
1624 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
1625 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
1626 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
1627 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
1635 "Reporting should not have occurred at "
1653 "Reporting should not have occurred at this time");
1656 "The RSRP observed differs with the reference RSRP");
1699 :
TestSuite(
"lte-ue-measurements-piecewise-3", SYSTEM)
1701 std::vector<Time> expectedTime;
1716 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1717 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1722 expectedTime.clear();
1723 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1744 std::vector<Time> expectedTime)
1747 m_expectedTime(expectedTime)
1793 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1794 positionAlloc->Add(Vector(200.0, 0.0, 0.0));
1795 positionAlloc->Add(Vector(1000700.0, 0.0, 0.0));
1796 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
1798 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1799 mobility.SetPositionAllocator(positionAlloc);
1821 enbRrc2->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1823 enbRrc3->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1835 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1849 Simulator::Stop(
Seconds(2.201));
1851 Simulator::Destroy();
1868 std::string context,
1883 this <<
" Serving cellId=" << cellId
1896 "Unexpected report content");
1902 "Unexpected report content");
1903 std::list<LteRrcSap::MeasResultEutra>::iterator it =
1908 NS_ASSERT(it.physCellId == 2 || it.physCellId == 3);
1911 "Report contains cgi-info, which is not supported");
1914 "Report does not contain measured RSRP result");
1917 "Report does not contain measured RSRQ result");
1919 this <<
" Neighbour cellId=" << it.physCellId
1920 <<
" rsrp=" << (uint16_t)it.rsrpResult <<
" ("
1921 << EutranMeasurementMapping::RsrpRange2Dbm(it.rsrpResult) <<
" dBm)"
1922 <<
" rsrq=" << (uint16_t)it.rsrqResult <<
" ("
1923 << EutranMeasurementMapping::RsrqRange2Db(it.rsrqResult) <<
" dB)");
1932 "Reporting should not have occurred at "
1943 "Reporting should not have occurred at this time");
1965 :
TestSuite(
"lte-ue-measurements-handover", SYSTEM)
1967 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1968 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1969 std::vector<Time> expectedTime;
1970 std::vector<uint8_t> expectedRsrp;
1973 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1974 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1975 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1978 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1979 sourceConfigList.push_back(sourceConfig);
1982 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1983 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1984 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1987 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1988 targetConfigList.push_back(targetConfig);
1993 sourceConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1994 targetConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1995 expectedTime.clear();
1996 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1997 expectedRsrp.clear();
1998 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
2006 TestCase::TAKES_FOREVER);
2009 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
2010 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
2011 expectedTime.clear();
2012 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
2013 expectedRsrp.clear();
2014 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
2026 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2027 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2028 sourceConfigList.front().threshold1.range = 54;
2029 sourceConfigList.front().threshold2.range = 54;
2030 sourceConfigList.front().a3Offset = 1;
2031 targetConfigList.front().threshold1.range = 54;
2032 targetConfigList.front().threshold2.range = 54;
2033 targetConfigList.front().a3Offset = 1;
2036 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2037 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2038 expectedTime.clear();
2039 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
2040 expectedRsrp.clear();
2041 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
2048 TestCase::EXTENSIVE);
2051 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2052 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2053 expectedTime.clear();
2054 expectedRsrp.clear();
2061 TestCase::TAKES_FOREVER);
2064 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2065 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2066 expectedTime.clear();
2067 expectedTime << 1200 << 1440 << 1680 << 1920;
2068 expectedRsrp.clear();
2069 expectedRsrp << 53 << 53 << 53 << 53;
2076 TestCase::TAKES_FOREVER);
2079 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2080 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2081 expectedTime.clear();
2082 expectedTime << 1200 << 1440 << 1680 << 1920;
2083 expectedRsrp.clear();
2084 expectedRsrp << 53 << 53 << 53 << 53;
2094 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2095 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2096 expectedTime.clear();
2097 expectedTime << 1200 << 1440 << 1680 << 1920;
2098 expectedRsrp.clear();
2099 expectedRsrp << 53 << 53 << 53 << 53;
2106 TestCase::EXTENSIVE);
2109 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2110 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2111 expectedTime.clear();
2112 expectedTime << 1200 << 1440 << 1680 << 1920;
2113 expectedRsrp.clear();
2114 expectedRsrp << 53 << 53 << 53 << 53;
2121 TestCase::TAKES_FOREVER);
2124 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2125 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2126 expectedTime.clear();
2127 expectedTime << 1200 << 1440 << 1680 << 1920;
2128 expectedRsrp.clear();
2129 expectedRsrp << 53 << 53 << 53 << 53;
2136 TestCase::TAKES_FOREVER);
2139 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2140 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2141 expectedTime.clear();
2142 expectedTime << 1200 << 1440 << 1680 << 1920;
2143 expectedRsrp.clear();
2144 expectedRsrp << 53 << 53 << 53 << 53;
2151 TestCase::EXTENSIVE);
2155 sourceConfigList.front().threshold1.range = 52;
2156 targetConfigList.front().threshold1.range = 56;
2159 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2160 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2161 expectedTime.clear();
2162 expectedTime << 200 << 440 << 680 << 920;
2163 expectedRsrp.clear();
2164 expectedRsrp << 55 << 55 << 55 << 55;
2172 TestCase::EXTENSIVE);
2175 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2176 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2177 expectedTime.clear();
2178 expectedTime << 1200 << 1440 << 1680 << 1920;
2179 expectedRsrp.clear();
2180 expectedRsrp << 53 << 53 << 53 << 53;
2191 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2192 sourceConfigList.front().a3Offset = -30;
2193 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2194 targetConfigList.front().a3Offset = 30;
2195 expectedTime.clear();
2196 expectedTime << 200 << 440 << 680 << 920;
2197 expectedRsrp.clear();
2198 expectedRsrp << 55 << 55 << 55 << 55;
2209 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2210 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2211 expectedTime.clear();
2212 expectedTime << 200 << 440 << 680 << 920;
2213 expectedRsrp.clear();
2214 expectedRsrp << 55 << 55 << 55 << 55;
2222 TestCase::EXTENSIVE);
2225 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2226 sourceConfigList.front().threshold2.range = 52;
2227 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2228 targetConfigList.front().threshold2.range = 56;
2229 expectedTime.clear();
2230 expectedRsrp.clear();
2238 TestCase::EXTENSIVE);
2242 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2243 sourceConfigList.front().a3Offset = 1;
2244 sourceConfigList.front().threshold1.range = 0;
2245 sourceConfigList.front().threshold2.range = 0;
2246 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2247 targetConfigList.front().a3Offset = 1;
2248 targetConfigList.front().threshold1.range = 0;
2249 targetConfigList.front().threshold2.range = 0;
2252 sourceConfigList.front().timeToTrigger = 1024;
2253 targetConfigList.front().timeToTrigger = 100;
2254 expectedTime.clear();
2255 expectedTime << 1300 << 1540 << 1780;
2256 expectedRsrp.clear();
2257 expectedRsrp << 53 << 53 << 53;
2267 sourceConfigList.front().timeToTrigger = 1024;
2268 targetConfigList.front().timeToTrigger = 640;
2269 expectedTime.clear();
2270 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
2271 expectedRsrp.clear();
2272 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
2279 TestCase::EXTENSIVE);
2295 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
2296 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
2297 std::vector<Time> expectedTime,
2298 std::vector<uint8_t> expectedRsrp,
2301 m_sourceConfigList(sourceConfigList),
2302 m_targetConfigList(targetConfigList),
2303 m_expectedTime(expectedTime),
2304 m_expectedRsrp(expectedRsrp),
2305 m_duration(duration)
2312 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
2356 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
2357 positionAlloc->Add(Vector(900.0, 0.0, 0.0));
2358 positionAlloc->Add(Vector(400.0, 0.0, 0.0));
2360 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2361 mobility.SetPositionAllocator(positionAlloc);
2370 remoteHostContainer.
Create(1);
2373 internet.
Install(remoteHostContainer);
2382 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
2389 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
2405 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
2412 measId = enbRrc1->AddUeMeasReportConfig(*itReportConfig).at(0);
2419 measId = enbRrc2->AddUeMeasReportConfig(*itReportConfig).at(0);
2429 for (uint32_t u = 0; u < ueNodes.
GetN(); ++u)
2446 "/NodeList/3/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2451 "/NodeList/4/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2463 Simulator::Destroy();
2481 std::string context,
2490 bool isCorrectMeasId;
2496 else if (cellId == 2)
2506 if (isCorrectMeasId)
2511 this <<
" Serving cellId=" << cellId
2524 "Unexpected report content");
2530 "Unexpected report content");
2531 std::list<LteRrcSap::MeasResultEutra>::iterator it =
2538 "Report contains cgi-info, which is not supported");
2541 "Report does not contain measured RSRP result");
2544 "Report does not contain measured RSRQ result");
2545 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
2546 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
2547 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
2548 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
2549 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
2557 "Reporting should not have occurred at "
2575 "Reporting should not have occurred at this time");
2578 "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()
AttributeValue implementation for Boolean.
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.
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.
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.
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.
enum ns3::LteRrcSap::ReportConfigEutra::@68 reportInterval
Report interval enumeration.
ThresholdEutra threshold2
Threshold for event A5.
enum ns3::LteRrcSap::ReportConfigEutra::@64 triggerType
Trigger enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@65 eventId
Event enumeration.
enum ns3::LteRrcSap::ReportConfigEutra::@66 triggerQuantity
Trigger type enumeration.
ThresholdEutra threshold1
Threshold for event A1, A2, A4, and A5.
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...
uint8_t range
Value range used in RSRP/RSRQ threshold.
enum ns3::LteRrcSap::ThresholdEutra::@63 choice
Threshold enumeration.