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")
 
  258     .AddAttribute (
"CqiTimerThreshold",
 
  259                    "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
 
  262                    MakeUintegerChecker<uint32_t> ())
 
  263     .AddAttribute (
"DebtLimit",
 
  264                    "Flow debt limit (default -625000 bytes)",
 
  267                    MakeIntegerChecker<int> ())
 
  268     .AddAttribute (
"CreditLimit",
 
  269                    "Flow credit limit (default 625000 bytes)",
 
  272                    MakeUintegerChecker<uint32_t> ())
 
  273     .AddAttribute (
"TokenPoolSize",
 
  274                    "The maximum value of flow token pool (default 1 bytes)",
 
  277                    MakeUintegerChecker<uint32_t> ())
 
  278     .AddAttribute (
"CreditableThreshold",
 
  279                    "Threshold of flow credit (default 0 bytes)",
 
  282                    MakeUintegerChecker<uint32_t> ())
 
  284     .AddAttribute (
"HarqEnabled",
 
  285                    "Activate/Deactivate the HARQ [by default is active].",
 
  289     .AddAttribute (
"UlGrantMcs",
 
  290                    "The MCS of the UL grant, must be [0..15] (default 0)",
 
  293                    MakeUintegerChecker<uint8_t> ())
 
  360       dlHarqPrcStatus.resize (8,0);
 
  363       dlHarqProcessesTimer.resize (8,0);
 
  366       dlHarqdci.resize (8);
 
  369       dlHarqRlcPdu.resize (2);
 
  370       dlHarqRlcPdu.at (0).resize (8);
 
  371       dlHarqRlcPdu.at (1).resize (8);
 
  375       ulHarqPrcStatus.resize (8,0);
 
  378       ulHarqdci.resize (8);
 
  393   std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator it;
 
  413           m_flowStatsDl.insert (std::pair<uint16_t, fdtbfqsFlowPerf_t> (params.
m_rnti, flowStatsDl));
 
  424           m_flowStatsUl.insert (std::pair<uint16_t, fdtbfqsFlowPerf_t> (params.
m_rnti, flowStatsUl));
 
  431           m_flowStatsDl[(*it).first].tokenGenerationRate =  mbrDlInBytes;
 
  432           m_flowStatsUl[(*it).first].tokenGenerationRate =  mbrUlInBytes;
 
  446       std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = 
m_rlcBufferReq.begin ();
 
  447       std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
 
  482   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = 
m_rlcBufferReq.begin ();
 
  483   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
 
  486       if ((*it).first.m_rnti == params.
m_rnti)
 
  512   std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
  520       m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params));
 
  524       (*it).second = params;
 
  549   for (
int i = 0; i < 4; i++)
 
  551       if (dlbandwidth < FdTbfqType0AllocationRbg[i])
 
  564   std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
  568       if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0)
 
  569                                            || ((*it).second.m_rlcRetransmissionQueueSize > 0)
 
  570                                            || ((*it).second.m_rlcStatusPduSize > 0) ))
 
  574       if ((*it).first.m_rnti > rnti)
 
  597       NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
 
  599   uint8_t i = (*it).second;
 
  604   while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
 
  605   if ((*itStat).second.at (i) == 0)
 
  636       NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
 
  638   uint8_t i = (*it).second;
 
  643   while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
 
  644   if ((*itStat).second.at (i) == 0)
 
  647       (*itStat).second.at (i) = 1;
 
  651       NS_FATAL_ERROR (
"No HARQ process available for RNTI " << rnti << 
" check before update with HarqProcessAvailability");
 
  654   return ((*it).second);
 
  663   std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
 
  672               NS_LOG_DEBUG (
this << 
" Reset HARQ proc " << i << 
" for RNTI " << (*itTimers).first);
 
  673               std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat = 
m_dlHarqProcessesStatus.find ((*itTimers).first);
 
  676                   NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
 
  678               (*itStat).second.at (i) = 0;
 
  679               (*itTimers).second.at (i) = 0;
 
  683               (*itTimers).second.at (i)++;
 
  706   std::map <uint16_t, std::vector <uint16_t> > allocationMap; 
 
  707   std::vector <bool> rbgMap;  
 
  708   uint16_t rbgAllocatedNum = 0;
 
  709   std::set <uint16_t> rntiAllocated;
 
  713   for (std::vector<bool>::iterator it = rbgMap.begin (); it != rbgMap.end (); it++)
 
  724   std::map <uint16_t, uint8_t>::iterator itProcId;
 
  727       (*itProcId).second = ((*itProcId).second + 1) % 
HARQ_PROC_NUM;
 
  731   uint16_t rbAllocatedNum = 0;
 
  732   std::vector <bool> ulRbMap;
 
  735   uint8_t maxContinuousUlBandwidth = 0;
 
  736   uint8_t tmpMinBandwidth = 0;
 
  737   uint16_t ffrRbStartOffset = 0;
 
  738   uint16_t tmpFfrRbStartOffset = 0;
 
  741   for (std::vector<bool>::iterator it = ulRbMap.begin (); it != ulRbMap.end (); it++)
 
  746           if (tmpMinBandwidth > maxContinuousUlBandwidth)
 
  748               maxContinuousUlBandwidth = tmpMinBandwidth;
 
  749               ffrRbStartOffset = tmpFfrRbStartOffset;
 
  755           if (tmpMinBandwidth == 0)
 
  757               tmpFfrRbStartOffset = index;
 
  764   if (tmpMinBandwidth > maxContinuousUlBandwidth)
 
  766       maxContinuousUlBandwidth = tmpMinBandwidth;
 
  767       ffrRbStartOffset = tmpFfrRbStartOffset;
 
  771   uint16_t rbStart = 0;
 
  772   rbStart = ffrRbStartOffset;
 
  773   std::vector <struct RachListElement_s>::iterator itRach;
 
  778       newRar.
m_rnti = (*itRach).m_rnti;
 
  782       newRar.m_grant.m_rnti = newRar.m_rnti;
 
  785       uint16_t tbSizeBits = 0;
 
  787       while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < (ffrRbStartOffset + maxContinuousUlBandwidth)))
 
  792       if (tbSizeBits < (*itRach).m_estimatedSize)
 
  797       newRar.m_grant.m_rbStart = rbStart;
 
  798       newRar.m_grant.m_rbLen = rbLen;
 
  799       newRar.m_grant.m_tbSize = tbSizeBits / 8;
 
  800       newRar.m_grant.m_hopping = 
false;
 
  801       newRar.m_grant.m_tpc = 0;
 
  802       newRar.m_grant.m_cqiRequest = 
false;
 
  803       newRar.m_grant.m_ulDelay = 
false;
 
  804       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);
 
  805       for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
 
  814           uldci.
m_rnti = newRar.m_rnti;
 
  833           std::map <uint16_t, uint8_t>::iterator itProcId;
 
  839           harqId = (*itProcId).second;
 
  845           (*itDci).second.at (harqId) = uldci;
 
  848       rbStart = rbStart + rbLen;
 
  861           NS_LOG_INFO (
this << 
" Received DL-HARQ feedback");
 
  877   std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
 
  881       if (itRnti != rntiAllocated.end ())
 
  887       std::vector <bool> retx;
 
  888       NS_LOG_INFO (
this << 
" Processing DLHARQ feedback");
 
  892           retx.push_back (
false);
 
  899       if (retx.at (0) || retx.at (1))
 
  904           NS_LOG_INFO (
this << 
" HARQ retx RNTI " << rnti << 
" harqId " << (uint16_t)harqId);
 
  913           if (dci.
m_rv.size () == 1)
 
  915               rv = dci.
m_rv.at (0);
 
  919               rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
 
  925               NS_LOG_INFO (
"Maximum number of retransmissions reached -> drop process");
 
  931               (*it).second.at (harqId) = 0;
 
  937               for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
 
  939                   (*itRlcPdu).second.at (k).at (harqId).clear ();
 
  945           std::vector <int> dciRbg;
 
  948           for (
int j = 0; j < 32; j++)
 
  952                   dciRbg.push_back (j);
 
  958           for (uint8_t j = 0; j < dciRbg.size (); j++)
 
  960               if (rbgMap.at (dciRbg.at (j)) == 
true)
 
  970               for (uint8_t j = 0; j < dciRbg.size (); j++)
 
  972                   rbgMap.at (dciRbg.at (j)) = 
true;
 
  973                   NS_LOG_INFO (
"RBG " << dciRbg.at (j) << 
" assigned");
 
  977               NS_LOG_INFO (
this << 
" Send retx in the same RBGs");
 
  983               uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
 
  984               uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
 
  985               std::vector <bool> rbgMapCopy = rbgMap;
 
  986               while ((j < dciRbg.size ())&&(startRbg != rbgId))
 
  988                   if (rbgMapCopy.at (rbgId) == 
false)
 
  990                       rbgMapCopy.at (rbgId) = 
true;
 
  991                       dciRbg.at (j) = rbgId;
 
  994                   rbgId = (rbgId + 1) % rbgNum;
 
  996               if (j == dciRbg.size ())
 
  999                   uint32_t rbgMask = 0;
 
 1000                   for (uint16_t k = 0; k < dciRbg.size (); k++)
 
 1002                       rbgMask = rbgMask + (0x1 << dciRbg.at (k));
 
 1006                   rbgMap = rbgMapCopy;
 
 1007                   NS_LOG_INFO (
this << 
" Move retx in RBGs " << dciRbg.size ());
 
 1013                   NS_LOG_INFO (
this << 
" No resource for this retx -> buffer it");
 
 1021               NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
 
 1023           for (uint8_t j = 0; j < nLayers; j++)
 
 1027                   if (j >= dci.
m_ndi.size ())
 
 1030                       dci.
m_ndi.push_back (0);
 
 1031                       dci.
m_rv.push_back (0);
 
 1032                       dci.
m_mcs.push_back (0);
 
 1034                       NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" no txed (MIMO transition)");
 
 1038                       dci.
m_ndi.at (j) = 0;
 
 1040                       (*itHarq).second.at (harqId).m_rv.at (j)++;
 
 1041                       NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" RV " << (uint16_t)dci.
m_rv.at (j));
 
 1047                   dci.
m_ndi.at (j) = 0;
 
 1048                   dci.
m_rv.at (j) = 0;
 
 1049                   dci.
m_mcs.at (j) = 0;
 
 1051                   NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" no retx");
 
 1054           for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
 
 1056               std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
 
 1057               for (uint8_t j = 0; j < nLayers; j++)
 
 1061                       if (j < dci.
m_ndi.size ())
 
 1063                           rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
 
 1068               if (rlcPduListPerLc.size () > 0)
 
 1075           (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
 
 1080               NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
 
 1082           (*itHarqTimer).second.at (harqId) = 0;
 
 1084           rntiAllocated.insert (rnti);
 
 1101           for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
 
 1110   if (rbgAllocatedNum == rbgNum)
 
 1121   std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats;
 
 1124       if ( (*itStats).second.tokenGenerationRate / 1000 +  (*itStats).second.tokenPoolSize > (*itStats).second.maxTokenPoolSize )     
 
 1126           (*itStats).second.counter +=  (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats).second.maxTokenPoolSize -  (*itStats).second.tokenPoolSize );
 
 1127           (*itStats).second.tokenPoolSize = (*itStats).second.maxTokenPoolSize;
 
 1128           bankSize += (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats).second.maxTokenPoolSize -  (*itStats).second.tokenPoolSize );
 
 1132           (*itStats).second.tokenPoolSize += (*itStats).second.tokenGenerationRate / 1000;
 
 1136   std::set <uint16_t> allocatedRnti;   
 
 1137   std::set <uint8_t> allocatedRbg;  
 
 1140   while (totalRbg < rbgNum)
 
 1143       std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator it;
 
 1144       std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itMax = 
m_flowStatsDl.end ();
 
 1145       double metricMax = 0.0;
 
 1146       bool firstRnti = 
true;
 
 1149           std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1153               if (itRnti != rntiAllocated.end ())
 
 1155                   NS_LOG_DEBUG (
this << 
" RNTI discared for HARQ tx" << (uint16_t)(*it).first);
 
 1159                   NS_LOG_DEBUG (
this << 
" RNTI discared for HARQ id" << (uint16_t)(*it).first);
 
 1169           std::set <uint16_t>::iterator rnti;
 
 1170           rnti = allocatedRnti.find((*it).first);
 
 1171           if (rnti != allocatedRnti.end ())  
 
 1176           double metric = ( ( (double)(*it).second.counter ) / ( (double)(*it).second.tokenGenerationRate ) );
 
 1178           if (firstRnti == 
true)
 
 1185          if (metric > metricMax)
 
 1199       allocatedRnti.insert((*itMax).first);
 
 1202       uint32_t budget = 0;
 
 1205             budget = (*itMax).second.counter - (*itMax).second.debtLimit;
 
 1206             if ( budget > (*itMax).second.burstCredit )
 
 1207               budget = (*itMax).second.burstCredit;
 
 1211       budget = budget + (*itMax).second.tokenPoolSize;
 
 1222             uint32_t rlcBufSize = 0;
 
 1224           std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itRlcBuf;
 
 1227               if ( (*itRlcBuf).first.m_rnti == (*itMax).first )
 
 1228                 lcid = (*itRlcBuf).first.m_lcId;
 
 1233               rlcBufSize = (*itRlcBuf).second.m_rlcTransmissionQueueSize + (*itRlcBuf).second.m_rlcRetransmissionQueueSize + (*itRlcBuf).second.m_rlcStatusPduSize;
 
 1234             if ( budget > rlcBufSize )
 
 1235               budget = rlcBufSize;
 
 1239       uint32_t bytesTxed = 0;
 
 1240       uint32_t bytesTxedTmp = 0;
 
 1242       while ( bytesTxed <= budget )
 
 1246           std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1248           std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1252               NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
 
 1257           double achievableRateMax = 0.0;
 
 1259             for (
int k = 0; k < rbgNum; k++)
 
 1261               std::set <uint8_t>::iterator rbg;
 
 1262               rbg = allocatedRbg.find (k);
 
 1263                 if (rbg != allocatedRbg.end ())  
 
 1266               if ( rbgMap.at (k) == 
true) 
 
 1272               std::vector <uint8_t> sbCqi;
 
 1275                   for (uint8_t k = 0; k < nLayer; k++)
 
 1277                       sbCqi.push_back (1);  
 
 1282                   sbCqi = (*itCqi).second.m_higherLayerSelected.at (k).m_sbCqi;
 
 1284               uint8_t cqi1 = sbCqi.at (0);
 
 1286               if (sbCqi.size () > 1)
 
 1288                   cqi2 = sbCqi.at (1);
 
 1291               if ((cqi1 > 0)||(cqi2 > 0)) 
 
 1296                   double achievableRate = 0.0;
 
 1297                       for (uint8_t j = 0; j < nLayer; j++) 
 
 1300                           if (sbCqi.size () > j)
 
 1302                               mcs = 
m_amc->GetMcsFromCqi (sbCqi.at (j));
 
 1309                           achievableRate += ((
m_amc->GetTbSizeFromMcs (mcs, rbgSize) / 8) / 0.001); 
 
 1312                   if ( achievableRate > achievableRateMax )
 
 1314                       achievableRateMax = achievableRate;
 
 1321           if ( rbgIndex == rbgNum)  
 
 1330               allocatedRbg.insert (rbgIndex);
 
 1334           std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
 
 1335           itMap = allocationMap.find ((*itMax).first);
 
 1336           uint16_t RbgPerRnti;
 
 1337           if (itMap == allocationMap.end ())
 
 1340               std::vector <uint16_t> tempMap;
 
 1341               tempMap.push_back (rbgIndex);
 
 1342               allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
 
 1343               itMap = allocationMap.find ((*itMax).first);  
 
 1347               (*itMap).second.push_back (rbgIndex);
 
 1349           rbgMap.at (rbgIndex) = 
true;  
 
 1351           RbgPerRnti = (*itMap).second.size();
 
 1354           std::vector <uint8_t> worstCqi (2, 15);
 
 1357               for (uint16_t k = 0; k < (*itMap).second.size (); k++)
 
 1359                   if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
 
 1361                       for (uint8_t j = 0; j < nLayer; j++) 
 
 1363                           if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
 
 1365                               if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
 
 1367                                   worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
 
 1373                               worstCqi.at (j) = 1;
 
 1379                       for (uint8_t j = 0; j < nLayer; j++)
 
 1381                           worstCqi.at (j) = 1; 
 
 1388               for (uint8_t j = 0; j < nLayer; j++)
 
 1390                   worstCqi.at (j) = 1; 
 
 1394           bytesTxedTmp = bytesTxed;
 
 1396           for (uint8_t j = 0; j < nLayer; j++)
 
 1398               int tbSize = (
m_amc->GetTbSizeFromMcs (
m_amc->GetMcsFromCqi (worstCqi.at (j)), RbgPerRnti * rbgSize) / 8); 
 
 1399               bytesTxed += tbSize;
 
 1405       if ( bytesTxed > budget )
 
 1407           std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
 
 1408           itMap = allocationMap.find ((*itMax).first);
 
 1409           (*itMap).second.pop_back ();
 
 1410           allocatedRbg.erase (rbgIndex);
 
 1411           bytesTxed = bytesTxedTmp;  
 
 1413           rbgMap.at (rbgIndex) = 
false;  
 
 1417       if ( bytesTxed <= (*itMax).second.tokenPoolSize )
 
 1419           (*itMax).second.tokenPoolSize -= bytesTxed;
 
 1423           (*itMax).second.counter = (*itMax).second.counter - ( bytesTxed -  (*itMax).second.tokenPoolSize );
 
 1424           (*itMax).second.tokenPoolSize = 0;
 
 1425           if (
bankSize <= ( bytesTxed -  (*itMax).second.tokenPoolSize ))
 
 1434   std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
 
 1435   while (itMap != allocationMap.end ())
 
 1439       newEl.
m_rnti = (*itMap).first;
 
 1442       newDci.
m_rnti = (*itMap).first;
 
 1450           lcActives = (uint16_t)65535; 
 
 1452       uint16_t RgbPerRnti = (*itMap).second.size ();
 
 1453       std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1455       std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1459           NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
 
 1462       std::vector <uint8_t> worstCqi (2, 15);
 
 1465           for (uint16_t k = 0; k < (*itMap).second.size (); k++)
 
 1467               if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
 
 1469                   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)) );
 
 1470                   for (uint8_t j = 0; j < nLayer; j++)
 
 1472                       if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
 
 1474                           if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
 
 1476                               worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
 
 1482                           worstCqi.at (j) = 1;
 
 1488                   for (uint8_t j = 0; j < nLayer; j++)
 
 1490                       worstCqi.at (j) = 1; 
 
 1497           for (uint8_t j = 0; j < nLayer; j++)
 
 1499               worstCqi.at (j) = 1; 
 
 1502       for (uint8_t j = 0; j < nLayer; j++)
 
 1504           NS_LOG_INFO (
this << 
" Layer " << (uint16_t)j << 
" CQI selected " << (uint16_t)worstCqi.at (j));
 
 1506       uint32_t bytesTxed = 0;
 
 1507       for (uint8_t j = 0; j < nLayer; j++)
 
 1509           newDci.
m_mcs.push_back (
m_amc->GetMcsFromCqi (worstCqi.at (j)));
 
 1510           int tbSize = (
m_amc->GetTbSizeFromMcs (newDci.
m_mcs.at (j), RgbPerRnti * rbgSize) / 8); 
 
 1512           NS_LOG_INFO (
this << 
" Layer " << (uint16_t)j << 
" MCS selected" << 
m_amc->GetMcsFromCqi (worstCqi.at (j)));
 
 1513           bytesTxed += tbSize;
 
 1518       uint32_t rbgMask = 0;
 
 1519       for (uint16_t k = 0; k < (*itMap).second.size (); k++)
 
 1521           rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
 
 1522           NS_LOG_INFO (
this << 
" Allocated RBG " << (*itMap).second.at (k));
 
 1527       std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
 
 1530           if (((*itBufReq).first.m_rnti == (*itMap).first)
 
 1531               && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
 
 1532                   || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
 
 1533                   || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
 
 1535               std::vector <struct RlcPduListElement_s> newRlcPduLe;
 
 1536               for (uint8_t j = 0; j < nLayer; j++)
 
 1542                   newRlcPduLe.push_back (newRlcEl);
 
 1550                           NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
 
 1552                       (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
 
 1557           if ((*itBufReq).first.m_rnti > (*itMap).first)
 
 1562       for (uint8_t j = 0; j < nLayer; j++)
 
 1564           newDci.
m_ndi.push_back (1);
 
 1565           newDci.
m_rv.push_back (0);
 
 1570       newEl.
m_dci = newDci;
 
 1620   for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
 
 1625           std::map <uint16_t,uint8_t>::iterator it;
 
 1626           uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
 
 1631               m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) ); 
 
 1638               (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
 
 1640               std::map <uint16_t,uint32_t>::iterator itTimers;
 
 1648           std::map <uint16_t,SbMeasResult_s>::iterator it;
 
 1649           uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
 
 1654               m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
 
 1660               (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
 
 1661               std::map <uint16_t,uint32_t>::iterator itTimers;
 
 1679   std::map <uint16_t, std::vector <double> >::iterator itCqi = 
m_ueCqi.find (rnti);
 
 1693           double sinr = (*itCqi).second.at (i);
 
 1700       double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
 
 1702       (*itCqi).second.at (rb) = estimatedSinr;
 
 1703       return (estimatedSinr);
 
 1717   std::vector <bool> rbMap;
 
 1718   uint16_t rbAllocatedNum = 0;
 
 1719   std::set <uint16_t> rntiAllocated;
 
 1720   std::vector <uint16_t> rbgAllocationMap;
 
 1731   for (std::vector<bool>::iterator it = rbMap.begin (); it != rbMap.end (); it++)
 
 1745       if (rbgAllocationMap.at (i) != 0)
 
 1747           rbMap.at (i) = 
true;
 
 1756       for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
 
 1765                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1768               NS_LOG_INFO (
this << 
" UL-HARQ retx RNTI " << rnti << 
" harqId " << (uint16_t)harqId << 
" i " << i << 
" size "  << params.
m_ulInfoList.size ());
 
 1772                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1779                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1781               if ((*itStat).second.at (harqId) >= 3)
 
 1783                   NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
 
 1789                   if (rbMap.at (j) == 
true)
 
 1800                       rbMap.at (j) = 
true;
 
 1801                       rbgAllocationMap.at (j) = dci.
m_rnti;
 
 1809                   NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
 
 1814               (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
 
 1815               (*itStat).second.at (harqId) = 0;
 
 1816               (*itHarq).second.at ((*itProcId).second) = dci;
 
 1818               rntiAllocated.insert (dci.
m_rnti);
 
 1827   std::map <uint16_t,uint32_t>::iterator it;
 
 1832       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1834       if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
 
 1853   uint16_t tempRbPerFlow = (ffrUlBandwidth) / (nflows + rntiAllocated.size ());
 
 1854   uint16_t rbPerFlow = (minContinuousUlBandwidth < tempRbPerFlow) ? minContinuousUlBandwidth : tempRbPerFlow;
 
 1860   int rbAllocated = 0;
 
 1862   std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats;
 
 1884       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1885       if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
 
 1888           NS_LOG_DEBUG (
this << 
" UE already allocated in HARQ -> discared, RNTI " << (*it).first);
 
 1911       uldci.
m_rnti = (*it).first;
 
 1913       bool allocated = 
false;
 
 1914       NS_LOG_INFO (
this << 
" RB Allocated " << rbAllocated << 
" rbPerFlow " << rbPerFlow << 
" flows " << nflows);
 
 1919           for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
 
 1921               if (rbMap.at (j) == 
true)
 
 1934               NS_LOG_INFO (
this << 
"RNTI: "<< (*it).first<< 
" RB Allocated " << rbAllocated << 
" rbPerFlow " << rbPerFlow << 
" flows " << nflows);
 
 1937               for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
 
 1939                   rbMap.at (j) = 
true;
 
 1941                   rbgAllocationMap.at (j) = (*it).first;
 
 1943               rbAllocated += rbPerFlow;
 
 1975       std::map <uint16_t, std::vector <double> >::iterator itCqi = 
m_ueCqi.find ((*it).first);
 
 1985           double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
 
 1992               double sinr = (*itCqi).second.at (i);
 
 1997               if ((*itCqi).second.at (i) < minSinr)
 
 1999                   minSinr = (*itCqi).second.at (i);
 
 2004           double s = log2 ( 1 + (
 
 2005                                  std::pow (10, minSinr / 10 )  /
 
 2006                                  ( (-std::log (5.0 * 0.00005 )) / 1.5) ));
 
 2007           cqi = 
m_amc->GetCqiFromSpectralEfficiency (s);
 
 2020                   rbgAllocationMap.at (i) = 0;
 
 2046           std::map <uint16_t, uint8_t>::iterator itProcId;
 
 2052           harqId = (*itProcId).second;
 
 2058           (*itDci).second.at (harqId) = uldci;
 
 2063               NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << uldci.
m_rnti);
 
 2065           (*itStat).second.at (harqId) = 0;
 
 2068       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);
 
 2111   std::map <uint16_t,uint32_t>::iterator it;
 
 2113   for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
 
 2124           uint32_t buffer = 0;
 
 2125           for (uint8_t lcg = 0; lcg < 4; ++lcg)
 
 2127               uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
 
 2132           NS_LOG_LOGIC (
this << 
"RNTI=" << rnti << 
" buffer=" << buffer);
 
 2137               m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
 
 2142               (*it).second = buffer;
 
 2185         std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
 
 2186         std::map <uint16_t, std::vector <double> >::iterator itCqi;
 
 2187         NS_LOG_DEBUG (
this << 
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) << 
" subframe no. " << (0xF & params.
m_sfnSf));
 
 2193         for (uint32_t i = 0; i < (*itMap).second.size (); i++)
 
 2197             itCqi = 
m_ueCqi.find ((*itMap).second.at (i));
 
 2201                 std::vector <double> newCqi;
 
 2206                         newCqi.push_back (sinr);
 
 2215                 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
 
 2222                 (*itCqi).second.at (i) = sinr;
 
 2223                 NS_LOG_DEBUG (
this << 
" RNTI " << (*itMap).second.at (i) << 
" RB " << i << 
" SINR " << sinr);
 
 2225                 std::map <uint16_t, uint32_t>::iterator itTimers;
 
 2246                 rnti = vsp->GetRnti ();
 
 2249         std::map <uint16_t, std::vector <double> >::iterator itCqi;
 
 2254             std::vector <double> newCqi;
 
 2258                 newCqi.push_back (sinr);
 
 2259                 NS_LOG_INFO (
this << 
" RNTI " << rnti << 
" new SRS-CQI for RB  " << j << 
" value " << sinr);
 
 2262             m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
 
 2272                 (*itCqi).second.at (j) = sinr;
 
 2273                 NS_LOG_INFO (
this << 
" RNTI " << rnti << 
" update SRS-CQI for RB  " << j << 
" value " << sinr);
 
 2276             std::map <uint16_t, uint32_t>::iterator itTimers;
 
 2289         NS_FATAL_ERROR (
"FdTbfqFfMacScheduler supports only PUSCH and SRS UL-CQIs");
 
 2302   std::map <uint16_t,uint32_t>::iterator itP10 = 
m_p10CqiTimers.begin ();
 
 2306       if ((*itP10).second == 0)
 
 2309           std::map <uint16_t,uint8_t>::iterator itMap = 
m_p10CqiRxed.find ((*itP10).first);
 
 2311           NS_LOG_INFO (
this << 
" P10-CQI expired for user " << (*itP10).first);
 
 2313           std::map <uint16_t,uint32_t>::iterator temp = itP10;
 
 2325   std::map <uint16_t,uint32_t>::iterator itA30 = 
m_a30CqiTimers.begin ();
 
 2329       if ((*itA30).second == 0)
 
 2332           std::map <uint16_t,SbMeasResult_s>::iterator itMap = 
m_a30CqiRxed.find ((*itA30).first);
 
 2334           NS_LOG_INFO (
this << 
" A30-CQI expired for user " << (*itA30).first);
 
 2336           std::map <uint16_t,uint32_t>::iterator temp = itA30;
 
 2355   std::map <uint16_t,uint32_t>::iterator itUl = 
m_ueCqiTimers.begin ();
 
 2359       if ((*itUl).second == 0)
 
 2362           std::map <uint16_t, std::vector <double> >::iterator itMap = 
m_ueCqi.find ((*itUl).first);
 
 2363           NS_ASSERT_MSG (itMap != 
m_ueCqi.end (), 
" Does not find CQI report for user " << (*itUl).first);
 
 2364           NS_LOG_INFO (
this << 
" UL-CQI exired for user " << (*itUl).first);
 
 2365           (*itMap).second.clear ();
 
 2367           std::map <uint16_t,uint32_t>::iterator temp = itUl;
 
 2384   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
 2389       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);
 
 2392       if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
 
 2394            (*it).second.m_rlcStatusPduSize = 0;
 
 2396       else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
 
 2398           (*it).second.m_rlcRetransmissionQueueSize = 0;
 
 2400       else if ((*it).second.m_rlcTransmissionQueueSize > 0)
 
 2402           uint32_t rlcOverhead;
 
 2417           if ((*it).second.m_rlcTransmissionQueueSize <= size - rlcOverhead)
 
 2419               (*it).second.m_rlcTransmissionQueueSize = 0;
 
 2423               (*it).second.m_rlcTransmissionQueueSize -= size - rlcOverhead;
 
 2429       NS_LOG_ERROR (
this << 
" Does not find DL RLC Buffer Report of UE " << rnti);
 
 2438   std::map <uint16_t,uint32_t>::iterator it = 
m_ceBsrRxed.find (rnti);
 
 2441       NS_LOG_INFO (
this << 
" UE " << rnti << 
" size " << size << 
" BSR " << (*it).second);
 
 2442       if ((*it).second >= size)
 
 2444           (*it).second -= size;
 
 2453       NS_LOG_ERROR (
this << 
" Does not find BSR report info of UE " << rnti);
 
 2461   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)
Report a fatal error with a message and terminate. 
 
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)
Set the parent TypeId. 
 
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.