23 #include <ns3/pointer.h>
26 #include <ns3/simulator.h>
27 #include <ns3/lte-amc.h>
28 #include <ns3/tdbet-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<TdBetFfMacScheduler> ()
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, tdbetsFlowPerf_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++)
959 std::map <uint16_t, tdbetsFlowPerf_t>::iterator it;
960 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itMax =
m_flowStatsDl.end ();
961 double metricMax = 0.0;
964 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
968 if (itRnti != rntiAllocated.end ())
970 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ tx" << (uint16_t)(*it).first);
974 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ id" << (uint16_t)(*it).first);
979 double metric = 1 / (*it).second.lastAveragedThroughput;
981 if (metric > metricMax)
997 std::vector <uint16_t> tempMap;
998 for (
int i = 0; i < rbgNum; i++)
1000 tempMap.push_back (i);
1002 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
1007 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats;
1010 (*itStats).second.lastTtiBytesTrasmitted = 0;
1015 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
1016 while (itMap != allocationMap.end ())
1020 newEl.
m_rnti = (*itMap).first;
1023 newDci.
m_rnti = (*itMap).first;
1028 uint16_t RgbPerRnti = (*itMap).second.size ();
1029 std::map <uint16_t,uint8_t>::iterator itCqi;
1031 std::map <uint16_t,uint8_t>::iterator itTxMode;
1035 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
1039 uint32_t bytesTxed = 0;
1040 for (uint8_t j = 0; j < nLayer; j++)
1044 newDci.
m_mcs.push_back (0);
1053 bytesTxed += tbSize;
1058 uint32_t rbgMask = 0;
1059 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1061 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
1062 NS_LOG_INFO (
this <<
" Allocated RBG " << (*itMap).second.at (k));
1067 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
1070 if (((*itBufReq).first.m_rnti == (*itMap).first)
1071 && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
1072 || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
1073 || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
1075 std::vector <struct RlcPduListElement_s> newRlcPduLe;
1076 for (uint8_t j = 0; j < nLayer; j++)
1082 newRlcPduLe.push_back (newRlcEl);
1090 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
1092 (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
1097 if ((*itBufReq).first.m_rnti > (*itMap).first)
1102 for (uint8_t j = 0; j < nLayer; j++)
1104 newDci.
m_ndi.push_back (1);
1105 newDci.
m_rv.push_back (0);
1108 newEl.
m_dci = newDci;
1132 std::map <uint16_t, tdbetsFlowPerf_t>::iterator it;
1136 (*it).second.lastTtiBytesTrasmitted = bytesTxed;
1137 NS_LOG_INFO (
this <<
" UE total bytes txed " << (*it).second.lastTtiBytesTrasmitted);
1155 (*itStats).second.totalBytesTransmitted += (*itStats).second.lastTtiBytesTrasmitted;
1157 (*itStats).second.lastAveragedThroughput = ((1.0 - (1.0 /
m_timeWindow)) * (*itStats).second.lastAveragedThroughput) + ((1.0 /
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTrasmitted / 0.001));
1158 NS_LOG_INFO (
this <<
" UE total bytes " << (*itStats).second.totalBytesTransmitted);
1159 NS_LOG_INFO (
this <<
" UE average throughput " << (*itStats).second.lastAveragedThroughput);
1160 (*itStats).second.lastTtiBytesTrasmitted = 0;
1184 for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
1189 std::map <uint16_t,uint8_t>::iterator it;
1190 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1195 m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) );
1202 (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
1204 std::map <uint16_t,uint32_t>::iterator itTimers;
1212 std::map <uint16_t,SbMeasResult_s>::iterator it;
1213 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1218 m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
1224 (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
1225 std::map <uint16_t,uint32_t>::iterator itTimers;
1243 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find (rnti);
1257 double sinr = (*itCqi).second.at (i);
1264 double estimatedSinr = sinrSum / (double)sinrNum;
1266 (*itCqi).second.at (rb) = estimatedSinr;
1267 return (estimatedSinr);
1280 std::vector <bool> rbMap;
1281 uint16_t rbAllocatedNum = 0;
1282 std::set <uint16_t> rntiAllocated;
1283 std::vector <uint16_t> rbgAllocationMap;
1294 if (rbgAllocationMap.at (i) != 0)
1296 rbMap.at (i) =
true;
1306 std::map <uint16_t, uint8_t>::iterator itProcId;
1309 (*itProcId).second = ((*itProcId).second + 1) %
HARQ_PROC_NUM;
1312 for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
1321 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1324 NS_LOG_INFO (
this <<
" UL-HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId <<
" i " << i <<
" size " << params.
m_ulInfoList.size ());
1328 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1335 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1337 if ((*itStat).second.at (harqId) >= 3)
1339 NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
1345 if (rbMap.at (j) ==
true)
1356 rbMap.at (j) =
true;
1357 rbgAllocationMap.at (j) = dci.
m_rnti;
1365 NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
1370 (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
1371 (*itStat).second.at (harqId) = 0;
1372 (*itHarq).second.at ((*itProcId).second) = dci;
1374 rntiAllocated.insert (dci.
m_rnti);
1383 std::map <uint16_t,uint32_t>::iterator it;
1388 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1390 if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
1413 int rbAllocated = 0;
1415 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats;
1437 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1438 if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
1462 uldci.
m_rnti = (*it).first;
1464 bool allocated =
false;
1465 NS_LOG_INFO (
this <<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow);
1470 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1472 if (rbMap.at (j) ==
true)
1482 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1484 rbMap.at (j) =
true;
1486 rbgAllocationMap.at (j) = (*it).first;
1488 rbAllocated += rbPerFlow;
1519 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find ((*it).first);
1529 double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
1536 double sinr = (*itCqi).second.at (i);
1541 if ((*itCqi).second.at (i) < minSinr)
1543 minSinr = (*itCqi).second.at (i);
1548 double s = log2 ( 1 + (
1549 pow (10, minSinr / 10 ) /
1550 ( (-log (5.0 * 0.00005 )) / 1.5) ));
1584 std::map <uint16_t, uint8_t>::iterator itProcId;
1590 harqId = (*itProcId).second;
1596 (*itDci).second.at (harqId) = uldci;
1599 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);
1605 (*itStats).second.lastTtiBytesTrasmitted = uldci.
m_tbSize;
1609 NS_LOG_DEBUG (
this <<
" No Stats for this allocated UE");
1633 (*itStats).second.totalBytesTransmitted += (*itStats).second.lastTtiBytesTrasmitted;
1635 (*itStats).second.lastAveragedThroughput = ((1.0 - (1.0 /
m_timeWindow)) * (*itStats).second.lastAveragedThroughput) + ((1.0 /
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTrasmitted / 0.001));
1636 NS_LOG_INFO (
this <<
" UE total bytes " << (*itStats).second.totalBytesTransmitted);
1637 NS_LOG_INFO (
this <<
" UE average throughput " << (*itStats).second.lastAveragedThroughput);
1638 (*itStats).second.lastTtiBytesTrasmitted = 0;
1665 std::map <uint16_t,uint32_t>::iterator it;
1667 for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
1678 uint32_t buffer = 0;
1679 for (uint8_t lcg = 0; lcg < 4; ++lcg)
1681 uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
1686 NS_LOG_LOGIC (
this <<
"RNTI=" << rnti <<
" buffer=" << buffer);
1691 m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
1696 (*it).second = buffer;
1739 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1740 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1741 NS_LOG_DEBUG (
this <<
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) <<
" subframe no. " << (0xF & params.
m_sfnSf));
1747 for (uint32_t i = 0; i < (*itMap).second.size (); i++)
1751 itCqi =
m_ueCqi.find ((*itMap).second.at (i));
1755 std::vector <double> newCqi;
1760 newCqi.push_back (sinr);
1769 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
1776 (*itCqi).second.at (i) = sinr;
1777 NS_LOG_DEBUG (
this <<
" RNTI " << (*itMap).second.at (i) <<
" RB " << i <<
" SINR " << sinr);
1779 std::map <uint16_t, uint32_t>::iterator itTimers;
1800 rnti = vsp->GetRnti ();
1803 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1808 std::vector <double> newCqi;
1812 newCqi.push_back (sinr);
1813 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" new SRS-CQI for RB " << j <<
" value " << sinr);
1816 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
1826 (*itCqi).second.at (j) = sinr;
1827 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" update SRS-CQI for RB " << j <<
" value " << sinr);
1830 std::map <uint16_t, uint32_t>::iterator itTimers;
1843 NS_FATAL_ERROR (
"TdBetFfMacScheduler supports only PUSCH and SRS UL-CQIs");
1856 std::map <uint16_t,uint32_t>::iterator itP10 =
m_p10CqiTimers.begin ();
1860 if ((*itP10).second == 0)
1863 std::map <uint16_t,uint8_t>::iterator itMap =
m_p10CqiRxed.find ((*itP10).first);
1865 NS_LOG_INFO (
this <<
" P10-CQI expired for user " << (*itP10).first);
1867 std::map <uint16_t,uint32_t>::iterator temp = itP10;
1879 std::map <uint16_t,uint32_t>::iterator itA30 =
m_a30CqiTimers.begin ();
1883 if ((*itA30).second == 0)
1886 std::map <uint16_t,SbMeasResult_s>::iterator itMap =
m_a30CqiRxed.find ((*itA30).first);
1888 NS_LOG_INFO (
this <<
" A30-CQI expired for user " << (*itA30).first);
1890 std::map <uint16_t,uint32_t>::iterator temp = itA30;
1909 std::map <uint16_t,uint32_t>::iterator itUl =
m_ueCqiTimers.begin ();
1913 if ((*itUl).second == 0)
1916 std::map <uint16_t, std::vector <double> >::iterator itMap =
m_ueCqi.find ((*itUl).first);
1917 NS_ASSERT_MSG (itMap !=
m_ueCqi.end (),
" Does not find CQI report for user " << (*itUl).first);
1918 NS_LOG_INFO (
this <<
" UL-CQI exired for user " << (*itUl).first);
1919 (*itMap).second.clear ();
1921 std::map <uint16_t,uint32_t>::iterator temp = itUl;
1938 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
1943 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);
1946 if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
1948 (*it).second.m_rlcStatusPduSize = 0;
1950 else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
1952 (*it).second.m_rlcRetransmissionQueueSize = 0;
1954 else if ((*it).second.m_rlcTransmissionQueueSize > 0)
1957 if ((*it).second.m_rlcTransmissionQueueSize <= size)
1959 (*it).second.m_rlcTransmissionQueueSize = 0;
1964 (*it).second.m_rlcTransmissionQueueSize -= size;
1970 NS_LOG_ERROR (
this <<
" Does not find DL RLC Buffer Report of UE " << rnti);
1979 std::map <uint16_t,uint32_t>::iterator it =
m_ceBsrRxed.find (rnti);
1982 NS_LOG_INFO (
this <<
" UE " << rnti <<
" size " << size <<
" BSR " << (*it).second);
1983 if ((*it).second >= size)
1985 (*it).second -= size;
1994 NS_LOG_ERROR (
this <<
" Does not find BSR report info of UE " << rnti);
2002 NS_LOG_FUNCTION (
this <<
" RNTI " << rnti <<
" txMode " << (uint16_t)txMode);