24 #include <ns3/fatal-error.h>
26 #include <ns3/object-map.h>
27 #include <ns3/object-factory.h>
28 #include <ns3/simulator.h>
30 #include <ns3/lte-rlc.h>
31 #include <ns3/lte-rlc-tm.h>
32 #include <ns3/lte-rlc-um.h>
33 #include <ns3/lte-rlc-am.h>
34 #include <ns3/lte-pdcp.h>
35 #include <ns3/lte-radio-bearer-info.h>
98 "IDLE_CAMPED_NORMALLY",
100 "IDLE_RANDOM_ACCESS",
102 "CONNECTED_NORMALLY",
103 "CONNECTED_HANDOVER",
104 "CONNECTED_PHY_PROBLEM",
105 "CONNECTED_REESTABLISHING"
122 : m_cphySapProvider (0),
123 m_cmacSapProvider (0),
125 m_macSapProvider (0),
127 m_state (IDLE_START),
132 m_connectionPending (false),
133 m_hasReceivedMib (false),
134 m_hasReceivedSib1 (false),
135 m_hasReceivedSib2 (false),
169 .AddConstructor<LteUeRrc> ()
170 .AddAttribute (
"DataRadioBearerMap",
"List of UE RadioBearerInfo for Data Radio Bearers by LCID.",
173 MakeObjectMapChecker<LteDataRadioBearerInfo> ())
174 .AddAttribute (
"Srb0",
"SignalingRadioBearerInfo for SRB0",
177 MakePointerChecker<LteSignalingRadioBearerInfo> ())
178 .AddAttribute (
"Srb1",
"SignalingRadioBearerInfo for SRB1",
181 MakePointerChecker<LteSignalingRadioBearerInfo> ())
182 .AddAttribute (
"CellId",
183 "Serving cell identifier",
186 MakeUintegerChecker<uint16_t> ())
187 .AddAttribute (
"C-RNTI",
188 "Cell Radio Network Temporary Identifier",
191 MakeUintegerChecker<uint16_t> ())
192 .AddTraceSource (
"MibReceived",
193 "trace fired upon reception of Master Information Block",
195 .AddTraceSource (
"Sib1Received",
196 "trace fired upon reception of System Information Block Type 1",
198 .AddTraceSource (
"Sib2Received",
199 "trace fired upon reception of System Information Block Type 2",
201 .AddTraceSource (
"StateTransition",
202 "trace fired upon every UE RRC state transition",
204 .AddTraceSource (
"InitialCellSelectionEndOk",
205 "trace fired upon successful initial cell selection procedure",
207 .AddTraceSource (
"InitialCellSelectionEndError",
208 "trace fired upon failed initial cell selection procedure",
210 .AddTraceSource (
"RandomAccessSuccessful",
211 "trace fired upon successful completion of the random access procedure",
213 .AddTraceSource (
"RandomAccessError",
214 "trace fired upon failure of the random access procedure",
216 .AddTraceSource (
"ConnectionEstablished",
217 "trace fired upon successful RRC connection establishment",
219 .AddTraceSource (
"ConnectionReconfiguration",
220 "trace fired upon RRC connection reconfiguration",
222 .AddTraceSource (
"HandoverStart",
223 "trace fired upon start of a handover procedure",
225 .AddTraceSource (
"HandoverEndOk",
226 "trace fired upon successful termination of a handover procedure",
228 .AddTraceSource (
"HandoverEndError",
229 "trace fired upon failure of a handover procedure",
375 Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
380 m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
382 m_srb0->m_srbIdentity = 0;
407 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
413 params.lcid = it->second->m_logicalChannelIdentity;
416 <<
" on DRBID " << (uint32_t) drbid
417 <<
" (LCID " << (uint32_t) params.lcid <<
")"
418 <<
" (" << packet->
GetSize () <<
" bytes)");
419 it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
500 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
692 "Cell identity in SIB1 does not match with the originating cell");
707 "Cell identity in SIB1 does not match with the originating cell");
731 std::vector <LteUeCphySapUser::UeMeasurementsElement>::iterator newMeasIt;
736 newMeasIt->m_rsrq, useLayer3Filtering);
746 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
979 uint16_t maxRsrpCellId = 0;
980 double maxRsrp = -std::numeric_limits<double>::infinity ();
982 std::map<uint16_t, MeasValues>::iterator it;
989 if (maxRsrp < it->second.rsrp)
991 std::set<uint16_t>::const_iterator itCell;
995 maxRsrpCellId = it->first;
996 maxRsrp = it->second.rsrp;
1001 if (maxRsrpCellId == 0)
1003 NS_LOG_WARN (
this <<
" Cell search is unable to detect surrounding cell to attach to");
1008 <<
" is the strongest untried surrounding cell");
1027 bool isSuitableCell =
false;
1028 bool isAcceptableCell =
false;
1029 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);
1030 double qRxLevMeas = storedMeasIt->second.rsrp;
1032 NS_LOG_LOGIC (
this <<
" cell selection to cellId=" << cellId
1033 <<
" qrxlevmeas=" << qRxLevMeas <<
" dBm"
1034 <<
" qrxlevmin=" << qRxLevMin <<
" dBm");
1036 if (qRxLevMeas - qRxLevMin > 0)
1038 isAcceptableCell =
true;
1043 isSuitableCell = (cellCsgIndication ==
false) || (cellCsgId ==
m_csgWhiteList);
1046 << cellCsgId <<
"/" << cellCsgIndication);
1067 if (isAcceptableCell)
1098 std::list<LteRrcSap::SrbToAddMod>::const_iterator stamIt = rrcd.
srbToAddModList.begin ();
1106 NS_ASSERT_MSG (stamIt->srbIdentity == 1,
"only SRB1 supported");
1108 const uint8_t lcid = 1;
1117 pdcp->SetLcId (lcid);
1122 m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
1125 m_srb1->m_srbIdentity = 1;
1127 m_srb1->m_logicalChannelConfig.priority = stamIt->logicalChannelConfig.priority;
1128 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = stamIt->logicalChannelConfig.prioritizedBitRateKbps;
1129 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = stamIt->logicalChannelConfig.bucketSizeDurationMs;
1130 m_srb1->m_logicalChannelConfig.logicalChannelGroup = stamIt->logicalChannelConfig.logicalChannelGroup;
1133 lcConfig.
priority = stamIt->logicalChannelConfig.priority;
1145 ueParams.srb1SapProvider =
m_srb1->m_pdcp->GetLtePdcpSapProvider ();
1150 NS_LOG_INFO (
"request to modify SRB1 (skipping as currently not implemented)");
1156 std::list<LteRrcSap::DrbToAddMod>::const_iterator dtamIt;
1161 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" adding/modifying DRBID " << (uint32_t) dtamIt->drbIdentity <<
" LC " << (uint32_t) dtamIt->logicalChannelIdentity);
1162 NS_ASSERT_MSG (dtamIt->logicalChannelIdentity > 2,
"LCID value " << dtamIt->logicalChannelIdentity <<
" is reserved for SRBs");
1164 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbMapIt =
m_drbMap.find (dtamIt->drbIdentity);
1176 switch (dtamIt->rlcConfig.choice)
1197 rlc->
SetLcId (dtamIt->logicalChannelIdentity);
1200 drbInfo->m_rlc = rlc;
1201 drbInfo->m_epsBearerIdentity = dtamIt->epsBearerIdentity;
1202 drbInfo->m_logicalChannelIdentity = dtamIt->logicalChannelIdentity;
1203 drbInfo->m_drbIdentity = dtamIt->drbIdentity;
1211 pdcp->SetLcId (dtamIt->logicalChannelIdentity);
1215 drbInfo->m_pdcp = pdcp;
1224 lcConfig.
priority = dtamIt->logicalChannelConfig.priority;
1242 std::list<uint8_t>::iterator dtdmIt;
1247 uint8_t drbid = *dtdmIt;
1248 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" releasing DRB " << (uint32_t) drbid << drbid);
1249 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
1269 uint8_t measObjectId = *it;
1270 NS_LOG_LOGIC (
this <<
" deleting measObjectId " << (uint32_t) measObjectId);
1275 if (measIdIt->second.measObjectId == measObjectId)
1277 uint8_t measId = measIdIt->second.measId;
1279 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to measObjectId " << (uint32_t) measObjectId);
1298 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"cellsToRemoveList not supported");
1299 NS_ASSERT_MSG (it->measObjectEutra.cellsToAddModList.empty (),
"cellsToAddModList not supported");
1300 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"blackCellsToRemoveList not supported");
1301 NS_ASSERT_MSG (it->measObjectEutra.blackCellsToAddModList.empty (),
"blackCellsToAddModList not supported");
1302 NS_ASSERT_MSG (it->measObjectEutra.haveCellForWhichToReportCGI ==
false,
"cellForWhichToReportCGI is not supported");
1304 uint8_t measObjectId = it->measObjectId;
1308 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" exists, updating entry");
1309 measObjectIt->second = *it;
1310 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1315 if (measIdIt->second.measObjectId == measObjectId)
1317 uint8_t measId = measIdIt->second.measId;
1318 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to measObjectId " << (uint32_t) measObjectId);
1325 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" is new, adding entry");
1336 uint8_t reportConfigId = *it;
1337 NS_LOG_LOGIC (
this <<
" deleting reportConfigId " << (uint32_t) reportConfigId);
1342 if (measIdIt->second.reportConfigId == reportConfigId)
1344 uint8_t measId = measIdIt->second.measId;
1346 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to reportConfigId " << (uint32_t) reportConfigId);
1366 "only trigger type EVENT is supported");
1368 uint8_t reportConfigId = it->reportConfigId;
1372 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" exists, updating entry");
1374 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1379 if (measIdIt->second.reportConfigId == reportConfigId)
1381 uint8_t measId = measIdIt->second.measId;
1382 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to reportConfigId " << (uint32_t) reportConfigId);
1389 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" is new, adding entry");
1405 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1419 uint8_t measId = *it;
1420 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId);
1430 for (std::list<LteRrcSap::MeasIdToAddMod>::iterator it = mc.
measIdToAddModList.begin ();
1434 NS_LOG_LOGIC (
this <<
" measId " << (uint32_t) it->measId
1435 <<
" (measObjectId=" << (uint32_t) it->measObjectId
1436 <<
", reportConfigId=" << (uint32_t) it->reportConfigId
1443 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (it->measId);
1446 measReportIt->second.periodicReportTimer.Cancel ();
1453 std::list<PendingTrigger_t>
s;
1476 bool useLayer3Filtering)
1478 NS_LOG_FUNCTION (
this << cellId << rsrp << rsrq << useLayer3Filtering);
1480 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);;
1484 if (useLayer3Filtering)
1490 if (std::isnan (storedMeasIt->second.rsrq))
1493 storedMeasIt->second.rsrq = rsrq;
1503 storedMeasIt->second.rsrp = rsrp;
1504 storedMeasIt->second.rsrq = rsrq;
1513 std::pair<uint16_t, MeasValues> val (cellId, v);
1514 std::pair<std::map<uint16_t, MeasValues>::iterator,
bool>
1516 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
1517 storedMeasIt = ret.first;
1522 <<
", new RSRP " << rsrp <<
" stored " << storedMeasIt->second.rsrp
1523 <<
", new RSRQ " << rsrq <<
" stored " << storedMeasIt->second.rsrq);
1533 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt =
1536 NS_ASSERT (measIdIt->first == measIdIt->second.measId);
1538 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
1543 std::map<uint8_t, LteRrcSap::MeasObjectToAddMod>::iterator
1548 std::map<uint8_t, VarMeasReport>::iterator
1556 "only triggerType == event is supported");
1559 NS_LOG_LOGIC (
this <<
" considering measId " << (uint32_t) measId);
1560 bool eventEntryCondApplicable =
false;
1561 bool eventLeavingCondApplicable =
false;
1565 switch (reportConfigEutra.eventId)
1579 switch (reportConfigEutra.triggerQuantity)
1583 NS_ASSERT (reportConfigEutra.threshold1.choice
1589 NS_ASSERT (reportConfigEutra.threshold1.choice
1599 bool entryCond = ms - hys > thresh;
1603 if (!isMeasIdInReportList)
1605 concernedCellsEntry.push_back (
m_cellId);
1606 eventEntryCondApplicable =
true;
1615 != measReportIt->second.cellsTriggeredList.end ());
1618 else if (reportConfigEutra.timeToTrigger > 0)
1624 bool leavingCond = ms + hys < thresh;
1628 if (isMeasIdInReportList)
1635 != measReportIt->second.cellsTriggeredList.end ());
1636 concernedCellsLeaving.push_back (
m_cellId);
1637 eventLeavingCondApplicable =
true;
1640 else if (reportConfigEutra.timeToTrigger > 0)
1646 <<
" ms=" << ms <<
" thresh=" << thresh
1647 <<
" entryCond=" << entryCond
1648 <<
" leavingCond=" << leavingCond);
1666 switch (reportConfigEutra.triggerQuantity)
1670 NS_ASSERT (reportConfigEutra.threshold1.choice
1676 NS_ASSERT (reportConfigEutra.threshold1.choice
1686 bool entryCond = ms + hys < thresh;
1690 if (!isMeasIdInReportList)
1692 concernedCellsEntry.push_back (
m_cellId);
1693 eventEntryCondApplicable =
true;
1702 != measReportIt->second.cellsTriggeredList.end ());
1705 else if (reportConfigEutra.timeToTrigger > 0)
1711 bool leavingCond = ms - hys > thresh;
1715 if (isMeasIdInReportList)
1722 != measReportIt->second.cellsTriggeredList.end ());
1723 concernedCellsLeaving.push_back (
m_cellId);
1724 eventLeavingCondApplicable =
true;
1727 else if (reportConfigEutra.timeToTrigger > 0)
1733 <<
" ms=" << ms <<
" thresh=" << thresh
1734 <<
" entryCond=" << entryCond
1735 <<
" leavingCond=" << leavingCond);
1749 double ofn = measObjectEutra.offsetFreq;
1752 double ofp = measObjectEutra.offsetFreq;
1759 switch (reportConfigEutra.triggerQuantity)
1763 NS_ASSERT (reportConfigEutra.threshold1.choice
1768 NS_ASSERT (reportConfigEutra.threshold1.choice
1776 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1780 uint16_t cellId = storedMeasIt->first;
1786 switch (reportConfigEutra.triggerQuantity)
1789 mn = storedMeasIt->second.rsrp;
1792 mn = storedMeasIt->second.rsrq;
1799 bool hasTriggered = isMeasIdInReportList
1800 && (measReportIt->second.cellsTriggeredList.find (cellId)
1801 != measReportIt->second.cellsTriggeredList.end ());
1804 bool entryCond = mn + ofn + ocn - hys > mp + ofp + ocp + off;
1810 concernedCellsEntry.push_back (cellId);
1811 eventEntryCondApplicable =
true;
1814 else if (reportConfigEutra.timeToTrigger > 0)
1820 bool leavingCond = mn + ofn + ocn + hys < mp + ofp + ocp + off;
1826 concernedCellsLeaving.push_back (cellId);
1827 eventLeavingCondApplicable =
true;
1830 else if (reportConfigEutra.timeToTrigger > 0)
1835 NS_LOG_LOGIC (
this <<
" event A3: neighbor cell " << cellId
1836 <<
" mn=" << mn <<
" mp=" << mp <<
" offset=" << off
1837 <<
" entryCond=" << entryCond
1838 <<
" leavingCond=" << leavingCond);
1854 double ofn = measObjectEutra.offsetFreq;
1860 switch (reportConfigEutra.triggerQuantity)
1863 NS_ASSERT (reportConfigEutra.threshold1.choice
1868 NS_ASSERT (reportConfigEutra.threshold1.choice
1877 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1881 uint16_t cellId = storedMeasIt->first;
1887 switch (reportConfigEutra.triggerQuantity)
1890 mn = storedMeasIt->second.rsrp;
1893 mn = storedMeasIt->second.rsrq;
1900 bool hasTriggered = isMeasIdInReportList
1901 && (measReportIt->second.cellsTriggeredList.find (cellId)
1902 != measReportIt->second.cellsTriggeredList.end ());
1905 bool entryCond = mn + ofn + ocn - hys > thresh;
1911 concernedCellsEntry.push_back (cellId);
1912 eventEntryCondApplicable =
true;
1915 else if (reportConfigEutra.timeToTrigger > 0)
1921 bool leavingCond = mn + ofn + ocn + hys < thresh;
1927 concernedCellsLeaving.push_back (cellId);
1928 eventLeavingCondApplicable =
true;
1931 else if (reportConfigEutra.timeToTrigger > 0)
1936 NS_LOG_LOGIC (
this <<
" event A4: neighbor cell " << cellId
1937 <<
" mn=" << mn <<
" thresh=" << thresh
1938 <<
" entryCond=" << entryCond
1939 <<
" leavingCond=" << leavingCond);
1957 double ofn = measObjectEutra.offsetFreq;
1964 switch (reportConfigEutra.triggerQuantity)
1968 NS_ASSERT (reportConfigEutra.threshold1.choice
1970 NS_ASSERT (reportConfigEutra.threshold2.choice
1977 NS_ASSERT (reportConfigEutra.threshold1.choice
1979 NS_ASSERT (reportConfigEutra.threshold2.choice
1990 bool entryCond = mp + hys < thresh1;
1994 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1998 uint16_t cellId = storedMeasIt->first;
2004 switch (reportConfigEutra.triggerQuantity)
2007 mn = storedMeasIt->second.rsrp;
2010 mn = storedMeasIt->second.rsrq;
2017 bool hasTriggered = isMeasIdInReportList
2018 && (measReportIt->second.cellsTriggeredList.find (cellId)
2019 != measReportIt->second.cellsTriggeredList.end ());
2023 entryCond = mn + ofn + ocn - hys > thresh2;
2029 concernedCellsEntry.push_back (cellId);
2030 eventEntryCondApplicable =
true;
2033 else if (reportConfigEutra.timeToTrigger > 0)
2038 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2039 <<
" mn=" << mn <<
" mp=" << mp
2040 <<
" thresh2=" << thresh2
2041 <<
" thresh1=" << thresh1
2042 <<
" entryCond=" << entryCond);
2050 <<
" mp=" << mp <<
" thresh1=" << thresh1
2051 <<
" entryCond=" << entryCond);
2053 if (reportConfigEutra.timeToTrigger > 0)
2059 if (isMeasIdInReportList)
2062 bool leavingCond = mp - hys > thresh1;
2066 if (reportConfigEutra.timeToTrigger == 0)
2070 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2074 uint16_t cellId = storedMeasIt->first;
2080 if (measReportIt->second.cellsTriggeredList.find (cellId)
2081 != measReportIt->second.cellsTriggeredList.end ())
2083 concernedCellsLeaving.push_back (cellId);
2084 eventLeavingCondApplicable =
true;
2092 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2096 uint16_t cellId = storedMeasIt->first;
2102 if (measReportIt->second.cellsTriggeredList.find (cellId)
2103 != measReportIt->second.cellsTriggeredList.end ())
2105 switch (reportConfigEutra.triggerQuantity)
2108 mn = storedMeasIt->second.rsrp;
2111 mn = storedMeasIt->second.rsrq;
2120 leavingCond = mn + ofn + ocn + hys < thresh2;
2132 concernedCellsLeaving.push_back (cellId);
2133 eventLeavingCondApplicable =
true;
2135 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2136 <<
" mn=" << mn <<
" mp=" << mp
2137 <<
" thresh2=" << thresh2
2138 <<
" thresh1=" << thresh1
2139 <<
" leavingCond=" << leavingCond);
2149 <<
" mp=" << mp <<
" thresh1=" << thresh1
2150 <<
" leavingCond=" << leavingCond);
2155 if (reportConfigEutra.timeToTrigger > 0)
2162 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2166 uint16_t cellId = storedMeasIt->first;
2172 if (measReportIt->second.cellsTriggeredList.find (cellId)
2173 != measReportIt->second.cellsTriggeredList.end ())
2175 switch (reportConfigEutra.triggerQuantity)
2178 mn = storedMeasIt->second.rsrp;
2181 mn = storedMeasIt->second.rsrq;
2189 leavingCond = mn + ofn + ocn + hys < thresh2;
2193 concernedCellsLeaving.push_back (cellId);
2194 eventLeavingCondApplicable =
true;
2197 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2198 <<
" mn=" << mn <<
" mp=" << mp
2199 <<
" thresh2=" << thresh2
2200 <<
" thresh1=" << thresh1
2201 <<
" leavingCond=" << leavingCond);
2217 NS_FATAL_ERROR (
"unsupported eventId " << reportConfigEutra.eventId);
2222 NS_LOG_LOGIC (
this <<
" eventEntryCondApplicable=" << eventEntryCondApplicable
2223 <<
" eventLeavingCondApplicable=" << eventLeavingCondApplicable);
2225 if (eventEntryCondApplicable)
2227 if (reportConfigEutra.timeToTrigger == 0)
2238 measId, concernedCellsEntry);
2239 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2242 enteringTriggerIt->second.push_back (t);
2246 if (eventLeavingCondApplicable)
2250 && reportConfigEutra.reportOnLeave;
2252 if (reportConfigEutra.timeToTrigger == 0)
2263 measId, concernedCellsLeaving, reportOnLeave);
2264 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2267 leavingTriggerIt->second.push_back (t);
2278 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2282 if (!it1->second.empty ())
2284 std::list<PendingTrigger_t>::iterator it2;
2285 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2288 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at "
2293 it1->second.clear ();
2302 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2306 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2307 while (it2 != it1->second.end ())
2311 ConcernedCells_t::iterator it3;
2312 for (it3 = it2->concernedCells.begin ();
2313 it3 != it2->concernedCells.end (); ++it3)
2317 it3 = it2->concernedCells.erase (it3);
2321 if (it2->concernedCells.empty ())
2323 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at "
2326 it2 = it1->second.erase (it2);
2340 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2344 if (!it1->second.empty ())
2346 std::list<PendingTrigger_t>::iterator it2;
2347 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2350 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at "
2355 it1->second.clear ();
2364 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2368 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2369 while (it2 != it1->second.end ())
2373 ConcernedCells_t::iterator it3;
2374 for (it3 = it2->concernedCells.begin ();
2375 it3 != it2->concernedCells.end (); ++it3)
2379 it3 = it2->concernedCells.erase (it3);
2383 if (it2->concernedCells.empty ())
2385 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at "
2388 it2 = it1->second.erase (it2);
2403 std::map<uint8_t, VarMeasReport>::iterator
2410 std::pair<uint8_t, VarMeasReport> val (measId, r);
2411 std::pair<std::map<uint8_t, VarMeasReport>::iterator,
bool>
2413 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
2414 measReportIt = ret.first;
2419 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2420 it != enteringCells.end ();
2423 measReportIt->second.cellsTriggeredList.insert (*it);
2426 NS_ASSERT (!measReportIt->second.cellsTriggeredList.empty ());
2427 measReportIt->second.numberOfReportsSent = 0;
2428 measReportIt->second.periodicReportTimer
2433 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2436 if (!enteringTriggerIt->second.empty ())
2444 enteringTriggerIt->second.pop_front ();
2446 if (!enteringTriggerIt->second.empty ())
2453 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2454 it != enteringCells.end (); ++it)
2471 std::map<uint8_t, VarMeasReport>::iterator
2475 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2476 it != leavingCells.end ();
2479 measReportIt->second.cellsTriggeredList.erase (*it);
2488 if (measReportIt->second.cellsTriggeredList.empty ())
2490 measReportIt->second.periodicReportTimer.Cancel ();
2494 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2497 if (!leavingTriggerIt->second.empty ())
2505 leavingTriggerIt->second.pop_front ();
2507 if (!leavingTriggerIt->second.empty ())
2514 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2515 it != leavingCells.end (); ++it)
2531 std::map<uint8_t, VarMeasReport>::iterator
2535 NS_LOG_LOGIC (
this <<
" deleting existing report for measId " << (uint16_t) measId);
2536 measReportIt->second.periodicReportTimer.Cancel ();
2550 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator
2554 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
2561 measResults.
measId = measId;
2568 "RSRP " << (uint32_t) measResults.
rsrpResult <<
" (" << servingMeasIt->second.rsrp <<
" dBm) "
2569 "RSRQ " << (uint32_t) measResults.
rsrqResult <<
" (" << servingMeasIt->second.rsrq <<
" dB)");
2571 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (measId);
2574 NS_LOG_ERROR (
"no entry found in m_varMeasReportList for measId " << (uint32_t) measId);
2578 if (!(measReportIt->second.cellsTriggeredList.empty ()))
2580 std::multimap<double, uint16_t> sortedNeighCells;
2581 for (std::set<uint16_t>::iterator cellsTriggeredIt = measReportIt->second.cellsTriggeredList.begin ();
2582 cellsTriggeredIt != measReportIt->second.cellsTriggeredList.end ();
2585 uint16_t cellId = *cellsTriggeredIt;
2588 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2589 double triggerValue;
2590 switch (reportConfigEutra.triggerQuantity)
2593 triggerValue = neighborMeasIt->second.rsrp;
2596 triggerValue = neighborMeasIt->second.rsrq;
2602 sortedNeighCells.insert (std::pair<double, uint16_t> (triggerValue, cellId));
2606 std::multimap<double, uint16_t>::reverse_iterator sortedNeighCellsIt;
2608 for (sortedNeighCellsIt = sortedNeighCells.rbegin (), count = 0;
2609 sortedNeighCellsIt != sortedNeighCells.rend () && count < reportConfigEutra.maxReportCells;
2610 ++sortedNeighCellsIt, ++count)
2612 uint16_t cellId = sortedNeighCellsIt->second;
2613 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2617 measResultEutra.haveCgiInfo =
false;
2618 measResultEutra.haveRsrpResult =
true;
2620 measResultEutra.haveRsrqResult =
true;
2622 NS_LOG_INFO (
this <<
" reporting neighbor cell " << (uint32_t) measResultEutra.physCellId
2623 <<
" RSRP " << (uint32_t) measResultEutra.rsrpResult
2624 <<
" (" << neighborMeasIt->second.rsrp <<
" dBm)"
2625 <<
" RSRQ " << (uint32_t) measResultEutra.rsrqResult
2626 <<
" (" << neighborMeasIt->second.rsrq <<
" dB)");
2633 NS_LOG_WARN (
this <<
" cellsTriggeredList is empty");
2641 measReportIt->second.numberOfReportsSent++;
2642 measReportIt->second.periodicReportTimer.Cancel ();
2644 Time reportInterval;
2645 switch (reportConfigEutra.reportInterval)
2648 reportInterval = MilliSeconds (120);
2651 reportInterval = MilliSeconds (240);
2654 reportInterval = MilliSeconds (480);
2657 reportInterval = MilliSeconds (640);
2660 reportInterval = MilliSeconds (1024);
2663 reportInterval = MilliSeconds (2048);
2666 reportInterval = MilliSeconds (5120);
2669 reportInterval = MilliSeconds (10240);
2672 reportInterval = Seconds (60);
2675 reportInterval = Seconds (360);
2678 reportInterval = Seconds (720);
2681 reportInterval = Seconds (1800);
2684 reportInterval = Seconds (3600);
2687 NS_FATAL_ERROR (
"Unsupported reportInterval " << (uint16_t) reportConfigEutra.reportInterval);
2692 measReportIt->second.periodicReportTimer
2719 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
2740 std::map<uint8_t, uint8_t>::iterator it =
m_bid2DrbidMap.find (bid);
static Time GetDelayLeft(const EventId &id)
uint8_t numberOfRaPreambles
LtePdcpSapProvider * srb1SapProvider
Simulation virtual time values and global simulation resolution.
uint8_t raResponseWindowSize
virtual void Reset()=0
reset the PHY
CarrierFreqEutra carrierFreq
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Part of the RRC protocol.
void DoRecvRrcConnectionSetup(LteRrcSap::RrcConnectionSetup msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionSetup interface...
void DoRecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock msg)
std::map< uint8_t, LteRrcSap::MeasObjectToAddMod > measObjectList
Reference Signal Received Quality.
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
void CancelEnteringTrigger(uint8_t measId)
Clear all the waiting triggers in m_enteringTriggerQueue which are associated with the given measurem...
void DoRecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 msg)
static TypeId GetTypeId(void)
static double IeValue2ActualHysteresis(uint8_t hysteresisIeValue)
Returns the actual value of a hysteresis parameter.
std::list< MeasObjectToAddMod > measObjectToAddModList
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
LtePdcpSapUser * m_drbPdcpSapUser
void DoRecvSystemInformation(LteRrcSap::SystemInformation msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvSystemInformation interface...
uint16_t bucketSizeDurationMs
uint8_t numberOfRaPreambles
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
static TypeId GetTypeId(void)
void SetAsSapUser(LteAsSapUser *s)
Set the AS SAP user to interact with the NAS entity.
void MeasurementReportTriggering(uint8_t measId)
Evaluate the reporting criteria of a measurement identity and invoke some reporting actions based on ...
QuantityConfig quantityConfig
void DoRecvRrcConnectionReject(LteRrcSap::RrcConnectionReject msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionReject interface...
std::list< uint8_t > reportConfigToRemoveList
Event A1: Serving becomes better than absolute threshold.
bool m_hasReceivedSib2
true if SIB2 was received for the current cell
std::list< MeasResultEutra > measResultListEutra
int8_t qRxLevMin
INTEGER (-70..-22), actual value = IE value * 2 [dBm].
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
void ApplyMeasConfig(LteRrcSap::MeasConfig mc)
Update the current measurement configuration m_varMeasConfig.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void SetUseRlcSm(bool val)
virtual void SendRrcConnectionReconfigurationCompleted(RrcConnectionReconfigurationCompleted msg)=0
Send an RRCConnectionReconfigurationComplete message to the serving eNodeB during an RRC connection r...
virtual void Reset()=0
reset the MAC
uint8_t measId
The measurement identity which raised the trigger.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
std::list< SrbToAddMod > srbToAddModList
void DoSetTemporaryCellRnti(uint16_t rnti)
Represents a single triggered event from a measurement identity which reporting criteria have been fu...
RadioResourceConfigDedicated radioResourceConfigDedicated
LteUeRrc()
create an RRC instance for use within an ue
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
std::list< uint8_t > measObjectToRemoveList
void SetTypeId(TypeId tid)
virtual void StartContentionBasedRandomAccessProcedure()=0
tell the MAC to start a contention-based random access procedure, e.g., to perform RRC connection est...
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void SynchronizeWithEnb(uint16_t cellId)=0
Tell the PHY entity to synchronize with a given eNodeB over the currently active EARFCN for communica...
virtual ~LteUeRrc()
Destructor.
EventId timer
The pending reporting event, scheduled at the end of the time-to-trigger.
void CancelLeavingTrigger(uint8_t measId)
Clear all the waiting triggers in m_leavingTriggerQueue which are associated with the given measureme...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
virtual void NotifyRandomAccessSuccessful()
Notify the RRC that the MAC Random Access procedure completed successfully.
#define NS_FATAL_ERROR(msg)
fatal error handling
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberContainer)
virtual void SetRnti(uint16_t rnti)=0
virtual void NotifyConnectionSuccessful()=0
Notify the NAS that RRC Connection Establishment was successful.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
uint16_t GetUlEarfcn() const
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
virtual void RemoveLc(uint8_t lcId)=0
remove an existing LC
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
bool m_hasReceivedMib
true if MIB was received for the current cell
RachConfigDedicated rachConfigDedicated
void DoRecvRrcConnectionReestablishmentReject(LteRrcSap::RrcConnectionReestablishmentReject msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionReestablishmentReject i...
void SetRnti(uint16_t rnti)
bool m_connectionPending
true if a connection request by upper layers is pending
LtePdcpSapUser * srb1SapUser
bool m_hasReceivedSib1
true if SIB1 was received for the current cell
LteMacSapProvider * m_macSapProvider
bool haveRadioResourceConfigDedicated
static double RsrqRange2Db(uint8_t range)
converts an RSRQ range to dB as per 3GPP TS 36.133 section 9.1.7 RSRQ Measurement Report Mapping ...
virtual void SendRrcConnectionSetupCompleted(RrcConnectionSetupCompleted msg)=0
Send an RRCConnectionSetupComplete message to the serving eNodeB during an RRC connection establishme...
uint8_t rrcTransactionIdentifier
Ptr< Packet > pdcpSdu
the RRC PDU
uint8_t Bid2Drbid(uint8_t bid)
Event A3: Neighbour becomes amount of offset better than PCell.
PreambleInfo preambleInfo
double GetSeconds(void) const
Event A2: Serving becomes worse than absolute threshold.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
Event A4: Neighbour becomes better than absolute threshold.
RSRP is used for the threshold.
LteUeCmacSapUser * GetLteUeCmacSapUser()
friend class UeMemberLteUeCmacSapUser
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
LteRrcSap::QuantityConfig quantityConfig
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
void SetLteUeRrcSapUser(LteUeRrcSapUser *s)
set the RRC SAP this RRC should interact with
LteUeRrcSapUser * m_rrcSapUser
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
uint16_t m_dlEarfcn
downlink carrier frequency
Ptr< LteSignalingRadioBearerInfo > m_srb0
ConcernedCells_t concernedCells
The list of cells responsible for this trigger.
static TypeId GetTypeId(void)
Represents a measurement result from a certain cell.
static double IeValue2ActualA3Offset(int8_t a3OffsetIeValue)
Returns the actual value of an a3-Offset parameter.
Ptr< Object > Create(void) const
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
void DoRecvRrcConnectionReconfiguration(LteRrcSap::RrcConnectionReconfiguration msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionReconfiguration interfa...
RSRQ is used for the threshold.
void DoRecvRrcConnectionReestablishment(LteRrcSap::RrcConnectionReestablishment msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionReestablishment interfa...
uint8_t m_dlBandwidth
downlink bandwidth in RBs
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
Hold an unsigned integer type.
TracedCallback< uint64_t, uint16_t, uint16_t > m_randomAccessErrorTrace
uint8_t rrcTransactionIdentifier
TracedCallback< uint64_t, uint16_t, uint16_t > m_sib2ReceivedTrace
void EvaluateCellForSelection()
Performs cell selection evaluation to the current serving cell.
std::list< MeasIdToAddMod > measIdToAddModList
bool haveRachConfigDedicated
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
std::map< uint16_t, MeasValues > m_storedMeasValues
Internal storage of the latest measurement results from all detected detected cells, indexed by the cell ID where the measurement was taken from.
PhysicalConfigDedicated physicalConfigDedicated
Ptr< LteSignalingRadioBearerInfo > m_srb1
LteUeCphySapProvider * m_cphySapProvider
uint8_t filterCoefficientRSRP
uint8_t GetUlBandwidth() const
void SetLteUeCmacSapProvider(LteUeCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
Template for the implementation of the LteAsSapProvider as a member of an owner class of type C to wh...
LteMacSapUser * GetLteMacSapUser()
uint32_t m_csgWhiteList
List of CSG ID which this UE entity has access to.
Service Access Point (SAP) offered by the UE MAC to the UE RRC.
uint8_t rrcTransactionIdentifier
std::map< uint8_t, LteRrcSap::MeasIdToAddMod > measIdList
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
std::map< uint8_t, uint8_t > m_bid2DrbidMap
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndOkTrace
RadioResourceConfigDedicated radioResourceConfigDedicated
uint8_t rrcTransactionIdentifier
void SetLteUeCphySapProvider(LteUeCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
void SwitchToState(State s)
static double IeValue2ActualQRxLevMin(int8_t qRxLevMinIeValue)
Returns the actual value of an Q-RxLevMin parameter.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndErrorTrace
VarMeasConfig m_varMeasConfig
Includes the accumulated configuration of the measurements to be performed by the UE...
std::map< uint8_t, std::list< PendingTrigger_t > > m_leavingTriggerQueue
List of triggers that were raised because leaving condition have been true, but are still delayed fro...
std::map< uint8_t, LteRrcSap::ReportConfigToAddMod > reportConfigList
LteUeCphySapUser * m_cphySapUser
virtual void Setup(SetupParameters params)=0
virtual void SetSrsConfigurationIndex(uint16_t srcCi)=0
Ptr< Packet > pdcpSdu
the RRC PDU
void SetLteRlcSapUser(LteRlcSapUser *s)
uint16_t targetPhysCellId
LteAsSapUser * m_asSapUser
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Template for the implementation of the LteUeRrcSapProvider as a member of an owner class of type C to...
bool haveMobilityControlInfo
virtual void StartCellSearch(uint16_t dlEarfcn)=0
Tell the PHY entity to listen to PSS from surrounding cells and measure the RSRP. ...
void DoNotifyRandomAccessSuccessful()
uint8_t GetDlBandwidth() const
uint16_t GetDlEarfcn() const
bool haveMeasResultNeighCells
uint8_t filterCoefficientRSRQ
Reference Signal Received Power.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_sib1ReceivedTrace
double rsrq
Measured RSRQ in dB.
void DoSendData(Ptr< Packet > packet, uint8_t bid)
Service Access Point (SAP) offered by the UE MAC to the UE RRC.
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
bool haveSoundingRsUlConfigDedicated
uint16_t m_ulEarfcn
uplink carrier frequency
static Time Now(void)
Return the "current simulation time".
LteRlcSapUser * srb0SapUser
void SetLcId(uint8_t lcId)
void DoRecvRrcConnectionRelease(LteRrcSap::RrcConnectionRelease msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvRrcConnectionRelease interface...
double rsrp
Measured RSRP in dBm.
virtual void AddLc(uint8_t lcId, LogicalChannelConfig lcConfig, LteMacSapUser *msu)=0
add a new Logical Channel (LC)
void VarMeasReportListErase(uint8_t measId, ConcernedCells_t leavingCells, bool reportOnLeave)
Remove some cells from an existing reporting entry in m_varMeasReportList.
CarrierBandwidthEutra carrierBandwidth
uint8_t m_ulBandwidth
uplink bandwidth in RBs
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
LteUeCphySapUser * GetLteUeCphySapUser()
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
Ptr< LteSignalingRadioBearerInfo > m_srb1Old
virtual void SendMeasurementReport(MeasurementReport msg)=0
Send a MeasurementReport message to the serving eNodeB during a measurement reporting procedure (Sect...
State
The states of the UE RRC entity.
virtual void StartNonContentionBasedRandomAccessProcedure(uint16_t rnti, uint8_t rapId, uint8_t prachMask)=0
tell the MAC to start a non-contention-based random access procedure, e.g., as a consequence of hando...
virtual void SetDlBandwidth(uint8_t dlBandwidth)=0
uint64_t GetImsi(void) const
RachConfigCommon rachConfigCommon
instantiate subclasses of ns3::Object.
static uint8_t Dbm2RsrpRange(double dbm)
convert an RSRP value in dBm to the corresponding range as per 3GPP TS 36.133 section 9...
uint8_t raResponseWindowSize
void SaveUeMeasurements(uint16_t cellId, double rsrp, double rsrq, bool useLayer3Filtering)
Keep the given measurement result as the latest measurement figures, to be utilised by UE RRC functio...
uint16_t prioritizedBitRateKbps
bool haveCarrierBandwidth
virtual void SetTransmissionMode(uint8_t txMode)=0
bool haveAntennaInfoDedicated
static const std::string & ToString(EpcUeNas::State s)
void DoSetCsgWhiteList(uint32_t csgId)
void DoNotifyRandomAccessFailed()
void DoCompleteSetup(LteUeRrcSapProvider::CompleteSetupParameters params)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::CompleteSetup interface.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
LteUeRrcSapProvider * m_rrcSapProvider
void ApplyRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd)
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
uint16_t GetCellId() const
std::list< DrbToAddMod > drbToAddModList
virtual void NotifyConnectionReleased()=0
Notify the NAS that RRC Connection was released.
std::map< uint8_t, VarMeasReport > m_varMeasReportList
The list of active reporting entries, indexed by the measurement identity which triggered the reporti...
virtual void NotifyConnectionFailed()=0
Notify the NAS that RRC Connection Establishment failed.
LteAsSapProvider * m_asSapProvider
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
LteRlcSapProvider * srb0SapProvider
void Initialize(void)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_mibReceivedTrace
LteUeCmacSapProvider * m_cmacSapProvider
std::set< uint16_t > m_acceptableCell
List of cell ID of acceptable cells for cell selection that have been detected.
LteAsSapProvider * GetAsSapProvider()
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
void DoReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params)
MobilityControlInfo mobilityControlInfo
void DoStartCellSelection(uint16_t dlEarfcn)
Represents a single measurement reporting entry., which includes information about a measurement for ...
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
AntennaInfoDedicated antennaInfo
LteRlcSapProvider * GetLteRlcSapProvider()
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
void SendMeasurementReport(uint8_t measId)
Produce a proper measurement report from the given measurement identity's reporting entry in m_varMea...
a base class which provides memory management and object aggregation
void SynchronizeToStrongestCell()
Go through the list of measurement results, choose the one with the strongest RSRP, and tell PHY to synchronize to it.
contain a set of ns3::Object pointers.
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
virtual void SendRrcConnectionRequest(RrcConnectionRequest msg)=0
Send an _RRCConnectionRequest message to the serving eNodeB during an RRC connection establishment pr...
Part of the RRC protocol.
static uint8_t Db2RsrqRange(double db)
convert an RSRQ value in dB to the corresponding range as per 3GPP TS 36.133 section 9...
virtual void RecvData(Ptr< Packet > packet)=0
receive a data packet
UeMemberLteUeCmacSapUser(LteUeRrc *rrc)
LteUeRrcSapProvider * GetLteUeRrcSapProvider()
static const std::string g_ueRrcStateName[LteUeRrc::NUM_STATES]
std::list< uint16_t > ConcernedCells_t
List of cell IDs which are responsible for a certain trigger.
void VarMeasReportListAdd(uint8_t measId, ConcernedCells_t enteringCells)
Compose a new reporting entry of the given measurement identity, insert it into m_varMeasReportList, and set it up for submission to eNodeB.
Ptr< T > GetObject(void) const
virtual void SetTemporaryCellRnti(uint16_t rnti)
TracedCallback< uint64_t, uint16_t, uint16_t > m_randomAccessSuccessfulTrace
std::map< uint8_t, std::list< PendingTrigger_t > > m_enteringTriggerQueue
List of triggers that were raised because entering condition have been true, but are still delayed fr...
std::list< uint8_t > measIdToRemoveList
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE...
a unique identifier for an interface.
virtual void ConfigureUplink(uint16_t ulEarfcn, uint8_t ulBandwidth)=0
Configure uplink (normally done after reception of SIB2)
std::list< ReportConfigToAddMod > reportConfigToAddModList
virtual void ConfigureRach(RachConfig rc)=0
TypeId SetParent(TypeId tid)
std::list< uint8_t > drbToReleaseList
static TypeId GetTypeId(void)
void SetImsi(uint64_t imsi)
uint8_t m_lastRrcTransactionIdentifier
void VarMeasReportListClear(uint8_t measId)
Remove the reporting entry of the given measurement identity from m_varMeasReportList.
void LeaveConnectedMode()
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndErrorTrace
RaSupervisionInfo raSupervisionInfo
LteRrcSap::SystemInformationBlockType1 m_lastSib1
Stored content of the last SIB1 received.
void SetLteMacSapProvider(LteMacSapProvider *s)
virtual void NotifyRandomAccessFailed()
Notify the RRC that the MAC Random Access procedure failed.
LteUeCmacSapUser * m_cmacSapUser
static double RsrpRange2Dbm(uint8_t range)
converts an RSRP range to dBm as per 3GPP TS 36.133 section 9.1.4 RSRP Measurement Report Mapping ...
void DoForceCampedOnEnb(uint16_t cellId, uint16_t dlEarfcn)
uint8_t logicalChannelGroup