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);
251 m_rsrpDbmUeServingCell(rsrpDbmUe1),
252 m_rsrpDbmUeNeighborCell(rsrpDbmUe2),
253 m_rsrqDbUeServingCell(rsrqDbUe1),
254 m_rsrqDbUeNeighborCell(rsrqDbUe2)
256 NS_LOG_INFO(
"Test UE Measurements d1 = " << d1 <<
" m. and d2 = " << d2 <<
" m.");
299 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
300 positionAlloc->Add(Vector(
m_d2,
m_d1, 0.0));
301 positionAlloc->Add(Vector(0.0,
m_d1, 0.0));
302 positionAlloc->Add(Vector(
m_d2, 0.0, 0.0));
304 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
305 mobility.SetPositionAllocator(positionAlloc);
319 lteHelper->
Attach(ueDevs1, enbDevs.
Get(0));
320 lteHelper->
Attach(ueDevs2, enbDevs.
Get(1));
329 "/NodeList/2/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
331 Config::Connect(
"/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
335 "/NodeList/3/DeviceList/0/ComponentCarrierMapUe/0/LteUePhy/ReportUeMeasurements",
337 Config::Connect(
"/NodeList/1/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
341 Simulator::Stop(
Seconds(0.800));
344 Simulator::Destroy();
360 NS_LOG_DEBUG(
"UE serving cellId " << cellId <<
" Rxed RSRP " << rsrp <<
" thr "
368 NS_LOG_DEBUG(
"UE neighbor cellId " << cellId <<
" Rxed RSRP " << rsrp <<
" thr "
390 this <<
"Serving Cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI "
406 this <<
"Neighbor cell: received IMSI " << imsi <<
" CellId " << cellId <<
" RNTI "
429operator<<(std::vector<Time>& v,
const uint64_t& ms)
440operator<<(std::vector<uint8_t>& v,
const uint8_t& range)
451 :
TestSuite(
"lte-ue-measurements-piecewise-1", SYSTEM)
453 std::vector<Time> expectedTime;
454 std::vector<uint8_t> expectedRsrp;
460 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
461 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
466 expectedTime.clear();
467 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280 << 1400
468 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
469 expectedRsrp.clear();
470 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51 << 47 << 47
473 "Piecewise test case 1 - Event A1 with very low threshold",
477 TestCase::EXTENSIVE);
481 expectedTime.clear();
482 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 2000 << 2120;
483 expectedRsrp.clear();
484 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 57 << 57;
486 "Piecewise test case 1 - Event A1 with normal threshold",
490 TestCase::EXTENSIVE);
494 expectedTime.clear();
495 expectedTime << 264 << 384 << 504 << 624 << 744 << 1064 << 1184 << 1304 << 1424 << 2064 << 2184;
496 expectedRsrp.clear();
497 expectedRsrp << 67 << 67 << 57 << 66 << 66 << 66 << 66 << 57 << 51 << 57 << 57;
499 "Piecewise test case 1 - Event A1 with short time-to-trigger",
507 expectedTime.clear();
508 expectedTime << 328 << 448 << 568 << 688 << 808 << 1128 << 1248 << 1368 << 1488 << 2128;
509 expectedRsrp.clear();
510 expectedRsrp << 67 << 57 << 57 << 66 << 47 << 66 << 57 << 57 << 51 << 57;
512 "Piecewise test case 1 - Event A1 with long time-to-trigger",
516 TestCase::EXTENSIVE);
520 expectedTime.clear();
521 expectedTime << 456 << 576 << 696 << 816 << 936 << 1056 << 1176 << 1296 << 1416 << 1536;
522 expectedRsrp.clear();
523 expectedRsrp << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51;
525 "Piecewise test case 1 - Event A1 with super time-to-trigger",
529 TestCase::EXTENSIVE);
534 expectedTime.clear();
535 expectedTime << 200 << 320 << 440 << 560 << 680 << 1000 << 1120 << 1240 << 1360 << 1480 << 2200;
536 expectedRsrp.clear();
537 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 66 << 66 << 57 << 57 << 51 << 67;
548 expectedTime.clear();
549 expectedRsrp.clear();
551 "Piecewise test case 1 - Event A1 with very high threshold",
555 TestCase::TAKES_FOREVER);
560 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
562 expectedTime.clear();
563 expectedRsrp.clear();
565 "Piecewise test case 1 - Event A2 with very low threshold",
569 TestCase::TAKES_FOREVER);
573 expectedTime.clear();
574 expectedTime << 800 << 920 << 1400 << 1520 << 1640 << 1760 << 1880;
575 expectedRsrp.clear();
576 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 47 << 51;
578 "Piecewise test case 1 - Event A2 with normal threshold",
586 expectedTime.clear();
587 expectedTime << 864 << 984 << 1464 << 1584 << 1704 << 1824 << 1944;
588 expectedRsrp.clear();
589 expectedRsrp << 47 << 47 << 51 << 51 << 47 << 51 << 51;
591 "Piecewise test case 1 - Event A2 with short time-to-trigger",
595 TestCase::EXTENSIVE);
599 expectedTime.clear();
600 expectedTime << 928 << 1048 << 1528 << 1648 << 1768 << 1888 << 2008;
601 expectedRsrp.clear();
602 expectedRsrp << 47 << 66 << 51 << 47 << 47 << 51 << 57;
604 "Piecewise test case 1 - Event A2 with long time-to-trigger",
608 TestCase::TAKES_FOREVER);
612 expectedTime.clear();
613 expectedTime << 1656 << 1776 << 1896 << 2016 << 2136;
614 expectedRsrp.clear();
615 expectedRsrp << 47 << 47 << 51 << 57 << 57;
617 "Piecewise test case 1 - Event A2 with super time-to-trigger",
626 expectedTime.clear();
627 expectedTime << 800 << 920 << 1600 << 1720 << 1840 << 1960 << 2080;
628 expectedRsrp.clear();
629 expectedRsrp << 47 << 47 << 47 << 47 << 51 << 51 << 57;
635 TestCase::EXTENSIVE);
640 expectedTime.clear();
641 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1040 << 1160 << 1280 << 1400
642 << 1520 << 1640 << 1760 << 1880 << 2000 << 2120;
643 expectedRsrp.clear();
644 expectedRsrp << 67 << 67 << 57 << 57 << 66 << 47 << 47 << 66 << 66 << 57 << 51 << 51 << 47 << 47
647 "Piecewise test case 1 - Event A2 with very high threshold",
651 TestCase::EXTENSIVE);
660 expectedTime.clear();
661 expectedRsrp.clear();
665 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
671 TestCase::EXTENSIVE);
675 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
681 TestCase::EXTENSIVE);
686 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
692 TestCase::EXTENSIVE);
705 std::vector<Time> expectedTime,
706 std::vector<uint8_t> expectedRsrp)
709 m_expectedTime(expectedTime),
710 m_expectedRsrp(expectedRsrp)
717 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
761 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
762 positionAlloc->Add(Vector(100.0, 0.0, 0.0));
764 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
765 mobility.SetPositionAllocator(positionAlloc);
795 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
839 Simulator::Stop(
Seconds(2.201));
841 Simulator::Destroy();
882 "Report should not have neighboring cells information");
888 "Reporting should not have occurred at "
906 "Reporting should not have occurred at this time");
909 "The RSRP observed differs with the reference RSRP");
951 :
TestSuite(
"lte-ue-measurements-piecewise-2", SYSTEM)
953 std::vector<Time> expectedTime;
954 std::vector<uint8_t> expectedRsrp;
965 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
966 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
971 expectedTime.clear();
972 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
973 expectedRsrp.clear();
974 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
976 "Piecewise test case 2 - Event A1 with very low threshold",
980 TestCase::EXTENSIVE);
984 expectedTime.clear();
985 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 2000;
986 expectedRsrp.clear();
987 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 59;
989 "Piecewise test case 2 - Event A1 with normal threshold",
993 TestCase::TAKES_FOREVER);
997 expectedTime.clear();
998 expectedTime << 200 << 440 << 680 << 1000 << 1240 << 1480 << 2200;
999 expectedRsrp.clear();
1000 expectedRsrp << 73 << 63 << 72 << 72 << 59 << 56 << 72;
1006 TestCase::EXTENSIVE);
1011 expectedTime.clear();
1012 expectedRsrp.clear();
1014 "Piecewise test case 2 - Event A1 with very high threshold",
1018 TestCase::TAKES_FOREVER);
1023 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
1025 expectedTime.clear();
1026 expectedRsrp.clear();
1028 "Piecewise test case 2 - Event A2 with very low threshold",
1032 TestCase::TAKES_FOREVER);
1036 expectedTime.clear();
1037 expectedTime << 800 << 1400 << 1640 << 1880;
1038 expectedRsrp.clear();
1039 expectedRsrp << 52 << 56 << 52 << 56;
1041 "Piecewise test case 2 - Event A2 with normal threshold",
1045 TestCase::TAKES_FOREVER);
1049 expectedTime.clear();
1050 expectedTime << 800 << 1600 << 1840 << 2080;
1051 expectedRsrp.clear();
1052 expectedRsrp << 52 << 52 << 56 << 59;
1058 TestCase::EXTENSIVE);
1063 expectedTime.clear();
1064 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1065 expectedRsrp.clear();
1066 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1068 "Piecewise test case 2 - Event A2 with very high threshold",
1072 TestCase::TAKES_FOREVER);
1077 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
1080 expectedTime.clear();
1081 expectedTime << 800 << 1600;
1082 expectedRsrp.clear();
1083 expectedRsrp << 52 << 52;
1085 "Piecewise test case 2 - Event A3 with positive offset",
1093 expectedTime.clear();
1094 expectedTime << 800 << 1400 << 1640 << 1880;
1095 expectedRsrp.clear();
1096 expectedRsrp << 52 << 56 << 52 << 56;
1102 TestCase::EXTENSIVE);
1106 expectedTime.clear();
1107 expectedTime << 960 << 1560 << 1800 << 2040;
1108 expectedRsrp.clear();
1109 expectedRsrp << 52 << 56 << 56 << 59;
1111 "Piecewise test case 2 - Event A3 with short time-to-trigger",
1115 TestCase::EXTENSIVE);
1119 expectedTime.clear();
1120 expectedTime << 1720 << 1960 << 2200;
1121 expectedRsrp.clear();
1122 expectedRsrp << 52 << 56 << 72;
1124 "Piecewise test case 2 - Event A3 with super time-to-trigger",
1134 expectedTime.clear();
1135 expectedTime << 800 << 1000 << 1600 << 1840 << 2080 << 2200;
1136 expectedRsrp.clear();
1137 expectedRsrp << 52 << 72 << 52 << 56 << 59 << 72;
1149 expectedTime.clear();
1150 expectedTime << 400 << 800 << 1200 << 1440 << 1680 << 1920 << 2160;
1151 expectedRsrp.clear();
1152 expectedRsrp << 63 << 52 << 59 << 56 << 52 << 56 << 59;
1154 "Piecewise test case 2 - Event A3 with negative offset",
1158 TestCase::EXTENSIVE);
1163 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1166 expectedTime.clear();
1167 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1168 expectedRsrp.clear();
1169 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1171 "Piecewise test case 2 - Event A4 with very low threshold",
1179 expectedTime.clear();
1180 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1181 expectedRsrp.clear();
1182 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1184 "Piecewise test case 2 - Event A4 with normal threshold",
1188 TestCase::EXTENSIVE);
1192 expectedTime.clear();
1193 expectedTime << 560 << 960 << 1560 << 1800 << 2040;
1194 expectedRsrp.clear();
1195 expectedRsrp << 63 << 52 << 56 << 56 << 59;
1197 "Piecewise test case 2 - Event A4 with short time-to-trigger",
1205 expectedTime.clear();
1206 expectedTime << 1720 << 1960 << 2200;
1207 expectedRsrp.clear();
1208 expectedRsrp << 52 << 56 << 72;
1210 "Piecewise test case 2 - Event A4 with super time-to-trigger",
1214 TestCase::TAKES_FOREVER);
1219 expectedTime.clear();
1220 expectedTime << 400 << 800 << 1600 << 1840 << 2080;
1221 expectedRsrp.clear();
1222 expectedRsrp << 63 << 52 << 52 << 56 << 59;
1233 expectedTime.clear();
1234 expectedRsrp.clear();
1236 "Piecewise test case 2 - Event A4 with very high threshold",
1240 TestCase::TAKES_FOREVER);
1246 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
1249 expectedTime.clear();
1250 expectedRsrp.clear();
1252 "Piecewise test case 2 - Event A5 with low-low threshold",
1256 TestCase::EXTENSIVE);
1261 "Piecewise test case 2 - Event A5 with low-normal threshold",
1265 TestCase::TAKES_FOREVER);
1270 "Piecewise test case 2 - Event A5 with low-high threshold",
1274 TestCase::TAKES_FOREVER);
1279 expectedTime.clear();
1280 expectedTime << 800 << 1400 << 1640 << 1880;
1281 expectedRsrp.clear();
1282 expectedRsrp << 52 << 56 << 52 << 56;
1284 "Piecewise test case 2 - Event A5 with normal-low threshold",
1288 TestCase::EXTENSIVE);
1292 expectedTime.clear();
1293 expectedTime << 800 << 1400 << 1640 << 1880;
1294 expectedRsrp.clear();
1295 expectedRsrp << 52 << 56 << 52 << 56;
1297 "Piecewise test case 2 - Event A5 with normal-normal threshold",
1301 TestCase::EXTENSIVE);
1305 expectedTime.clear();
1306 expectedTime << 960 << 1560 << 1800 << 2040;
1307 expectedRsrp.clear();
1308 expectedRsrp << 52 << 56 << 56 << 59;
1310 "Piecewise test case 2 - Event A5 with short time-to-trigger",
1314 TestCase::TAKES_FOREVER);
1318 expectedTime.clear();
1319 expectedTime << 1720 << 1960 << 2200;
1320 expectedRsrp.clear();
1321 expectedRsrp << 52 << 56 << 72;
1323 "Piecewise test case 2 - Event A5 with super time-to-trigger",
1332 expectedTime.clear();
1333 expectedTime << 800 << 1600 << 1840 << 2080;
1334 expectedRsrp.clear();
1335 expectedRsrp << 52 << 52 << 56 << 59;
1346 expectedTime.clear();
1347 expectedRsrp.clear();
1349 "Piecewise test case 2 - Event A5 with normal-high threshold",
1353 TestCase::TAKES_FOREVER);
1358 expectedTime.clear();
1359 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1360 expectedRsrp.clear();
1361 expectedRsrp << 73 << 63 << 72 << 52 << 72 << 56 << 52 << 56 << 59;
1363 "Piecewise test case 2 - Event A5 with high-low threshold",
1367 TestCase::EXTENSIVE);
1371 expectedTime.clear();
1372 expectedTime << 400 << 800 << 1400 << 1640 << 1880;
1373 expectedRsrp.clear();
1374 expectedRsrp << 63 << 52 << 56 << 52 << 56;
1376 "Piecewise test case 2 - Event A5 with high-normal threshold",
1380 TestCase::TAKES_FOREVER);
1384 expectedTime.clear();
1385 expectedRsrp.clear();
1387 "Piecewise test case 2 - Event A5 with high-high threshold",
1391 TestCase::EXTENSIVE);
1404 std::vector<Time> expectedTime,
1405 std::vector<uint8_t> expectedRsrp)
1408 m_expectedTime(expectedTime),
1409 m_expectedRsrp(expectedRsrp)
1416 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
1460 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1461 positionAlloc->Add(Vector(600.0, 0.0, 0.0));
1462 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
1464 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1465 mobility.SetPositionAllocator(positionAlloc);
1487 enbRrc2->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1499 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1543 Simulator::Stop(
Seconds(2.201));
1545 Simulator::Destroy();
1563 std::string context,
1578 this <<
" Serving cellId=" << cellId
1591 "Unexpected report content");
1597 "Unexpected report content");
1598 std::list<LteRrcSap::MeasResultEutra>::iterator it =
1604 "Report contains cgi-info, which is not supported");
1607 "Report does not contain measured RSRP result");
1610 "Report does not contain measured RSRQ result");
1611 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
1612 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
1613 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
1614 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
1615 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
1623 "Reporting should not have occurred at "
1641 "Reporting should not have occurred at this time");
1644 "The RSRP observed differs with the reference RSRP");
1687 :
TestSuite(
"lte-ue-measurements-piecewise-3", SYSTEM)
1689 std::vector<Time> expectedTime;
1704 config.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1705 config.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
1710 expectedTime.clear();
1711 expectedTime << 200 << 440 << 680 << 920 << 1160 << 1400 << 1640 << 1880 << 2120;
1728 std::vector<Time> expectedTime)
1731 m_expectedTime(expectedTime)
1777 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
1778 positionAlloc->Add(Vector(200.0, 0.0, 0.0));
1779 positionAlloc->Add(Vector(1000700.0, 0.0, 0.0));
1780 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
1782 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
1783 mobility.SetPositionAllocator(positionAlloc);
1805 enbRrc2->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1807 enbRrc3->SetAttribute(
"AdmitHandoverRequest",
BooleanValue(
false));
1819 "/NodeList/0/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
1833 Simulator::Stop(
Seconds(2.201));
1835 Simulator::Destroy();
1852 std::string context,
1867 this <<
" Serving cellId=" << cellId
1880 "Unexpected report content");
1886 "Unexpected report content");
1887 std::list<LteRrcSap::MeasResultEutra>::iterator it =
1892 NS_ASSERT(it.physCellId == 2 || it.physCellId == 3);
1895 "Report contains cgi-info, which is not supported");
1898 "Report does not contain measured RSRP result");
1901 "Report does not contain measured RSRQ result");
1903 this <<
" Neighbour cellId=" << it.physCellId
1904 <<
" rsrp=" << (uint16_t)it.rsrpResult <<
" ("
1905 << EutranMeasurementMapping::RsrpRange2Dbm(it.rsrpResult) <<
" dBm)"
1906 <<
" rsrq=" << (uint16_t)it.rsrqResult <<
" ("
1907 << EutranMeasurementMapping::RsrqRange2Db(it.rsrqResult) <<
" dB)");
1916 "Reporting should not have occurred at "
1927 "Reporting should not have occurred at this time");
1949 :
TestSuite(
"lte-ue-measurements-handover", SYSTEM)
1951 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
1952 std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
1953 std::vector<Time> expectedTime;
1954 std::vector<uint8_t> expectedRsrp;
1957 sourceConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1958 sourceConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1959 sourceConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1962 sourceConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1963 sourceConfigList.push_back(sourceConfig);
1966 targetConfig.
triggerType = LteRrcSap::ReportConfigEutra::EVENT;
1967 targetConfig.
eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
1968 targetConfig.
threshold1.
choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
1971 targetConfig.
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1972 targetConfigList.push_back(targetConfig);
1977 sourceConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS480;
1978 targetConfigList.front().
reportInterval = LteRrcSap::ReportConfigEutra::MS240;
1979 expectedTime.clear();
1980 expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
1981 expectedRsrp.clear();
1982 expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
1990 TestCase::TAKES_FOREVER);
1993 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
1994 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
1995 expectedTime.clear();
1996 expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
1997 expectedRsrp.clear();
1998 expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
2010 sourceConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2011 targetConfigList.front().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
2012 sourceConfigList.front().threshold1.range = 54;
2013 sourceConfigList.front().threshold2.range = 54;
2014 sourceConfigList.front().a3Offset = 1;
2015 targetConfigList.front().threshold1.range = 54;
2016 targetConfigList.front().threshold2.range = 54;
2017 targetConfigList.front().a3Offset = 1;
2020 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2021 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2022 expectedTime.clear();
2023 expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
2024 expectedRsrp.clear();
2025 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
2032 TestCase::EXTENSIVE);
2035 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2036 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2037 expectedTime.clear();
2038 expectedRsrp.clear();
2045 TestCase::TAKES_FOREVER);
2048 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2049 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2050 expectedTime.clear();
2051 expectedTime << 1200 << 1440 << 1680 << 1920;
2052 expectedRsrp.clear();
2053 expectedRsrp << 53 << 53 << 53 << 53;
2060 TestCase::TAKES_FOREVER);
2063 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2064 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2065 expectedTime.clear();
2066 expectedTime << 1200 << 1440 << 1680 << 1920;
2067 expectedRsrp.clear();
2068 expectedRsrp << 53 << 53 << 53 << 53;
2078 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2079 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2080 expectedTime.clear();
2081 expectedTime << 1200 << 1440 << 1680 << 1920;
2082 expectedRsrp.clear();
2083 expectedRsrp << 53 << 53 << 53 << 53;
2090 TestCase::EXTENSIVE);
2093 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2094 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2095 expectedTime.clear();
2096 expectedTime << 1200 << 1440 << 1680 << 1920;
2097 expectedRsrp.clear();
2098 expectedRsrp << 53 << 53 << 53 << 53;
2105 TestCase::TAKES_FOREVER);
2108 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2109 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2110 expectedTime.clear();
2111 expectedTime << 1200 << 1440 << 1680 << 1920;
2112 expectedRsrp.clear();
2113 expectedRsrp << 53 << 53 << 53 << 53;
2120 TestCase::TAKES_FOREVER);
2123 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2124 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2125 expectedTime.clear();
2126 expectedTime << 1200 << 1440 << 1680 << 1920;
2127 expectedRsrp.clear();
2128 expectedRsrp << 53 << 53 << 53 << 53;
2135 TestCase::EXTENSIVE);
2139 sourceConfigList.front().threshold1.range = 52;
2140 targetConfigList.front().threshold1.range = 56;
2143 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2144 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2145 expectedTime.clear();
2146 expectedTime << 200 << 440 << 680 << 920;
2147 expectedRsrp.clear();
2148 expectedRsrp << 55 << 55 << 55 << 55;
2156 TestCase::EXTENSIVE);
2159 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2160 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
2161 expectedTime.clear();
2162 expectedTime << 1200 << 1440 << 1680 << 1920;
2163 expectedRsrp.clear();
2164 expectedRsrp << 53 << 53 << 53 << 53;
2175 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2176 sourceConfigList.front().a3Offset = -30;
2177 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
2178 targetConfigList.front().a3Offset = 30;
2179 expectedTime.clear();
2180 expectedTime << 200 << 440 << 680 << 920;
2181 expectedRsrp.clear();
2182 expectedRsrp << 55 << 55 << 55 << 55;
2193 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2194 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
2195 expectedTime.clear();
2196 expectedTime << 200 << 440 << 680 << 920;
2197 expectedRsrp.clear();
2198 expectedRsrp << 55 << 55 << 55 << 55;
2206 TestCase::EXTENSIVE);
2209 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2210 sourceConfigList.front().threshold2.range = 52;
2211 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
2212 targetConfigList.front().threshold2.range = 56;
2213 expectedTime.clear();
2214 expectedRsrp.clear();
2222 TestCase::EXTENSIVE);
2226 sourceConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2227 sourceConfigList.front().a3Offset = 1;
2228 sourceConfigList.front().threshold1.range = 0;
2229 sourceConfigList.front().threshold2.range = 0;
2230 targetConfigList.front().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
2231 targetConfigList.front().a3Offset = 1;
2232 targetConfigList.front().threshold1.range = 0;
2233 targetConfigList.front().threshold2.range = 0;
2236 sourceConfigList.front().timeToTrigger = 1024;
2237 targetConfigList.front().timeToTrigger = 100;
2238 expectedTime.clear();
2239 expectedTime << 1300 << 1540 << 1780;
2240 expectedRsrp.clear();
2241 expectedRsrp << 53 << 53 << 53;
2251 sourceConfigList.front().timeToTrigger = 1024;
2252 targetConfigList.front().timeToTrigger = 640;
2253 expectedTime.clear();
2254 expectedTime << 1224 << 1464 << 1704 << 1944 << 2840 << 3080 << 3320 << 3560 << 3800 << 4040;
2255 expectedRsrp.clear();
2256 expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53 << 53 << 53;
2263 TestCase::EXTENSIVE);
2275 std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
2276 std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
2277 std::vector<Time> expectedTime,
2278 std::vector<uint8_t> expectedRsrp,
2281 m_sourceConfigList(sourceConfigList),
2282 m_targetConfigList(targetConfigList),
2283 m_expectedTime(expectedTime),
2284 m_expectedRsrp(expectedRsrp),
2285 m_duration(duration)
2292 NS_FATAL_ERROR(
"Vectors of expected results are not of the same size");
2336 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
2337 positionAlloc->Add(Vector(900.0, 0.0, 0.0));
2338 positionAlloc->Add(Vector(400.0, 0.0, 0.0));
2340 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
2341 mobility.SetPositionAllocator(positionAlloc);
2350 remoteHostContainer.
Create(1);
2353 internet.
Install(remoteHostContainer);
2362 ipv4h.
SetBase(
"1.0.0.0",
"255.0.0.0");
2369 remoteHostStaticRouting->AddNetworkRouteTo(
Ipv4Address(
"7.0.0.0"),
Ipv4Mask(
"255.0.0.0"), 1);
2385 std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
2392 measId = enbRrc1->AddUeMeasReportConfig(*itReportConfig).at(0);
2399 measId = enbRrc2->AddUeMeasReportConfig(*itReportConfig).at(0);
2426 "/NodeList/3/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2431 "/NodeList/4/DeviceList/0/LteEnbRrc/RecvMeasurementReport",
2443 Simulator::Destroy();
2461 std::string context,
2470 bool isCorrectMeasId;
2476 else if (cellId == 2)
2486 if (isCorrectMeasId)
2491 this <<
" Serving cellId=" << cellId
2504 "Unexpected report content");
2510 "Unexpected report content");
2511 std::list<LteRrcSap::MeasResultEutra>::iterator it =
2518 "Report contains cgi-info, which is not supported");
2521 "Report does not contain measured RSRP result");
2524 "Report does not contain measured RSRQ result");
2525 NS_LOG_DEBUG(
this <<
" Neighbour cellId=" << it->physCellId
2526 <<
" rsrp=" << (uint16_t)it->rsrpResult <<
" ("
2527 << EutranMeasurementMapping::RsrpRange2Dbm(it->rsrpResult) <<
" dBm)"
2528 <<
" rsrq=" << (uint16_t)it->rsrqResult <<
" ("
2529 << EutranMeasurementMapping::RsrqRange2Db(it->rsrqResult) <<
" dB)");
2537 "Reporting should not have occurred at "
2555 "Reporting should not have occurred at this time");
2558 "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.
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.
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.
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.