23 #include <ns3/pointer.h> 
   26 #include <ns3/simulator.h> 
   27 #include <ns3/lte-amc.h> 
   28 #include <ns3/pss-ff-mac-scheduler.h> 
   29 #include <ns3/lte-vendor-specific-parameters.h> 
   30 #include <ns3/boolean.h> 
   33 #include <ns3/string.h> 
  145   : m_scheduler (scheduler)
 
  220   :   m_cschedSapUser (0),
 
  225   m_amc = CreateObject <LteAmc> ();
 
  260     .AddAttribute (
"CqiTimerThreshold",
 
  261                    "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
 
  264                    MakeUintegerChecker<uint32_t> ())
 
  265     .AddAttribute (
"PssFdSchedulerType",
 
  266                    "FD scheduler in PSS (default value is PFsch)",
 
  270     .AddAttribute (
"nMux",
 
  271                    "The number of UE selected by TD scheduler (default value is 0)",
 
  274                    MakeUintegerChecker<uint32_t> ())
 
  275     .AddAttribute (
"HarqEnabled",
 
  276                    "Activate/Deactivate the HARQ [by default is active].",
 
  280     .AddAttribute (
"UlGrantMcs",
 
  281                    "The MCS of the UL grant, must be [0..15] (default 0)",
 
  284                    MakeUintegerChecker<uint8_t> ())
 
  351       dlHarqPrcStatus.resize (8,0);
 
  354       dlHarqProcessesTimer.resize (8,0);
 
  357       dlHarqdci.resize (8);
 
  360       dlHarqRlcPdu.resize (2);
 
  361       dlHarqRlcPdu.at (0).resize (8);
 
  362       dlHarqRlcPdu.at (1).resize (8);
 
  366       ulHarqPrcStatus.resize (8,0);
 
  369       ulHarqdci.resize (8);
 
  384   std::map <uint16_t, pssFlowPerf_t>::iterator it;
 
  430       std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = 
m_rlcBufferReq.begin ();
 
  431       std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
 
  466   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = 
m_rlcBufferReq.begin ();
 
  467   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator temp;
 
  470       if ((*it).first.m_rnti == params.
m_rnti)
 
  496   std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
  504       m_rlcBufferReq.insert (std::pair <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters> (flow, params));
 
  508       (*it).second = params;
 
  533   for (
int i = 0; i < 4; i++)
 
  535       if (dlbandwidth < PssType0AllocationRbg[i])
 
  548   std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
  552       if (((*it).first.m_rnti == rnti) && (((*it).second.m_rlcTransmissionQueueSize > 0)
 
  553                                            || ((*it).second.m_rlcRetransmissionQueueSize > 0)
 
  554                                            || ((*it).second.m_rlcStatusPduSize > 0) ))
 
  558       if ((*it).first.m_rnti > rnti)
 
  581       NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
 
  583   uint8_t i = (*it).second;
 
  588   while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
 
  589   if ((*itStat).second.at (i) == 0)
 
  620       NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
 
  622   uint8_t i = (*it).second;
 
  627   while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
 
  628   if ((*itStat).second.at (i) == 0)
 
  631       (*itStat).second.at (i) = 1;
 
  635       NS_FATAL_ERROR (
"No HARQ process available for RNTI " << rnti << 
" check before update with HarqProcessAvailability");
 
  638   return ((*it).second);
 
  647   std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
 
  656               NS_LOG_DEBUG (
this << 
" Reset HARQ proc " << i << 
" for RNTI " << (*itTimers).first);
 
  657               std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat = 
m_dlHarqProcessesStatus.find ((*itTimers).first);
 
  660                   NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
 
  662               (*itStat).second.at (i) = 0;
 
  663               (*itTimers).second.at (i) = 0;
 
  667               (*itTimers).second.at (i)++;
 
  690   std::map <uint16_t, std::vector <uint16_t> > allocationMap; 
 
  691   std::vector <bool> rbgMap;  
 
  692   uint16_t rbgAllocatedNum = 0;
 
  693   std::set <uint16_t> rntiAllocated;
 
  697   for (std::vector<bool>::iterator it = rbgMap.begin (); it != rbgMap.end (); it++)
 
  708   std::map <uint16_t, uint8_t>::iterator itProcId;
 
  711       (*itProcId).second = ((*itProcId).second + 1) % 
HARQ_PROC_NUM;
 
  715   uint16_t rbAllocatedNum = 0;
 
  716   std::vector <bool> ulRbMap;
 
  719   uint8_t maxContinuousUlBandwidth = 0;
 
  720   uint8_t tmpMinBandwidth = 0;
 
  721   uint16_t ffrRbStartOffset = 0;
 
  722   uint16_t tmpFfrRbStartOffset = 0;
 
  725   for (std::vector<bool>::iterator it = ulRbMap.begin (); it != ulRbMap.end (); it++)
 
  730           if (tmpMinBandwidth > maxContinuousUlBandwidth)
 
  732               maxContinuousUlBandwidth = tmpMinBandwidth;
 
  733               ffrRbStartOffset = tmpFfrRbStartOffset;
 
  739           if (tmpMinBandwidth == 0)
 
  741               tmpFfrRbStartOffset = index;
 
  748   if (tmpMinBandwidth > maxContinuousUlBandwidth)
 
  750       maxContinuousUlBandwidth = tmpMinBandwidth;
 
  751       ffrRbStartOffset = tmpFfrRbStartOffset;
 
  755   uint16_t rbStart = 0;
 
  756   rbStart = ffrRbStartOffset;
 
  757   std::vector <struct RachListElement_s>::iterator itRach;
 
  762       newRar.
m_rnti = (*itRach).m_rnti;
 
  766       newRar.m_grant.m_rnti = newRar.m_rnti;
 
  769       uint16_t tbSizeBits = 0;
 
  771       while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < (ffrRbStartOffset + maxContinuousUlBandwidth)))
 
  776       if (tbSizeBits < (*itRach).m_estimatedSize)
 
  781       newRar.m_grant.m_rbStart = rbStart;
 
  782       newRar.m_grant.m_rbLen = rbLen;
 
  783       newRar.m_grant.m_tbSize = tbSizeBits / 8;
 
  784       newRar.m_grant.m_hopping = 
false;
 
  785       newRar.m_grant.m_tpc = 0;
 
  786       newRar.m_grant.m_cqiRequest = 
false;
 
  787       newRar.m_grant.m_ulDelay = 
false;
 
  788       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);
 
  789       for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
 
  798           uldci.
m_rnti = newRar.m_rnti;
 
  817           std::map <uint16_t, uint8_t>::iterator itProcId;
 
  823           harqId = (*itProcId).second;
 
  829           (*itDci).second.at (harqId) = uldci;
 
  832       rbStart = rbStart + rbLen;
 
  845           NS_LOG_INFO (
this << 
" Received DL-HARQ feedback");
 
  861   std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
 
  865       if (itRnti != rntiAllocated.end ())
 
  871       std::vector <bool> retx;
 
  872       NS_LOG_INFO (
this << 
" Processing DLHARQ feedback");
 
  876           retx.push_back (
false);
 
  883       if (retx.at (0) || retx.at (1))
 
  888           NS_LOG_INFO (
this << 
" HARQ retx RNTI " << rnti << 
" harqId " << (uint16_t)harqId);
 
  897           if (dci.
m_rv.size () == 1)
 
  899               rv = dci.
m_rv.at (0);
 
  903               rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
 
  909               NS_LOG_INFO (
"Maximum number of retransmissions reached -> drop process");
 
  915               (*it).second.at (harqId) = 0;
 
  921               for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
 
  923                   (*itRlcPdu).second.at (k).at (harqId).clear ();
 
  929           std::vector <int> dciRbg;
 
  932           for (
int j = 0; j < 32; j++)
 
  936                   dciRbg.push_back (j);
 
  942           for (uint8_t j = 0; j < dciRbg.size (); j++)
 
  944               if (rbgMap.at (dciRbg.at (j)) == 
true)
 
  954               for (uint8_t j = 0; j < dciRbg.size (); j++)
 
  956                   rbgMap.at (dciRbg.at (j)) = 
true;
 
  957                   NS_LOG_INFO (
"RBG " << dciRbg.at (j) << 
" assigned");
 
  961               NS_LOG_INFO (
this << 
" Send retx in the same RBGs");
 
  967               uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
 
  968               uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
 
  969               std::vector <bool> rbgMapCopy = rbgMap;
 
  970               while ((j < dciRbg.size ())&&(startRbg != rbgId))
 
  972                   if (rbgMapCopy.at (rbgId) == 
false)
 
  974                       rbgMapCopy.at (rbgId) = 
true;
 
  975                       dciRbg.at (j) = rbgId;
 
  978                   rbgId = (rbgId + 1) % rbgNum;
 
  980               if (j == dciRbg.size ())
 
  983                   uint32_t rbgMask = 0;
 
  984                   for (uint16_t k = 0; k < dciRbg.size (); k++)
 
  986                       rbgMask = rbgMask + (0x1 << dciRbg.at (k));
 
  991                   NS_LOG_INFO (
this << 
" Move retx in RBGs " << dciRbg.size ());
 
  997                   NS_LOG_INFO (
this << 
" No resource for this retx -> buffer it");
 
 1005               NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
 
 1007           for (uint8_t j = 0; j < nLayers; j++)
 
 1011                   if (j >= dci.
m_ndi.size ())
 
 1014                       dci.
m_ndi.push_back (0);
 
 1015                       dci.
m_rv.push_back (0);
 
 1016                       dci.
m_mcs.push_back (0);
 
 1018                       NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" no txed (MIMO transition)");
 
 1022                       dci.
m_ndi.at (j) = 0;
 
 1024                       (*itHarq).second.at (harqId).m_rv.at (j)++;
 
 1025                       NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" RV " << (uint16_t)dci.
m_rv.at (j));
 
 1031                   dci.
m_ndi.at (j) = 0;
 
 1032                   dci.
m_rv.at (j) = 0;
 
 1033                   dci.
m_mcs.at (j) = 0;
 
 1035                   NS_LOG_INFO (
this << 
" layer " << (uint16_t)j << 
" no retx");
 
 1038           for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
 
 1040               std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
 
 1041               for (uint8_t j = 0; j < nLayers; j++)
 
 1045                       if (j < dci.
m_ndi.size ())
 
 1047                           rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
 
 1052               if (rlcPduListPerLc.size () > 0)
 
 1059           (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
 
 1064               NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
 
 1066           (*itHarqTimer).second.at (harqId) = 0;
 
 1068           rntiAllocated.insert (rnti);
 
 1085           for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
 
 1094   if (rbgAllocatedNum == rbgNum)
 
 1105   std::map <uint16_t, pssFlowPerf_t>::iterator it;
 
 1106   std::map <uint16_t, pssFlowPerf_t> tdUeSet; 
 
 1109   std::map <uint16_t, pssFlowPerf_t> ueSet;
 
 1114           ueSet.insert(std::pair <uint16_t, pssFlowPerf_t> ((*it).first, (*it).second));
 
 1118   if (ueSet.size() != 0)
 
 1122       std::vector <std::pair<double, uint16_t> > ueSet1;
 
 1123       std::vector <std::pair<double,uint16_t> > ueSet2;
 
 1124       for (it = ueSet.begin (); it != ueSet.end (); it++)
 
 1126           std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1130               if (itRnti != rntiAllocated.end ())
 
 1132                 NS_LOG_DEBUG (
this << 
" RNTI discared for HARQ tx" << (uint16_t)(*it).first);
 
 1136                 NS_LOG_DEBUG (
this << 
" RNTI discared for HARQ id" << (uint16_t)(*it).first);
 
 1141           double metric = 0.0;
 
 1142           if ((*it).second.lastAveragedThroughput < (*it).second.targetThroughput )
 
 1145               metric = 1 / (*it).second.lastAveragedThroughput;
 
 1146               ueSet1.push_back(std::pair<double, uint16_t> (metric, (*it).first));
 
 1151               std::map <uint16_t,uint8_t>::iterator itCqi;
 
 1153               std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1157                   NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
 
 1167                   wbCqi = (*itCqi).second;
 
 1175                       double achievableRate = 0.0;
 
 1176                       for (uint8_t k = 0; k < nLayer; k++) 
 
 1179                           mcs = 
m_amc->GetMcsFromCqi (wbCqi);
 
 1180                           achievableRate += ((
m_amc->GetTbSizeFromMcs (mcs, rbgSize) / 8) / 0.001); 
 
 1183                       metric = achievableRate / (*it).second.lastAveragedThroughput;
 
 1187               ueSet2.push_back(std::pair<double, uint16_t> (metric, (*it).first));
 
 1192       if (ueSet1.size () != 0 || ueSet2.size () != 0)
 
 1195           std::sort (ueSet1.rbegin (), ueSet1.rend ());
 
 1196           std::sort (ueSet2.rbegin (), ueSet2.rend ());
 
 1205               if (ueSet1.size() + ueSet2.size() <=2 )
 
 1208                 nMux = (int)((ueSet1.size() + ueSet2.size()) / 2) ; 
 
 1212              std::vector <std::pair<double, uint16_t> >::iterator itSet;
 
 1213              for (itSet = ueSet1.begin (); itSet != ueSet1.end () && nMux != 0; itSet++)
 
 1215                  std::map <uint16_t, pssFlowPerf_t>::iterator itUe;
 
 1217                  tdUeSet.insert(std::pair<uint16_t, pssFlowPerf_t> ( (*itUe).first, (*itUe).second ) );
 
 1224              for (itSet = ueSet2.begin (); itSet != ueSet2.end () && nMux != 0; itSet++)
 
 1226                  std::map <uint16_t, pssFlowPerf_t>::iterator itUe;
 
 1228                  tdUeSet.insert(std::pair<uint16_t, pssFlowPerf_t> ( (*itUe).first, (*itUe).second ) );
 
 1241               std::map < uint16_t, uint8_t > sbCqiSum;
 
 1242               for (it = tdUeSet.begin (); it != tdUeSet.end (); it++)
 
 1245                   for (
int i = 0; i < rbgNum; i++)
 
 1247                       std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1249                       std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1253                           NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
 
 1256                       std::vector <uint8_t> sbCqis;
 
 1259                           for (uint8_t k = 0; k < nLayer; k++)
 
 1261                               sbCqis.push_back (1);  
 
 1266                           sbCqis = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi;
 
 1269                       uint8_t cqi1 = sbCqis.at (0);
 
 1271                       if (sbCqis.size () > 1)
 
 1273                           cqi2 = sbCqis.at (1);
 
 1277                       if ((cqi1 > 0)||(cqi2 > 0)) 
 
 1279                           for (uint8_t k = 0; k < nLayer; k++) 
 
 1281                               if (sbCqis.size () > k)
 
 1283                               sbCqi = sbCqis.at(k);
 
 1295                   sbCqiSum.insert (std::pair<uint16_t, uint8_t> ((*it).first, sum));
 
 1298               for (
int i = 0; i < rbgNum; i++)
 
 1300                   if (rbgMap.at (i) == 
true)
 
 1303                   std::map <uint16_t, pssFlowPerf_t>::iterator itMax = tdUeSet.end ();
 
 1304                   double metricMax = 0.0;
 
 1305                   for (it = tdUeSet.begin (); it != tdUeSet.end (); it++)
 
 1311                       double weight = (*it).second.targetThroughput / (*it).second.lastAveragedThroughput;
 
 1315                       std::map < uint16_t, uint8_t>::iterator itSbCqiSum;
 
 1316                       itSbCqiSum = sbCqiSum.find((*it).first);
 
 1318                       std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1320                       std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1324                           NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
 
 1327                       std::vector <uint8_t> sbCqis;
 
 1330                           for (uint8_t k = 0; k < nLayer; k++)
 
 1332                               sbCqis.push_back (1);  
 
 1337                           sbCqis = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi;
 
 1340                       uint8_t cqi1 = sbCqis.at( 0);
 
 1342                       if (sbCqis.size () > 1)
 
 1344                           cqi2 = sbCqis.at(1);
 
 1348                       double colMetric = 0.0;
 
 1349                       if ((cqi1 > 0)||(cqi2 > 0)) 
 
 1351                           for (uint8_t k = 0; k < nLayer; k++) 
 
 1353                               if (sbCqis.size () > k)
 
 1355                                   sbCqi = sbCqis.at(k);
 
 1362                               colMetric += (double)sbCqi / (
double)(*itSbCqiSum).second;
 
 1366                       double metric = 0.0;
 
 1368                         metric= weight * colMetric;
 
 1372                       if (metric > metricMax )
 
 1379                   if (itMax == tdUeSet.end ())
 
 1385                       allocationMap[(*itMax).first].push_back (i);
 
 1386                       rbgMap.at (i) = 
true;
 
 1396               for (
int i = 0; i < rbgNum; i++)
 
 1398                   if (rbgMap.at (i) == 
true)
 
 1401                   std::map <uint16_t, pssFlowPerf_t>::iterator itMax = tdUeSet.end ();
 
 1402                   double metricMax = 0.0;
 
 1403                   for (it = tdUeSet.begin (); it != tdUeSet.end (); it++)
 
 1408                       double weight = (*it).second.targetThroughput / (*it).second.lastAveragedThroughput;
 
 1412                       std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1414                       std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1418                           NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).first);
 
 1421                       std::vector <uint8_t> sbCqis;
 
 1424                           for (uint8_t k = 0; k < nLayer; k++)
 
 1426                               sbCqis.push_back (1);  
 
 1431                           sbCqis = (*itCqi).second.m_higherLayerSelected.at (i).m_sbCqi;
 
 1434                       uint8_t cqi1 = sbCqis.at(0);
 
 1436                       if (sbCqis.size () > 1)
 
 1438                           cqi2 = sbCqis.at(1);
 
 1441                       double schMetric = 0.0;
 
 1442                       if ((cqi1 > 0)||(cqi2 > 0)) 
 
 1444                           double achievableRate = 0.0;
 
 1445                           for (uint8_t k = 0; k < nLayer; k++) 
 
 1448                               if (sbCqis.size () > k)
 
 1450                                   mcs = 
m_amc->GetMcsFromCqi (sbCqis.at (k));
 
 1457                               achievableRate += ((
m_amc->GetTbSizeFromMcs (mcs, rbgSize) / 8) / 0.001); 
 
 1459                           schMetric = achievableRate / (*it).second.secondLastAveragedThroughput;
 
 1462                       double metric = 0.0;
 
 1463                       metric= weight * schMetric;
 
 1465                       if (metric > metricMax )
 
 1472                   if (itMax == tdUeSet.end ())
 
 1478                       allocationMap[(*itMax).first].push_back (i);
 
 1479                       rbgMap.at (i) = 
true;
 
 1493   std::map <uint16_t, pssFlowPerf_t>::iterator itStats;
 
 1496       (*itStats).second.lastTtiBytesTransmitted = 0;
 
 1501   std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.begin ();
 
 1502   while (itMap != allocationMap.end ())
 
 1506       newEl.
m_rnti = (*itMap).first;
 
 1509       newDci.
m_rnti = (*itMap).first;
 
 1517           lcActives = (uint16_t)65535; 
 
 1519       uint16_t RgbPerRnti = (*itMap).second.size ();
 
 1520       std::map <uint16_t,SbMeasResult_s>::iterator itCqi;
 
 1522       std::map <uint16_t,uint8_t>::iterator itTxMode;
 
 1526           NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*itMap).first);
 
 1529       std::vector <uint8_t> worstCqi (2, 15);
 
 1532           for (uint16_t k = 0; k < (*itMap).second.size (); k++)
 
 1534               if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).second.at (k))
 
 1536                   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)) );
 
 1537                   for (uint8_t j = 0; j < nLayer; j++)
 
 1539                       if ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.size () > j)
 
 1541                           if (((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j)) < worstCqi.at (j))
 
 1543                               worstCqi.at (j) = ((*itCqi).second.m_higherLayerSelected.at ((*itMap).second.at (k)).m_sbCqi.at (j));
 
 1549                           worstCqi.at (j) = 1;
 
 1555                   for (uint8_t j = 0; j < nLayer; j++)
 
 1557                       worstCqi.at (j) = 1; 
 
 1564           for (uint8_t j = 0; j < nLayer; j++)
 
 1566               worstCqi.at (j) = 1; 
 
 1569       for (uint8_t j = 0; j < nLayer; j++)
 
 1571           NS_LOG_INFO (
this << 
" Layer " << (uint16_t)j << 
" CQI selected " << (uint16_t)worstCqi.at (j));
 
 1573       uint32_t bytesTxed = 0;
 
 1574       for (uint8_t j = 0; j < nLayer; j++)
 
 1576           newDci.
m_mcs.push_back (
m_amc->GetMcsFromCqi (worstCqi.at (j)));
 
 1577           int tbSize = (
m_amc->GetTbSizeFromMcs (newDci.
m_mcs.at (j), RgbPerRnti * rbgSize) / 8); 
 
 1579           NS_LOG_INFO (
this << 
" Layer " << (uint16_t)j << 
" MCS selected" << 
m_amc->GetMcsFromCqi (worstCqi.at (j)));
 
 1580           bytesTxed += tbSize;
 
 1585       uint32_t rbgMask = 0;
 
 1586       for (uint16_t k = 0; k < (*itMap).second.size (); k++)
 
 1588           rbgMask = rbgMask + (0x1 << (*itMap).second.at (k));
 
 1589           NS_LOG_INFO (
this << 
" Allocated RBG " << (*itMap).second.at (k));
 
 1594       std::map <LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator itBufReq;
 
 1597           if (((*itBufReq).first.m_rnti == (*itMap).first)
 
 1598               && (((*itBufReq).second.m_rlcTransmissionQueueSize > 0)
 
 1599                   || ((*itBufReq).second.m_rlcRetransmissionQueueSize > 0)
 
 1600                   || ((*itBufReq).second.m_rlcStatusPduSize > 0) ))
 
 1602               std::vector <struct RlcPduListElement_s> newRlcPduLe;
 
 1603               for (uint8_t j = 0; j < nLayer; j++)
 
 1609                   newRlcPduLe.push_back (newRlcEl);
 
 1617                           NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*itMap).first);
 
 1619                       (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
 
 1624           if ((*itBufReq).first.m_rnti > (*itMap).first)
 
 1629       for (uint8_t j = 0; j < nLayer; j++)
 
 1631           newDci.
m_ndi.push_back (1);
 
 1632           newDci.
m_rv.push_back (0);
 
 1637       newEl.
m_dci = newDci;
 
 1661       std::map <uint16_t, pssFlowPerf_t>::iterator it;
 
 1665           (*it).second.lastTtiBytesTransmitted = bytesTxed;
 
 1666           NS_LOG_INFO (
this << 
" UE total bytes txed " << (*it).second.lastTtiBytesTransmitted);
 
 1684       std::map <uint16_t, pssFlowPerf_t>::iterator itUeScheduleted = tdUeSet.end();
 
 1685       itUeScheduleted = tdUeSet.find((*itStats).first);
 
 1686       if (itUeScheduleted != tdUeSet.end())
 
 1688           (*itStats).second.secondLastAveragedThroughput = ((1.0 - (1 / 
m_timeWindow)) * (*itStats).second.secondLastAveragedThroughput) + ((1 / 
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTransmitted / 0.001));
 
 1691       (*itStats).second.totalBytesTransmitted += (*itStats).second.lastTtiBytesTransmitted;
 
 1693       (*itStats).second.lastAveragedThroughput = ((1.0 - (1.0 / 
m_timeWindow)) * (*itStats).second.lastAveragedThroughput) + ((1.0 / 
m_timeWindow) * (double)((*itStats).second.lastTtiBytesTransmitted / 0.001));
 
 1694       (*itStats).second.lastTtiBytesTransmitted = 0;
 
 1720   for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
 
 1725           std::map <uint16_t,uint8_t>::iterator it;
 
 1726           uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
 
 1731               m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) ); 
 
 1738               (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
 
 1740               std::map <uint16_t,uint32_t>::iterator itTimers;
 
 1748           std::map <uint16_t,SbMeasResult_s>::iterator it;
 
 1749           uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
 
 1754               m_a30CqiRxed.insert ( std::pair<uint16_t, SbMeasResult_s > (rnti, params.
m_cqiList.at (i).m_sbMeasResult) );
 
 1760               (*it).second = params.
m_cqiList.at (i).m_sbMeasResult;
 
 1761               std::map <uint16_t,uint32_t>::iterator itTimers;
 
 1779   std::map <uint16_t, std::vector <double> >::iterator itCqi = 
m_ueCqi.find (rnti);
 
 1793           double sinr = (*itCqi).second.at (i);
 
 1800       double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
 
 1802       (*itCqi).second.at (rb) = estimatedSinr;
 
 1803       return (estimatedSinr);
 
 1817   std::vector <bool> rbMap;
 
 1818   uint16_t rbAllocatedNum = 0;
 
 1819   std::set <uint16_t> rntiAllocated;
 
 1820   std::vector <uint16_t> rbgAllocationMap;
 
 1831   for (std::vector<bool>::iterator it = rbMap.begin (); it != rbMap.end (); it++)
 
 1846       if (rbgAllocationMap.at (i) != 0)
 
 1848           rbMap.at (i) = 
true;
 
 1857       for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
 
 1866                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1869               NS_LOG_INFO (
this << 
" UL-HARQ retx RNTI " << rnti << 
" harqId " << (uint16_t)harqId << 
" i " << i << 
" size "  << params.
m_ulInfoList.size ());
 
 1873                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1880                   NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
 
 1882               if ((*itStat).second.at (harqId) >= 3)
 
 1884                   NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
 
 1890                   if (rbMap.at (j) == 
true)
 
 1901                       rbMap.at (j) = 
true;
 
 1902                       rbgAllocationMap.at (j) = dci.
m_rnti;
 
 1910                   NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
 
 1915               (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
 
 1916               (*itStat).second.at (harqId) = 0;
 
 1917               (*itHarq).second.at ((*itProcId).second) = dci;
 
 1919               rntiAllocated.insert (dci.
m_rnti);
 
 1928   std::map <uint16_t,uint32_t>::iterator it;
 
 1933       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1935       if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
 
 1954   uint16_t tempRbPerFlow = (ffrUlBandwidth) / (nflows + rntiAllocated.size ());
 
 1955   uint16_t rbPerFlow = (minContinuousUlBandwidth < tempRbPerFlow) ? minContinuousUlBandwidth : tempRbPerFlow;
 
 1961   int rbAllocated = 0;
 
 1963   std::map <uint16_t, pssFlowPerf_t>::iterator itStats;
 
 1985       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
 
 1986       if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
 
 1989           NS_LOG_DEBUG (
this << 
" UE already allocated in HARQ -> discared, RNTI " << (*it).first);
 
 2012       uldci.
m_rnti = (*it).first;
 
 2014       bool allocated = 
false;
 
 2015       NS_LOG_INFO (
this << 
" RB Allocated " << rbAllocated << 
" rbPerFlow " << rbPerFlow << 
" flows " << nflows);
 
 2020           for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
 
 2022               if (rbMap.at (j) == 
true)
 
 2035               NS_LOG_INFO (
this << 
"RNTI: "<< (*it).first<< 
" RB Allocated " << rbAllocated << 
" rbPerFlow " << rbPerFlow << 
" flows " << nflows);
 
 2038               for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
 
 2040                   rbMap.at (j) = 
true;
 
 2042                   rbgAllocationMap.at (j) = (*it).first;
 
 2044               rbAllocated += rbPerFlow;
 
 2076       std::map <uint16_t, std::vector <double> >::iterator itCqi = 
m_ueCqi.find ((*it).first);
 
 2086           double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
 
 2093               double sinr = (*itCqi).second.at (i);
 
 2098               if ((*itCqi).second.at (i) < minSinr)
 
 2100                   minSinr = (*itCqi).second.at (i);
 
 2105           double s = log2 ( 1 + (
 
 2106                                  std::pow (10, minSinr / 10 )  /
 
 2107                                  ( (-std::log (5.0 * 0.00005 )) / 1.5) ));
 
 2108           cqi = 
m_amc->GetCqiFromSpectralEfficiency (s);
 
 2121                   rbgAllocationMap.at (i) = 0;
 
 2147           std::map <uint16_t, uint8_t>::iterator itProcId;
 
 2153           harqId = (*itProcId).second;
 
 2159           (*itDci).second.at (harqId) = uldci;
 
 2164               NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << uldci.
m_rnti);
 
 2166           (*itStat).second.at (harqId) = 0;
 
 2169       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);
 
 2211   std::map <uint16_t,uint32_t>::iterator it;
 
 2213   for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
 
 2224           uint32_t buffer = 0;
 
 2225           for (uint8_t lcg = 0; lcg < 4; ++lcg)
 
 2227               uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
 
 2232           NS_LOG_LOGIC (
this << 
"RNTI=" << rnti << 
" buffer=" << buffer);
 
 2237               m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
 
 2242               (*it).second = buffer;
 
 2285         std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
 
 2286         std::map <uint16_t, std::vector <double> >::iterator itCqi;
 
 2287         NS_LOG_DEBUG (
this << 
" Collect PUSCH CQIs of Frame no. " << (params.
m_sfnSf >> 4) << 
" subframe no. " << (0xF & params.
m_sfnSf));
 
 2293         for (uint32_t i = 0; i < (*itMap).second.size (); i++)
 
 2297             itCqi = 
m_ueCqi.find ((*itMap).second.at (i));
 
 2301                 std::vector <double> newCqi;
 
 2306                         newCqi.push_back (sinr);
 
 2315                 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
 
 2322                 (*itCqi).second.at (i) = sinr;
 
 2323                 NS_LOG_DEBUG (
this << 
" RNTI " << (*itMap).second.at (i) << 
" RB " << i << 
" SINR " << sinr);
 
 2325                 std::map <uint16_t, uint32_t>::iterator itTimers;
 
 2346                 rnti = vsp->GetRnti ();
 
 2349         std::map <uint16_t, std::vector <double> >::iterator itCqi;
 
 2354             std::vector <double> newCqi;
 
 2358                 newCqi.push_back (sinr);
 
 2359                 NS_LOG_INFO (
this << 
" RNTI " << rnti << 
" new SRS-CQI for RB  " << j << 
" value " << sinr);
 
 2362             m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
 
 2372                 (*itCqi).second.at (j) = sinr;
 
 2373                 NS_LOG_INFO (
this << 
" RNTI " << rnti << 
" update SRS-CQI for RB  " << j << 
" value " << sinr);
 
 2376             std::map <uint16_t, uint32_t>::iterator itTimers;
 
 2389         NS_FATAL_ERROR (
"PssFfMacScheduler supports only PUSCH and SRS UL-CQIs");
 
 2402   std::map <uint16_t,uint32_t>::iterator itP10 = 
m_p10CqiTimers.begin ();
 
 2406       if ((*itP10).second == 0)
 
 2409           std::map <uint16_t,uint8_t>::iterator itMap = 
m_p10CqiRxed.find ((*itP10).first);
 
 2411           NS_LOG_INFO (
this << 
" P10-CQI expired for user " << (*itP10).first);
 
 2413           std::map <uint16_t,uint32_t>::iterator temp = itP10;
 
 2425   std::map <uint16_t,uint32_t>::iterator itA30 = 
m_a30CqiTimers.begin ();
 
 2429       if ((*itA30).second == 0)
 
 2432           std::map <uint16_t,SbMeasResult_s>::iterator itMap = 
m_a30CqiRxed.find ((*itA30).first);
 
 2434           NS_LOG_INFO (
this << 
" A30-CQI expired for user " << (*itA30).first);
 
 2436           std::map <uint16_t,uint32_t>::iterator temp = itA30;
 
 2455   std::map <uint16_t,uint32_t>::iterator itUl = 
m_ueCqiTimers.begin ();
 
 2459       if ((*itUl).second == 0)
 
 2462           std::map <uint16_t, std::vector <double> >::iterator itMap = 
m_ueCqi.find ((*itUl).first);
 
 2463           NS_ASSERT_MSG (itMap != 
m_ueCqi.end (), 
" Does not find CQI report for user " << (*itUl).first);
 
 2464           NS_LOG_INFO (
this << 
" UL-CQI exired for user " << (*itUl).first);
 
 2465           (*itMap).second.clear ();
 
 2467           std::map <uint16_t,uint32_t>::iterator temp = itUl;
 
 2484   std::map<LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
 
 2489       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);
 
 2492       if (((*it).second.m_rlcStatusPduSize > 0) && (size >= (*it).second.m_rlcStatusPduSize))
 
 2494            (*it).second.m_rlcStatusPduSize = 0;
 
 2496       else if (((*it).second.m_rlcRetransmissionQueueSize > 0) && (size >= (*it).second.m_rlcRetransmissionQueueSize))
 
 2498           (*it).second.m_rlcRetransmissionQueueSize = 0;
 
 2500       else if ((*it).second.m_rlcTransmissionQueueSize > 0)
 
 2502           uint32_t rlcOverhead;
 
 2517           if ((*it).second.m_rlcTransmissionQueueSize <= size - rlcOverhead)
 
 2519               (*it).second.m_rlcTransmissionQueueSize = 0;
 
 2523               (*it).second.m_rlcTransmissionQueueSize -= size - rlcOverhead;
 
 2529       NS_LOG_ERROR (
this << 
" Does not find DL RLC Buffer Report of UE " << rnti);
 
 2538   std::map <uint16_t,uint32_t>::iterator it = 
m_ceBsrRxed.find (rnti);
 
 2541       NS_LOG_INFO (
this << 
" UE " << rnti << 
" size " << size << 
" BSR " << (*it).second);
 
 2542       if ((*it).second >= size)
 
 2544           (*it).second -= size;
 
 2553       NS_LOG_ERROR (
this << 
" Does not find BSR report info of UE " << rnti);
 
 2561   NS_LOG_FUNCTION (
this << 
" RNTI " << rnti << 
" txMode " << (uint16_t)txMode);
 
virtual void SchedDlCqiInfoReq(const struct SchedDlCqiInfoReqParameters ¶ms)
 
std::vector< struct UlInfoListElement_s > m_ulInfoList
 
See section 4.3.1 dlDciListElement. 
 
Ptr< const AttributeChecker > MakeStringChecker(void)
 
std::map< uint16_t, uint32_t > m_p10CqiTimers
 
PssSchedulerMemberCschedSapProvider()
 
std::map< uint16_t, std::vector< uint16_t > > m_allocationMaps
 
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 "...
 
void DoCschedLcConfigReq(const struct FfMacCschedSapProvider::CschedLcConfigReqParameters ¶ms)
 
AttributeValue implementation for Boolean. 
 
virtual LteFfrSapUser * GetLteFfrSapUser()
 
std::map< uint16_t, uint8_t > m_uesTxMode
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
virtual void ReportUlCqiInfo(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)=0
ReportUlCqiInfo. 
 
void DoSchedUlSrInfoReq(const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters ¶ms)
 
Parameters of the CSCHED_UE_CONFIG_CNF primitive. 
 
Hold variables of type string. 
 
int LcActivePerFlow(uint16_t rnti)
 
Parameters of the CSCHED_UE_RELEASE_REQ primitive. 
 
void DoCschedLcReleaseReq(const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters ¶ms)
 
void TransmissionModeConfigurationUpdate(uint16_t rnti, uint8_t txMode)
 
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, uint8_t > m_p10CqiRxed
 
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 UpdateDlRlcBufferInfo(uint16_t rnti, uint8_t lcid, uint16_t size)
 
std::vector< UlDciListElement_s > UlHarqProcessesDciBuffer_t
 
std::vector< struct LogicalChannelConfigListElement_s > m_logicalChannelConfigList
 
std::vector< uint16_t > m_sinr
 
std::map< uint16_t, pssFlowPerf_t > m_flowStatsUl
 
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...
 
virtual void SchedUlCqiInfoReq(const struct SchedUlCqiInfoReqParameters ¶ms)
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
std::vector< uint8_t > m_mcs
 
See section 4.3.2 ulDciListElement. 
 
std::map< uint16_t, UlHarqProcessesStatus_t > m_ulHarqProcessesStatus
 
virtual void SchedDlRachInfoReq(const struct SchedDlRachInfoReqParameters ¶ms)
 
std::vector< struct UlDciListElement_s > m_dciList
 
#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 CschedUeConfigReq(const struct CschedUeConfigReqParameters ¶ms)
 
Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive. 
 
std::map< uint16_t, UlHarqProcessesDciBuffer_t > m_ulHarqProcessesDciBuffer
 
PssFfMacScheduler * m_scheduler
 
Parameters of the CSCHED_LC_RELEASE_REQ primitive. 
 
virtual uint8_t GetTpc(uint16_t rnti)=0
GetTpc. 
 
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
 
uint8_t m_transmissionMode
 
Parameters of the SCHED_DL_TRIGGER_REQ primitive. 
 
uint8_t m_logicalChannelIdentity
 
static TypeId GetTypeId(void)
 
std::map< uint16_t, DlHarqProcessesDciBuffer_t > m_dlHarqProcessesDciBuffer
 
std::map< uint16_t, DlHarqProcessesStatus_t > m_dlHarqProcessesStatus
 
void RefreshUlCqiMaps(void)
 
std::string m_fdSchedulerType
 
FfMacCschedSapUser * m_cschedSapUser
 
void DoSchedUlMacCtrlInfoReq(const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters ¶ms)
 
void DoSchedDlTriggerReq(const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters ¶ms)
 
std::vector< RlcPduList_t > DlHarqRlcPduListBuffer_t
 
int GetRbgSize(int dlbandwidth)
 
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
 
std::vector< struct VendorSpecificListElement_s > m_vendorSpecificList
 
uint32_t m_cqiTimersThreshold
 
void DoSchedDlCqiInfoReq(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
 
double secondLastAveragedThroughput
Past average throughput. 
 
virtual FfMacSchedSapProvider * GetFfMacSchedSapProvider()
 
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the MAC Scheduler ins...
 
Parameters of the SCHED_UL_TRIGGER_REQ primitive. 
 
double EstimateUlSinr(uint16_t rnti, uint16_t rb)
 
Hold an unsigned integer type. 
 
static uint8_t TxMode2LayerNum(uint8_t txMode)
 
bool m_harqOn
m_harqOn when false inhibit te HARQ mechanisms (by default active) 
 
std::vector< uint8_t > m_ndi
 
std::map< LteFlowId_t, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters > m_rlcBufferReq
 
void DoSchedDlRlcBufferReq(const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters ¶ms)
 
virtual void CschedLcReleaseReq(const struct CschedLcReleaseReqParameters ¶ms)
 
virtual void CschedUeConfigCnf(const struct CschedUeConfigCnfParameters ¶ms)=0
 
LteFfrSapProvider * m_ffrSapProvider
 
LteFfrSapUser * m_ffrSapUser
 
unsigned int lastTtiBytesTransmitted
Total bytes send by eNb for this UE. 
 
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. 
 
friend class PssSchedulerMemberSchedSapProvider
 
uint8_t m_logicalChannelIdentity
 
std::vector< struct CqiListElement_s > m_cqiList
 
std::vector< struct DlInfoListElement_s > m_dlInfoList
 
virtual void ReportDlCqiInfo(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)=0
ReportDlCqiInfo. 
 
virtual void SchedDlRlcBufferReq(const struct SchedDlRlcBufferReqParameters ¶ms)
 
void DoCschedUeConfigReq(const struct FfMacCschedSapProvider::CschedUeConfigReqParameters ¶ms)
 
PssFfMacScheduler()
Constructor. 
 
double lastAveragedThroughput
Total bytes send by eNB in last tti for this UE. 
 
void RefreshDlCqiMaps(void)
 
virtual void SchedDlConfigInd(const struct SchedDlConfigIndParameters ¶ms)=0
 
virtual void CschedLcConfigReq(const struct CschedLcConfigReqParameters ¶ms)
 
Parameters of the API primitives. 
 
int8_t m_pdcchPowerOffset
 
std::vector< uint16_t > m_tbsSize
 
See section 4.3.9 rlcPDU_ListElement. 
 
std::map< uint16_t, DlHarqRlcPduListBuffer_t > m_dlHarqProcessesRlcPduListBuffer
 
void DoSchedUlNoiseInterferenceReq(const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters ¶ms)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void DoSchedDlPagingBufferReq(const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters ¶ms)
 
unsigned long totalBytesTransmitted
 
Ptr< const AttributeChecker > MakeBooleanChecker(void)
 
std::vector< DlDciListElement_s > DlHarqProcessesDciBuffer_t
 
Parameters of the CSCHED_LC_CONFIG_REQ primitive. 
 
PssFfMacScheduler * m_scheduler
 
std::vector< uint8_t > m_rv
 
virtual void SetFfMacSchedSapUser(FfMacSchedSapUser *s)
set the user part of the FfMacSchedSap that this Scheduler will interact with. 
 
std::map< uint16_t, pssFlowPerf_t > m_flowStatsDl
 
uint8_t HarqProcessAvailability(uint16_t rnti)
Return the availability of free process for the RNTI specified. 
 
std::map< uint16_t, uint8_t > m_ulHarqCurrentProcessId
 
virtual void CschedUeReleaseReq(const struct CschedUeReleaseReqParameters ¶ms)
 
static const int PssType0AllocationRbg[4]
 
virtual std::vector< bool > GetAvailableUlRbg()=0
Get vector of available RB in UL for this Cell. 
 
virtual uint8_t GetMinContinuousUlBandwidth()=0
GetMinContinuousUlBandwidth. 
 
virtual void SchedUlConfigInd(const struct SchedUlConfigIndParameters ¶ms)=0
 
void RefreshHarqProcesses()
Refresh HARQ processes according to the timers. 
 
static Time Now(void)
Return the current simulation virtual time. 
 
UlCqiFilter_t m_ulCqiFilter
 
void DoSchedUlTriggerReq(const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters ¶ms)
 
std::map< uint16_t, DlHarqProcessesTimer_t > m_dlHarqProcessesTimer
 
PssSchedulerMemberSchedSapProvider()
 
void UpdateUlRlcBufferInfo(uint16_t rnti, uint16_t size)
 
This abstract base class identifies the interface by means of which the helper object can plug on the...
 
uint8_t UpdateHarqProcessId(uint16_t rnti)
Update and return a new process Id for the RNTI specified. 
 
#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
 
std::vector< struct RachListElement_s > m_rachList
 
void DoSchedDlMacBufferReq(const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters ¶ms)
 
Parameters of the SCHED_DL_CQI_INFO_REQ primitive. 
 
std::vector< struct MacCeListElement_s > m_macCeList
 
Parameters of the API primitives. 
 
std::vector< struct RachListElement_s > m_rachList
 
void DoCschedCellConfigReq(const struct FfMacCschedSapProvider::CschedCellConfigReqParameters ¶ms)
 
static double fpS11dot3toDouble(uint16_t val)
 
virtual ~PssFfMacScheduler()
Destructor. 
 
std::map< uint16_t, SbMeasResult_s > m_a30CqiRxed
 
void DoSchedUlCqiInfoReq(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
 
std::map< uint16_t, uint32_t > m_ceBsrRxed
 
std::vector< uint8_t > UlHarqProcessesStatus_t
 
virtual void DoDispose(void)
Destructor implementation. 
 
std::vector< uint8_t > DlHarqProcessesStatus_t
 
Parameters of the SCHED_UL_CQI_INFO_REQ primitive. 
 
virtual void SchedDlTriggerReq(const struct SchedDlTriggerReqParameters ¶ms)
 
void DoSchedDlRachInfoReq(const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters ¶ms)
 
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...
 
FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig
 
virtual void SetLteFfrSapProvider(LteFfrSapProvider *s)
Set the Provider part of the LteFfrSap that this Scheduler will interact with. 
 
Parameters of the API primitives. 
 
virtual void SetFfMacCschedSapUser(FfMacCschedSapUser *s)
set the user part of the FfMacCschedSap that this Scheduler will interact with. 
 
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. 
 
virtual std::vector< bool > GetAvailableDlRbg()=0
Get vector of available RBG in DL for this Cell. 
 
virtual void SchedUlTriggerReq(const struct SchedUlTriggerReqParameters ¶ms)
 
std::vector< uint16_t > m_rachAllocationMap
 
std::vector< DlInfoListElement_s > m_dlInfoListBuffered
 
virtual void SchedDlMacBufferReq(const struct SchedDlMacBufferReqParameters ¶ms)
 
FfMacCschedSapProvider * m_cschedSapProvider
 
std::map< uint16_t, uint32_t > m_a30CqiTimers
 
Parameters of the SCHED_UL_SR_INFO_REQ primitive. 
 
virtual void SchedDlPagingBufferReq(const struct SchedDlPagingBufferReqParameters ¶ms)
 
virtual void SchedUlMacCtrlInfoReq(const struct SchedUlMacCtrlInfoReqParameters ¶ms)
 
std::map< uint16_t, std::vector< double > > m_ueCqi
 
std::map< uint16_t, uint32_t > m_ueCqiTimers
 
#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. 
 
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
Parameters of the CSCHED_UE_CONFIG_REQ primitive. 
 
void DoCschedUeReleaseReq(const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters ¶ms)
 
std::map< uint16_t, uint8_t > m_dlHarqCurrentProcessId
 
struct DlDciListElement_s m_dci
 
std::vector< struct BuildRarListElement_s > m_buildRarList
 
virtual FfMacCschedSapProvider * GetFfMacCschedSapProvider()
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
FfMacSchedSapUser * m_schedSapUser
 
a unique identifier for an interface. 
 
FfMacSchedSapProvider * m_schedSapProvider
 
virtual void SchedUlSrInfoReq(const struct SchedUlSrInfoReqParameters ¶ms)
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
virtual void CschedCellConfigReq(const struct CschedCellConfigReqParameters ¶ms)
CSCHED_CELL_CONFIG_REQ. 
 
std::vector< struct BuildDataListElement_s > m_buildDataList
 
virtual void SchedUlNoiseInterferenceReq(const struct SchedUlNoiseInterferenceReqParameters ¶ms)
 
uint8_t m_ueTxAntennaSelection
 
friend class PssSchedulerMemberCschedSapProvider
 
See section 4.3.8 builDataListElement. 
 
Implements the SCHED SAP and CSCHED SAP for a Priority Set scheduler.