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> 
   97   "IDLE_CAMPED_NORMALLY",
 
  101   "CONNECTED_NORMALLY",
 
  102   "CONNECTED_HANDOVER",
 
  103   "CONNECTED_PHY_PROBLEM",
 
  104   "CONNECTED_REESTABLISHING" 
  113   return g_ueRrcStateName[s];
 
  125   : m_cphySapProvider (0),
 
  126     m_cmacSapProvider (0),
 
  128     m_macSapProvider (0),
 
  130     m_state (IDLE_START),
 
  135     m_connectionPending (false),
 
  136     m_hasReceivedMib (false),
 
  137     m_hasReceivedSib1 (false),
 
  138     m_hasReceivedSib2 (false),
 
  174     .AddAttribute (
"DataRadioBearerMap", 
"List of UE RadioBearerInfo for Data Radio Bearers by LCID.",
 
  177                    MakeObjectMapChecker<LteDataRadioBearerInfo> ())
 
  178     .AddAttribute (
"Srb0", 
"SignalingRadioBearerInfo for SRB0",
 
  181                    MakePointerChecker<LteSignalingRadioBearerInfo> ())
 
  182     .AddAttribute (
"Srb1", 
"SignalingRadioBearerInfo for SRB1",
 
  185                    MakePointerChecker<LteSignalingRadioBearerInfo> ())
 
  186     .AddAttribute (
"CellId",
 
  187                    "Serving cell identifier",
 
  190                    MakeUintegerChecker<uint16_t> ())
 
  191     .AddAttribute (
"C-RNTI",
 
  192                    "Cell Radio Network Temporary Identifier",
 
  195                    MakeUintegerChecker<uint16_t> ())
 
  196     .AddAttribute (
"T300",
 
  197                    "Timer for the RRC Connection Establishment procedure " 
  198                    "(i.e., the procedure is deemed as failed if it takes longer than this)",
 
  202     .AddTraceSource (
"MibReceived",
 
  203                      "trace fired upon reception of Master Information Block",
 
  205                      "ns3::LteUeRrc::MibSibHandoverTracedCallback")
 
  206     .AddTraceSource (
"Sib1Received",
 
  207                      "trace fired upon reception of System Information Block Type 1",
 
  209                      "ns3::LteUeRrc::MibSibHandoverTracedCallback")
 
  210     .AddTraceSource (
"Sib2Received",
 
  211                      "trace fired upon reception of System Information Block Type 2",
 
  213                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  214     .AddTraceSource (
"StateTransition",
 
  215                      "trace fired upon every UE RRC state transition",
 
  217                      "ns3::LteUeRrc::StateTracedCallback")
 
  218     .AddTraceSource (
"InitialCellSelectionEndOk",
 
  219                      "trace fired upon successful initial cell selection procedure",
 
  221                      "ns3::LteUeRrc::CellSelectionTracedCallback")
 
  222     .AddTraceSource (
"InitialCellSelectionEndError",
 
  223                      "trace fired upon failed initial cell selection procedure",
 
  225                      "ns3::LteUeRrc::CellSelectionTracedCallback")
 
  226     .AddTraceSource (
"RandomAccessSuccessful",
 
  227                      "trace fired upon successful completion of the random access procedure",
 
  229                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  230     .AddTraceSource (
"RandomAccessError",
 
  231                      "trace fired upon failure of the random access procedure",
 
  233                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  234     .AddTraceSource (
"ConnectionEstablished",
 
  235                      "trace fired upon successful RRC connection establishment",
 
  237                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  238     .AddTraceSource (
"ConnectionTimeout",
 
  239                      "trace fired upon timeout RRC connection establishment because of T300",
 
  241                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  242     .AddTraceSource (
"ConnectionReconfiguration",
 
  243                      "trace fired upon RRC connection reconfiguration",
 
  245                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  246     .AddTraceSource (
"HandoverStart",
 
  247                      "trace fired upon start of a handover procedure",
 
  249                      "ns3::LteUeRrc::MibSibHandoverTracedCallback")
 
  250     .AddTraceSource (
"HandoverEndOk",
 
  251                      "trace fired upon successful termination of a handover procedure",
 
  253                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  254     .AddTraceSource (
"HandoverEndError",
 
  255                      "trace fired upon failure of a handover procedure",
 
  257                      "ns3::LteUeRrc::ImsiCidRntiTracedCallback")
 
  402   Ptr<LteRlc> rlc = CreateObject<LteRlcTm> ()->GetObject<LteRlc> ();
 
  407   m_srb0 = CreateObject<LteSignalingRadioBearerInfo> ();
 
  409   m_srb0->m_srbIdentity = 0;
 
  436   std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =   
m_drbMap.find (drbid);
 
  442   params.lcid = it->second->m_logicalChannelIdentity;
 
  445                      << 
" on DRBID " << (uint32_t) drbid
 
  446                      << 
" (LCID " << (uint32_t) params.lcid << 
")" 
  447                      << 
" (" << packet->
GetSize () << 
" bytes)");
 
  448   it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
 
  533         std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
 
  725                      "Cell identity in SIB1 does not match with the originating cell");
 
  740                      "Cell identity in SIB1 does not match with the originating cell");
 
  764   std::vector <LteUeCphySapUser::UeMeasurementsElement>::iterator newMeasIt;
 
  769                           newMeasIt->m_rsrq, useLayer3Filtering);
 
  779       std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt;
 
 1018   uint16_t maxRsrpCellId = 0;
 
 1019   double maxRsrp = -std::numeric_limits<double>::infinity ();
 
 1021   std::map<uint16_t, MeasValues>::iterator it;
 
 1028       if (maxRsrp < it->
second.rsrp)
 
 1030           std::set<uint16_t>::const_iterator itCell;
 
 1034               maxRsrpCellId = it->first;
 
 1035               maxRsrp = it->second.rsrp;
 
 1040   if (maxRsrpCellId == 0)
 
 1042       NS_LOG_WARN (
this << 
" Cell search is unable to detect surrounding cell to attach to");
 
 1047                          << 
" is the strongest untried surrounding cell");
 
 1066   bool isSuitableCell = 
false;
 
 1067   bool isAcceptableCell = 
false;
 
 1068   std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.find (cellId);
 
 1069   double qRxLevMeas = storedMeasIt->second.rsrp;
 
 1071   NS_LOG_LOGIC (
this << 
" cell selection to cellId=" << cellId
 
 1072                      << 
" qrxlevmeas=" << qRxLevMeas << 
" dBm" 
 1073                      << 
" qrxlevmin=" << qRxLevMin << 
" dBm");
 
 1075   if (qRxLevMeas - qRxLevMin > 0)
 
 1077       isAcceptableCell = 
true;
 
 1082       isSuitableCell = (cellCsgIndication == 
false) || (cellCsgId == 
m_csgWhiteList);
 
 1085                          << cellCsgId << 
"/" << cellCsgIndication);
 
 1106       if (isAcceptableCell)
 
 1145   std::list<LteRrcSap::SrbToAddMod>::const_iterator stamIt = rrcd.
srbToAddModList.begin ();
 
 1153           NS_ASSERT_MSG (stamIt->srbIdentity == 1, 
"only SRB1 supported");
 
 1155           const uint8_t lcid = 1; 
 
 1164           pdcp->SetLcId (lcid);
 
 1169           m_srb1 = CreateObject<LteSignalingRadioBearerInfo> ();
 
 1172           m_srb1->m_srbIdentity = 1;
 
 1174           m_srb1->m_logicalChannelConfig.priority = stamIt->logicalChannelConfig.priority;
 
 1175           m_srb1->m_logicalChannelConfig.prioritizedBitRateKbps = stamIt->logicalChannelConfig.prioritizedBitRateKbps;
 
 1176           m_srb1->m_logicalChannelConfig.bucketSizeDurationMs = stamIt->logicalChannelConfig.bucketSizeDurationMs;
 
 1177           m_srb1->m_logicalChannelConfig.logicalChannelGroup = stamIt->logicalChannelConfig.logicalChannelGroup;
 
 1180           lcConfig.
priority = stamIt->logicalChannelConfig.priority;
 
 1192           ueParams.srb1SapProvider = 
m_srb1->m_pdcp->GetLtePdcpSapProvider ();
 
 1197           NS_LOG_INFO (
"request to modify SRB1 (skipping as currently not implemented)");
 
 1203   std::list<LteRrcSap::DrbToAddMod>::const_iterator dtamIt;
 
 1208       NS_LOG_INFO (
this << 
" IMSI " << 
m_imsi << 
" adding/modifying DRBID " << (uint32_t) dtamIt->drbIdentity << 
" LC " << (uint32_t) dtamIt->logicalChannelIdentity);
 
 1209       NS_ASSERT_MSG (dtamIt->logicalChannelIdentity > 2, 
"LCID value " << dtamIt->logicalChannelIdentity << 
" is reserved for SRBs");
 
 1211       std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbMapIt = 
m_drbMap.find (dtamIt->drbIdentity);
 
 1223               switch (dtamIt->rlcConfig.choice)
 
 1244           rlc->
SetLcId (dtamIt->logicalChannelIdentity);
 
 1247           drbInfo->m_rlc = rlc;
 
 1248           drbInfo->m_epsBearerIdentity = dtamIt->epsBearerIdentity;
 
 1249           drbInfo->m_logicalChannelIdentity = dtamIt->logicalChannelIdentity;
 
 1250           drbInfo->m_drbIdentity = dtamIt->drbIdentity;
 
 1258               pdcp->SetLcId (dtamIt->logicalChannelIdentity);
 
 1262               drbInfo->m_pdcp = pdcp;
 
 1271           lcConfig.
priority = dtamIt->logicalChannelConfig.priority;
 
 1289   std::list<uint8_t>::iterator dtdmIt;
 
 1294       uint8_t drbid = *dtdmIt;
 
 1295       NS_LOG_INFO (
this << 
" IMSI " << 
m_imsi << 
" releasing DRB " << (uint32_t) drbid << drbid);
 
 1296       std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it =   
m_drbMap.find (drbid);
 
 1318       uint8_t measObjectId = *it;
 
 1319       NS_LOG_LOGIC (
this << 
" deleting measObjectId " << (uint32_t)  measObjectId);
 
 1324           if (measIdIt->second.measObjectId == measObjectId)
 
 1326               uint8_t measId = measIdIt->second.measId;
 
 1328               NS_LOG_LOGIC (
this << 
" deleting measId " << (uint32_t) measId << 
" because referring to measObjectId " << (uint32_t)  measObjectId);
 
 1347       NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (), 
"cellsToRemoveList not supported");
 
 1348       NS_ASSERT_MSG (it->measObjectEutra.cellsToAddModList.empty (), 
"cellsToAddModList not supported");
 
 1349       NS_ASSERT_MSG (it->measObjectEutra.cellsToRemoveList.empty (), 
"blackCellsToRemoveList not supported");
 
 1350       NS_ASSERT_MSG (it->measObjectEutra.blackCellsToAddModList.empty (), 
"blackCellsToAddModList not supported");
 
 1351       NS_ASSERT_MSG (it->measObjectEutra.haveCellForWhichToReportCGI == 
false, 
"cellForWhichToReportCGI is not supported");
 
 1353       uint8_t measObjectId = it->measObjectId;
 
 1357           NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId << 
" exists, updating entry");
 
 1358           measObjectIt->second = *it;
 
 1359           for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt 
 
 1364               if (measIdIt->second.measObjectId == measObjectId)
 
 1366                   uint8_t measId = measIdIt->second.measId;
 
 1367                   NS_LOG_LOGIC (
this << 
" found measId " << (uint32_t) measId << 
" referring to measObjectId " << (uint32_t)  measObjectId);
 
 1374           NS_LOG_LOGIC (
"measObjectId " << (uint32_t) measObjectId << 
" is new, adding entry");
 
 1385       uint8_t reportConfigId = *it;
 
 1386       NS_LOG_LOGIC (
this << 
" deleting reportConfigId " << (uint32_t)  reportConfigId);
 
 1391           if (measIdIt->second.reportConfigId == reportConfigId)
 
 1393               uint8_t measId = measIdIt->second.measId;
 
 1395               NS_LOG_LOGIC (
this << 
" deleting measId " << (uint32_t) measId << 
" because referring to reportConfigId " << (uint32_t)  reportConfigId);
 
 1415                      "only trigger type EVENT is supported");
 
 1417       uint8_t reportConfigId = it->reportConfigId;
 
 1421           NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId << 
" exists, updating entry");
 
 1423           for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt 
 
 1428               if (measIdIt->second.reportConfigId == reportConfigId)
 
 1430                   uint8_t measId = measIdIt->second.measId;
 
 1431                   NS_LOG_LOGIC (
this << 
" found measId " << (uint32_t) measId << 
" referring to reportConfigId " << (uint32_t)  reportConfigId);
 
 1438           NS_LOG_LOGIC (
"reportConfigId " << (uint32_t) reportConfigId << 
" is new, adding entry");
 
 1454       for (std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt
 
 1468       uint8_t measId = *it;
 
 1469       NS_LOG_LOGIC (
this << 
" deleting measId " << (uint32_t) measId);
 
 1479   for (std::list<LteRrcSap::MeasIdToAddMod>::iterator it = mc.
measIdToAddModList.begin ();
 
 1483       NS_LOG_LOGIC (
this << 
" measId " << (uint32_t) it->measId
 
 1484                          << 
" (measObjectId=" << (uint32_t) it->measObjectId
 
 1485                          << 
", reportConfigId=" << (uint32_t) it->reportConfigId
 
 1492       std::map<uint8_t, VarMeasReport>::iterator measReportIt = 
m_varMeasReportList.find (it->measId);
 
 1495           measReportIt->second.periodicReportTimer.Cancel ();
 
 1502       std::list<PendingTrigger_t> s;
 
 1525                               bool useLayer3Filtering)
 
 1527   NS_LOG_FUNCTION (
this << cellId << rsrp << rsrq << useLayer3Filtering);
 
 1529   std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.find (cellId);
 
 1533       if (useLayer3Filtering)
 
 1539           if (std::isnan (storedMeasIt->second.rsrq))
 
 1542               storedMeasIt->second.rsrq = rsrq; 
 
 1552           storedMeasIt->second.rsrp = rsrp;
 
 1553           storedMeasIt->second.rsrq = rsrq;
 
 1562       std::pair<uint16_t, MeasValues> val (cellId, v);
 
 1563       std::pair<std::map<uint16_t, MeasValues>::iterator, 
bool>
 
 1565       NS_ASSERT_MSG (ret.second == 
true, 
"element already existed");
 
 1566       storedMeasIt = ret.first;
 
 1571                      << 
", new RSRP " << rsrp << 
" stored " << storedMeasIt->second.rsrp
 
 1572                      << 
", new RSRQ " << rsrq << 
" stored " << storedMeasIt->second.rsrq);
 
 1582   std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator measIdIt =
 
 1585   NS_ASSERT (measIdIt->first == measIdIt->second.measId);
 
 1587   std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator
 
 1592   std::map<uint8_t, LteRrcSap::MeasObjectToAddMod>::iterator
 
 1597   std::map<uint8_t, VarMeasReport>::iterator
 
 1605                  "only triggerType == event is supported");
 
 1608   NS_LOG_LOGIC (
this << 
" considering measId " << (uint32_t) measId);
 
 1609   bool eventEntryCondApplicable = 
false;
 
 1610   bool eventLeavingCondApplicable = 
false;
 
 1614   switch (reportConfigEutra.eventId)
 
 1628         switch (reportConfigEutra.triggerQuantity)
 
 1632             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1638             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1648         bool entryCond = ms - hys > thresh;
 
 1652             if (!isMeasIdInReportList)
 
 1654                 concernedCellsEntry.push_back (
m_cellId);
 
 1655                 eventEntryCondApplicable = 
true;
 
 1664                            != measReportIt->second.cellsTriggeredList.end ());
 
 1667         else if (reportConfigEutra.timeToTrigger > 0)
 
 1673         bool leavingCond = ms + hys < thresh;
 
 1677             if (isMeasIdInReportList)
 
 1684                            != measReportIt->second.cellsTriggeredList.end ());
 
 1685                 concernedCellsLeaving.push_back (
m_cellId);
 
 1686                 eventLeavingCondApplicable = 
true;
 
 1689         else if (reportConfigEutra.timeToTrigger > 0)
 
 1695                            << 
" ms=" << ms << 
" thresh=" << thresh
 
 1696                            << 
" entryCond=" << entryCond
 
 1697                            << 
" leavingCond=" << leavingCond);
 
 1715         switch (reportConfigEutra.triggerQuantity)
 
 1719             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1725             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1735         bool entryCond = ms + hys < thresh;
 
 1739             if (!isMeasIdInReportList)
 
 1741                 concernedCellsEntry.push_back (
m_cellId);
 
 1742                 eventEntryCondApplicable = 
true;
 
 1751                            != measReportIt->second.cellsTriggeredList.end ());
 
 1754         else if (reportConfigEutra.timeToTrigger > 0)
 
 1760         bool leavingCond = ms - hys > thresh;
 
 1764             if (isMeasIdInReportList)
 
 1771                            != measReportIt->second.cellsTriggeredList.end ());
 
 1772                 concernedCellsLeaving.push_back (
m_cellId);
 
 1773                 eventLeavingCondApplicable = 
true;
 
 1776         else if (reportConfigEutra.timeToTrigger > 0)
 
 1782                            << 
" ms=" << ms << 
" thresh=" << thresh
 
 1783                            << 
" entryCond=" << entryCond
 
 1784                            << 
" leavingCond=" << leavingCond);
 
 1798         double ofn = measObjectEutra.offsetFreq; 
 
 1801         double ofp = measObjectEutra.offsetFreq; 
 
 1808         switch (reportConfigEutra.triggerQuantity)
 
 1812             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1817             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1825         for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 1829             uint16_t cellId = storedMeasIt->first;
 
 1835             switch (reportConfigEutra.triggerQuantity)
 
 1838                 mn = storedMeasIt->second.rsrp;
 
 1841                 mn = storedMeasIt->second.rsrq;
 
 1848             bool hasTriggered = isMeasIdInReportList
 
 1849               && (measReportIt->second.cellsTriggeredList.find (cellId)
 
 1850                   != measReportIt->second.cellsTriggeredList.end ());
 
 1853             bool entryCond = mn + ofn + ocn - hys > mp + ofp + ocp + off;
 
 1859                     concernedCellsEntry.push_back (cellId);
 
 1860                     eventEntryCondApplicable = 
true;
 
 1863             else if (reportConfigEutra.timeToTrigger > 0)
 
 1869             bool leavingCond = mn + ofn + ocn + hys < mp + ofp + ocp + off;
 
 1875                     concernedCellsLeaving.push_back (cellId);
 
 1876                     eventLeavingCondApplicable = 
true;
 
 1879             else if (reportConfigEutra.timeToTrigger > 0)
 
 1884             NS_LOG_LOGIC (
this << 
" event A3: neighbor cell " << cellId
 
 1885                                << 
" mn=" << mn << 
" mp=" << mp << 
" offset=" << off
 
 1886                                << 
" entryCond=" << entryCond
 
 1887                                << 
" leavingCond=" << leavingCond);
 
 1903         double ofn = measObjectEutra.offsetFreq; 
 
 1909         switch (reportConfigEutra.triggerQuantity)
 
 1912             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1917             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 1926         for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 1930             uint16_t cellId = storedMeasIt->first;
 
 1936             switch (reportConfigEutra.triggerQuantity)
 
 1939                 mn = storedMeasIt->second.rsrp;
 
 1942                 mn = storedMeasIt->second.rsrq;
 
 1949             bool hasTriggered = isMeasIdInReportList
 
 1950               && (measReportIt->second.cellsTriggeredList.find (cellId)
 
 1951                   != measReportIt->second.cellsTriggeredList.end ());
 
 1954             bool entryCond = mn + ofn + ocn - hys > thresh;
 
 1960                     concernedCellsEntry.push_back (cellId);
 
 1961                     eventEntryCondApplicable = 
true;
 
 1964             else if (reportConfigEutra.timeToTrigger > 0)
 
 1970             bool leavingCond = mn + ofn + ocn + hys < thresh;
 
 1976                     concernedCellsLeaving.push_back (cellId);
 
 1977                     eventLeavingCondApplicable = 
true;
 
 1980             else if (reportConfigEutra.timeToTrigger > 0)
 
 1985             NS_LOG_LOGIC (
this << 
" event A4: neighbor cell " << cellId
 
 1986                                << 
" mn=" << mn << 
" thresh=" << thresh
 
 1987                                << 
" entryCond=" << entryCond
 
 1988                                << 
" leavingCond=" << leavingCond);
 
 2006         double ofn = measObjectEutra.offsetFreq; 
 
 2013         switch (reportConfigEutra.triggerQuantity)
 
 2017             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 2019             NS_ASSERT (reportConfigEutra.threshold2.choice
 
 2026             NS_ASSERT (reportConfigEutra.threshold1.choice
 
 2028             NS_ASSERT (reportConfigEutra.threshold2.choice
 
 2039         bool entryCond = mp + hys < thresh1;
 
 2043             for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 2047                 uint16_t cellId = storedMeasIt->first;
 
 2053                 switch (reportConfigEutra.triggerQuantity)
 
 2056                     mn = storedMeasIt->second.rsrp;
 
 2059                     mn = storedMeasIt->second.rsrq;
 
 2066                 bool hasTriggered = isMeasIdInReportList
 
 2067                   && (measReportIt->second.cellsTriggeredList.find (cellId)
 
 2068                       != measReportIt->second.cellsTriggeredList.end ());
 
 2072                 entryCond = mn + ofn + ocn - hys > thresh2;
 
 2078                         concernedCellsEntry.push_back (cellId);
 
 2079                         eventEntryCondApplicable = 
true;
 
 2082                 else if (reportConfigEutra.timeToTrigger > 0)
 
 2087                 NS_LOG_LOGIC (
this << 
" event A5: neighbor cell " << cellId
 
 2088                                    << 
" mn=" << mn << 
" mp=" << mp
 
 2089                                    << 
" thresh2=" << thresh2
 
 2090                                    << 
" thresh1=" << thresh1
 
 2091                                    << 
" entryCond=" << entryCond);
 
 2099                                << 
" mp=" << mp << 
" thresh1=" << thresh1
 
 2100                                << 
" entryCond=" << entryCond);
 
 2102             if (reportConfigEutra.timeToTrigger > 0)
 
 2108         if (isMeasIdInReportList)
 
 2111             bool leavingCond = mp - hys > thresh1;
 
 2115                 if (reportConfigEutra.timeToTrigger == 0)
 
 2119                     for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 2123                         uint16_t cellId = storedMeasIt->first;
 
 2129                         if (measReportIt->second.cellsTriggeredList.find (cellId)
 
 2130                             != measReportIt->second.cellsTriggeredList.end ())
 
 2132                             concernedCellsLeaving.push_back (cellId);
 
 2133                             eventLeavingCondApplicable = 
true;
 
 2141                     for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 2145                         uint16_t cellId = storedMeasIt->first;
 
 2151                         if (measReportIt->second.cellsTriggeredList.find (cellId)
 
 2152                             != measReportIt->second.cellsTriggeredList.end ())
 
 2154                             switch (reportConfigEutra.triggerQuantity)
 
 2157                                 mn = storedMeasIt->second.rsrp;
 
 2160                                 mn = storedMeasIt->second.rsrq;
 
 2169                             leavingCond = mn + ofn + ocn + hys < thresh2;
 
 2181                             concernedCellsLeaving.push_back (cellId);
 
 2182                             eventLeavingCondApplicable = 
true;
 
 2184                             NS_LOG_LOGIC (
this << 
" event A5: neighbor cell " << cellId
 
 2185                                                << 
" mn=" << mn << 
" mp=" << mp
 
 2186                                                << 
" thresh2=" << thresh2
 
 2187                                                << 
" thresh1=" << thresh1
 
 2188                                                << 
" leavingCond=" << leavingCond);
 
 2198                                    << 
" mp=" << mp << 
" thresh1=" << thresh1
 
 2199                                    << 
" leavingCond=" << leavingCond);
 
 2204                 if (reportConfigEutra.timeToTrigger > 0)
 
 2211                 for (std::map<uint16_t, MeasValues>::iterator storedMeasIt = 
m_storedMeasValues.begin ();
 
 2215                     uint16_t cellId = storedMeasIt->first;
 
 2221                     if (measReportIt->second.cellsTriggeredList.find (cellId)
 
 2222                         != measReportIt->second.cellsTriggeredList.end ())
 
 2224                         switch (reportConfigEutra.triggerQuantity)
 
 2227                             mn = storedMeasIt->second.rsrp;
 
 2230                             mn = storedMeasIt->second.rsrq;
 
 2238                         leavingCond = mn + ofn + ocn + hys < thresh2;
 
 2242                             concernedCellsLeaving.push_back (cellId);
 
 2243                             eventLeavingCondApplicable = 
true;
 
 2246                         NS_LOG_LOGIC (
this << 
" event A5: neighbor cell " << cellId
 
 2247                                            << 
" mn=" << mn << 
" mp=" << mp
 
 2248                                            << 
" thresh2=" << thresh2
 
 2249                                            << 
" thresh1=" << thresh1
 
 2250                                            << 
" leavingCond=" << leavingCond);
 
 2266       NS_FATAL_ERROR (
"unsupported eventId " << reportConfigEutra.eventId);
 
 2271   NS_LOG_LOGIC (
this << 
" eventEntryCondApplicable=" << eventEntryCondApplicable
 
 2272                      << 
" eventLeavingCondApplicable=" << eventLeavingCondApplicable);
 
 2274   if (eventEntryCondApplicable)
 
 2276       if (reportConfigEutra.timeToTrigger == 0)
 
 2287                                          measId, concernedCellsEntry);
 
 2288           std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2291           enteringTriggerIt->second.push_back (t);
 
 2295   if (eventLeavingCondApplicable)
 
 2299         && reportConfigEutra.reportOnLeave;
 
 2301       if (reportConfigEutra.timeToTrigger == 0)
 
 2312                                          measId, concernedCellsLeaving, reportOnLeave);
 
 2313           std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2316           leavingTriggerIt->second.push_back (t);
 
 2327   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2331   if (!it1->second.empty ())
 
 2333       std::list<PendingTrigger_t>::iterator it2;
 
 2334       for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
 
 2337           NS_LOG_LOGIC (
this << 
" canceling entering time-to-trigger event at " 
 2342       it1->second.clear ();
 
 2351   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2355   std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
 
 2356   while (it2 != it1->second.end ())
 
 2360       ConcernedCells_t::iterator it3;
 
 2361       for (it3 = it2->concernedCells.begin ();
 
 2362            it3 != it2->concernedCells.end (); ++it3)
 
 2366               it3 = it2->concernedCells.erase (it3);
 
 2370       if (it2->concernedCells.empty ())
 
 2372           NS_LOG_LOGIC (
this << 
" canceling entering time-to-trigger event at " 
 2375           it2 = it1->second.erase (it2);
 
 2389   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2393   if (!it1->second.empty ())
 
 2395       std::list<PendingTrigger_t>::iterator it2;
 
 2396       for (it2 = it1->second.begin (); it2 != it1->second.end (); ++it2)
 
 2399           NS_LOG_LOGIC (
this << 
" canceling leaving time-to-trigger event at " 
 2404       it1->second.clear ();
 
 2413   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2417   std::list<PendingTrigger_t>::iterator it2 = it1->second.begin ();
 
 2418   while (it2 != it1->second.end ())
 
 2422       ConcernedCells_t::iterator it3;
 
 2423       for (it3 = it2->concernedCells.begin ();
 
 2424            it3 != it2->concernedCells.end (); ++it3)
 
 2428               it3 = it2->concernedCells.erase (it3);
 
 2432       if (it2->concernedCells.empty ())
 
 2434           NS_LOG_LOGIC (
this << 
" canceling leaving time-to-trigger event at " 
 2437           it2 = it1->second.erase (it2);
 
 2452   std::map<uint8_t, VarMeasReport>::iterator
 
 2459       std::pair<uint8_t, VarMeasReport> val (measId, r);
 
 2460       std::pair<std::map<uint8_t, VarMeasReport>::iterator, 
bool>
 
 2462       NS_ASSERT_MSG (ret.second == 
true, 
"element already existed");
 
 2463       measReportIt = ret.first;
 
 2468   for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
 
 2469        it != enteringCells.end ();
 
 2472       measReportIt->second.cellsTriggeredList.insert (*it);
 
 2475   NS_ASSERT (!measReportIt->second.cellsTriggeredList.empty ());
 
 2476   measReportIt->second.numberOfReportsSent = 0;
 
 2477   measReportIt->second.periodicReportTimer
 
 2482   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2485   if (!enteringTriggerIt->second.empty ())
 
 2493       enteringTriggerIt->second.pop_front ();
 
 2495       if (!enteringTriggerIt->second.empty ())
 
 2502           for (ConcernedCells_t::const_iterator it = enteringCells.begin ();
 
 2503                it != enteringCells.end (); ++it)
 
 2520   std::map<uint8_t, VarMeasReport>::iterator
 
 2524   for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
 
 2525        it != leavingCells.end ();
 
 2528       measReportIt->second.cellsTriggeredList.erase (*it);
 
 2537   if (measReportIt->second.cellsTriggeredList.empty ())
 
 2539       measReportIt->second.periodicReportTimer.Cancel ();
 
 2543   std::map<uint8_t, std::list<PendingTrigger_t> >::iterator
 
 2546   if (!leavingTriggerIt->second.empty ())
 
 2554       leavingTriggerIt->second.pop_front ();
 
 2556       if (!leavingTriggerIt->second.empty ())
 
 2563           for (ConcernedCells_t::const_iterator it = leavingCells.begin ();
 
 2564                it != leavingCells.end (); ++it)
 
 2580   std::map<uint8_t, VarMeasReport>::iterator
 
 2584       NS_LOG_LOGIC (
this << 
" deleting existing report for measId " << (uint16_t) measId);
 
 2585       measReportIt->second.periodicReportTimer.Cancel ();
 
 2599   std::map<uint8_t, LteRrcSap::MeasIdToAddMod>::iterator 
 
 2603   std::map<uint8_t, LteRrcSap::ReportConfigToAddMod>::iterator 
 
 2610   measResults.
measId = measId;
 
 2617                "RSRP " << (uint32_t) measResults.
rsrpResult << 
" (" << servingMeasIt->second.rsrp << 
" dBm) " 
 2618                "RSRQ " << (uint32_t) measResults.
rsrqResult << 
" (" << servingMeasIt->second.rsrq << 
" dB)");
 
 2620   std::map<uint8_t, VarMeasReport>::iterator measReportIt = 
m_varMeasReportList.find (measId);
 
 2623       NS_LOG_ERROR (
"no entry found in m_varMeasReportList for measId " << (uint32_t) measId);
 
 2627       if (!(measReportIt->second.cellsTriggeredList.empty ()))
 
 2629           std::multimap<double, uint16_t> sortedNeighCells;
 
 2630           for (std::set<uint16_t>::iterator cellsTriggeredIt = measReportIt->second.cellsTriggeredList.begin ();
 
 2631                cellsTriggeredIt != measReportIt->second.cellsTriggeredList.end ();
 
 2634               uint16_t cellId = *cellsTriggeredIt;
 
 2637                   std::map<uint16_t, MeasValues>::iterator neighborMeasIt = 
m_storedMeasValues.find (cellId);
 
 2638                   double triggerValue;
 
 2639                   switch (reportConfigEutra.triggerQuantity)
 
 2642                       triggerValue = neighborMeasIt->second.rsrp;
 
 2645                       triggerValue = neighborMeasIt->second.rsrq;
 
 2651                   sortedNeighCells.insert (std::pair<double, uint16_t> (triggerValue, cellId));
 
 2655           std::multimap<double, uint16_t>::reverse_iterator sortedNeighCellsIt;
 
 2657           for (sortedNeighCellsIt = sortedNeighCells.rbegin (), count = 0;
 
 2658                sortedNeighCellsIt != sortedNeighCells.rend () && count < reportConfigEutra.maxReportCells;
 
 2659                ++sortedNeighCellsIt, ++count)
 
 2661               uint16_t cellId = sortedNeighCellsIt->second;
 
 2662               std::map<uint16_t, MeasValues>::iterator neighborMeasIt = 
m_storedMeasValues.find (cellId);
 
 2666               measResultEutra.haveCgiInfo = 
false;
 
 2667               measResultEutra.haveRsrpResult = 
true;
 
 2669               measResultEutra.haveRsrqResult = 
true;
 
 2671               NS_LOG_INFO (
this << 
" reporting neighbor cell " << (uint32_t) measResultEutra.physCellId 
 
 2672                                 << 
" RSRP " << (uint32_t) measResultEutra.rsrpResult
 
 2673                                 << 
" (" << neighborMeasIt->second.rsrp << 
" dBm)" 
 2674                                 << 
" RSRQ " << (uint32_t) measResultEutra.rsrqResult
 
 2675                                 << 
" (" << neighborMeasIt->second.rsrq << 
" dB)");
 
 2682           NS_LOG_WARN (
this << 
" cellsTriggeredList is empty");
 
 2690       measReportIt->second.numberOfReportsSent++;
 
 2691       measReportIt->second.periodicReportTimer.Cancel ();
 
 2693       Time reportInterval;
 
 2694       switch (reportConfigEutra.reportInterval)
 
 2721           reportInterval = 
Seconds (60);
 
 2724           reportInterval = 
Seconds (360);
 
 2727           reportInterval = 
Seconds (720);
 
 2730           reportInterval = 
Seconds (1800);
 
 2733           reportInterval = 
Seconds (3600);
 
 2736           NS_FATAL_ERROR (
"Unsupported reportInterval " << (uint16_t) reportConfigEutra.reportInterval);
 
 2741       measReportIt->second.periodicReportTimer 
 
 2768   std::map<uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it;
 
 2800   std::map<uint8_t, uint8_t>::iterator it = 
m_bid2DrbidMap.find (bid);
 
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute. 
 
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 an Object subclass with the TypeId system. 
 
LtePdcpSapUser * m_drbPdcpSapUser
 
void DoRecvSystemInformation(LteRrcSap::SystemInformation msg)
Part of the RRC protocol. Implement the LteUeRrcSapProvider::RecvSystemInformation interface...
 
uint16_t bucketSizeDurationMs
 
uint8_t numberOfRaPreambles
 
static double ConvertPdschConfigDedicated2Double(PdschConfigDedicated pdschConfigDedicated)
 
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
 
SoundingRsUlConfigDedicated soundingRsUlConfigDedicated
 
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
 
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
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)
 
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)
 
virtual void SetPa(double pa)=0
 
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)
Set the TypeId of the Objects to be created by this factory. 
 
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. 
 
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 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 
 
Event A5: PCell becomes worse than absolute threshold1 AND Neighbour becomes better than another abso...
 
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...
 
Event A2: Serving becomes worse than absolute threshold. 
 
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 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
 
Ptr< Packet > pdcpSdu
the RRC PDU 
 
uint8_t Bid2Drbid(uint8_t bid)
 
PreambleInfo preambleInfo
 
double GetSeconds(void) const 
Get an approximation of the time stored in this instance in the indicated unit. 
 
Event A4: Neighbour becomes better than absolute threshold. 
 
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
 
Reference Signal Received Quality. 
 
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
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
 
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source. 
 
State m_state
The current UE RRC state. 
 
uint16_t m_dlEarfcn
Downlink carrier frequency. 
 
AttributeValue implementation for Time. 
 
Ptr< LteSignalingRadioBearerInfo > m_srb0
The Srb0 attribute. 
 
virtual void ConfigureReferenceSignalPower(int8_t referenceSignalPower)=0
Configure referenceSignalPower. 
 
Event A1: Serving becomes better than absolute threshold. 
 
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 
Create an Object instance of the configured TypeId. 
 
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
The HandoverStart trace source. 
 
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
The RandomAccessError trace source. 
 
uint8_t rrcTransactionIdentifier
 
TracedCallback< uint64_t, uint16_t, uint16_t > m_sib2ReceivedTrace
The Sib2Received trace source. 
 
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)
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. 
 
PhysicalConfigDedicated physicalConfigDedicated
 
Ptr< LteSignalingRadioBearerInfo > m_srb1
The Srb1 attribute. 
 
LteUeCphySapProvider * m_cphySapProvider
 
uint8_t filterCoefficientRSRP
 
uint8_t GetUlBandwidth() const 
 
void SetLteUeCmacSapProvider(LteUeCmacSapProvider *s)
set the CMAC SAP this RRC should interact with 
 
bool m_useRlcSm
True if RLC SM is to be used, false if RLC UM/AM are to be used. 
 
Parameters for LtePdcpSapProvider::TransmitPdcpSdu. 
 
Reference Signal Received Power. 
 
RSRP is used for the threshold. 
 
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
The InitialCellSelectionEndOk trace source. 
 
RadioResourceConfigDedicated radioResourceConfigDedicated
 
uint8_t rrcTransactionIdentifier
 
void SetLteUeCphySapProvider(LteUeCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY 
 
void SwitchToState(State s)
Switch the UE RRC to the given state. 
 
static double IeValue2ActualQRxLevMin(int8_t qRxLevMinIeValue)
Returns the actual value of an Q-RxLevMin parameter. 
 
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::map< uint8_t, LteRrcSap::ReportConfigToAddMod > reportConfigList
 
LteUeCphySapUser * m_cphySapUser
 
virtual void Setup(SetupParameters params)=0
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
virtual void SetSrsConfigurationIndex(uint16_t srcCi)=0
 
Hold objects of type Ptr. 
 
Ptr< Packet > pdcpSdu
the RRC PDU 
 
void SetLteRlcSapUser(LteRlcSapUser *s)
 
uint16_t targetPhysCellId
 
LteAsSapUser * m_asSapUser
 
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
The Sib1Received trace source. 
 
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. 
 
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
 
uint16_t m_ulEarfcn
Uplink carrier frequency. 
 
static Time Now(void)
Return the current simulation virtual 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. 
 
Event A3: Neighbour becomes amount of offset better than PCell. 
 
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
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. 
 
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
The ConnectionEstablished trace source. 
 
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
 
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_mibReceivedTrace
The MibReceived trace source. 
 
LteUeCmacSapProvider * m_cmacSapProvider
 
uint16_t m_rnti
The C-RNTI attribute. 
 
uint64_t m_imsi
The unique UE identifier. 
 
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...
 
void DoReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params)
 
MobilityControlInfo mobilityControlInfo
 
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionTimeoutTrace
The ConnectionTimeout trace source. 
 
void DoStartCellSelection(uint16_t dlEarfcn)
 
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector. 
 
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
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...
 
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. 
 
Container for a set of ns3::Object pointers. 
 
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
 
virtual void SendRrcConnectionRequest(RrcConnectionRequest msg)=0
Send an _RRCConnectionRequest message to the serving eNodeB during an RRC connection establishment pr...
 
Part of the RRC protocol. 
 
static uint8_t Db2RsrqRange(double db)
convert an RSRQ value in dB to the corresponding range as per 3GPP TS 36.133 section 9...
 
virtual void RecvData(Ptr< Packet > packet)=0
receive a data packet 
 
RSRQ is used for the threshold. 
 
UeMemberLteUeCmacSapUser(LteUeRrc *rrc)
 
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. 
 
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. 
 
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
 
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)
Set the parent TypeId. 
 
std::list< uint8_t > drbToReleaseList
 
static TypeId GetTypeId(void)
 
void SetImsi(uint64_t imsi)
 
uint8_t m_lastRrcTransactionIdentifier
 
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()
 
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndErrorTrace
The HandoverEndError trace source. 
 
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