23 #include <ns3/pointer.h>
26 #include <ns3/simulator.h>
27 #include <ns3/lte-amc.h>
28 #include <ns3/fdmt-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),
220 m_amc = CreateObject <LteAmc> ();
250 .AddConstructor<FdMtFfMacScheduler> ()
251 .AddAttribute (
"CqiTimerThreshold",
252 "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
255 MakeUintegerChecker<uint32_t> ())
256 .AddAttribute (
"HarqEnabled",
257 "Activate/Deactivate the HARQ [by default is active].",
260 MakeBooleanChecker ())
261 .AddAttribute (
"UlGrantMcs",
262 "The MCS of the UL grant, must be [0..15] (default 0)",
265 MakeUintegerChecker<uint8_t> ())
320 dlHarqPrcStatus.resize (8,0);
323 dlHarqProcessesTimer.resize (8,0);
326 dlHarqdci.resize (8);
329 dlHarqRlcPdu.resize (2);
330 dlHarqRlcPdu.at (0).resize (8);
331 dlHarqRlcPdu.at (1).resize (8);
335 ulHarqPrcStatus.resize (8,0);
338 ulHarqdci.resize (8);
353 std::set <uint16_t>::iterator it;
378 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
379 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
414 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
415 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
418 if ((*it).first.m_rnti == params.
m_rnti)
444 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
452 m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params));
456 (*it).second = params;
481 for (
int i = 0; i < 4; i++)
496 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
500 if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0)
501 || ((*it).second.m_rlcRetransmissionQueueSize > 0)
502 || ((*it).second.m_rlcStatusPduSize > 0) ))
506 if ((*it).first.m_rnti > rnti)
529 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
531 uint8_t i = (*it).second;
536 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
537 if ((*itStat).second.at (i) == 0)
568 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
570 uint8_t i = (*it).second;
575 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
576 if ((*itStat).second.at (i) == 0)
579 (*itStat).second.at (i) = 1;
583 NS_FATAL_ERROR (
"No HARQ process available for RNTI " << rnti <<
" check before update with HarqProcessAvailability");
586 return ((*it).second);
595 std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
604 NS_LOG_DEBUG (
this <<
" Reset HARQ proc " << i <<
" for RNTI " << (*itTimers).first);
605 std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat =
m_dlHarqProcessesStatus.find ((*itTimers).first);
608 NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
610 (*itStat).second.at (i) = 0;
611 (*itTimers).second.at (i) = 0;
615 (*itTimers).second.at (i)++;
638 std::map <uint16_t, std::vector <uint16_t> > allocationMap;
639 std::vector <bool> rbgMap;
640 uint16_t rbgAllocatedNum = 0;
641 std::set <uint16_t> rntiAllocated;
647 uint16_t rbStart = 0;
648 std::vector <struct RachListElement_s>::iterator itRach;
653 newRar.
m_rnti = (*itRach).m_rnti;
657 newRar.m_grant.m_rnti = newRar.m_rnti;
660 uint16_t tbSizeBits = 0;
667 if (tbSizeBits < (*itRach).m_estimatedSize)
672 newRar.m_grant.m_rbStart = rbStart;
673 newRar.m_grant.m_rbLen = rbLen;
674 newRar.m_grant.m_tbSize = tbSizeBits / 8;
675 newRar.m_grant.m_hopping =
false;
676 newRar.m_grant.m_tpc = 0;
677 newRar.m_grant.m_cqiRequest =
false;
678 newRar.m_grant.m_ulDelay =
false;
679 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);
680 for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
684 rbStart = rbStart + rbLen;
698 NS_LOG_INFO (
this <<
" Received DL-HARQ feedback");
714 std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
718 if (itRnti != rntiAllocated.end ())
724 std::vector <bool> retx;
725 NS_LOG_INFO (
this <<
" Processing DLHARQ feedback");
729 retx.push_back (
false);
736 if (retx.at (0) || retx.at (1))
741 NS_LOG_INFO (
this <<
" HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId);
750 if (dci.
m_rv.size () == 1)
752 rv = dci.
m_rv.at (0);
756 rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
762 NS_LOG_INFO (
"Maximum number of retransmissions reached -> drop process");
768 (*it).second.at (harqId) = 0;
774 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
776 (*itRlcPdu).second.at (k).at (harqId).clear ();
782 std::vector <int> dciRbg;
785 for (
int j = 0; j < 32; j++)
789 dciRbg.push_back (j);
795 for (uint8_t j = 0; j < dciRbg.size (); j++)
797 if (rbgMap.at (dciRbg.at (j)) ==
true)
807 for (uint8_t j = 0; j < dciRbg.size (); j++)
809 rbgMap.at (dciRbg.at (j)) =
true;
810 NS_LOG_INFO (
"RBG " << dciRbg.at (j) <<
" assigned");
814 NS_LOG_INFO (
this <<
" Send retx in the same RBGs");
820 uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
821 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
822 std::vector <bool> rbgMapCopy = rbgMap;
823 while ((j < dciRbg.size ())&&(startRbg != rbgId))
825 if (rbgMapCopy.at (rbgId) ==
false)
827 rbgMapCopy.at (rbgId) =
true;
828 dciRbg.at (j) = rbgId;
833 if (j == dciRbg.size ())
836 uint32_t rbgMask = 0;
837 for (uint16_t k = 0; k < dciRbg.size (); k++)
839 rbgMask = rbgMask + (0x1 << dciRbg.at (k));
844 NS_LOG_INFO (
this <<
" Move retx in RBGs " << dciRbg.size ());
849 dlInfoListUntxed.push_back (params.
m_dlInfoList.at (i));
850 NS_LOG_INFO (
this <<
" No resource for this retx -> buffer it");
858 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
860 for (uint8_t j = 0; j < nLayers; j++)
864 if (j >= dci.
m_ndi.size ())
867 dci.
m_ndi.push_back (0);
868 dci.
m_rv.push_back (0);
869 dci.
m_mcs.push_back (0);
871 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no txed (MIMO transition)");
875 dci.
m_ndi.at (j) = 0;
877 (*itHarq).second.at (harqId).m_rv.at (j)++;
878 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" RV " << (uint16_t)dci.
m_rv.at (j));
884 dci.
m_ndi.at (j) = 0;
886 dci.
m_mcs.at (j) = 0;
888 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no retx");
891 for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
893 std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
894 for (uint8_t j = 0; j < nLayers; j++)
898 if (j < dci.
m_ndi.size ())
900 rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
905 if (rlcPduListPerLc.size () > 0)
912 (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
917 NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
919 (*itHarqTimer).second.at (harqId) = 0;
921 rntiAllocated.insert (rnti);
938 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
949 for (
int i = 0; i < rbgNum; i++)
951 NS_LOG_INFO (
this <<
" ALLOCATION for RBG " << i <<
" of " << rbgNum);
952 if (rbgMap.at (i) ==
false)
954 std::set <uint16_t>::iterator it;
956 double rcqiMax = 0.0;
959 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it));
963 if (itRnti != rntiAllocated.end ())
965 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ tx" << (uint16_t)(*it));
969 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ id" << (uint16_t)(*it));
974 std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
976 std::map <uint16_t,uint8_t>::iterator itTxMode;
983 std::vector <uint8_t> sbCqi;
986 for (uint8_t k = 0; k < nLayer; k++)
993 sbCqi = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi;
995 uint8_t cqi1 = sbCqi.at (0);
997 if (sbCqi.size () > 1)
1001 if ((cqi1 > 0)||(cqi2 > 0))
1006 double achievableRate = 0.0;
1008 for (uint8_t k = 0; k < nLayer; k++)
1010 if (sbCqi.size () > k)
1022 double rcqi = achievableRate;
1023 NS_LOG_INFO (
this <<
" RNTI " << (*it) <<
" MCS " << (uint32_t)mcs <<
" achievableRate " << achievableRate <<
" RCQI " << rcqi);
1042 rbgMap.at (i) =
true;
1043 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1044 itMap = allocationMap.find ((*itMax));
1045 if (itMap == allocationMap.end ())
1048 std::vector <uint16_t> tempMap;
1049 tempMap.push_back (i);
1050 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax), tempMap));
1054 (*itMap).second.push_back (i);
1056 NS_LOG_INFO (
this <<
" UE assigned " << (*itMax));
1063 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
1064 while (itMap != allocationMap.end ())
1068 newEl.
m_rnti = (*itMap).first;
1071 newDci.
m_rnti = (*itMap).first;
1076 uint16_t RgbPerRnti = (*itMap).second.size ();
1077 std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
1079 std::map <uint16_t,uint8_t>::iterator itTxMode;
1083 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
1086 std::vector <uint8_t> worstCqi (2, 15);
1089 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1091 if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
1093 NS_LOG_INFO (
this <<
" RBG " << (*itMap).second.at (k) <<
" CQI " << (uint16_t)((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (0)) );
1094 for (uint8_t j = 0; j < nLayer; j++)
1096 if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
1098 if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
1100 worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
1106 worstCqi.at (j) = 1;
1112 for (uint8_t j = 0; j < nLayer; j++)
1114 worstCqi.at (j) = 1;
1121 for (uint8_t j = 0; j < nLayer; j++)
1123 worstCqi.at (j) = 1;
1126 for (uint8_t j = 0; j < nLayer; j++)
1128 NS_LOG_INFO (
this <<
" Layer " << (uint16_t)j <<
" CQI selected " << (uint16_t)worstCqi.at (j));
1130 uint32_t bytesTxed = 0;
1131 for (uint8_t j = 0; j < nLayer; j++)
1137 bytesTxed += tbSize;
1142 uint32_t rbgMask = 0;
1143 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1145 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
1146 NS_LOG_INFO (
this <<
" Allocated RBG " << (*itMap).second.at (k));
1151 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
1154 if (((*itBufReq).first.m_rnti == (*itMap).first)
1155 && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
1156 || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
1157 || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
1159 std::vector <struct RlcPduListElement_s> newRlcPduLe;
1160 for (uint8_t j = 0; j < nLayer; j++)
1166 newRlcPduLe.push_back (newRlcEl);
1174 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
1176 (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
1181 if ((*itBufReq).first.m_rnti > (*itMap).first)
1186 for (uint8_t j = 0; j < nLayer; j++)
1188 newDci.
m_ndi.push_back (1);
1189 newDci.
m_rv.push_back (0);
1192 newEl.
m_dci = newDci;
1241 for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
1246 std::map <uint16_t,uint8_t>::iterator it;
1247 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1252 m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) );
1259 (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
1261 std::map <uint16_t,uint32_t>::iterator itTimers;
1269 std::map <uint16_t,SbMeasResult_s>::iterator it;
1270 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1275 m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
1281 (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
1282 std::map <uint16_t,uint32_t>::iterator itTimers;
1300 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find (rnti);
1314 double sinr = (*itCqi).second.at (i);
1321 double estimatedSinr = sinrSum / (double)sinrNum;
1323 (*itCqi).second.at (rb) = estimatedSinr;
1324 return (estimatedSinr);
1337 std::vector <bool> rbMap;
1338 uint16_t rbAllocatedNum = 0;
1339 std::set <uint16_t> rntiAllocated;
1340 std::vector <uint16_t> rbgAllocationMap;
1351 if (rbgAllocationMap.at (i) != 0)
1353 rbMap.at (i) =
true;
1363 std::map <uint16_t, uint8_t>::iterator itProcId;
1366 (*itProcId).second = ((*itProcId).second + 1) %
HARQ_PROC_NUM;
1369 for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
1378 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1381 NS_LOG_INFO (
this <<
" UL-HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId <<
" i " << i <<
" size " << params.
m_ulInfoList.size ());
1385 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1392 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1394 if ((*itStat).second.at (harqId) >= 3)
1396 NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
1402 if (rbMap.at (j) ==
true)
1413 rbMap.at (j) =
true;
1414 rbgAllocationMap.at (j) = dci.
m_rnti;
1422 NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
1427 (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
1428 (*itStat).second.at (harqId) = 0;
1429 (*itHarq).second.at ((*itProcId).second) = dci;
1431 rntiAllocated.insert (dci.
m_rnti);
1440 std::map <uint16_t,uint32_t>::iterator it;
1445 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1447 if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
1470 int rbAllocated = 0;
1493 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1494 if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
1518 uldci.
m_rnti = (*it).first;
1520 bool allocated =
false;
1521 NS_LOG_INFO (
this <<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow);
1526 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1528 if (rbMap.at (j) ==
true)
1538 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1540 rbMap.at (j) =
true;
1542 rbgAllocationMap.at (j) = (*it).first;
1544 rbAllocated += rbPerFlow;
1575 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find ((*it).first);
1585 double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
1592 double sinr = (*itCqi).second.at (i);
1597 if ((*itCqi).second.at (i) < minSinr)
1599 minSinr = (*itCqi).second.at (i);
1604 double s = log2 ( 1 + (
1605 pow (10, minSinr / 10 ) /
1606 ( (-log (5.0 * 0.00005 )) / 1.5) ));
1640 std::map <uint16_t, uint8_t>::iterator itProcId;
1646 harqId = (*itProcId).second;
1652 (*itDci).second.at (harqId) = uldci;
1655 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);
1699 std::map <uint16_t,uint32_t>::iterator it;
1701 for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
1712 uint32_t buffer = 0;
1713 for (uint8_t lcg = 0; lcg < 4; ++lcg)
1715 uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
1720 NS_LOG_LOGIC (
this <<
"RNTI=" << rnti <<
" buffer=" << buffer);
1725 m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
1730 (*it).second = buffer;
1773 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1774 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1775 NS_LOG_DEBUG (
this <<
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) <<
" subframe no. " << (0xF & params.
m_sfnSf));
1781 for (uint32_t i = 0; i < (*itMap).second.size (); i++)
1785 itCqi =
m_ueCqi.find ((*itMap).second.at (i));
1789 std::vector <double> newCqi;
1794 newCqi.push_back (sinr);
1803 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
1810 (*itCqi).second.at (i) = sinr;
1811 NS_LOG_DEBUG (
this <<
" RNTI " << (*itMap).second.at (i) <<
" RB " << i <<
" SINR " << sinr);
1813 std::map <uint16_t, uint32_t>::iterator itTimers;
1834 rnti = vsp->GetRnti ();
1837 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1842 std::vector <double> newCqi;
1846 newCqi.push_back (sinr);
1847 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" new SRS-CQI for RB " << j <<
" value " << sinr);
1850 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
1860 (*itCqi).second.at (j) = sinr;
1861 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" update SRS-CQI for RB " << j <<
" value " << sinr);
1864 std::map <uint16_t, uint32_t>::iterator itTimers;
1877 NS_FATAL_ERROR (
"FdMtFfMacScheduler supports only PUSCH and SRS UL-CQIs");
1890 std::map <uint16_t,uint32_t>::iterator itP10 =
m_p10CqiTimers.begin ();
1894 if ((*itP10).second == 0)
1897 std::map <uint16_t,uint8_t>::iterator itMap =
m_p10CqiRxed.find ((*itP10).first);
1899 NS_LOG_INFO (
this <<
" P10-CQI expired for user " << (*itP10).first);
1901 std::map <uint16_t,uint32_t>::iterator temp = itP10;
1913 std::map <uint16_t,uint32_t>::iterator itA30 =
m_a30CqiTimers.begin ();
1917 if ((*itA30).second == 0)
1920 std::map <uint16_t,SbMeasResult_s>::iterator itMap =
m_a30CqiRxed.find ((*itA30).first);
1922 NS_LOG_INFO (
this <<
" A30-CQI expired for user " << (*itA30).first);
1924 std::map <uint16_t,uint32_t>::iterator temp = itA30;
1943 std::map <uint16_t,uint32_t>::iterator itUl =
m_ueCqiTimers.begin ();
1947 if ((*itUl).second == 0)
1950 std::map <uint16_t, std::vector <double> >::iterator itMap =
m_ueCqi.find ((*itUl).first);
1951 NS_ASSERT_MSG (itMap !=
m_ueCqi.end (),
" Does not find CQI report for user " << (*itUl).first);
1952 NS_LOG_INFO (
this <<
" UL-CQI exired for user " << (*itUl).first);
1953 (*itMap).second.clear ();
1955 std::map <uint16_t,uint32_t>::iterator temp = itUl;
1972 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
1977 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);
1980 if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
1982 (*it).second.m_rlcStatusPduSize = 0;
1984 else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
1986 (*it).second.m_rlcRetransmissionQueueSize = 0;
1988 else if ((*it).second.m_rlcTransmissionQueueSize > 0)
1991 if ((*it).second.m_rlcTransmissionQueueSize <= size)
1993 (*it).second.m_rlcTransmissionQueueSize = 0;
1998 (*it).second.m_rlcTransmissionQueueSize -= size;
2004 NS_LOG_ERROR (
this <<
" Does not find DL RLC Buffer Report of UE " << rnti);
2013 std::map <uint16_t,uint32_t>::iterator it =
m_ceBsrRxed.find (rnti);
2016 NS_LOG_INFO (
this <<
" UE " << rnti <<
" size " << size <<
" BSR " << (*it).second);
2017 if ((*it).second >= size)
2019 (*it).second -= size;
2028 NS_LOG_ERROR (
this <<
" Does not find BSR report info of UE " << rnti);
2036 NS_LOG_FUNCTION (
this <<
" RNTI " << rnti <<
" txMode " << (uint16_t)txMode);