23 #include <ns3/pointer.h>
26 #include <ns3/simulator.h>
27 #include <ns3/lte-amc.h>
28 #include <ns3/fdbet-ff-mac-scheduler.h>
29 #include <ns3/lte-vendor-specific-parameters.h>
30 #include <ns3/boolean.h>
141 : m_scheduler (scheduler)
216 : m_cschedSapUser (0),
221 m_amc = CreateObject <LteAmc> ();
251 .AddConstructor<FdBetFfMacScheduler> ()
252 .AddAttribute (
"CqiTimerThreshold",
253 "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
256 MakeUintegerChecker<uint32_t> ())
257 .AddAttribute (
"HarqEnabled",
258 "Activate/Deactivate the HARQ [by default is active].",
261 MakeBooleanChecker ())
262 .AddAttribute (
"UlGrantMcs",
263 "The MCS of the UL grant, must be [0..15] (default 0)",
266 MakeUintegerChecker<uint8_t> ())
321 dlHarqPrcStatus.resize (8,0);
324 dlHarqProcessesTimer.resize (8,0);
327 dlHarqdci.resize (8);
330 dlHarqRlcPdu.resize (2);
331 dlHarqRlcPdu.at (0).resize (8);
332 dlHarqRlcPdu.at (1).resize (8);
336 ulHarqPrcStatus.resize (8,0);
339 ulHarqdci.resize (8);
354 std::map <uint16_t, fdbetsFlowPerf_t>::iterator it;
389 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
390 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
425 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
426 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
429 if ((*it).first.m_rnti == params.
m_rnti)
455 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
463 m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params));
467 (*it).second = params;
492 for (
int i = 0; i < 4; i++)
507 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
511 if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0)
512 || ((*it).second.m_rlcRetransmissionQueueSize > 0)
513 || ((*it).second.m_rlcStatusPduSize > 0) ))
517 if ((*it).first.m_rnti > rnti)
540 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
542 uint8_t i = (*it).second;
547 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
548 if ((*itStat).second.at (i) == 0)
579 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
581 uint8_t i = (*it).second;
586 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
587 if ((*itStat).second.at (i) == 0)
590 (*itStat).second.at (i) = 1;
594 NS_FATAL_ERROR (
"No HARQ process available for RNTI " << rnti <<
" check before update with HarqProcessAvailability");
597 return ((*it).second);
606 std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
615 NS_LOG_DEBUG (
this <<
" Reset HARQ proc " << i <<
" for RNTI " << (*itTimers).first);
616 std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat =
m_dlHarqProcessesStatus.find ((*itTimers).first);
619 NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
621 (*itStat).second.at (i) = 0;
622 (*itTimers).second.at (i) = 0;
626 (*itTimers).second.at (i)++;
649 std::map <uint16_t, std::vector <uint16_t> > allocationMap;
650 std::vector <bool> rbgMap;
651 uint16_t rbgAllocatedNum = 0;
652 std::set <uint16_t> rntiAllocated;
658 uint16_t rbStart = 0;
659 std::vector <struct RachListElement_s>::iterator itRach;
664 newRar.
m_rnti = (*itRach).m_rnti;
668 newRar.m_grant.m_rnti = newRar.m_rnti;
671 uint16_t tbSizeBits = 0;
678 if (tbSizeBits < (*itRach).m_estimatedSize)
683 newRar.m_grant.m_rbStart = rbStart;
684 newRar.m_grant.m_rbLen = rbLen;
685 newRar.m_grant.m_tbSize = tbSizeBits / 8;
686 newRar.m_grant.m_hopping =
false;
687 newRar.m_grant.m_tpc = 0;
688 newRar.m_grant.m_cqiRequest =
false;
689 newRar.m_grant.m_ulDelay =
false;
690 NS_LOG_INFO (
this <<
" UL grant allocated to RNTI " << (*itRach).m_rnti <<
" rbStart " << rbStart <<
" rbLen " << rbLen <<
" MCS " <<
m_ulGrantMcs <<
" tbSize " << newRar.m_grant.m_tbSize);
691 for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
695 rbStart = rbStart + rbLen;
709 NS_LOG_INFO (
this <<
" Received DL-HARQ feedback");
725 std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
729 if (itRnti != rntiAllocated.end ())
735 std::vector <bool> retx;
736 NS_LOG_INFO (
this <<
" Processing DLHARQ feedback");
740 retx.push_back (
false);
747 if (retx.at (0) || retx.at (1))
752 NS_LOG_INFO (
this <<
" HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId);
761 if (dci.
m_rv.size () == 1)
763 rv = dci.
m_rv.at (0);
767 rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
773 NS_LOG_INFO (
"Maximum number of retransmissions reached -> drop process");
779 (*it).second.at (harqId) = 0;
785 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
787 (*itRlcPdu).second.at (k).at (harqId).clear ();
793 std::vector <int> dciRbg;
796 for (
int j = 0; j < 32; j++)
800 dciRbg.push_back (j);
806 for (uint8_t j = 0; j < dciRbg.size (); j++)
808 if (rbgMap.at (dciRbg.at (j)) ==
true)
818 for (uint8_t j = 0; j < dciRbg.size (); j++)
820 rbgMap.at (dciRbg.at (j)) =
true;
821 NS_LOG_INFO (
"RBG " << dciRbg.at (j) <<
" assigned");
825 NS_LOG_INFO (
this <<
" Send retx in the same RBGs");
831 uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
832 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
833 std::vector <bool> rbgMapCopy = rbgMap;
834 while ((j < dciRbg.size ())&&(startRbg != rbgId))
836 if (rbgMapCopy.at (rbgId) ==
false)
838 rbgMapCopy.at (rbgId) =
true;
839 dciRbg.at (j) = rbgId;
844 if (j == dciRbg.size ())
847 uint32_t rbgMask = 0;
848 for (uint16_t k = 0; k < dciRbg.size (); k++)
850 rbgMask = rbgMask + (0x1 << dciRbg.at (k));
855 NS_LOG_INFO (
this <<
" Move retx in RBGs " << dciRbg.size ());
860 dlInfoListUntxed.push_back (params.
m_dlInfoList.at (i));
861 NS_LOG_INFO (
this <<
" No resource for this retx -> buffer it");
869 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
871 for (uint8_t j = 0; j < nLayers; j++)
875 if (j >= dci.
m_ndi.size ())
878 dci.
m_ndi.push_back (0);
879 dci.
m_rv.push_back (0);
880 dci.
m_mcs.push_back (0);
882 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no txed (MIMO transition)");
886 dci.
m_ndi.at (j) = 0;
888 (*itHarq).second.at (harqId).m_rv.at (j)++;
889 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" RV " << (uint16_t)dci.
m_rv.at (j));
895 dci.
m_ndi.at (j) = 0;
897 dci.
m_mcs.at (j) = 0;
899 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no retx");
902 for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
904 std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
905 for (uint8_t j = 0; j < nLayers; j++)
909 if (j < dci.
m_ndi.size ())
911 rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
916 if (rlcPduListPerLc.size () > 0)
923 (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
928 NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
930 (*itHarqTimer).second.at (harqId) = 0;
932 rntiAllocated.insert (rnti);
949 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
958 std::map <uint16_t, fdbetsFlowPerf_t>::iterator itFlow;
959 std::map <uint16_t, double> estAveThr;
960 std::map <uint16_t, double>::iterator itMax = estAveThr.end ();
961 std::map <uint16_t, double>::iterator it;
962 std::map <uint16_t, int> rbgPerRntiLog;
963 double metricMax = 0.0;
966 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*itFlow).first);
970 if (itRnti != rntiAllocated.end ())
972 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ tx" << (uint16_t)(*itFlow).first);
976 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ id" << (uint16_t)(*itFlow).first);
981 estAveThr.insert (std::pair <uint16_t, double> ((*itFlow).first, (*itFlow).second.lastAveragedThroughput));
984 if (estAveThr.size () != 0)
987 for (it = estAveThr.begin (); it != estAveThr.end (); it++)
989 double metric = 1 / (*it).second;
990 if (metric > metricMax)
995 rbgPerRntiLog.insert (std::pair<uint16_t, int> ((*it).first, 1));
1003 NS_LOG_INFO (
this <<
" ALLOCATION for RBG " << i <<
" of " << rbgNum);
1004 if (rbgMap.at (i) ==
false)
1007 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1008 std::vector <uint16_t> tempMap;
1009 itMap = allocationMap.find ((*itMax).first);
1010 if (itMap == allocationMap.end ())
1012 tempMap.push_back (i);
1013 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
1017 (*itMap).second.push_back (i);
1021 std::map <uint16_t,uint8_t>::iterator itCqi;
1023 std::map <uint16_t,uint8_t>::iterator itTxMode;
1027 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMax).first);
1030 std::vector <uint8_t> mcs;
1031 for (uint8_t j = 0; j < nLayer; j++)
1043 std::map <uint16_t,int>::iterator itRbgPerRntiLog;
1044 itRbgPerRntiLog = rbgPerRntiLog.find ((*itMax).first);
1045 std::map <uint16_t, fdbetsFlowPerf_t>::iterator itPastAveThr;
1047 uint32_t bytesTxed = 0;
1048 for (uint8_t j = 0; j < nLayer; j++)
1051 bytesTxed += tbSize;
1053 double expectedAveThr = ((1.0 - (1.0 /
m_timeWindow)) * (*itPastAveThr).second.lastAveragedThroughput) + ((1.0 /
m_timeWindow) * (double)(bytesTxed / 0.001));
1055 int rbgPerRnti = (*itRbgPerRntiLog).second;
1057 rbgPerRntiLog[(*itMax).first] = rbgPerRnti;
1058 estAveThr[(*itMax).first] = expectedAveThr;
1062 for (it = estAveThr.begin (); it != estAveThr.end (); it++)
1064 double metric = 1 / (*it).second;
1065 if (metric > metricMax)
1072 rbgMap.at (i) =
true;
1079 while ( i < rbgNum );
1084 std::map <uint16_t, fdbetsFlowPerf_t>::iterator itStats;
1087 (*itStats).second.lastTtiBytesTrasmitted = 0;
1092 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
1093 while (itMap != allocationMap.end ())
1097 newEl.
m_rnti = (*itMap).first;
1100 newDci.
m_rnti = (*itMap).first;
1105 uint16_t RgbPerRnti = (*itMap).second.size ();
1106 std::map <uint16_t,uint8_t>::iterator itCqi;
1108 std::map <uint16_t,uint8_t>::iterator itTxMode;
1112 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
1116 uint32_t bytesTxed = 0;
1117 for (uint8_t j = 0; j < nLayer; j++)
1121 newDci.
m_mcs.push_back (0);
1130 bytesTxed += tbSize;
1135 uint32_t rbgMask = 0;
1136 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1138 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
1139 NS_LOG_INFO (
this <<
" Allocated RBG " << (*itMap).second.at (k));
1144 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
1147 if (((*itBufReq).first.m_rnti == (*itMap).first)
1148 && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
1149 || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
1150 || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
1152 std::vector <struct RlcPduListElement_s> newRlcPduLe;
1153 for (uint8_t j = 0; j < nLayer; j++)
1159 newRlcPduLe.push_back (newRlcEl);
1167 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
1169 (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
1174 if ((*itBufReq).first.m_rnti > (*itMap).first)
1179 for (uint8_t j = 0; j < nLayer; j++)
1181 newDci.
m_ndi.push_back (1);
1182 newDci.
m_rv.push_back (0);
1185 newEl.
m_dci = newDci;
1209 std::map <uint16_t, fdbetsFlowPerf_t>::iterator it;
1213 (*it).second.lastTtiBytesTrasmitted = bytesTxed;
1214 NS_LOG_INFO (
this <<
" UE total bytes txed " << (*it).second.lastTtiBytesTrasmitted);
1232 (*itStats).second.totalBytesTransmitted += (*itStats).second.lastTtiBytesTrasmitted;
1234 (*itStats).second.lastAveragedThroughput = ((1.0 - (1.0 /
m_timeWindow)) * (*itStats).second.lastAveragedThroughput) + ((1.0 /
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTrasmitted / 0.001));
1235 NS_LOG_INFO (
this <<
" UE total bytes " << (*itStats).second.totalBytesTransmitted);
1236 NS_LOG_INFO (
this <<
" UE average throughput " << (*itStats).second.lastAveragedThroughput);
1237 (*itStats).second.lastTtiBytesTrasmitted = 0;
1261 for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
1266 std::map <uint16_t,uint8_t>::iterator it;
1267 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1272 m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) );
1279 (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
1281 std::map <uint16_t,uint32_t>::iterator itTimers;
1289 std::map <uint16_t,SbMeasResult_s>::iterator it;
1290 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1295 m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
1301 (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
1302 std::map <uint16_t,uint32_t>::iterator itTimers;
1320 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find (rnti);
1334 double sinr = (*itCqi).second.at (i);
1341 double estimatedSinr = sinrSum / (double)sinrNum;
1343 (*itCqi).second.at (rb) = estimatedSinr;
1344 return (estimatedSinr);
1357 std::vector <bool> rbMap;
1358 uint16_t rbAllocatedNum = 0;
1359 std::set <uint16_t> rntiAllocated;
1360 std::vector <uint16_t> rbgAllocationMap;
1371 if (rbgAllocationMap.at (i) != 0)
1373 rbMap.at (i) =
true;
1383 std::map <uint16_t, uint8_t>::iterator itProcId;
1386 (*itProcId).second = ((*itProcId).second + 1) %
HARQ_PROC_NUM;
1389 for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
1398 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1401 NS_LOG_INFO (
this <<
" UL-HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId <<
" i " << i <<
" size " << params.
m_ulInfoList.size ());
1405 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1412 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1414 if ((*itStat).second.at (harqId) >= 3)
1416 NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
1422 if (rbMap.at (j) ==
true)
1433 rbMap.at (j) =
true;
1434 rbgAllocationMap.at (j) = dci.
m_rnti;
1442 NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
1447 (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
1448 (*itStat).second.at (harqId) = 0;
1449 (*itHarq).second.at ((*itProcId).second) = dci;
1451 rntiAllocated.insert (dci.
m_rnti);
1460 std::map <uint16_t,uint32_t>::iterator it;
1465 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1467 if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
1490 int rbAllocated = 0;
1492 std::map <uint16_t, fdbetsFlowPerf_t>::iterator itStats;
1514 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1515 if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
1539 uldci.
m_rnti = (*it).first;
1541 bool allocated =
false;
1542 NS_LOG_INFO (
this <<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow);
1547 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1549 if (rbMap.at (j) ==
true)
1559 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1561 rbMap.at (j) =
true;
1563 rbgAllocationMap.at (j) = (*it).first;
1565 rbAllocated += rbPerFlow;
1596 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find ((*it).first);
1606 double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
1613 double sinr = (*itCqi).second.at (i);
1618 if ((*itCqi).second.at (i) < minSinr)
1620 minSinr = (*itCqi).second.at (i);
1625 double s = log2 ( 1 + (
1626 pow (10, minSinr / 10 ) /
1627 ( (-log (5.0 * 0.00005 )) / 1.5) ));
1661 std::map <uint16_t, uint8_t>::iterator itProcId;
1667 harqId = (*itProcId).second;
1673 (*itDci).second.at (harqId) = uldci;
1676 NS_LOG_INFO (
this <<
" UE Allocation RNTI " << (*it).first <<
" startPRB " << (uint32_t)uldci.
m_rbStart <<
" nPRB " << (uint32_t)uldci.
m_rbLen <<
" CQI " << cqi <<
" MCS " << (uint32_t)uldci.
m_mcs <<
" TBsize " << uldci.
m_tbSize <<
" RbAlloc " << rbAllocated <<
" harqId " << (uint16_t)harqId);
1682 (*itStats).second.lastTtiBytesTrasmitted = uldci.
m_tbSize;
1686 NS_LOG_DEBUG (
this <<
" No Stats for this allocated UE");
1710 (*itStats).second.totalBytesTransmitted += (*itStats).second.lastTtiBytesTrasmitted;
1712 (*itStats).second.lastAveragedThroughput = ((1.0 - (1.0 /
m_timeWindow)) * (*itStats).second.lastAveragedThroughput) + ((1.0 /
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTrasmitted / 0.001));
1713 NS_LOG_INFO (
this <<
" UE total bytes " << (*itStats).second.totalBytesTransmitted);
1714 NS_LOG_INFO (
this <<
" UE average throughput " << (*itStats).second.lastAveragedThroughput);
1715 (*itStats).second.lastTtiBytesTrasmitted = 0;
1742 std::map <uint16_t,uint32_t>::iterator it;
1744 for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
1755 uint32_t buffer = 0;
1756 for (uint8_t lcg = 0; lcg < 4; ++lcg)
1758 uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
1763 NS_LOG_LOGIC (
this <<
"RNTI=" << rnti <<
" buffer=" << buffer);
1768 m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
1773 (*it).second = buffer;
1816 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1817 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1818 NS_LOG_DEBUG (
this <<
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) <<
" subframe no. " << (0xF & params.
m_sfnSf));
1824 for (uint32_t i = 0; i < (*itMap).second.size (); i++)
1828 itCqi =
m_ueCqi.find ((*itMap).second.at (i));
1832 std::vector <double> newCqi;
1837 newCqi.push_back (sinr);
1846 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
1853 (*itCqi).second.at (i) = sinr;
1854 NS_LOG_DEBUG (
this <<
" RNTI " << (*itMap).second.at (i) <<
" RB " << i <<
" SINR " << sinr);
1856 std::map <uint16_t, uint32_t>::iterator itTimers;
1877 rnti = vsp->GetRnti ();
1880 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1885 std::vector <double> newCqi;
1889 newCqi.push_back (sinr);
1890 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" new SRS-CQI for RB " << j <<
" value " << sinr);
1893 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
1903 (*itCqi).second.at (j) = sinr;
1904 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" update SRS-CQI for RB " << j <<
" value " << sinr);
1907 std::map <uint16_t, uint32_t>::iterator itTimers;
1920 NS_FATAL_ERROR (
"FdBetFfMacScheduler supports only PUSCH and SRS UL-CQIs");
1933 std::map <uint16_t,uint32_t>::iterator itP10 =
m_p10CqiTimers.begin ();
1937 if ((*itP10).second == 0)
1940 std::map <uint16_t,uint8_t>::iterator itMap =
m_p10CqiRxed.find ((*itP10).first);
1942 NS_LOG_INFO (
this <<
" P10-CQI expired for user " << (*itP10).first);
1944 std::map <uint16_t,uint32_t>::iterator temp = itP10;
1956 std::map <uint16_t,uint32_t>::iterator itA30 =
m_a30CqiTimers.begin ();
1960 if ((*itA30).second == 0)
1963 std::map <uint16_t,SbMeasResult_s>::iterator itMap =
m_a30CqiRxed.find ((*itA30).first);
1965 NS_LOG_INFO (
this <<
" A30-CQI expired for user " << (*itA30).first);
1967 std::map <uint16_t,uint32_t>::iterator temp = itA30;
1986 std::map <uint16_t,uint32_t>::iterator itUl =
m_ueCqiTimers.begin ();
1990 if ((*itUl).second == 0)
1993 std::map <uint16_t, std::vector <double> >::iterator itMap =
m_ueCqi.find ((*itUl).first);
1994 NS_ASSERT_MSG (itMap !=
m_ueCqi.end (),
" Does not find CQI report for user " << (*itUl).first);
1995 NS_LOG_INFO (
this <<
" UL-CQI exired for user " << (*itUl).first);
1996 (*itMap).second.clear ();
1998 std::map <uint16_t,uint32_t>::iterator temp = itUl;
2015 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
2020 NS_LOG_INFO (
this <<
" UE " << rnti <<
" LC " << (uint16_t)lcid <<
" txqueue " << (*it).second.m_rlcTransmissionQueueSize <<
" retxqueue " << (*it).second.m_rlcRetransmissionQueueSize <<
" status " << (*it).second.m_rlcStatusPduSize <<
" decrease " << size);
2023 if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
2025 (*it).second.m_rlcStatusPduSize = 0;
2027 else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
2029 (*it).second.m_rlcRetransmissionQueueSize = 0;
2031 else if ((*it).second.m_rlcTransmissionQueueSize > 0)
2034 if ((*it).second.m_rlcTransmissionQueueSize <= size)
2036 (*it).second.m_rlcTransmissionQueueSize = 0;
2041 (*it).second.m_rlcTransmissionQueueSize -= size;
2047 NS_LOG_ERROR (
this <<
" Does not find DL RLC Buffer Report of UE " << rnti);
2056 std::map <uint16_t,uint32_t>::iterator it =
m_ceBsrRxed.find (rnti);
2059 NS_LOG_INFO (
this <<
" UE " << rnti <<
" size " << size <<
" BSR " << (*it).second);
2060 if ((*it).second >= size)
2062 (*it).second -= size;
2071 NS_LOG_ERROR (
this <<
" Does not find BSR report info of UE " << rnti);
2079 NS_LOG_FUNCTION (
this <<
" RNTI " << rnti <<
" txMode " << (uint16_t)txMode);