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 .AddAttribute (
"T300",
193 "Timer for the RRC Connection Establishment procedure "
194 "(i.e., the procedure is deemed as failed if it takes longer than this)",
198 .AddTraceSource (
"MibReceived",
199 "trace fired upon reception of Master Information Block",
201 .AddTraceSource (
"Sib1Received",
202 "trace fired upon reception of System Information Block Type 1",
204 .AddTraceSource (
"Sib2Received",
205 "trace fired upon reception of System Information Block Type 2",
207 .AddTraceSource (
"StateTransition",
208 "trace fired upon every UE RRC state transition",
210 .AddTraceSource (
"InitialCellSelectionEndOk",
211 "trace fired upon successful initial cell selection procedure",
213 .AddTraceSource (
"InitialCellSelectionEndError",
214 "trace fired upon failed initial cell selection procedure",
216 .AddTraceSource (
"RandomAccessSuccessful",
217 "trace fired upon successful completion of the random access procedure",
219 .AddTraceSource (
"RandomAccessError",
220 "trace fired upon failure of the random access procedure",
222 .AddTraceSource (
"ConnectionEstablished",
223 "trace fired upon successful RRC connection establishment",
225 .AddTraceSource (
"ConnectionTimeout",
226 "trace fired upon timeout RRC connection establishment because of T300",
228 .AddTraceSource (
"ConnectionReconfiguration",
229 "trace fired upon RRC connection reconfiguration",
231 .AddTraceSource (
"HandoverStart",
232 "trace fired upon start of a handover procedure",
234 .AddTraceSource (
"HandoverEndOk",
235 "trace fired upon successful termination of a handover procedure",
237 .AddTraceSource (
"HandoverEndError",
238 "trace fired upon failure of a handover procedure",
384 Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
389 m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
391 m_srb0->m_srbIdentity = 0;
416 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
422 params.lcid = it->second->m_logicalChannelIdentity;
425 <<
" on DRBID " << (uint32_t) drbid
426 <<
" (LCID " << (uint32_t) params.lcid <<
")"
427 <<
" (" << packet->
GetSize () <<
" bytes)");
428 it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
512 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
704 "Cell identity in SIB1 does not match with the originating cell");
719 "Cell identity in SIB1 does not match with the originating cell");
743 std::vector <LteUeCphySapUser::UeMeasurementsElement>::iterator newMeasIt;
748 newMeasIt->m_rsrq, useLayer3Filtering);
758 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
997 uint16_t maxRsrpCellId = 0;
998 double maxRsrp = -std::numeric_limits<double>::infinity ();
1000 std::map<uint16_t, MeasValues>::iterator it;
1007 if (maxRsrp < it->second.rsrp)
1009 std::set<uint16_t>::const_iterator itCell;
1013 maxRsrpCellId = it->first;
1014 maxRsrp = it->second.rsrp;
1019 if (maxRsrpCellId == 0)
1021 NS_LOG_WARN (
this <<
" Cell search is unable to detect surrounding cell to attach to");
1026 <<
" is the strongest untried surrounding cell");
1045 bool isSuitableCell =
false;
1046 bool isAcceptableCell =
false;
1047 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);
1048 double qRxLevMeas = storedMeasIt->second.rsrp;
1050 NS_LOG_LOGIC (
this <<
" cell selection to cellId=" << cellId
1051 <<
" qrxlevmeas=" << qRxLevMeas <<
" dBm"
1052 <<
" qrxlevmin=" << qRxLevMin <<
" dBm");
1054 if (qRxLevMeas - qRxLevMin > 0)
1056 isAcceptableCell =
true;
1061 isSuitableCell = (cellCsgIndication ==
false) || (cellCsgId ==
m_csgWhiteList);
1064 << cellCsgId <<
"/" << cellCsgIndication);
1085 if (isAcceptableCell)
1122 std::list<LteRrcSap::SrbToAddMod>::const_iterator stamIt = rrcd.
srbToAddModList.begin ();
1130 NS_ASSERT_MSG (stamIt->srbIdentity == 1,
"only SRB1 supported");
1132 const uint8_t lcid = 1;
1141 pdcp->SetLcId (lcid);
1146 m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
1149 m_srb1->m_srbIdentity = 1;
1151 m_srb1->m_logicalChannelConfig.priority = stamIt->logicalChannelConfig.priority;
1152 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = stamIt->logicalChannelConfig.prioritizedBitRateKbps;
1153 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = stamIt->logicalChannelConfig.bucketSizeDurationMs;
1154 m_srb1->m_logicalChannelConfig.logicalChannelGroup = stamIt->logicalChannelConfig.logicalChannelGroup;
1157 lcConfig.
priority = stamIt->logicalChannelConfig.priority;
1169 ueParams.srb1SapProvider =
m_srb1->m_pdcp->GetLtePdcpSapProvider ();
1174 NS_LOG_INFO (
"request to modify SRB1 (skipping as currently not implemented)");
1180 std::list<LteRrcSap::DrbToAddMod>::const_iterator dtamIt;
1185 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" adding/modifying DRBID " << (uint32_t) dtamIt->drbIdentity <<
" LC " << (uint32_t) dtamIt->logicalChannelIdentity);
1186 NS_ASSERT_MSG (dtamIt->logicalChannelIdentity > 2,
"LCID value " << dtamIt->logicalChannelIdentity <<
" is reserved for SRBs");
1188 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbMapIt =
m_drbMap.find (dtamIt->drbIdentity);
1200 switch (dtamIt->rlcConfig.choice)
1221 rlc->
SetLcId (dtamIt->logicalChannelIdentity);
1224 drbInfo->m_rlc = rlc;
1225 drbInfo->m_epsBearerIdentity = dtamIt->epsBearerIdentity;
1226 drbInfo->m_logicalChannelIdentity = dtamIt->logicalChannelIdentity;
1227 drbInfo->m_drbIdentity = dtamIt->drbIdentity;
1235 pdcp->SetLcId (dtamIt->logicalChannelIdentity);
1239 drbInfo->m_pdcp = pdcp;
1248 lcConfig.
priority = dtamIt->logicalChannelConfig.priority;
1266 std::list<uint8_t>::iterator dtdmIt;
1271 uint8_t drbid = *dtdmIt;
1272 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" releasing DRB " << (uint32_t) drbid << drbid);
1273 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
1293 uint8_t measObjectId = *it;
1294 NS_LOG_LOGIC (
this <<
" deleting measObjectId " << (uint32_t) measObjectId);
1299 if (measIdIt->second.measObjectId == measObjectId)
1301 uint8_t measId = measIdIt->second.measId;
1303 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to measObjectId " << (uint32_t) measObjectId);
1322 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"cellsToRemoveList not supported");
1323 NS_ASSERT_MSG (it->measObjectEutra.cellsToAddModList.empty (),
"cellsToAddModList not supported");
1324 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"blackCellsToRemoveList not supported");
1325 NS_ASSERT_MSG (it->measObjectEutra.blackCellsToAddModList.empty (),
"blackCellsToAddModList not supported");
1326 NS_ASSERT_MSG (it->measObjectEutra.haveCellForWhichToReportCGI ==
false,
"cellForWhichToReportCGI is not supported");
1328 uint8_t measObjectId = it->measObjectId;
1332 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" exists, updating entry");
1333 measObjectIt->second = *it;
1334 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1339 if (measIdIt->second.measObjectId == measObjectId)
1341 uint8_t measId = measIdIt->second.measId;
1342 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to measObjectId " << (uint32_t) measObjectId);
1349 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" is new, adding entry");
1360 uint8_t reportConfigId = *it;
1361 NS_LOG_LOGIC (
this <<
" deleting reportConfigId " << (uint32_t) reportConfigId);
1366 if (measIdIt->second.reportConfigId == reportConfigId)
1368 uint8_t measId = measIdIt->second.measId;
1370 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to reportConfigId " << (uint32_t) reportConfigId);
1390 "only trigger type EVENT is supported");
1392 uint8_t reportConfigId = it->reportConfigId;
1396 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" exists, updating entry");
1398 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1403 if (measIdIt->second.reportConfigId == reportConfigId)
1405 uint8_t measId = measIdIt->second.measId;
1406 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to reportConfigId " << (uint32_t) reportConfigId);
1413 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" is new, adding entry");
1429 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1443 uint8_t measId = *it;
1444 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId);
1454 for (std::list<LteRrcSap::MeasIdToAddMod>::iterator it = mc.
measIdToAddModList.begin ();
1458 NS_LOG_LOGIC (
this <<
" measId " << (uint32_t) it->measId
1459 <<
" (measObjectId=" << (uint32_t) it->measObjectId
1460 <<
", reportConfigId=" << (uint32_t) it->reportConfigId
1467 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (it->measId);
1470 measReportIt->second.periodicReportTimer.Cancel ();
1477 std::list<PendingTrigger_t>
s;
1500 bool useLayer3Filtering)
1502 NS_LOG_FUNCTION (
this << cellId << rsrp << rsrq << useLayer3Filtering);
1504 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);;
1508 if (useLayer3Filtering)
1514 if (std::isnan (storedMeasIt->second.rsrq))
1517 storedMeasIt->second.rsrq = rsrq;
1527 storedMeasIt->second.rsrp = rsrp;
1528 storedMeasIt->second.rsrq = rsrq;
1537 std::pair<uint16_t, MeasValues> val (cellId, v);
1538 std::pair<std::map<uint16_t, MeasValues>::iterator,
bool>
1540 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
1541 storedMeasIt = ret.first;
1546 <<
", new RSRP " << rsrp <<
" stored " << storedMeasIt->second.rsrp
1547 <<
", new RSRQ " << rsrq <<
" stored " << storedMeasIt->second.rsrq);
1557 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt =
1560 NS_ASSERT (measIdIt->first == measIdIt->second.measId);
1562 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
1567 std::map<uint8_t, LteRrcSap::MeasObjectToAddMod>::iterator
1572 std::map<uint8_t, VarMeasReport>::iterator
1580 "only triggerType == event is supported");
1583 NS_LOG_LOGIC (
this <<
" considering measId " << (uint32_t) measId);
1584 bool eventEntryCondApplicable =
false;
1585 bool eventLeavingCondApplicable =
false;
1589 switch (reportConfigEutra.eventId)
1603 switch (reportConfigEutra.triggerQuantity)
1607 NS_ASSERT (reportConfigEutra.threshold1.choice
1613 NS_ASSERT (reportConfigEutra.threshold1.choice
1623 bool entryCond = ms - hys > thresh;
1627 if (!isMeasIdInReportList)
1629 concernedCellsEntry.push_back (
m_cellId);
1630 eventEntryCondApplicable =
true;
1639 != measReportIt->second.cellsTriggeredList.end ());
1642 else if (reportConfigEutra.timeToTrigger > 0)
1648 bool leavingCond = ms + hys < thresh;
1652 if (isMeasIdInReportList)
1659 != measReportIt->second.cellsTriggeredList.end ());
1660 concernedCellsLeaving.push_back (
m_cellId);
1661 eventLeavingCondApplicable =
true;
1664 else if (reportConfigEutra.timeToTrigger > 0)
1670 <<
" ms=" << ms <<
" thresh=" << thresh
1671 <<
" entryCond=" << entryCond
1672 <<
" leavingCond=" << leavingCond);
1690 switch (reportConfigEutra.triggerQuantity)
1694 NS_ASSERT (reportConfigEutra.threshold1.choice
1700 NS_ASSERT (reportConfigEutra.threshold1.choice
1710 bool entryCond = ms + hys < thresh;
1714 if (!isMeasIdInReportList)
1716 concernedCellsEntry.push_back (
m_cellId);
1717 eventEntryCondApplicable =
true;
1726 != measReportIt->second.cellsTriggeredList.end ());
1729 else if (reportConfigEutra.timeToTrigger > 0)
1735 bool leavingCond = ms - hys > thresh;
1739 if (isMeasIdInReportList)
1746 != measReportIt->second.cellsTriggeredList.end ());
1747 concernedCellsLeaving.push_back (
m_cellId);
1748 eventLeavingCondApplicable =
true;
1751 else if (reportConfigEutra.timeToTrigger > 0)
1757 <<
" ms=" << ms <<
" thresh=" << thresh
1758 <<
" entryCond=" << entryCond
1759 <<
" leavingCond=" << leavingCond);
1773 double ofn = measObjectEutra.offsetFreq;
1776 double ofp = measObjectEutra.offsetFreq;
1783 switch (reportConfigEutra.triggerQuantity)
1787 NS_ASSERT (reportConfigEutra.threshold1.choice
1792 NS_ASSERT (reportConfigEutra.threshold1.choice
1800 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1804 uint16_t cellId = storedMeasIt->first;
1810 switch (reportConfigEutra.triggerQuantity)
1813 mn = storedMeasIt->second.rsrp;
1816 mn = storedMeasIt->second.rsrq;
1823 bool hasTriggered = isMeasIdInReportList
1824 && (measReportIt->second.cellsTriggeredList.find (cellId)
1825 != measReportIt->second.cellsTriggeredList.end ());
1828 bool entryCond = mn + ofn + ocn - hys > mp + ofp + ocp + off;
1834 concernedCellsEntry.push_back (cellId);
1835 eventEntryCondApplicable =
true;
1838 else if (reportConfigEutra.timeToTrigger > 0)
1844 bool leavingCond = mn + ofn + ocn + hys < mp + ofp + ocp + off;
1850 concernedCellsLeaving.push_back (cellId);
1851 eventLeavingCondApplicable =
true;
1854 else if (reportConfigEutra.timeToTrigger > 0)
1859 NS_LOG_LOGIC (
this <<
" event A3: neighbor cell " << cellId
1860 <<
" mn=" << mn <<
" mp=" << mp <<
" offset=" << off
1861 <<
" entryCond=" << entryCond
1862 <<
" leavingCond=" << leavingCond);
1878 double ofn = measObjectEutra.offsetFreq;
1884 switch (reportConfigEutra.triggerQuantity)
1887 NS_ASSERT (reportConfigEutra.threshold1.choice
1892 NS_ASSERT (reportConfigEutra.threshold1.choice
1901 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1905 uint16_t cellId = storedMeasIt->first;
1911 switch (reportConfigEutra.triggerQuantity)
1914 mn = storedMeasIt->second.rsrp;
1917 mn = storedMeasIt->second.rsrq;
1924 bool hasTriggered = isMeasIdInReportList
1925 && (measReportIt->second.cellsTriggeredList.find (cellId)
1926 != measReportIt->second.cellsTriggeredList.end ());
1929 bool entryCond = mn + ofn + ocn - hys > thresh;
1935 concernedCellsEntry.push_back (cellId);
1936 eventEntryCondApplicable =
true;
1939 else if (reportConfigEutra.timeToTrigger > 0)
1945 bool leavingCond = mn + ofn + ocn + hys < thresh;
1951 concernedCellsLeaving.push_back (cellId);
1952 eventLeavingCondApplicable =
true;
1955 else if (reportConfigEutra.timeToTrigger > 0)
1960 NS_LOG_LOGIC (
this <<
" event A4: neighbor cell " << cellId
1961 <<
" mn=" << mn <<
" thresh=" << thresh
1962 <<
" entryCond=" << entryCond
1963 <<
" leavingCond=" << leavingCond);
1981 double ofn = measObjectEutra.offsetFreq;
1988 switch (reportConfigEutra.triggerQuantity)
1992 NS_ASSERT (reportConfigEutra.threshold1.choice
1994 NS_ASSERT (reportConfigEutra.threshold2.choice
2001 NS_ASSERT (reportConfigEutra.threshold1.choice
2003 NS_ASSERT (reportConfigEutra.threshold2.choice
2014 bool entryCond = mp + hys < thresh1;
2018 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2022 uint16_t cellId = storedMeasIt->first;
2028 switch (reportConfigEutra.triggerQuantity)
2031 mn = storedMeasIt->second.rsrp;
2034 mn = storedMeasIt->second.rsrq;
2041 bool hasTriggered = isMeasIdInReportList
2042 && (measReportIt->second.cellsTriggeredList.find (cellId)
2043 != measReportIt->second.cellsTriggeredList.end ());
2047 entryCond = mn + ofn + ocn - hys > thresh2;
2053 concernedCellsEntry.push_back (cellId);
2054 eventEntryCondApplicable =
true;
2057 else if (reportConfigEutra.timeToTrigger > 0)
2062 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2063 <<
" mn=" << mn <<
" mp=" << mp
2064 <<
" thresh2=" << thresh2
2065 <<
" thresh1=" << thresh1
2066 <<
" entryCond=" << entryCond);
2074 <<
" mp=" << mp <<
" thresh1=" << thresh1
2075 <<
" entryCond=" << entryCond);
2077 if (reportConfigEutra.timeToTrigger > 0)
2083 if (isMeasIdInReportList)
2086 bool leavingCond = mp - hys > thresh1;
2090 if (reportConfigEutra.timeToTrigger == 0)
2094 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2098 uint16_t cellId = storedMeasIt->first;
2104 if (measReportIt->second.cellsTriggeredList.find (cellId)
2105 != measReportIt->second.cellsTriggeredList.end ())
2107 concernedCellsLeaving.push_back (cellId);
2108 eventLeavingCondApplicable =
true;
2116 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2120 uint16_t cellId = storedMeasIt->first;
2126 if (measReportIt->second.cellsTriggeredList.find (cellId)
2127 != measReportIt->second.cellsTriggeredList.end ())
2129 switch (reportConfigEutra.triggerQuantity)
2132 mn = storedMeasIt->second.rsrp;
2135 mn = storedMeasIt->second.rsrq;
2144 leavingCond = mn + ofn + ocn + hys < thresh2;
2156 concernedCellsLeaving.push_back (cellId);
2157 eventLeavingCondApplicable =
true;
2159 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2160 <<
" mn=" << mn <<
" mp=" << mp
2161 <<
" thresh2=" << thresh2
2162 <<
" thresh1=" << thresh1
2163 <<
" leavingCond=" << leavingCond);
2173 <<
" mp=" << mp <<
" thresh1=" << thresh1
2174 <<
" leavingCond=" << leavingCond);
2179 if (reportConfigEutra.timeToTrigger > 0)
2186 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2190 uint16_t cellId = storedMeasIt->first;
2196 if (measReportIt->second.cellsTriggeredList.find (cellId)
2197 != measReportIt->second.cellsTriggeredList.end ())
2199 switch (reportConfigEutra.triggerQuantity)
2202 mn = storedMeasIt->second.rsrp;
2205 mn = storedMeasIt->second.rsrq;
2213 leavingCond = mn + ofn + ocn + hys < thresh2;
2217 concernedCellsLeaving.push_back (cellId);
2218 eventLeavingCondApplicable =
true;
2221 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2222 <<
" mn=" << mn <<
" mp=" << mp
2223 <<
" thresh2=" << thresh2
2224 <<
" thresh1=" << thresh1
2225 <<
" leavingCond=" << leavingCond);
2241 NS_FATAL_ERROR (
"unsupported eventId " << reportConfigEutra.eventId);
2246 NS_LOG_LOGIC (
this <<
" eventEntryCondApplicable=" << eventEntryCondApplicable
2247 <<
" eventLeavingCondApplicable=" << eventLeavingCondApplicable);
2249 if (eventEntryCondApplicable)
2251 if (reportConfigEutra.timeToTrigger == 0)
2262 measId, concernedCellsEntry);
2263 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2266 enteringTriggerIt->second.push_back (t);
2270 if (eventLeavingCondApplicable)
2274 && reportConfigEutra.reportOnLeave;
2276 if (reportConfigEutra.timeToTrigger == 0)
2287 measId, concernedCellsLeaving, reportOnLeave);
2288 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2291 leavingTriggerIt->second.push_back (t);
2302 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2306 if (!it1->second.empty ())
2308 std::list<PendingTrigger_t>::iterator it2;
2309 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2312 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at "
2317 it1->second.clear ();
2326 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2330 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2331 while (it2 != it1->second.end ())
2335 ConcernedCells_t::iterator it3;
2336 for (it3 = it2->concernedCells.begin ();
2337 it3 != it2->concernedCells.end (); ++it3)
2341 it3 = it2->concernedCells.erase (it3);
2345 if (it2->concernedCells.empty ())
2347 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at "
2350 it2 = it1->second.erase (it2);
2364 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2368 if (!it1->second.empty ())
2370 std::list<PendingTrigger_t>::iterator it2;
2371 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2374 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at "
2379 it1->second.clear ();
2388 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2392 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2393 while (it2 != it1->second.end ())
2397 ConcernedCells_t::iterator it3;
2398 for (it3 = it2->concernedCells.begin ();
2399 it3 != it2->concernedCells.end (); ++it3)
2403 it3 = it2->concernedCells.erase (it3);
2407 if (it2->concernedCells.empty ())
2409 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at "
2412 it2 = it1->second.erase (it2);
2427 std::map<uint8_t, VarMeasReport>::iterator
2434 std::pair<uint8_t, VarMeasReport> val (measId, r);
2435 std::pair<std::map<uint8_t, VarMeasReport>::iterator,
bool>
2437 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
2438 measReportIt = ret.first;
2443 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2444 it != enteringCells.end ();
2447 measReportIt->second.cellsTriggeredList.insert (*it);
2450 NS_ASSERT (!measReportIt->second.cellsTriggeredList.empty ());
2451 measReportIt->second.numberOfReportsSent = 0;
2452 measReportIt->second.periodicReportTimer
2457 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2460 if (!enteringTriggerIt->second.empty ())
2468 enteringTriggerIt->second.pop_front ();
2470 if (!enteringTriggerIt->second.empty ())
2477 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2478 it != enteringCells.end (); ++it)
2495 std::map<uint8_t, VarMeasReport>::iterator
2499 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2500 it != leavingCells.end ();
2503 measReportIt->second.cellsTriggeredList.erase (*it);
2512 if (measReportIt->second.cellsTriggeredList.empty ())
2514 measReportIt->second.periodicReportTimer.Cancel ();
2518 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2521 if (!leavingTriggerIt->second.empty ())
2529 leavingTriggerIt->second.pop_front ();
2531 if (!leavingTriggerIt->second.empty ())
2538 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2539 it != leavingCells.end (); ++it)
2555 std::map<uint8_t, VarMeasReport>::iterator
2559 NS_LOG_LOGIC (
this <<
" deleting existing report for measId " << (uint16_t) measId);
2560 measReportIt->second.periodicReportTimer.Cancel ();
2574 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator
2578 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
2585 measResults.
measId = measId;
2592 "RSRP " << (uint32_t) measResults.
rsrpResult <<
" (" << servingMeasIt->second.rsrp <<
" dBm) "
2593 "RSRQ " << (uint32_t) measResults.
rsrqResult <<
" (" << servingMeasIt->second.rsrq <<
" dB)");
2595 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (measId);
2598 NS_LOG_ERROR (
"no entry found in m_varMeasReportList for measId " << (uint32_t) measId);
2602 if (!(measReportIt->second.cellsTriggeredList.empty ()))
2604 std::multimap<double, uint16_t> sortedNeighCells;
2605 for (std::set<uint16_t>::iterator cellsTriggeredIt = measReportIt->second.cellsTriggeredList.begin ();
2606 cellsTriggeredIt != measReportIt->second.cellsTriggeredList.end ();
2609 uint16_t cellId = *cellsTriggeredIt;
2612 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2613 double triggerValue;
2614 switch (reportConfigEutra.triggerQuantity)
2617 triggerValue = neighborMeasIt->second.rsrp;
2620 triggerValue = neighborMeasIt->second.rsrq;
2626 sortedNeighCells.insert (std::pair<double, uint16_t> (triggerValue, cellId));
2630 std::multimap<double, uint16_t>::reverse_iterator sortedNeighCellsIt;
2632 for (sortedNeighCellsIt = sortedNeighCells.rbegin (), count = 0;
2633 sortedNeighCellsIt != sortedNeighCells.rend () && count < reportConfigEutra.maxReportCells;
2634 ++sortedNeighCellsIt, ++count)
2636 uint16_t cellId = sortedNeighCellsIt->second;
2637 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2641 measResultEutra.haveCgiInfo =
false;
2642 measResultEutra.haveRsrpResult =
true;
2644 measResultEutra.haveRsrqResult =
true;
2646 NS_LOG_INFO (
this <<
" reporting neighbor cell " << (uint32_t) measResultEutra.physCellId
2647 <<
" RSRP " << (uint32_t) measResultEutra.rsrpResult
2648 <<
" (" << neighborMeasIt->second.rsrp <<
" dBm)"
2649 <<
" RSRQ " << (uint32_t) measResultEutra.rsrqResult
2650 <<
" (" << neighborMeasIt->second.rsrq <<
" dB)");
2657 NS_LOG_WARN (
this <<
" cellsTriggeredList is empty");
2665 measReportIt->second.numberOfReportsSent++;
2666 measReportIt->second.periodicReportTimer.Cancel ();
2668 Time reportInterval;
2669 switch (reportConfigEutra.reportInterval)
2696 reportInterval =
Seconds (60);
2699 reportInterval =
Seconds (360);
2702 reportInterval =
Seconds (720);
2705 reportInterval =
Seconds (1800);
2708 reportInterval =
Seconds (3600);
2711 NS_FATAL_ERROR (
"Unsupported reportInterval " << (uint16_t) reportConfigEutra.reportInterval);
2716 measReportIt->second.periodicReportTimer
2743 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
2775 std::map<uint8_t, uint8_t>::iterator it =
m_bid2DrbidMap.find (bid);
static Time GetDelayLeft(const EventId &id)
RSRQ is used for the threshold.
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 "...
PdschConfigDedicated pdschConfigDedicated
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
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
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.
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
#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
EventId m_connectionTimeout
Invokes ConnectionEstablishmentTimeout() if RRC connection establishment procedure for this UE takes ...
LteUeRrc()
create an RRC instance for use within an ue
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
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
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
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 A4: Neighbour becomes better than absolute threshold.
PreambleInfo preambleInfo
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
LteUeCmacSapUser * GetLteUeCmacSapUser()
friend class UeMemberLteUeCmacSapUser
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
LteRrcSap::QuantityConfig quantityConfig
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
Attribute for objects of type ns3::Time.
Ptr< LteSignalingRadioBearerInfo > m_srb0
virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower)=0
Configure referenceSignalPower.
ConcernedCells_t concernedCells
The list of cells responsible for this trigger.
static TypeId GetTypeId(void)
int8_t referenceSignalPower
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...
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 ConnectionTimeout()
Invoked after timer T300 expires, notifying upper layers that RRC connection establishment procedure ...
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
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
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
Event A1: Serving becomes better than absolute threshold.
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
bool havePdschConfigDedicated
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
Event A2: Serving becomes worse than absolute threshold.
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.
Time Seconds(double value)
Construct a Time in the indicated unit.
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.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
LteAsSapProvider * GetAsSapProvider()
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Reference Signal Received Power.
void DoReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params)
MobilityControlInfo mobilityControlInfo
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionTimeoutTrace
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
Reference Signal Received Quality.
void SendMeasurementReport(uint8_t measId)
Produce a proper measurement report from the given measurement identity's reporting entry in m_varMea...
RSRP is used for the threshold.
a base class which provides memory management and object aggregation
PdschConfigCommon pdschConfigCommon
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...
Event A3: Neighbour becomes amount of offset better than PCell.
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.
Time m_t300
Timer for RRC connection establishment procedure.
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