23 #include <ns3/pointer.h>
26 #include <ns3/simulator.h>
27 #include <ns3/lte-amc.h>
28 #include <ns3/fdtbfq-ff-mac-scheduler.h>
29 #include <ns3/lte-vendor-specific-parameters.h>
30 #include <ns3/boolean.h>
31 #include <ns3/integer.h>
143 : m_scheduler (scheduler)
218 : m_cschedSapUser (0),
223 m_amc = CreateObject <LteAmc> ();
254 static TypeId tid =
TypeId (
"ns3::FdTbfqFfMacScheduler")
256 .AddConstructor<FdTbfqFfMacScheduler> ()
257 .AddAttribute (
"CqiTimerThreshold",
258 "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
261 MakeUintegerChecker<uint32_t> ())
262 .AddAttribute (
"DebtLimit",
263 "Flow debt limit (default -625000 bytes)",
266 MakeIntegerChecker<int> ())
267 .AddAttribute (
"CreditLimit",
268 "Flow credit limit (default 625000 bytes)",
271 MakeUintegerChecker<uint32_t> ())
272 .AddAttribute (
"TokenPoolSize",
273 "The maximum value of flow token pool (default 1 bytes)",
276 MakeUintegerChecker<uint32_t> ())
277 .AddAttribute (
"CreditableThreshold",
278 "Threshold of flow credit (default 0 bytes)",
281 MakeUintegerChecker<uint32_t> ())
283 .AddAttribute (
"HarqEnabled",
284 "Activate/Deactivate the HARQ [by default is active].",
288 .AddAttribute (
"UlGrantMcs",
289 "The MCS of the UL grant, must be [0..15] (default 0)",
292 MakeUintegerChecker<uint8_t> ())
359 dlHarqPrcStatus.resize (8,0);
362 dlHarqProcessesTimer.resize (8,0);
365 dlHarqdci.resize (8);
368 dlHarqRlcPdu.resize (2);
369 dlHarqRlcPdu.at (0).resize (8);
370 dlHarqRlcPdu.at (1).resize (8);
374 ulHarqPrcStatus.resize (8,0);
377 ulHarqdci.resize (8);
392 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator it;
412 m_flowStatsDl.insert (std::pair<uint16_t, fdtbfqsFlowPerf_t> (params.
m_rnti, flowStatsDl));
423 m_flowStatsUl.insert (std::pair<uint16_t, fdtbfqsFlowPerf_t> (params.
m_rnti, flowStatsUl));
430 m_flowStatsDl[(*it).first].tokenGenerationRate = mbrDlInBytes;
431 m_flowStatsUl[(*it).first].tokenGenerationRate = mbrUlInBytes;
445 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
446 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
481 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
482 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
485 if ((*it).first.m_rnti == params.
m_rnti)
511 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
519 m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params));
523 (*it).second = params;
548 for (
int i = 0; i < 4; i++)
550 if (dlbandwidth < FdTbfqType0AllocationRbg[i])
563 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
567 if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0)
568 || ((*it).second.m_rlcRetransmissionQueueSize > 0)
569 || ((*it).second.m_rlcStatusPduSize > 0) ))
573 if ((*it).first.m_rnti > rnti)
596 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
598 uint8_t i = (*it).second;
603 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
604 if ((*itStat).second.at (i) == 0)
635 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
637 uint8_t i = (*it).second;
642 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
643 if ((*itStat).second.at (i) == 0)
646 (*itStat).second.at (i) = 1;
650 NS_FATAL_ERROR (
"No HARQ process available for RNTI " << rnti <<
" check before update with HarqProcessAvailability");
653 return ((*it).second);
662 std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
671 NS_LOG_DEBUG (
this <<
" Reset HARQ proc " << i <<
" for RNTI " << (*itTimers).first);
672 std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat =
m_dlHarqProcessesStatus.find ((*itTimers).first);
675 NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
677 (*itStat).second.at (i) = 0;
678 (*itTimers).second.at (i) = 0;
682 (*itTimers).second.at (i)++;
705 std::map <uint16_t, std::vector <uint16_t> > allocationMap;
706 std::vector <bool> rbgMap;
707 uint16_t rbgAllocatedNum = 0;
708 std::set <uint16_t> rntiAllocated;
712 for (std::vector<bool>::iterator it = rbgMap.begin (); it != rbgMap.end (); it++)
723 std::map <uint16_t, uint8_t>::iterator itProcId;
726 (*itProcId).second = ((*itProcId).second + 1) %
HARQ_PROC_NUM;
730 uint16_t rbAllocatedNum = 0;
731 std::vector <bool> ulRbMap;
734 uint8_t maxContinuousUlBandwidth = 0;
735 uint8_t tmpMinBandwidth = 0;
736 uint16_t ffrRbStartOffset = 0;
737 uint16_t tmpFfrRbStartOffset = 0;
740 for (std::vector<bool>::iterator it = ulRbMap.begin (); it != ulRbMap.end (); it++)
745 if (tmpMinBandwidth > maxContinuousUlBandwidth)
747 maxContinuousUlBandwidth = tmpMinBandwidth;
748 ffrRbStartOffset = tmpFfrRbStartOffset;
754 if (tmpMinBandwidth == 0)
756 tmpFfrRbStartOffset = index;
763 if (tmpMinBandwidth > maxContinuousUlBandwidth)
765 maxContinuousUlBandwidth = tmpMinBandwidth;
766 ffrRbStartOffset = tmpFfrRbStartOffset;
770 uint16_t rbStart = 0;
771 rbStart = ffrRbStartOffset;
772 std::vector <struct RachListElement_s>::iterator itRach;
777 newRar.
m_rnti = (*itRach).m_rnti;
781 newRar.m_grant.m_rnti = newRar.m_rnti;
784 uint16_t tbSizeBits = 0;
786 while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < (ffrRbStartOffset + maxContinuousUlBandwidth)))
791 if (tbSizeBits < (*itRach).m_estimatedSize)
796 newRar.m_grant.m_rbStart = rbStart;
797 newRar.m_grant.m_rbLen = rbLen;
798 newRar.m_grant.m_tbSize = tbSizeBits / 8;
799 newRar.m_grant.m_hopping =
false;
800 newRar.m_grant.m_tpc = 0;
801 newRar.m_grant.m_cqiRequest =
false;
802 newRar.m_grant.m_ulDelay =
false;
803 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);
804 for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
813 uldci.
m_rnti = newRar.m_rnti;
832 std::map <uint16_t, uint8_t>::iterator itProcId;
838 harqId = (*itProcId).second;
844 (*itDci).second.at (harqId) = uldci;
847 rbStart = rbStart + rbLen;
860 NS_LOG_INFO (
this <<
" Received DL-HARQ feedback");
876 std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
880 if (itRnti != rntiAllocated.end ())
886 std::vector <bool> retx;
887 NS_LOG_INFO (
this <<
" Processing DLHARQ feedback");
891 retx.push_back (
false);
898 if (retx.at (0) || retx.at (1))
903 NS_LOG_INFO (
this <<
" HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId);
912 if (dci.
m_rv.size () == 1)
914 rv = dci.
m_rv.at (0);
918 rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
924 NS_LOG_INFO (
"Maximum number of retransmissions reached -> drop process");
930 (*it).second.at (harqId) = 0;
936 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
938 (*itRlcPdu).second.at (k).at (harqId).clear ();
944 std::vector <int> dciRbg;
947 for (
int j = 0; j < 32; j++)
951 dciRbg.push_back (j);
957 for (uint8_t j = 0; j < dciRbg.size (); j++)
959 if (rbgMap.at (dciRbg.at (j)) ==
true)
969 for (uint8_t j = 0; j < dciRbg.size (); j++)
971 rbgMap.at (dciRbg.at (j)) =
true;
972 NS_LOG_INFO (
"RBG " << dciRbg.at (j) <<
" assigned");
976 NS_LOG_INFO (
this <<
" Send retx in the same RBGs");
982 uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
983 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
984 std::vector <bool> rbgMapCopy = rbgMap;
985 while ((j < dciRbg.size ())&&(startRbg != rbgId))
987 if (rbgMapCopy.at (rbgId) ==
false)
989 rbgMapCopy.at (rbgId) =
true;
990 dciRbg.at (j) = rbgId;
993 rbgId = (rbgId + 1) % rbgNum;
995 if (j == dciRbg.size ())
998 uint32_t rbgMask = 0;
999 for (uint16_t k = 0; k < dciRbg.size (); k++)
1001 rbgMask = rbgMask + (0x1 << dciRbg.at (k));
1005 rbgMap = rbgMapCopy;
1006 NS_LOG_INFO (
this <<
" Move retx in RBGs " << dciRbg.size ());
1012 NS_LOG_INFO (
this <<
" No resource for this retx -> buffer it");
1020 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
1022 for (uint8_t j = 0; j < nLayers; j++)
1026 if (j >= dci.
m_ndi.size ())
1029 dci.
m_ndi.push_back (0);
1030 dci.
m_rv.push_back (0);
1031 dci.
m_mcs.push_back (0);
1033 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no txed (MIMO transition)");
1037 dci.
m_ndi.at (j) = 0;
1039 (*itHarq).second.at (harqId).m_rv.at (j)++;
1040 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" RV " << (uint16_t)dci.
m_rv.at (j));
1046 dci.
m_ndi.at (j) = 0;
1047 dci.
m_rv.at (j) = 0;
1048 dci.
m_mcs.at (j) = 0;
1050 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no retx");
1053 for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
1055 std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
1056 for (uint8_t j = 0; j < nLayers; j++)
1060 if (j < dci.
m_ndi.size ())
1062 rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
1067 if (rlcPduListPerLc.size () > 0)
1074 (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
1079 NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
1081 (*itHarqTimer).second.at (harqId) = 0;
1083 rntiAllocated.insert (rnti);
1100 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
1109 if (rbgAllocatedNum == rbgNum)
1120 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats;
1123 if ( (*itStats).second.tokenGenerationRate / 1000 + (*itStats).second.tokenPoolSize > (*itStats).second.maxTokenPoolSize )
1125 (*itStats).second.counter += (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats).second.maxTokenPoolSize - (*itStats).second.tokenPoolSize );
1126 (*itStats).second.tokenPoolSize = (*itStats).second.maxTokenPoolSize;
1127 bankSize += (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats).second.maxTokenPoolSize - (*itStats).second.tokenPoolSize );
1131 (*itStats).second.tokenPoolSize += (*itStats).second.tokenGenerationRate / 1000;
1135 std::set <uint16_t> allocatedRnti;
1136 std::set <uint8_t> allocatedRbg;
1139 while (totalRbg < rbgNum)
1142 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator it;
1143 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itMax =
m_flowStatsDl.end ();
1144 double metricMax = 0.0;
1145 bool firstRnti =
true;
1148 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1152 if (itRnti != rntiAllocated.end ())
1154 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ tx" << (uint16_t)(*it).first);
1158 NS_LOG_DEBUG (
this <<
" RNTI discared for HARQ id" << (uint16_t)(*it).first);
1168 std::set <uint16_t>::iterator rnti;
1169 rnti = allocatedRnti.find((*it).first);
1170 if (rnti != allocatedRnti.end ())
1175 double metric = ( ( (double)(*it).second.counter ) / ( (double)(*it).second.tokenGenerationRate ) );
1177 if (firstRnti ==
true)
1184 if (metric > metricMax)
1198 allocatedRnti.insert((*itMax).first);
1201 uint32_t budget = 0;
1204 budget = (*itMax).second.counter - (*itMax).second.debtLimit;
1205 if ( budget > (*itMax).second.burstCredit )
1206 budget = (*itMax).second.burstCredit;
1210 budget = budget + (*itMax).second.tokenPoolSize;
1221 uint32_t rlcBufSize = 0;
1223 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itRlcBuf;
1226 if ( (*itRlcBuf).first.m_rnti == (*itMax).first )
1227 lcid = (*itRlcBuf).first.m_lcId;
1232 rlcBufSize = (*itRlcBuf).second.m_rlcTransmissionQueueSize + (*itRlcBuf).second.m_rlcRetransmissionQueueSize + (*itRlcBuf).second.m_rlcStatusPduSize;
1233 if ( budget > rlcBufSize )
1234 budget = rlcBufSize;
1238 uint32_t bytesTxed = 0;
1239 uint32_t bytesTxedTmp = 0;
1241 while ( bytesTxed <= budget )
1245 std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
1247 std::map <uint16_t,uint8_t>::iterator itTxMode;
1251 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
1256 double achievableRateMax = 0.0;
1258 for (
int k = 0; k < rbgNum; k++)
1260 std::set <uint8_t>::iterator rbg;
1261 rbg = allocatedRbg.find (k);
1262 if (rbg != allocatedRbg.end ())
1265 if ( rbgMap.at (k) ==
true)
1271 std::vector <uint8_t> sbCqi;
1274 for (uint8_t k = 0; k < nLayer; k++)
1276 sbCqi.push_back (1);
1281 sbCqi = (*itCqi).second.m_higherLayerSelected.at (k).m_sbCqi;
1283 uint8_t cqi1 = sbCqi.at (0);
1285 if (sbCqi.size () > 1)
1287 cqi2 = sbCqi.at (1);
1290 if ((cqi1 > 0)||(cqi2 > 0))
1295 double achievableRate = 0.0;
1296 for (uint8_t j = 0; j < nLayer; j++)
1299 if (sbCqi.size () > j)
1301 mcs =
m_amc->GetMcsFromCqi (sbCqi.at (j));
1308 achievableRate += ((
m_amc->GetTbSizeFromMcs (mcs, rbgSize) / 8) / 0.001);
1311 if ( achievableRate > achievableRateMax )
1313 achievableRateMax = achievableRate;
1320 if ( rbgIndex == rbgNum)
1329 allocatedRbg.insert (rbgIndex);
1333 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1334 itMap = allocationMap.find ((*itMax).first);
1335 uint16_t RbgPerRnti;
1336 if (itMap == allocationMap.end ())
1339 std::vector <uint16_t> tempMap;
1340 tempMap.push_back (rbgIndex);
1341 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
1342 itMap = allocationMap.find ((*itMax).first);
1346 (*itMap).second.push_back (rbgIndex);
1348 rbgMap.at (rbgIndex) =
true;
1350 RbgPerRnti = (*itMap).second.size();
1353 std::vector <uint8_t> worstCqi (2, 15);
1356 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1358 if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
1360 for (uint8_t j = 0; j < nLayer; j++)
1362 if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
1364 if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
1366 worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
1372 worstCqi.at (j) = 1;
1378 for (uint8_t j = 0; j < nLayer; j++)
1380 worstCqi.at (j) = 1;
1387 for (uint8_t j = 0; j < nLayer; j++)
1389 worstCqi.at (j) = 1;
1393 bytesTxedTmp = bytesTxed;
1395 for (uint8_t j = 0; j < nLayer; j++)
1397 int tbSize = (
m_amc->GetTbSizeFromMcs (
m_amc->GetMcsFromCqi (worstCqi.at (j)), RbgPerRnti * rbgSize) / 8);
1398 bytesTxed += tbSize;
1404 if ( bytesTxed > budget )
1406 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1407 itMap = allocationMap.find ((*itMax).first);
1408 (*itMap).second.pop_back ();
1409 allocatedRbg.erase (rbgIndex);
1410 bytesTxed = bytesTxedTmp;
1412 rbgMap.at (rbgIndex) =
false;
1416 if ( bytesTxed <= (*itMax).second.tokenPoolSize )
1418 (*itMax).second.tokenPoolSize -= bytesTxed;
1422 (*itMax).second.counter = (*itMax).second.counter - ( bytesTxed - (*itMax).second.tokenPoolSize );
1423 (*itMax).second.tokenPoolSize = 0;
1424 if (
bankSize <= ( bytesTxed - (*itMax).second.tokenPoolSize ))
1433 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
1434 while (itMap != allocationMap.end ())
1438 newEl.
m_rnti = (*itMap).first;
1441 newDci.
m_rnti = (*itMap).first;
1449 lcActives = (uint16_t)65535;
1451 uint16_t RgbPerRnti = (*itMap).second.size ();
1452 std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
1454 std::map <uint16_t,uint8_t>::iterator itTxMode;
1458 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
1461 std::vector <uint8_t> worstCqi (2, 15);
1464 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1466 if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
1468 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)) );
1469 for (uint8_t j = 0; j < nLayer; j++)
1471 if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
1473 if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
1475 worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
1481 worstCqi.at (j) = 1;
1487 for (uint8_t j = 0; j < nLayer; j++)
1489 worstCqi.at (j) = 1;
1496 for (uint8_t j = 0; j < nLayer; j++)
1498 worstCqi.at (j) = 1;
1501 for (uint8_t j = 0; j < nLayer; j++)
1503 NS_LOG_INFO (
this <<
" Layer " << (uint16_t)j <<
" CQI selected " << (uint16_t)worstCqi.at (j));
1505 uint32_t bytesTxed = 0;
1506 for (uint8_t j = 0; j < nLayer; j++)
1508 newDci.
m_mcs.push_back (
m_amc->GetMcsFromCqi (worstCqi.at (j)));
1509 int tbSize = (
m_amc->GetTbSizeFromMcs (newDci.
m_mcs.at (j), RgbPerRnti * rbgSize) / 8);
1511 NS_LOG_INFO (
this <<
" Layer " << (uint16_t)j <<
" MCS selected" <<
m_amc->GetMcsFromCqi (worstCqi.at (j)));
1512 bytesTxed += tbSize;
1517 uint32_t rbgMask = 0;
1518 for (uint16_t k = 0; k < (*itMap).second.size (); k++)
1520 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
1521 NS_LOG_INFO (
this <<
" Allocated RBG " << (*itMap).second.at (k));
1526 std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
1529 if (((*itBufReq).first.m_rnti == (*itMap).first)
1530 && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
1531 || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
1532 || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
1534 std::vector <struct RlcPduListElement_s> newRlcPduLe;
1535 for (uint8_t j = 0; j < nLayer; j++)
1541 newRlcPduLe.push_back (newRlcEl);
1549 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
1551 (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
1556 if ((*itBufReq).first.m_rnti > (*itMap).first)
1561 for (uint8_t j = 0; j < nLayer; j++)
1563 newDci.
m_ndi.push_back (1);
1564 newDci.
m_rv.push_back (0);
1569 newEl.
m_dci = newDci;
1619 for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
1624 std::map <uint16_t,uint8_t>::iterator it;
1625 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1630 m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) );
1637 (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
1639 std::map <uint16_t,uint32_t>::iterator itTimers;
1647 std::map <uint16_t,SbMeasResult_s>::iterator it;
1648 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1653 m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
1659 (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
1660 std::map <uint16_t,uint32_t>::iterator itTimers;
1678 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find (rnti);
1692 double sinr = (*itCqi).second.at (i);
1699 double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
1701 (*itCqi).second.at (rb) = estimatedSinr;
1702 return (estimatedSinr);
1716 std::vector <bool> rbMap;
1717 uint16_t rbAllocatedNum = 0;
1718 std::set <uint16_t> rntiAllocated;
1719 std::vector <uint16_t> rbgAllocationMap;
1730 for (std::vector<bool>::iterator it = rbMap.begin (); it != rbMap.end (); it++)
1744 if (rbgAllocationMap.at (i) != 0)
1746 rbMap.at (i) =
true;
1755 for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
1764 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1767 NS_LOG_INFO (
this <<
" UL-HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId <<
" i " << i <<
" size " << params.
m_ulInfoList.size ());
1771 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1778 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1780 if ((*itStat).second.at (harqId) >= 3)
1782 NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
1788 if (rbMap.at (j) ==
true)
1799 rbMap.at (j) =
true;
1800 rbgAllocationMap.at (j) = dci.
m_rnti;
1808 NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
1813 (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
1814 (*itStat).second.at (harqId) = 0;
1815 (*itHarq).second.at ((*itProcId).second) = dci;
1817 rntiAllocated.insert (dci.
m_rnti);
1826 std::map <uint16_t,uint32_t>::iterator it;
1831 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1833 if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
1852 uint16_t tempRbPerFlow = (ffrUlBandwidth) / (nflows + rntiAllocated.size ());
1853 uint16_t rbPerFlow = (minContinuousUlBandwidth < tempRbPerFlow) ? minContinuousUlBandwidth : tempRbPerFlow;
1859 int rbAllocated = 0;
1861 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats;
1883 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1884 if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
1887 NS_LOG_DEBUG (
this <<
" UE already allocated in HARQ -> discared, RNTI " << (*it).first);
1910 uldci.
m_rnti = (*it).first;
1912 bool allocated =
false;
1913 NS_LOG_INFO (
this <<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow <<
" flows " << nflows);
1918 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1920 if (rbMap.at (j) ==
true)
1933 NS_LOG_INFO (
this <<
"RNTI: "<< (*it).first<<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow <<
" flows " << nflows);
1936 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1938 rbMap.at (j) =
true;
1940 rbgAllocationMap.at (j) = (*it).first;
1942 rbAllocated += rbPerFlow;
1974 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find ((*it).first);
1984 double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
1991 double sinr = (*itCqi).second.at (i);
1996 if ((*itCqi).second.at (i) < minSinr)
1998 minSinr = (*itCqi).second.at (i);
2003 double s = log2 ( 1 + (
2004 std::pow (10, minSinr / 10 ) /
2005 ( (-std::log (5.0 * 0.00005 )) / 1.5) ));
2006 cqi =
m_amc->GetCqiFromSpectralEfficiency (s);
2019 rbgAllocationMap.at (i) = 0;
2045 std::map <uint16_t, uint8_t>::iterator itProcId;
2051 harqId = (*itProcId).second;
2057 (*itDci).second.at (harqId) = uldci;
2062 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << uldci.
m_rnti);
2064 (*itStat).second.at (harqId) = 0;
2067 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);
2110 std::map <uint16_t,uint32_t>::iterator it;
2112 for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
2123 uint32_t buffer = 0;
2124 for (uint8_t lcg = 0; lcg < 4; ++lcg)
2126 uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
2131 NS_LOG_LOGIC (
this <<
"RNTI=" << rnti <<
" buffer=" << buffer);
2136 m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
2141 (*it).second = buffer;
2184 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
2185 std::map <uint16_t, std::vector <double> >::iterator itCqi;
2186 NS_LOG_DEBUG (
this <<
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) <<
" subframe no. " << (0xF & params.
m_sfnSf));
2192 for (uint32_t i = 0; i < (*itMap).second.size (); i++)
2196 itCqi =
m_ueCqi.find ((*itMap).second.at (i));
2200 std::vector <double> newCqi;
2205 newCqi.push_back (sinr);
2214 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
2221 (*itCqi).second.at (i) = sinr;
2222 NS_LOG_DEBUG (
this <<
" RNTI " << (*itMap).second.at (i) <<
" RB " << i <<
" SINR " << sinr);
2224 std::map <uint16_t, uint32_t>::iterator itTimers;
2245 rnti = vsp->GetRnti ();
2248 std::map <uint16_t, std::vector <double> >::iterator itCqi;
2253 std::vector <double> newCqi;
2257 newCqi.push_back (sinr);
2258 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" new SRS-CQI for RB " << j <<
" value " << sinr);
2261 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
2271 (*itCqi).second.at (j) = sinr;
2272 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" update SRS-CQI for RB " << j <<
" value " << sinr);
2275 std::map <uint16_t, uint32_t>::iterator itTimers;
2288 NS_FATAL_ERROR (
"FdTbfqFfMacScheduler supports only PUSCH and SRS UL-CQIs");
2301 std::map <uint16_t,uint32_t>::iterator itP10 =
m_p10CqiTimers.begin ();
2305 if ((*itP10).second == 0)
2308 std::map <uint16_t,uint8_t>::iterator itMap =
m_p10CqiRxed.find ((*itP10).first);
2310 NS_LOG_INFO (
this <<
" P10-CQI expired for user " << (*itP10).first);
2312 std::map <uint16_t,uint32_t>::iterator temp = itP10;
2324 std::map <uint16_t,uint32_t>::iterator itA30 =
m_a30CqiTimers.begin ();
2328 if ((*itA30).second == 0)
2331 std::map <uint16_t,SbMeasResult_s>::iterator itMap =
m_a30CqiRxed.find ((*itA30).first);
2333 NS_LOG_INFO (
this <<
" A30-CQI expired for user " << (*itA30).first);
2335 std::map <uint16_t,uint32_t>::iterator temp = itA30;
2354 std::map <uint16_t,uint32_t>::iterator itUl =
m_ueCqiTimers.begin ();
2358 if ((*itUl).second == 0)
2361 std::map <uint16_t, std::vector <double> >::iterator itMap =
m_ueCqi.find ((*itUl).first);
2362 NS_ASSERT_MSG (itMap !=
m_ueCqi.end (),
" Does not find CQI report for user " << (*itUl).first);
2363 NS_LOG_INFO (
this <<
" UL-CQI exired for user " << (*itUl).first);
2364 (*itMap).second.clear ();
2366 std::map <uint16_t,uint32_t>::iterator temp = itUl;
2383 std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
2388 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);
2391 if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
2393 (*it).second.m_rlcStatusPduSize = 0;
2395 else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
2397 (*it).second.m_rlcRetransmissionQueueSize = 0;
2399 else if ((*it).second.m_rlcTransmissionQueueSize > 0)
2401 uint32_t rlcOverhead;
2416 if ((*it).second.m_rlcTransmissionQueueSize <= size - rlcOverhead)
2418 (*it).second.m_rlcTransmissionQueueSize = 0;
2422 (*it).second.m_rlcTransmissionQueueSize -= size - rlcOverhead;
2428 NS_LOG_ERROR (
this <<
" Does not find DL RLC Buffer Report of UE " << rnti);
2437 std::map <uint16_t,uint32_t>::iterator it =
m_ceBsrRxed.find (rnti);
2440 NS_LOG_INFO (
this <<
" UE " << rnti <<
" size " << size <<
" BSR " << (*it).second);
2441 if ((*it).second >= size)
2443 (*it).second -= size;
2452 NS_LOG_ERROR (
this <<
" Does not find BSR report info of UE " << rnti);
2460 NS_LOG_FUNCTION (
this <<
" RNTI " << rnti <<
" txMode " << (uint16_t)txMode);
std::vector< struct UlInfoListElement_s > m_ulInfoList
See section 4.3.1 dlDciListElement.
std::map< uint16_t, uint32_t > m_a30CqiTimers
virtual void SetFfMacCschedSapUser(FfMacCschedSapUser *s)
set the user part of the FfMacCschedSap that this Scheduler will interact with.
void DoCschedCellConfigReq(const struct FfMacCschedSapProvider::CschedCellConfigReqParameters ¶ms)
uint32_t creditableThreshold
counter threshold that the flow cannot further borrow tokens from bank
Smart pointer class similar to boost::intrusive_ptr.
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::map< uint16_t, uint8_t > m_uesTxMode
std::map< uint16_t, std::vector< double > > m_ueCqi
AttributeValue implementation for Boolean.
std::map< LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters > m_rlcBufferReq
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)=0
ReportUlCqiInfo.
std::map< uint16_t, SbMeasResult_s > m_a30CqiRxed
Parameters of the CSCHED_UE_CONFIG_CNF primitive.
Parameters of the CSCHED_UE_RELEASE_REQ primitive.
void DoSchedUlNoiseInterferenceReq(const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters ¶ms)
void DoCschedLcConfigReq(const struct FfMacCschedSapProvider::CschedLcConfigReqParameters ¶ms)
virtual bool IsDlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in DL.
virtual bool IsUlRbgAvailableForUe(int i, uint16_t rnti)=0
Check if UE can be served on i-th RB in UL.
std::map< uint16_t, UlHarqProcessesDciBuffer_t > m_ulHarqProcessesDciBuffer
enum ns3::UlCqi_s::Type_e m_type
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void DoSchedUlSrInfoReq(const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters ¶ms)
std::vector< UlDciListElement_s > UlHarqProcessesDciBuffer_t
std::vector< struct LogicalChannelConfigListElement_s > m_logicalChannelConfigList
std::vector< uint16_t > m_sinr
void DoSchedDlPagingBufferReq(const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters ¶ms)
std::vector< uint8_t > DlHarqProcessesTimer_t
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Hold a signed integer type.
int debtLimit
the maximum number of tokens connection i can borrow from the bank each time
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
std::vector< uint8_t > m_mcs
void DoSchedDlCqiInfoReq(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
See section 4.3.2 ulDciListElement.
bool m_harqOn
m_harqOn when false inhibit te HARQ mechanisms (by default active)
uint32_t tokenPoolSize
token generation rate ( byte/s )
std::vector< struct UlDciListElement_s > m_dciList
virtual void SchedDlRachInfoReq(const struct SchedDlRachInfoReqParameters ¶ms)
virtual void CschedLcConfigReq(const struct CschedLcConfigReqParameters ¶ms)
virtual void SchedDlCqiInfoReq(const struct SchedDlCqiInfoReqParameters ¶ms)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_FATAL_ERROR(msg)
Fatal error handling.
See section 4.3.10 buildRARListElement.
virtual void SchedUlSrInfoReq(const struct SchedUlSrInfoReqParameters ¶ms)
Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
virtual void SchedUlNoiseInterferenceReq(const struct SchedUlNoiseInterferenceReqParameters ¶ms)
std::map< uint16_t, fdtbfqsFlowPerf_t > m_flowStatsUl
void DoSchedDlRachInfoReq(const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters ¶ms)
Parameters of the CSCHED_LC_RELEASE_REQ primitive.
virtual uint8_t GetTpc(uint16_t rnti)=0
GetTpc.
virtual void SetLteFfrSapProvider(LteFfrSapProvider *s)
Set the Provider part of the LteFfrSap that this Scheduler will interact with.
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
uint8_t m_transmissionMode
uint32_t m_cqiTimersThreshold
Parameters of the SCHED_DL_TRIGGER_REQ primitive.
uint8_t m_logicalChannelIdentity
virtual ~FdTbfqFfMacScheduler()
Destructor.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void CschedUeReleaseReq(const struct CschedUeReleaseReqParameters ¶ms)
int LcActivePerFlow(uint16_t rnti)
virtual void SchedUlTriggerReq(const struct SchedUlTriggerReqParameters ¶ms)
std::vector< RlcPduList_t > DlHarqRlcPduListBuffer_t
Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
virtual void CschedUeConfigUpdateInd(const struct CschedUeConfigUpdateIndParameters ¶ms)=0
virtual void SetFfMacSchedSapUser(FfMacSchedSapUser *s)
set the user part of the FfMacSchedSap that this Scheduler will interact with.
std::vector< struct RachListElement_s > m_rachList
std::vector< struct VendorSpecificListElement_s > m_vendorSpecificList
FfMacSchedSapUser * m_schedSapUser
virtual void SchedDlRlcBufferReq(const struct SchedDlRlcBufferReqParameters ¶ms)
std::map< uint16_t, std::vector< uint16_t > > m_allocationMaps
std::map< uint16_t, DlHarqProcessesDciBuffer_t > m_dlHarqProcessesDciBuffer
virtual void SchedDlTriggerReq(const struct SchedDlTriggerReqParameters ¶ms)
uint8_t HarqProcessAvailability(uint16_t rnti)
Return the availability of free process for the RNTI specified.
static TypeId GetTypeId(void)
friend class FdTbfqSchedulerMemberCschedSapProvider
std::map< uint16_t, DlHarqProcessesTimer_t > m_dlHarqProcessesTimer
uint64_t packetArrivalRate
void DoCschedLcReleaseReq(const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters ¶ms)
std::map< uint16_t, fdtbfqsFlowPerf_t > m_flowStatsDl
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
Parameters of the SCHED_UL_TRIGGER_REQ primitive.
Hold an unsigned integer type.
static uint8_t TxMode2LayerNum(uint8_t txMode)
std::vector< uint8_t > m_ndi
FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig
LteFfrSapProvider * m_ffrSapProvider
virtual FfMacCschedSapProvider * GetFfMacCschedSapProvider()
virtual void CschedUeConfigCnf(const struct CschedUeConfigCnfParameters ¶ms)=0
std::vector< uint16_t > m_rachAllocationMap
std::map< uint16_t, uint32_t > m_p10CqiTimers
std::vector< uint8_t > m_logicalChannelIdentity
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Parameters of the SCHED_UL_NOISE_INTERFERENCE_REQ primitive.
uint8_t m_logicalChannelIdentity
std::vector< struct CqiListElement_s > m_cqiList
std::vector< struct DlInfoListElement_s > m_dlInfoList
void DoSchedDlRlcBufferReq(const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters ¶ms)
std::map< uint16_t, uint32_t > m_ueCqiTimers
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)=0
ReportDlCqiInfo.
Implements the SCHED SAP and CSCHED SAP for a Frequency Domain Token Bank Fair Queue scheduler...
virtual void SchedDlConfigInd(const struct SchedDlConfigIndParameters ¶ms)=0
Parameters of the API primitives.
int8_t m_pdcchPowerOffset
std::vector< uint16_t > m_tbsSize
uint32_t m_creditableThreshold
See section 4.3.9 rlcPDU_ListElement.
void DoSchedUlMacCtrlInfoReq(const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters ¶ms)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
FdTbfqFfMacScheduler * m_scheduler
Ptr< const AttributeChecker > MakeBooleanChecker(void)
LteFfrSapUser * m_ffrSapUser
std::vector< DlDciListElement_s > DlHarqProcessesDciBuffer_t
FdTbfqFfMacScheduler * m_scheduler
Parameters of the CSCHED_LC_CONFIG_REQ primitive.
virtual void CschedCellConfigReq(const struct CschedCellConfigReqParameters ¶ms)
CSCHED_CELL_CONFIG_REQ.
virtual void CschedLcReleaseReq(const struct CschedLcReleaseReqParameters ¶ms)
std::vector< uint8_t > m_rv
FdTbfqFfMacScheduler()
Constructor.
void RefreshHarqProcesses()
Refresh HARQ processes according to the timers.
std::map< uint16_t, uint8_t > m_dlHarqCurrentProcessId
virtual std::vector< bool > GetAvailableUlRbg()=0
Get vector of available RB in UL for this Cell.
FfMacCschedSapProvider * m_cschedSapProvider
virtual uint8_t GetMinContinuousUlBandwidth()=0
GetMinContinuousUlBandwidth.
uint64_t tokenGenerationRate
packet arrival rate( byte/s)
virtual void SchedUlConfigInd(const struct SchedUlConfigIndParameters ¶ms)=0
static Time Now(void)
Return the current simulation virtual time.
double EstimateUlSinr(uint16_t rnti, uint16_t rb)
std::map< uint16_t, DlHarqRlcPduListBuffer_t > m_dlHarqProcessesRlcPduListBuffer
UlCqiFilter_t m_ulCqiFilter
int GetRbgSize(int dlbandwidth)
This abstract base class identifies the interface by means of which the helper object can plug on the...
virtual void SchedDlMacBufferReq(const struct SchedDlMacBufferReqParameters ¶ms)
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
uint8_t m_nrOfPdcchOfdmSymbols
Parameters of the SCHED_DL_CQI_INFO_REQ primitive.
std::vector< struct MacCeListElement_s > m_macCeList
Parameters of the API primitives.
uint32_t burstCredit
the number of token borrow or given to token bank
virtual LteFfrSapUser * GetLteFfrSapUser()
std::vector< struct RachListElement_s > m_rachList
static double fpS11dot3toDouble(uint16_t val)
int counter
maximum size of token pool (byte)
std::vector< uint8_t > UlHarqProcessesStatus_t
void DoSchedUlCqiInfoReq(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
std::vector< uint8_t > DlHarqProcessesStatus_t
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
virtual void DoDispose(void)
Destructor implementation.
static uint32_t BsrId2BufferSize(uint8_t val)
uint8_t m_transmissionMode
Template for the implementation of the LteFfrSapUser as a member of an owner class of type C to which...
void DoSchedDlTriggerReq(const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters ¶ms)
FfMacSchedSapProvider * m_schedSapProvider
void RefreshDlCqiMaps(void)
Parameters of the API primitives.
Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
std::map< uint16_t, UlHarqProcessesStatus_t > m_ulHarqProcessesStatus
virtual std::vector< bool > GetAvailableDlRbg()=0
Get vector of available RBG in DL for this Cell.
void DoSchedDlMacBufferReq(const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters ¶ms)
FfMacCschedSapUser * m_cschedSapUser
void DoSchedUlTriggerReq(const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters ¶ms)
std::vector< DlInfoListElement_s > m_dlInfoListBuffered
Parameters of the SCHED_UL_SR_INFO_REQ primitive.
FdTbfqSchedulerMemberSchedSapProvider()
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
Parameters of the SCHED_UL_CONFIG_IND primitive.
std::map< uint16_t, DlHarqProcessesStatus_t > m_dlHarqProcessesStatus
Parameters of the CSCHED_UE_CONFIG_REQ primitive.
std::map< uint16_t, uint8_t > m_ulHarqCurrentProcessId
virtual FfMacSchedSapProvider * GetFfMacSchedSapProvider()
uint32_t maxTokenPoolSize
current size of token pool (byte)
struct DlDciListElement_s m_dci
std::vector< struct BuildRarListElement_s > m_buildRarList
std::map< uint16_t, uint8_t > m_p10CqiRxed
void RefreshUlCqiMaps(void)
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void SchedUlCqiInfoReq(const struct SchedUlCqiInfoReqParameters ¶ms)
FdTbfqSchedulerMemberCschedSapProvider()
friend class FdTbfqSchedulerMemberSchedSapProvider
a unique identifier for an interface.
static const int FdTbfqType0AllocationRbg[4]
TypeId SetParent(TypeId tid)
void DoCschedUeReleaseReq(const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters ¶ms)
void UpdateUlRlcBufferInfo(uint16_t rnti, uint16_t size)
virtual void SchedUlMacCtrlInfoReq(const struct SchedUlMacCtrlInfoReqParameters ¶ms)
void DoCschedUeConfigReq(const struct FfMacCschedSapProvider::CschedUeConfigReqParameters ¶ms)
uint8_t UpdateHarqProcessId(uint16_t rnti)
Update and return a new process Id for the RNTI specified.
std::map< uint16_t, uint32_t > m_ceBsrRxed
virtual void SchedDlPagingBufferReq(const struct SchedDlPagingBufferReqParameters ¶ms)
void UpdateDlRlcBufferInfo(uint16_t rnti, uint8_t lcid, uint16_t size)
void TransmissionModeConfigurationUpdate(uint16_t rnti, uint8_t txMode)
std::vector< struct BuildDataListElement_s > m_buildDataList
virtual void CschedUeConfigReq(const struct CschedUeConfigReqParameters ¶ms)
uint8_t m_ueTxAntennaSelection
See section 4.3.8 builDataListElement.