27 #include <ns3/fatal-error.h> 29 #include <ns3/object-map.h> 30 #include <ns3/object-factory.h> 31 #include <ns3/simulator.h> 33 #include <ns3/lte-rlc.h> 34 #include <ns3/lte-rlc-tm.h> 35 #include <ns3/lte-rlc-um.h> 36 #include <ns3/lte-rlc-am.h> 37 #include <ns3/lte-pdcp.h> 38 #include <ns3/lte-radio-bearer-info.h> 103 "IDLE_WAIT_MIB_SIB1",
106 "IDLE_CAMPED_NORMALLY",
108 "IDLE_RANDOM_ACCESS",
110 "CONNECTED_NORMALLY",
111 "CONNECTED_HANDOVER",
112 "CONNECTED_PHY_PROBLEM",
113 "CONNECTED_REESTABLISHING" 134 : m_cmacSapProvider (0),
136 m_macSapProvider (0),
138 m_ccmRrcSapProvider (0),
139 m_state (IDLE_START),
144 m_connectionPending (false),
145 m_hasReceivedMib (false),
146 m_hasReceivedSib1 (false),
147 m_hasReceivedSib2 (false),
194 .SetGroupName (
"Lte")
196 .AddAttribute (
"DataRadioBearerMap",
"List of UE RadioBearerInfo for Data Radio Bearers by LCID.",
199 MakeObjectMapChecker<LteDataRadioBearerInfo> ())
200 .AddAttribute (
"Srb0",
"SignalingRadioBearerInfo for SRB0",
203 MakePointerChecker<LteSignalingRadioBearerInfo> ())
204 .AddAttribute (
"Srb1",
"SignalingRadioBearerInfo for SRB1",
207 MakePointerChecker<LteSignalingRadioBearerInfo> ())
208 .AddAttribute (
"CellId",
209 "Serving cell identifier",
212 MakeUintegerChecker<uint16_t> ())
213 .AddAttribute (
"C-RNTI",
214 "Cell Radio Network Temporary Identifier",
217 MakeUintegerChecker<uint16_t> ())
218 .AddAttribute (
"T300",
219 "Timer for the RRC Connection Establishment procedure " 220 "(i.e., the procedure is deemed as failed if it takes longer than this)",
224 .AddTraceSource (
"MibReceived",
225 "trace fired upon reception of Master Information Block",
227 "ns3::LteUeRrc::MibSibHandoverTracedCallback")
228 .AddTraceSource (
"Sib1Received",
229 "trace fired upon reception of System Information Block Type 1",
231 "ns3::LteUeRrc::MibSibHandoverTracedCallback")
232 .AddTraceSource (
"Sib2Received",
233 "trace fired upon reception of System Information Block Type 2",
235 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
236 .AddTraceSource (
"StateTransition",
237 "trace fired upon every UE RRC state transition",
239 "ns3::LteUeRrc::StateTracedCallback")
240 .AddTraceSource (
"InitialCellSelectionEndOk",
241 "trace fired upon successful initial cell selection procedure",
243 "ns3::LteUeRrc::CellSelectionTracedCallback")
244 .AddTraceSource (
"InitialCellSelectionEndError",
245 "trace fired upon failed initial cell selection procedure",
247 "ns3::LteUeRrc::CellSelectionTracedCallback")
248 .AddTraceSource (
"RandomAccessSuccessful",
249 "trace fired upon successful completion of the random access procedure",
251 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
252 .AddTraceSource (
"RandomAccessError",
253 "trace fired upon failure of the random access procedure",
255 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
256 .AddTraceSource (
"ConnectionEstablished",
257 "trace fired upon successful RRC connection establishment",
259 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
260 .AddTraceSource (
"ConnectionTimeout",
261 "trace fired upon timeout RRC connection establishment because of T300",
263 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
264 .AddTraceSource (
"ConnectionReconfiguration",
265 "trace fired upon RRC connection reconfiguration",
267 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
268 .AddTraceSource (
"HandoverStart",
269 "trace fired upon start of a handover procedure",
271 "ns3::LteUeRrc::MibSibHandoverTracedCallback")
272 .AddTraceSource (
"HandoverEndOk",
273 "trace fired upon successful termination of a handover procedure",
275 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
276 .AddTraceSource (
"HandoverEndError",
277 "trace fired upon failure of a handover procedure",
279 "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
280 .AddTraceSource (
"SCarrierConfigured",
281 "trace fired after configuring secondary carriers",
283 "ns3::LteUeRrc::SCarrierConfiguredTracedCallback")
470 Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
475 m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
477 m_srb0->m_srbIdentity = 0;
495 if (m_numberOfComponentCarriers < MIN_NO_CC || m_numberOfComponentCarriers >
MAX_NO_CC)
525 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
531 params.lcid = it->second->m_logicalChannelIdentity;
534 <<
" on DRBID " << (uint32_t) drbid
535 <<
" (LCID " << (uint32_t) params.lcid <<
")" 536 <<
" (" << packet->
GetSize () <<
" bytes)");
537 it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
622 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
815 "Cell identity in SIB1 does not match with the originating cell");
830 "Cell identity in SIB1 does not match with the originating cell");
853 bool triggering =
true;
854 std::vector <LteUeCphySapUser::UeMeasurementsElement>::iterator newMeasIt;
864 newMeasIt->m_rsrq, useLayer3Filtering,
870 newMeasIt->m_rsrq, useLayer3Filtering);
883 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
1129 uint16_t maxRsrpCellId = 0;
1130 double maxRsrp = -std::numeric_limits<double>::infinity ();
1132 std::map<uint16_t, MeasValues>::iterator it;
1139 if (maxRsrp < it->
second.rsrp)
1141 std::set<uint16_t>::const_iterator itCell;
1145 maxRsrpCellId = it->first;
1146 maxRsrp = it->second.rsrp;
1151 if (maxRsrpCellId == 0)
1153 NS_LOG_WARN (
this <<
" Cell search is unable to detect surrounding cell to attach to");
1158 <<
" is the strongest untried surrounding cell");
1177 bool isSuitableCell =
false;
1178 bool isAcceptableCell =
false;
1179 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);
1180 double qRxLevMeas = storedMeasIt->second.rsrp;
1182 NS_LOG_LOGIC (
this <<
" cell selection to cellId=" << cellId
1183 <<
" qrxlevmeas=" << qRxLevMeas <<
" dBm" 1184 <<
" qrxlevmin=" << qRxLevMin <<
" dBm");
1186 if (qRxLevMeas - qRxLevMin > 0)
1188 isAcceptableCell =
true;
1193 isSuitableCell = (cellCsgIndication ==
false) || (cellCsgId ==
m_csgWhiteList);
1196 << cellCsgId <<
"/" << cellCsgIndication);
1217 if (isAcceptableCell)
1294 std::list<LteRrcSap::SrbToAddMod>::const_iterator stamIt = rrcd.
srbToAddModList.begin ();
1302 NS_ASSERT_MSG (stamIt->srbIdentity == 1,
"only SRB1 supported");
1304 const uint8_t lcid = 1;
1313 pdcp->SetLcId (lcid);
1318 m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
1321 m_srb1->m_srbIdentity = 1;
1323 m_srb1->m_logicalChannelConfig.priority = stamIt->logicalChannelConfig.priority;
1324 m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = stamIt->logicalChannelConfig.prioritizedBitRateKbps;
1325 m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = stamIt->logicalChannelConfig.bucketSizeDurationMs;
1326 m_srb1->m_logicalChannelConfig.logicalChannelGroup = stamIt->logicalChannelConfig.logicalChannelGroup;
1329 lcConfig.
priority = stamIt->logicalChannelConfig.priority;
1339 ueParams.srb1SapProvider =
m_srb1->m_pdcp->GetLtePdcpSapProvider ();
1344 NS_LOG_INFO (
"request to modify SRB1 (skipping as currently not implemented)");
1350 std::list<LteRrcSap::DrbToAddMod>::const_iterator dtamIt;
1355 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" adding/modifying DRBID " << (uint32_t) dtamIt->drbIdentity <<
" LC " << (uint32_t) dtamIt->logicalChannelIdentity);
1356 NS_ASSERT_MSG (dtamIt->logicalChannelIdentity > 2,
"LCID value " << dtamIt->logicalChannelIdentity <<
" is reserved for SRBs");
1358 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbMapIt =
m_drbMap.find (dtamIt->drbIdentity);
1370 switch (dtamIt->rlcConfig.choice)
1391 rlc->
SetLcId (dtamIt->logicalChannelIdentity);
1394 drbInfo->m_rlc = rlc;
1395 drbInfo->m_epsBearerIdentity = dtamIt->epsBearerIdentity;
1396 drbInfo->m_logicalChannelIdentity = dtamIt->logicalChannelIdentity;
1397 drbInfo->m_drbIdentity = dtamIt->drbIdentity;
1405 pdcp->SetLcId (dtamIt->logicalChannelIdentity);
1409 drbInfo->m_pdcp = pdcp;
1418 lcConfig.
priority = dtamIt->logicalChannelConfig.priority;
1439 std::list<uint8_t>::iterator dtdmIt;
1444 uint8_t drbid = *dtdmIt;
1445 NS_LOG_INFO (
this <<
" IMSI " <<
m_imsi <<
" releasing DRB " << (uint32_t) drbid << drbid);
1446 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =
m_drbMap.find (drbid);
1471 uint8_t measObjectId = *it;
1472 NS_LOG_LOGIC (
this <<
" deleting measObjectId " << (uint32_t) measObjectId);
1477 if (measIdIt->second.measObjectId == measObjectId)
1479 uint8_t measId = measIdIt->second.measId;
1481 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to measObjectId " << (uint32_t) measObjectId);
1500 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"cellsToRemoveList not supported");
1501 NS_ASSERT_MSG (it->measObjectEutra.cellsToAddModList.empty (),
"cellsToAddModList not supported");
1502 NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (),
"blackCellsToRemoveList not supported");
1503 NS_ASSERT_MSG (it->measObjectEutra.blackCellsToAddModList.empty (),
"blackCellsToAddModList not supported");
1504 NS_ASSERT_MSG (it->measObjectEutra.haveCellForWhichToReportCGI ==
false,
"cellForWhichToReportCGI is not supported");
1506 uint8_t measObjectId = it->measObjectId;
1510 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" exists, updating entry");
1511 measObjectIt->second = *it;
1512 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1517 if (measIdIt->second.measObjectId == measObjectId)
1519 uint8_t measId = measIdIt->second.measId;
1520 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to measObjectId " << (uint32_t) measObjectId);
1527 NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId <<
" is new, adding entry");
1538 uint8_t reportConfigId = *it;
1539 NS_LOG_LOGIC (
this <<
" deleting reportConfigId " << (uint32_t) reportConfigId);
1544 if (measIdIt->second.reportConfigId == reportConfigId)
1546 uint8_t measId = measIdIt->second.measId;
1548 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId <<
" because referring to reportConfigId " << (uint32_t) reportConfigId);
1568 "only trigger type EVENT is supported");
1570 uint8_t reportConfigId = it->reportConfigId;
1574 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" exists, updating entry");
1576 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1581 if (measIdIt->second.reportConfigId == reportConfigId)
1583 uint8_t measId = measIdIt->second.measId;
1584 NS_LOG_LOGIC (
this <<
" found measId " << (uint32_t) measId <<
" referring to reportConfigId " << (uint32_t) reportConfigId);
1591 NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId <<
" is new, adding entry");
1607 for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
1621 uint8_t measId = *it;
1622 NS_LOG_LOGIC (
this <<
" deleting measId " << (uint32_t) measId);
1632 for (std::list<LteRrcSap::MeasIdToAddMod>::iterator it = mc.
measIdToAddModList.begin ();
1636 NS_LOG_LOGIC (
this <<
" measId " << (uint32_t) it->measId
1637 <<
" (measObjectId=" << (uint32_t) it->measObjectId
1638 <<
", reportConfigId=" << (uint32_t) it->reportConfigId
1645 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (it->measId);
1648 measReportIt->second.periodicReportTimer.Cancel ();
1655 std::list<PendingTrigger_t> s;
1678 bool useLayer3Filtering)
1680 NS_LOG_FUNCTION (
this << cellId << rsrp << rsrq << useLayer3Filtering);
1682 std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.find (cellId);
1686 if (useLayer3Filtering)
1692 if (std::isnan (storedMeasIt->second.rsrq))
1695 storedMeasIt->second.rsrq = rsrq;
1705 storedMeasIt->second.rsrp = rsrp;
1706 storedMeasIt->second.rsrq = rsrq;
1715 std::pair<uint16_t, MeasValues> val (cellId, v);
1716 std::pair<std::map<uint16_t, MeasValues>::iterator,
bool>
1718 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
1719 storedMeasIt = ret.first;
1724 <<
", new RSRP " << rsrp <<
" stored " << storedMeasIt->second.rsrp
1725 <<
", new RSRQ " << rsrq <<
" stored " << storedMeasIt->second.rsrq);
1735 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt =
1738 NS_ASSERT (measIdIt->first == measIdIt->second.measId);
1740 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
1745 std::map<uint8_t, LteRrcSap::MeasObjectToAddMod>::iterator
1750 std::map<uint8_t, VarMeasReport>::iterator
1758 "only triggerType == event is supported");
1761 NS_LOG_LOGIC (
this <<
" considering measId " << (uint32_t) measId);
1762 bool eventEntryCondApplicable =
false;
1763 bool eventLeavingCondApplicable =
false;
1767 switch (reportConfigEutra.eventId)
1781 switch (reportConfigEutra.triggerQuantity)
1785 NS_ASSERT (reportConfigEutra.threshold1.choice
1791 NS_ASSERT (reportConfigEutra.threshold1.choice
1801 bool entryCond = ms - hys > thresh;
1805 if (!isMeasIdInReportList)
1807 concernedCellsEntry.push_back (
m_cellId);
1808 eventEntryCondApplicable =
true;
1817 != measReportIt->second.cellsTriggeredList.end ());
1820 else if (reportConfigEutra.timeToTrigger > 0)
1826 bool leavingCond = ms + hys < thresh;
1830 if (isMeasIdInReportList)
1837 != measReportIt->second.cellsTriggeredList.end ());
1838 concernedCellsLeaving.push_back (
m_cellId);
1839 eventLeavingCondApplicable =
true;
1842 else if (reportConfigEutra.timeToTrigger > 0)
1848 <<
" ms=" << ms <<
" thresh=" << thresh
1849 <<
" entryCond=" << entryCond
1850 <<
" leavingCond=" << leavingCond);
1868 switch (reportConfigEutra.triggerQuantity)
1872 NS_ASSERT (reportConfigEutra.threshold1.choice
1878 NS_ASSERT (reportConfigEutra.threshold1.choice
1888 bool entryCond = ms + hys < thresh;
1892 if (!isMeasIdInReportList)
1894 concernedCellsEntry.push_back (
m_cellId);
1895 eventEntryCondApplicable =
true;
1904 != measReportIt->second.cellsTriggeredList.end ());
1907 else if (reportConfigEutra.timeToTrigger > 0)
1913 bool leavingCond = ms - hys > thresh;
1917 if (isMeasIdInReportList)
1924 != measReportIt->second.cellsTriggeredList.end ());
1925 concernedCellsLeaving.push_back (
m_cellId);
1926 eventLeavingCondApplicable =
true;
1929 else if (reportConfigEutra.timeToTrigger > 0)
1935 <<
" ms=" << ms <<
" thresh=" << thresh
1936 <<
" entryCond=" << entryCond
1937 <<
" leavingCond=" << leavingCond);
1951 double ofn = measObjectEutra.offsetFreq;
1954 double ofp = measObjectEutra.offsetFreq;
1961 switch (reportConfigEutra.triggerQuantity)
1965 NS_ASSERT (reportConfigEutra.threshold1.choice
1970 NS_ASSERT (reportConfigEutra.threshold1.choice
1978 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
1982 uint16_t cellId = storedMeasIt->first;
1988 switch (reportConfigEutra.triggerQuantity)
1991 mn = storedMeasIt->second.rsrp;
1994 mn = storedMeasIt->second.rsrq;
2001 bool hasTriggered = isMeasIdInReportList
2002 && (measReportIt->second.cellsTriggeredList.find (cellId)
2003 != measReportIt->second.cellsTriggeredList.end ());
2006 bool entryCond = mn + ofn + ocn - hys > mp + ofp + ocp + off;
2012 concernedCellsEntry.push_back (cellId);
2013 eventEntryCondApplicable =
true;
2016 else if (reportConfigEutra.timeToTrigger > 0)
2022 bool leavingCond = mn + ofn + ocn + hys < mp + ofp + ocp + off;
2028 concernedCellsLeaving.push_back (cellId);
2029 eventLeavingCondApplicable =
true;
2032 else if (reportConfigEutra.timeToTrigger > 0)
2037 NS_LOG_LOGIC (
this <<
" event A3: neighbor cell " << cellId
2038 <<
" mn=" << mn <<
" mp=" << mp <<
" offset=" << off
2039 <<
" entryCond=" << entryCond
2040 <<
" leavingCond=" << leavingCond);
2056 double ofn = measObjectEutra.offsetFreq;
2062 switch (reportConfigEutra.triggerQuantity)
2065 NS_ASSERT (reportConfigEutra.threshold1.choice
2070 NS_ASSERT (reportConfigEutra.threshold1.choice
2079 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2083 uint16_t cellId = storedMeasIt->first;
2089 switch (reportConfigEutra.triggerQuantity)
2092 mn = storedMeasIt->second.rsrp;
2095 mn = storedMeasIt->second.rsrq;
2102 bool hasTriggered = isMeasIdInReportList
2103 && (measReportIt->second.cellsTriggeredList.find (cellId)
2104 != measReportIt->second.cellsTriggeredList.end ());
2107 bool entryCond = mn + ofn + ocn - hys > thresh;
2113 concernedCellsEntry.push_back (cellId);
2114 eventEntryCondApplicable =
true;
2117 else if (reportConfigEutra.timeToTrigger > 0)
2123 bool leavingCond = mn + ofn + ocn + hys < thresh;
2129 concernedCellsLeaving.push_back (cellId);
2130 eventLeavingCondApplicable =
true;
2133 else if (reportConfigEutra.timeToTrigger > 0)
2138 NS_LOG_LOGIC (
this <<
" event A4: neighbor cell " << cellId
2139 <<
" mn=" << mn <<
" thresh=" << thresh
2140 <<
" entryCond=" << entryCond
2141 <<
" leavingCond=" << leavingCond);
2159 double ofn = measObjectEutra.offsetFreq;
2166 switch (reportConfigEutra.triggerQuantity)
2170 NS_ASSERT (reportConfigEutra.threshold1.choice
2172 NS_ASSERT (reportConfigEutra.threshold2.choice
2179 NS_ASSERT (reportConfigEutra.threshold1.choice
2181 NS_ASSERT (reportConfigEutra.threshold2.choice
2192 bool entryCond = mp + hys < thresh1;
2196 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2200 uint16_t cellId = storedMeasIt->first;
2206 switch (reportConfigEutra.triggerQuantity)
2209 mn = storedMeasIt->second.rsrp;
2212 mn = storedMeasIt->second.rsrq;
2219 bool hasTriggered = isMeasIdInReportList
2220 && (measReportIt->second.cellsTriggeredList.find (cellId)
2221 != measReportIt->second.cellsTriggeredList.end ());
2225 entryCond = mn + ofn + ocn - hys > thresh2;
2231 concernedCellsEntry.push_back (cellId);
2232 eventEntryCondApplicable =
true;
2235 else if (reportConfigEutra.timeToTrigger > 0)
2240 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2241 <<
" mn=" << mn <<
" mp=" << mp
2242 <<
" thresh2=" << thresh2
2243 <<
" thresh1=" << thresh1
2244 <<
" entryCond=" << entryCond);
2252 <<
" mp=" << mp <<
" thresh1=" << thresh1
2253 <<
" entryCond=" << entryCond);
2255 if (reportConfigEutra.timeToTrigger > 0)
2261 if (isMeasIdInReportList)
2264 bool leavingCond = mp - hys > thresh1;
2268 if (reportConfigEutra.timeToTrigger == 0)
2272 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2276 uint16_t cellId = storedMeasIt->first;
2282 if (measReportIt->second.cellsTriggeredList.find (cellId)
2283 != measReportIt->second.cellsTriggeredList.end ())
2285 concernedCellsLeaving.push_back (cellId);
2286 eventLeavingCondApplicable =
true;
2294 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2298 uint16_t cellId = storedMeasIt->first;
2304 if (measReportIt->second.cellsTriggeredList.find (cellId)
2305 != measReportIt->second.cellsTriggeredList.end ())
2307 switch (reportConfigEutra.triggerQuantity)
2310 mn = storedMeasIt->second.rsrp;
2313 mn = storedMeasIt->second.rsrq;
2322 leavingCond = mn + ofn + ocn + hys < thresh2;
2334 concernedCellsLeaving.push_back (cellId);
2335 eventLeavingCondApplicable =
true;
2337 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2338 <<
" mn=" << mn <<
" mp=" << mp
2339 <<
" thresh2=" << thresh2
2340 <<
" thresh1=" << thresh1
2341 <<
" leavingCond=" << leavingCond);
2351 <<
" mp=" << mp <<
" thresh1=" << thresh1
2352 <<
" leavingCond=" << leavingCond);
2357 if (reportConfigEutra.timeToTrigger > 0)
2364 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt =
m_storedMeasValues.begin ();
2368 uint16_t cellId = storedMeasIt->first;
2374 if (measReportIt->second.cellsTriggeredList.find (cellId)
2375 != measReportIt->second.cellsTriggeredList.end ())
2377 switch (reportConfigEutra.triggerQuantity)
2380 mn = storedMeasIt->second.rsrp;
2383 mn = storedMeasIt->second.rsrq;
2391 leavingCond = mn + ofn + ocn + hys < thresh2;
2395 concernedCellsLeaving.push_back (cellId);
2396 eventLeavingCondApplicable =
true;
2399 NS_LOG_LOGIC (
this <<
" event A5: neighbor cell " << cellId
2400 <<
" mn=" << mn <<
" mp=" << mp
2401 <<
" thresh2=" << thresh2
2402 <<
" thresh1=" << thresh1
2403 <<
" leavingCond=" << leavingCond);
2419 NS_FATAL_ERROR (
"unsupported eventId " << reportConfigEutra.eventId);
2424 NS_LOG_LOGIC (
this <<
" eventEntryCondApplicable=" << eventEntryCondApplicable
2425 <<
" eventLeavingCondApplicable=" << eventLeavingCondApplicable);
2427 if (eventEntryCondApplicable)
2429 if (reportConfigEutra.timeToTrigger == 0)
2440 measId, concernedCellsEntry);
2441 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2444 enteringTriggerIt->second.push_back (t);
2448 if (eventLeavingCondApplicable)
2452 && reportConfigEutra.reportOnLeave;
2454 if (reportConfigEutra.timeToTrigger == 0)
2465 measId, concernedCellsLeaving, reportOnLeave);
2466 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2469 leavingTriggerIt->second.push_back (t);
2480 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2484 if (!it1->second.empty ())
2486 std::list<PendingTrigger_t>::iterator it2;
2487 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2490 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at " 2495 it1->second.clear ();
2504 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2508 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2509 while (it2 != it1->second.end ())
2513 ConcernedCells_t::iterator it3;
2514 for (it3 = it2->concernedCells.begin ();
2515 it3 != it2->concernedCells.end (); ++it3)
2519 it3 = it2->concernedCells.erase (it3);
2523 if (it2->concernedCells.empty ())
2525 NS_LOG_LOGIC (
this <<
" canceling entering time-to-trigger event at " 2528 it2 = it1->second.erase (it2);
2542 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2546 if (!it1->second.empty ())
2548 std::list<PendingTrigger_t>::iterator it2;
2549 for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
2552 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at " 2557 it1->second.clear ();
2566 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2570 std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
2571 while (it2 != it1->second.end ())
2575 ConcernedCells_t::iterator it3;
2576 for (it3 = it2->concernedCells.begin ();
2577 it3 != it2->concernedCells.end (); ++it3)
2581 it3 = it2->concernedCells.erase (it3);
2585 if (it2->concernedCells.empty ())
2587 NS_LOG_LOGIC (
this <<
" canceling leaving time-to-trigger event at " 2590 it2 = it1->second.erase (it2);
2605 std::map<uint8_t, VarMeasReport>::iterator
2612 std::pair<uint8_t, VarMeasReport> val (measId, r);
2613 std::pair<std::map<uint8_t, VarMeasReport>::iterator,
bool>
2615 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
2616 measReportIt = ret.first;
2621 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2622 it != enteringCells.end ();
2625 measReportIt->second.cellsTriggeredList.insert (*it);
2628 NS_ASSERT (!measReportIt->second.cellsTriggeredList.empty ());
2629 measReportIt->second.numberOfReportsSent = 0;
2630 measReportIt->second.periodicReportTimer
2635 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2638 if (!enteringTriggerIt->second.empty ())
2646 enteringTriggerIt->second.pop_front ();
2648 if (!enteringTriggerIt->second.empty ())
2655 for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
2656 it != enteringCells.end (); ++it)
2673 std::map<uint8_t, VarMeasReport>::iterator
2677 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2678 it != leavingCells.end ();
2681 measReportIt->second.cellsTriggeredList.erase (*it);
2690 if (measReportIt->second.cellsTriggeredList.empty ())
2692 measReportIt->second.periodicReportTimer.Cancel ();
2696 std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
2699 if (!leavingTriggerIt->second.empty ())
2707 leavingTriggerIt->second.pop_front ();
2709 if (!leavingTriggerIt->second.empty ())
2716 for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
2717 it != leavingCells.end (); ++it)
2733 std::map<uint8_t, VarMeasReport>::iterator
2737 NS_LOG_LOGIC (
this <<
" deleting existing report for measId " << (uint16_t) measId);
2738 measReportIt->second.periodicReportTimer.Cancel ();
2752 std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator
2756 std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
2763 measResults.
measId = measId;
2770 "RSRP " << (uint32_t) measResults.
rsrpResult <<
" (" << servingMeasIt->second.rsrp <<
" dBm) " 2771 "RSRQ " << (uint32_t) measResults.
rsrqResult <<
" (" << servingMeasIt->second.rsrq <<
" dB)");
2773 std::map<uint8_t, VarMeasReport>::iterator measReportIt =
m_varMeasReportList.find (measId);
2776 NS_LOG_ERROR (
"no entry found in m_varMeasReportList for measId " << (uint32_t) measId);
2780 if (!(measReportIt->second.cellsTriggeredList.empty ()))
2782 std::multimap<double, uint16_t> sortedNeighCells;
2783 for (std::set<uint16_t>::iterator cellsTriggeredIt = measReportIt->second.cellsTriggeredList.begin ();
2784 cellsTriggeredIt != measReportIt->second.cellsTriggeredList.end ();
2787 uint16_t cellId = *cellsTriggeredIt;
2790 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2791 double triggerValue;
2792 switch (reportConfigEutra.triggerQuantity)
2795 triggerValue = neighborMeasIt->second.rsrp;
2798 triggerValue = neighborMeasIt->second.rsrq;
2804 sortedNeighCells.insert (std::pair<double, uint16_t> (triggerValue, cellId));
2808 std::multimap<double, uint16_t>::reverse_iterator sortedNeighCellsIt;
2810 for (sortedNeighCellsIt = sortedNeighCells.rbegin (), count = 0;
2811 sortedNeighCellsIt != sortedNeighCells.rend () && count < reportConfigEutra.maxReportCells;
2812 ++sortedNeighCellsIt, ++count)
2814 uint16_t cellId = sortedNeighCellsIt->second;
2815 std::map<uint16_t, MeasValues>::iterator neighborMeasIt =
m_storedMeasValues.find (cellId);
2819 measResultEutra.haveCgiInfo =
false;
2820 measResultEutra.haveRsrpResult =
true;
2822 measResultEutra.haveRsrqResult =
true;
2824 NS_LOG_INFO (
this <<
" reporting neighbor cell " << (uint32_t) measResultEutra.physCellId
2825 <<
" RSRP " << (uint32_t) measResultEutra.rsrpResult
2826 <<
" (" << neighborMeasIt->second.rsrp <<
" dBm)" 2827 <<
" RSRQ " << (uint32_t) measResultEutra.rsrqResult
2828 <<
" (" << neighborMeasIt->second.rsrq <<
" dB)");
2835 NS_LOG_WARN (
this <<
" cellsTriggeredList is empty");
2851 measResultScell.
servFreqId = sCellsMeasIt->first;
2865 measReportIt->second.numberOfReportsSent++;
2866 measReportIt->second.periodicReportTimer.Cancel ();
2868 Time reportInterval;
2869 switch (reportConfigEutra.reportInterval)
2896 reportInterval =
Seconds (60);
2899 reportInterval =
Seconds (360);
2902 reportInterval =
Seconds (720);
2905 reportInterval =
Seconds (1800);
2908 reportInterval =
Seconds (3600);
2911 NS_FATAL_ERROR (
"Unsupported reportInterval " << (uint16_t) reportConfigEutra.reportInterval);
2916 measReportIt->second.periodicReportTimer
2943 std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
2975 std::map<uint8_t, uint8_t>::iterator it =
m_bid2DrbidMap.find (bid);
3045 bool useLayer3Filtering, uint16_t componentCarrierId)
3047 NS_LOG_FUNCTION (
this << sCellId << componentCarrierId << rsrp << rsrq << useLayer3Filtering);
3055 if (useLayer3Filtering)
3061 if (std::isnan (storedMeasIt->second.rsrq))
3064 storedMeasIt->second.rsrq = rsrq;
3074 storedMeasIt->second.rsrp = rsrp;
3075 storedMeasIt->second.rsrq = rsrq;
3084 std::pair<uint16_t, MeasValues> val (componentCarrierId, v);
3085 std::pair<std::map<uint16_t, MeasValues>::iterator,
bool>
3087 NS_ASSERT_MSG (ret.second ==
true,
"element already existed");
3088 storedMeasIt = ret.first;
3092 <<
", measured cell " << sCellId
3093 <<
", carrier component Id " << componentCarrierId
3094 <<
", new RSRP " << rsrp <<
" stored " << storedMeasIt->second.rsrp
3095 <<
", new RSRQ " << rsrq <<
" stored " << storedMeasIt->second.rsrq);
3100 NS_LOG_DEBUG (
this <<
" IMSI " <<
m_imsi <<
"measurement on SCC from not serving cell ");
uint32_t sCellIndex
SCell index.
std::map< uint16_t, MeasValues > m_storedScellMeasValues
Internal storage of the latest measurement results from all detected detected Secondary carrier compo...
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute.
MemberLteUeCcmRrcSapUser class.
RrcConnectionRequest structure.
uint64_t GetImsi(void) const
uint8_t numberOfRaPreambles
number of RA preambles
PhysicalConfigDedicated structure.
bool haveNonCriticalExtension
have critical extension?
LtePdcpSapProvider * srb1SapProvider
SRB1 SAP provider.
Simulation virtual time values and global simulation resolution.
uint8_t raResponseWindowSize
RA response window size.
RadioResourceConfigCommonSCell radioResourceConfigCommonSCell
radio resource config common SCell
CarrierFreqEutra carrierFreq
carrier frequency
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
Part of the RRC protocol.
void DoRecvRrcConnectionSetup(LteRrcSap::RrcConnectionSetup msg)
Part of the RRC protocol.
uint8_t m_componentCarrierId
component carrier ID
void DoRecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock msg)
Receive master information block function.
MeasurementReport structure.
std::map< uint8_t, LteRrcSap::MeasObjectToAddMod > measObjectList
measure object list
std::vector< struct UeMeasurementsElement > m_ueMeasurementsList
UE measurement list.
UeMemberLteUeCmacSapUser class.
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)
Receive system information block type 1 function.
PdschConfigDedicated pdschConfigDedicated
PDSCH config dedicated.
void DoComponentCarrierEnabling(std::vector< uint8_t > res)
RRC CCM SAP USER Method.
static TypeId GetTypeId(void)
Get the type ID.
MobilityControlInfo structure.
static double IeValue2ActualHysteresis(uint8_t hysteresisIeValue)
Returns the actual value of a hysteresis parameter.
std::list< MeasObjectToAddMod > measObjectToAddModList
measure object to add mod list
uint8_t GetDlBandwidth() const
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
LtePdcpSapUser * m_drbPdcpSapUser
DRB PDCP SAP user.
void DoRecvSystemInformation(LteRrcSap::SystemInformation msg)
Part of the RRC protocol.
uint16_t bucketSizeDurationMs
bucket size duration ms
uint8_t numberOfRaPreambles
number of RA preambles
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Event A3: Neighbour becomes amount of offset better than PCell.
static double ConvertPdschConfigDedicated2Double(PdschConfigDedicated pdschConfigDedicated)
Convert PDSCH config dedicated function.
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
static TypeId GetTypeId(void)
Get the type ID.
RSRP is used for the threshold.
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
quantity config
void DoRecvRrcConnectionReject(LteRrcSap::RrcConnectionReject msg)
Part of the RRC protocol.
std::list< uint8_t > reportConfigToRemoveList
report config to remove list
bool m_hasReceivedSib2
True if SIB2 was received for the current cell.
MeasObjectEutra structure.
std::list< MeasResultEutra > measResultListEutra
measure result list eutra
int8_t qRxLevMin
INTEGER (-70..-22), actual value = IE value * 2 [dBm].
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
The DataRadioBearerMap attribute.
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)
Destructor implementation.
void SetUseRlcSm(bool val)
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
virtual void SendRrcConnectionReconfigurationCompleted(RrcConnectionReconfigurationCompleted msg)=0
Send an RRCConnectionReconfigurationComplete message to the serving eNodeB during an RRC connection r...
uint16_t m_numberOfComponentCarriers
The number of component carriers.
uint8_t measId
The measurement identity which raised the trigger.
RadioResourceConfigDedicatedSCell radioResourceConfigDedicateSCell
radio resource config dedicated SCell
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
the PDSCH condig dedicated
#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
SRB to add mod list.
void DoSetTemporaryCellRnti(uint16_t rnti)
Set temporary cell rnti function.
Represents a single triggered event from a measurement identity which reporting criteria have been fu...
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
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
measure object to remove list
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
std::vector< LteUeCmacSapProvider * > m_cmacSapProvider
UE CMac SAP provider.
PdschConfigCommon pdschConfigCommon
4: Physical configuration, physical channels pdsch-ConfigCommon-r10
virtual ~LteUeRrc()
Destructor.
uint16_t srsConfigIndex
SRS config index.
uint16_t m_cellId
The CellId attribute.
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)
Report a fatal error with a message and terminate.
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...
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
bool haveCarrierFreq
have carrier frequency?
bool m_hasReceivedMib
True if MIB was received for the current cell.
RachConfigDedicated rachConfigDedicated
RACH config dedicated.
SetupParameters structure.
bool haveSmeasure
have S measure?
void DoRecvRrcConnectionReestablishmentReject(LteRrcSap::RrcConnectionReestablishmentReject msg)
Part of the RRC protocol.
uint8_t GetUlBandwidth() const
uint32_t m_dlEarfcn
Downlink carrier frequency.
Reference Signal Received Quality.
MeasConfig measConfig
measure config
void SetRnti(uint16_t rnti)
bool m_connectionPending
True if a connection request by upper layers is pending.
LtePdcpSapUser * srb1SapUser
SRB1 SAP user.
uint8_t rsrpResult
the RSRP result
void DoStartCellSelection(uint32_t dlEarfcn)
Start cell selection function.
uint32_t ulCarrierFreq
UL carrier frequency.
bool m_hasReceivedSib1
True if SIB1 was received for the current cell.
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
bool haveRadioResourceConfigDedicated
have radio resource config dedicated
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
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
RRC transaction identifier.
Ptr< Packet > pdcpSdu
the RRC PDU
uint8_t Bid2Drbid(uint8_t bid)
Bid 2 DR bid.
PreambleInfo preambleInfo
preamble info
uint8_t rsrpResult
RSRP result.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
CellIdentification cellIdentification
cell identification
LteUeCmacSapUser * GetLteUeCmacSapUser()
This function is overloaded to maintain backward compatibility.
uint8_t preambleTransMax
preamble transmit maximum
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
LteRrcSap::QuantityConfig quantityConfig
quantity config
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
std::vector< LteUeCphySapProvider * > m_cphySapProvider
UE CPhy SAP provider.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
void SetLteUeRrcSapUser(LteUeRrcSapUser *s)
set the RRC SAP this RRC should interact with
LteUeRrcSapUser * m_rrcSapUser
RRC SAP user.
uint8_t preambleTransMax
preamble transmit maximum
MeasResults measResults
measure results
FreqInfo ulFreqInfo
UL frequency info.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source.
MeasResultScell structure.
State m_state
The current UE RRC state.
AttributeValue implementation for Time.
Ptr< LteSignalingRadioBearerInfo > m_srb0
The Srb0 attribute.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
ConcernedCells_t concernedCells
The list of cells responsible for this trigger.
TracedCallback< Ptr< LteUeRrc >, std::list< LteRrcSap::SCellToAddMod > > m_sCarrierConfiguredTrace
The SCarrierConfigured trace source.
uint64_t ueIdentity
UE identity.
static TypeId GetTypeId(void)
Get the type ID.
int8_t referenceSignalPower
INTEGER (-60..50),.
RrcConnectionReestablishment structure.
Represents a measurement result from a certain cell.
void DisposeOldSrb1()
Dispose old SRB1.
static double IeValue2ActualA3Offset(int8_t a3OffsetIeValue)
Returns the actual value of an a3-Offset parameter.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
The HandoverStart trace source.
uint8_t rsrqResult
the RSRQ result
void DoRecvRrcConnectionReconfiguration(LteRrcSap::RrcConnectionReconfiguration msg)
Part of the RRC protocol.
void DoRecvRrcConnectionReestablishment(LteRrcSap::RrcConnectionReestablishment msg)
Part of the RRC protocol.
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
The RandomAccessError trace source.
bool haveMeasurementResultsNeighCell
always false since not implemented
Service Access Point (SAP) offered by the UE RRC to the UE CCM.
NonUlConfiguration nonUlConfiguration
non UL configuration
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
TracedCallback< uint64_t, uint16_t, uint16_t > m_sib2ReceivedTrace
The Sib2Received trace source.
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
LteUeRrc * m_rrc
the RRC class
void ConnectionTimeout()
Invoked after timer T300 expires, notifying upper layers that RRC connection establishment procedure ...
uint32_t dlCarrierFreq
ARFCN - valueEUTRA.
bool haveMeasGapConfig
have measure gap config?
void EvaluateCellForSelection()
Performs cell selection evaluation to the current serving cell.
MeasResultEutra structure.
std::list< MeasResultScell > measResultScell
measure results Scells
RrcConnectionReconfiguration structure.
std::list< MeasIdToAddMod > measIdToAddModList
measure ID to add mod list
bool haveRachConfigDedicated
Have RACH config dedicated?
uint8_t raPrachMaskIndex
RA PRACH mask index.
virtual void DoInitialize(void)
Initialize() implementation.
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.
void SetLteCcmRrcSapProvider(LteUeCcmRrcSapProvider *s)
set the Component Carrier Management SAP this RRC should interact with
PhysicalConfigDedicated physicalConfigDedicated
physical config dedicated
Ptr< LteSignalingRadioBearerInfo > m_srb1
The Srb1 attribute.
uint8_t filterCoefficientRSRP
filter coefficient RSRP
bool haveRsrpResult
have RSRP result?
void SetLteUeCmacSapProvider(LteUeCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
RrcConnectionReconfigurationCompleted structure.
bool m_useRlcSm
True if RLC SM is to be used, false if RLC UM/AM are to be used.
MeasResultServFreqList measScellResultList
measure SCell result list
Parameters for LtePdcpSapProvider::TransmitPdcpSdu.
std::list< SCellToAddMod > sCellsToAddModList
SCell to add mod list.
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
RRC transaction identifier.
std::map< uint8_t, LteRrcSap::MeasIdToAddMod > measIdList
measure ID list
LogicalChannelConfig structure.
std::map< uint8_t, uint8_t > m_bid2DrbidMap
bid to DR bid map
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
RrcConnectionSetupCompleted structure.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndOkTrace
The InitialCellSelectionEndOk trace source.
RadioResourceConfigDedicated radioResourceConfigDedicated
radio resource config dedicated
RrcConnectionSetup structure.
std::list< LteRrcSap::SCellToAddMod > m_sCellToAddModList
Secondary carriers.
uint8_t rrcTransactionIdentifier
RRC transaction identifier.
void SetLteUeCphySapProvider(LteUeCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
void SwitchToState(State s)
Switch the UE RRC to the given state.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
static double IeValue2ActualQRxLevMin(int8_t qRxLevMinIeValue)
Returns the actual value of an Q-RxLevMin parameter.
uint8_t raPreambleIndex
RA preamble index.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndErrorTrace
The InitialCellSelectionEndError trace source.
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::vector< LteUeCphySapUser * > m_cphySapUser
UE CPhy SAP user.
std::map< uint8_t, LteRrcSap::ReportConfigToAddMod > reportConfigList
report config list
uint16_t servFreqId
service frequency ID
virtual void Setup(SetupParameters params)=0
Setup function.
uint16_t physCellId
Phy cell ID.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool haveQuantityConfig
have quantity config?
Hold objects of type Ptr<T>.
Ptr< Packet > pdcpSdu
the RRC PDU
void SetLteRlcSapUser(LteRlcSapUser *s)
uint16_t targetPhysCellId
target Phy cell ID
RrcConnectionReject structure.
LteAsSapUser * m_asSapUser
AS SAP user.
PhysicalConfigDedicatedSCell physicalConfigDedicatedSCell
physical config dedicated SCell
Template for the implementation of the LteUeRrcSapProvider as a member of an owner class of type C to...
bool haveMobilityControlInfo
have mobility control info
void DoNotifyRandomAccessSuccessful()
Notify random access successful function.
void SaveScellUeMeasurements(uint16_t cellId, double rsrp, double rsrq, bool useLayer3Filtering, uint16_t componentCarrierId)
keep the given measurement result as the latest measurement figures, to be utilised by UE RRC functio...
Reference Signal Received Power.
LteUeCcmRrcSapUser * m_ccmRrcSapUser
CCM RRC SAP user.
bool haveMeasResultNeighCells
have measure result neighbor cells
uint16_t dlBandwidth
1: Cell characteristics
uint32_t physCellId
physical cell ID
uint8_t filterCoefficientRSRQ
filter coefficient RSRQ
bool havePdschConfigDedicated
have PDSCH config dedicated?
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_sib1ReceivedTrace
The Sib1Received trace source.
uint16_t newUeIdentity
new UE identity
double rsrq
Measured RSRQ in dB.
uint8_t ulBandwidth
UL bandwidth.
void DoSendData(Ptr< Packet > packet, uint8_t bid)
Send data function.
Service Access Point (SAP) offered by the UE MAC to the UE RRC.
void DoForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn)
Force camped on ENB function.
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.
LtePdcpSpecificLtePdcpSapUser class.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
bool haveSoundingRsUlConfigDedicated
have sounding RS UL config dedicated?
RrcConnectionReestablishmentReject structure.
static Time Now(void)
Return the current simulation virtual time.
LteRlcSapUser * srb0SapUser
SRB0 SAP user.
void SetLcId(uint8_t lcId)
void DoRecvRrcConnectionRelease(LteRrcSap::RrcConnectionRelease msg)
Part of the RRC protocol.
double rsrp
Measured RSRP in dBm.
void VarMeasReportListErase(uint8_t measId, ConcernedCells_t leavingCells, bool reportOnLeave)
Remove some cells from an existing reporting entry in m_varMeasReportList.
LteUeCcmRrcSapUser * GetLteCcmRrcSapUser()
Get the Component Carrier Management SAP offered by this RRC.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
uint32_t dlCarrierFreq
DL carrier frequency.
CarrierBandwidthEutra carrierBandwidth
carrier bandwidth
LteUeCcmRrcSapProvider * m_ccmRrcSapProvider
Interface to the LteUeComponentCarrierManage instance.
uint8_t m_ulBandwidth
Uplink bandwidth in RBs.
LteUeCphySapUser * GetLteUeCphySapUser()
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
The ConnectionReconfiguration trace source.
Ptr< LteSignalingRadioBearerInfo > m_srb1Old
SRB1 configuration before RRC connection reconfiguration.
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.
RachConfigCommon rachConfigCommon
RACH config common.
void StartConnection()
Start connetion function.
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
RA response window size.
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
prioritize bit rate Kbps
Service Access Point (SAP) offered by the UE component carrier manager to the UE RRC...
bool haveCarrierBandwidth
have carrier bandwidth?
bool haveAntennaInfoDedicated
have antenna info dedicated?
uint8_t ulBandwidth
UL bandwidth.
static const std::string & ToString(EpcUeNas::State s)
void DoSetCsgWhiteList(uint32_t csgId)
Set CSG white list function.
std::vector< LteUeCmacSapUser * > m_cmacSapUser
UE CMac SAP user.
void DoNotifyRandomAccessFailed()
Notify random access failed function.
NonCriticalExtensionConfiguration nonCriticalExtension
3GPP TS 36.331 v.11.10 R11 Sec. 6.2.2 pag. 147 (also known as ETSI TS 136 331 v.11.10 Feb-2015)
void DoCompleteSetup(LteUeRrcSapProvider::CompleteSetupParameters params)
Part of the RRC protocol.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
LteUeRrcSapProvider * m_rrcSapProvider
RRC SAP provider.
void DoConnect()
Connect function.
bool haveSpeedStatePars
have speed state parameters?
void ApplyRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd)
Apply radio resource config dedicated.
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
The ConnectionEstablished trace source.
std::list< DrbToAddMod > drbToAddModList
DRB to add mod list.
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
AS SAP provider.
#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
SRB0 SAP provider.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_mibReceivedTrace
The MibReceived trace source.
uint16_t m_rnti
The C-RNTI attribute.
uint64_t m_imsi
The unique UE identifier.
uint8_t transmissionMode
transmission mode
void ApplyRadioResourceConfigDedicatedSecondaryCarrier(LteRrcSap::NonCriticalExtensionConfiguration nonCec)
Apply radio resource config dedicated secondary carrier.
UeMeasurementsParameters structure.
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.
Event A1: Serving becomes better than absolute threshold.
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)
Report UE measurements function.
RSRQ is used for the threshold.
MobilityControlInfo mobilityControlInfo
mobility control info
bool haveMeasConfig
have measure config
Event A4: Neighbour becomes better than absolute threshold.
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionTimeoutTrace
The ConnectionTimeout trace source.
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Represents a single measurement reporting entry., which includes information about a measurement for ...
bool haveRsrqResult
have RSRQ result?
CompleteSetupParameters structure.
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
AntennaInfoDedicated antennaInfo
antenna info
LteRlcSapProvider * GetLteRlcSapProvider()
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
void SendMeasurementReport(uint8_t measId)
Produce a proper measurement report from the given measurement identity's reporting entry in m_varMea...
uint32_t GetDlEarfcn() const
uint8_t rsrqResult
RSRQ result.
A base class which provides memory management and object aggregation.
PdschConfigCommon pdschConfigCommon
PDSCH config common.
void SynchronizeToStrongestCell()
Go through the list of measurement results, choose the one with the strongest RSRP, and tell PHY to synchronize to it.
Container for a set of ns3::Object pointers.
void InitializeSap(void)
Initiaize SAP.
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
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.
uint8_t dlBandwidth
DL bandwidth.
NonCriticalExtensionConfiguration structure.
uint32_t GetUlEarfcn() const
RrcConnectionRelease structure.
static uint8_t Db2RsrqRange(double db)
convert an RSRQ value in dB to the corresponding range as per 3GPP TS 36.133 section 9...
PdschConfigDedicated structure.
virtual void RecvData(Ptr< Packet > packet)=0
receive a data packet
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
sounding RS UL config dedicated
UeMemberLteUeCmacSapUser(LteUeRrc *rrc)
Constructor.
LteUeRrcSapProvider * GetLteUeRrcSapProvider()
static const std::string g_ueRrcStateName[LteUeRrc::NUM_STATES]
Map each of UE RRC states to its string representation.
std::list< uint16_t > ConcernedCells_t
List of cell IDs which are responsible for a certain trigger.
Time m_t300
The T300 attribute.
UlConfiguration ulConfiguration
UL configuration.
Event A2: Serving becomes worse than absolute threshold.
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.
void DoDisconnect()
Disconnect function.
virtual void SetTemporaryCellRnti(uint16_t rnti)
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
TracedCallback< uint64_t, uint16_t, uint16_t > m_randomAccessSuccessfulTrace
The RandomAccessSuccessful trace source.
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
measure ID to remove list
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE...
a unique identifier for an interface.
std::list< ReportConfigToAddMod > reportConfigToAddModList
report config to add mod list
TypeId SetParent(TypeId tid)
Set the parent TypeId.
std::list< uint8_t > drbToReleaseList
DRB to release list.
static TypeId GetTypeId(void)
Get the type ID.
void SetImsi(uint64_t imsi)
uint8_t m_lastRrcTransactionIdentifier
last RRC transaction identifier
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
void VarMeasReportListClear(uint8_t measId)
Remove the reporting entry of the given measurement identity from m_varMeasReportList.
void LeaveConnectedMode()
Leave connected mode.
uint32_t m_ulEarfcn
Uplink carrier frequency.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndErrorTrace
The HandoverEndError trace source.
RaSupervisionInfo raSupervisionInfo
RA supervision info.
LteRrcSap::SystemInformationBlockType1 m_lastSib1
Stored content of the last SIB1 received.
void SetLteMacSapProvider(LteMacSapProvider *s)
bool haveScellsMeas
has SCells measure
bool haveMeasurementResultsServingSCells
have measure results serving Scells
AntennaInfoDedicated antennaInfo
antenna info dedicated
virtual void NotifyRandomAccessFailed()
Notify the RRC that the MAC Random Access procedure failed.
RadioResourceConfigDedicated structure.
uint32_t ulCarrierFreq
UL carrier frequency.
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 ...
uint8_t logicalChannelGroup
logical channel group
uint16_t GetCellId() const