22 #include <ns3/pointer.h>
28 #include <ns3/lte-amc.h>
29 #include <ns3/rr-ff-mac-scheduler.h>
30 #include <ns3/simulator.h>
31 #include <ns3/lte-common.h>
32 #include <ns3/lte-vendor-specific-parameters.h>
33 #include <ns3/boolean.h>
145 : m_scheduler (scheduler)
220 : m_cschedSapUser (0),
225 m_amc = CreateObject <LteAmc> ();
255 .AddConstructor<RrFfMacScheduler> ()
256 .AddAttribute (
"CqiTimerThreshold",
257 "The number of TTIs a CQI is valid (default 1000 - 1 sec.)",
260 MakeUintegerChecker<uint32_t> ())
261 .AddAttribute (
"HarqEnabled",
262 "Activate/Deactivate the HARQ [by default is active].",
265 MakeBooleanChecker ())
266 .AddAttribute (
"UlGrantMcs",
267 "The MCS of the UL grant, must be [0..15] (default 0)",
270 MakeUintegerChecker<uint8_t> ())
325 dlHarqPrcStatus.resize (8,0);
328 dlHarqProcessesTimer.resize (8,0);
331 dlHarqdci.resize (8);
334 dlHarqRlcPdu.resize (2);
335 dlHarqRlcPdu.at (0).resize (8);
336 dlHarqRlcPdu.at (1).resize (8);
340 ulHarqPrcStatus.resize (8,0);
343 ulHarqdci.resize (8);
367 std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
398 std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
401 if ((*it).m_rnti == params.
m_rnti)
403 NS_LOG_INFO (
this <<
" Erase RNTI " << (*it).m_rnti <<
" LC " << (uint16_t)(*it).m_logicalChannelIdentity);
430 std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it =
m_rlcBufferReq.begin ();
478 for (
int i = 0; i < 4; i++)
509 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
511 uint8_t i = (*it).second;
516 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
517 if ((*itStat).second.at (i) == 0)
548 NS_FATAL_ERROR (
"No Process Id Statusfound for this RNTI " << rnti);
550 uint8_t i = (*it).second;
555 while ( ((*itStat).second.at (i) != 0)&&(i != (*it).second));
556 if ((*itStat).second.at (i) == 0)
559 (*itStat).second.at (i) = 1;
566 return ((*it).second);
575 std::map <uint16_t, DlHarqProcessesTimer_t>::iterator itTimers;
584 NS_LOG_INFO (
this <<
" Reset HARQ proc " << i <<
" for RNTI " << (*itTimers).first);
585 std::map <uint16_t, DlHarqProcessesStatus_t>::iterator itStat =
m_dlHarqProcessesStatus.find ((*itTimers).first);
588 NS_FATAL_ERROR (
"No Process Id Status found for this RNTI " << (*itTimers).first);
590 (*itStat).second.at (i) = 0;
591 (*itTimers).second.at (i) = 0;
595 (*itTimers).second.at (i)++;
616 std::vector <bool> rbgMap;
617 uint16_t rbgAllocatedNum = 0;
618 std::set <uint16_t> rntiAllocated;
622 std::map <uint16_t, uint8_t>::iterator itProcId;
625 (*itProcId).second = ((*itProcId).second + 1) %
HARQ_PROC_NUM;
630 uint16_t rbStart = 0;
631 std::vector <struct RachListElement_s>::iterator itRach;
636 newRar.
m_rnti = (*itRach).m_rnti;
640 newRar.m_grant.m_rnti = newRar.m_rnti;
643 uint16_t tbSizeBits = 0;
650 if (tbSizeBits < (*itRach).m_estimatedSize)
655 newRar.m_grant.m_rbStart = rbStart;
656 newRar.m_grant.m_rbLen = rbLen;
657 newRar.m_grant.m_tbSize = tbSizeBits / 8;
658 newRar.m_grant.m_hopping =
false;
659 newRar.m_grant.m_tpc = 0;
660 newRar.m_grant.m_cqiRequest =
false;
661 newRar.m_grant.m_ulDelay =
false;
662 NS_LOG_INFO (
this <<
" UL grant allocated to RNTI " << (*itRach).m_rnti <<
" rbStart " << rbStart <<
" rbLen " << rbLen <<
" MCS " << (uint16_t)
m_ulGrantMcs <<
" tbSize " << newRar.m_grant.m_tbSize);
663 for (uint16_t i = rbStart; i < rbStart + rbLen; i++)
667 rbStart = rbStart + rbLen;
673 uldci.
m_rnti = newRar.m_rnti;
692 std::map <uint16_t, uint8_t>::iterator itProcId;
698 harqId = (*itProcId).second;
704 (*itDci).second.at (harqId) = uldci;
718 NS_LOG_INFO (
this <<
" Received DL-HARQ feedback");
734 std::vector <struct DlInfoListElement_s> dlInfoListUntxed;
738 if (itRnti != rntiAllocated.end ())
744 std::vector <bool> retx;
745 NS_LOG_INFO (
this <<
" Processing DLHARQ feedback");
749 retx.push_back (
false);
756 if (retx.at (0) || retx.at (1))
761 NS_LOG_INFO (
this <<
" HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId);
770 if (dci.
m_rv.size () == 1)
772 rv = dci.
m_rv.at (0);
776 rv = (dci.
m_rv.at (0) > dci.
m_rv.at (1) ? dci.
m_rv.at (0) : dci.
m_rv.at (1));
782 NS_LOG_INFO (
"Max number of retransmissions reached -> drop process");
788 (*it).second.at (harqId) = 0;
794 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
796 (*itRlcPdu).second.at (k).at (harqId).clear ();
802 std::vector <int> dciRbg;
805 for (
int j = 0; j < 32; j++)
809 dciRbg.push_back (j);
815 for (uint8_t j = 0; j < dciRbg.size (); j++)
817 if (rbgMap.at (dciRbg.at (j)) ==
true)
827 for (uint8_t j = 0; j < dciRbg.size (); j++)
829 rbgMap.at (dciRbg.at (j)) =
true;
830 NS_LOG_INFO (
"RBG " << dciRbg.at (j) <<
" assigned");
834 NS_LOG_INFO (
this <<
" Send retx in the same RBGs");
840 uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
841 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
842 std::vector <bool> rbgMapCopy = rbgMap;
843 while ((j < dciRbg.size ())&&(startRbg != rbgId))
845 if (rbgMapCopy.at (rbgId) ==
false)
847 rbgMapCopy.at (rbgId) =
true;
848 dciRbg.at (j) = rbgId;
853 if (j == dciRbg.size ())
856 uint32_t rbgMask = 0;
857 for (uint16_t k = 0; k < dciRbg.size (); k++)
859 rbgMask = rbgMask + (0x1 << dciRbg.at (k));
860 NS_LOG_INFO (
this <<
" New allocated RBG " << dciRbg.at (k));
869 dlInfoListUntxed.push_back (params.
m_dlInfoList.at (i));
870 NS_LOG_INFO (
this <<
" No resource for this retx -> buffer it");
878 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << rnti);
880 for (uint8_t j = 0; j < nLayers; j++)
884 if (j >= dci.
m_ndi.size ())
887 dci.
m_ndi.push_back (0);
888 dci.
m_rv.push_back (0);
889 dci.
m_mcs.push_back (0);
891 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no txed (MIMO transition)");
896 dci.
m_ndi.at (j) = 0;
898 (*itHarq).second.at (harqId).m_rv.at (j)++;
899 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" RV " << (uint16_t)dci.
m_rv.at (j));
905 dci.
m_ndi.at (j) = 0;
907 dci.
m_mcs.at (j) = 0;
909 NS_LOG_INFO (
this <<
" layer " << (uint16_t)j <<
" no retx");
913 for (uint16_t k = 0; k < (*itRlcPdu).second.at (0).at (dci.
m_harqProcess).size (); k++)
915 std::vector <struct RlcPduListElement_s> rlcPduListPerLc;
916 for (uint8_t j = 0; j < nLayers; j++)
920 if (j < dci.
m_ndi.size ())
922 rlcPduListPerLc.push_back ((*itRlcPdu).second.at (j).at (dci.
m_harqProcess).at (k));
927 if (rlcPduListPerLc.size () > 0)
934 (*itHarq).second.at (harqId).
m_rv = dci.
m_rv;
939 NS_FATAL_ERROR (
"Unable to find HARQ timer for RNTI " << (uint16_t)rnti);
941 (*itHarqTimer).second.at (harqId) = 0;
943 rntiAllocated.insert (rnti);
960 for (uint16_t k = 0; k < (*itRlcPdu).second.size (); k++)
969 if (rbgAllocatedNum == rbgNum)
980 std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
984 std::map <uint16_t,uint8_t> lcActivesPerRnti;
985 std::map <uint16_t,uint8_t>::iterator itLcRnti;
989 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).m_rnti);
990 if ( (((*it).m_rlcTransmissionQueueSize > 0)
991 || ((*it).m_rlcRetransmissionQueueSize > 0)
992 || ((*it).m_rlcStatusPduSize > 0))
993 && (itRnti == rntiAllocated.end ())
997 NS_LOG_LOGIC (
this <<
" User " << (*it).m_rnti <<
" LC " << (uint16_t)(*it).m_logicalChannelIdentity <<
" is active, status " << (*it).m_rlcStatusPduSize <<
" retx " << (*it).m_rlcRetransmissionQueueSize <<
" tx " << (*it).m_rlcTransmissionQueueSize);
998 std::map <uint16_t,uint8_t>::iterator itCqi =
m_p10CqiRxed.find ((*it).m_rnti);
1002 cqi = (*itCqi).second;
1012 itLcRnti = lcActivesPerRnti.find ((*it).m_rnti);
1013 if (itLcRnti != lcActivesPerRnti.end ())
1015 (*itLcRnti).second++;
1019 lcActivesPerRnti.insert (std::pair<uint16_t, uint8_t > ((*it).m_rnti, 1));
1038 int rbgPerTb = (nTbs > 0) ? ((rbgNum - rbgAllocatedNum) / nTbs) : INT_MAX;
1039 NS_LOG_INFO (
this <<
" Flows to be transmitted " << nflows <<
" rbgPerTb " << rbgPerTb);
1044 int rbgAllocated = 0;
1068 std::map <uint16_t,uint8_t>::iterator itTxMode;
1071 itLcRnti = lcActivesPerRnti.find ((*it).m_rnti);
1072 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).m_rnti);
1073 if ((itLcRnti == lcActivesPerRnti.end ())||(itRnti != rntiAllocated.end ()))
1076 uint16_t rntiDiscared = (*it).m_rnti;
1079 if ((*it).m_rnti != rntiDiscared)
1095 NS_FATAL_ERROR (
"No Transmission Mode info on user " << (*it).m_rnti);
1098 int lcNum = (*itLcRnti).second;
1101 newEl.
m_rnti = (*it).m_rnti;
1104 newDci.
m_rnti = (*it).m_rnti;
1109 for (uint8_t i = 0; i < nLayer; i++)
1113 newDci.
m_mcs.push_back (0);
1117 newDci.
m_mcs.push_back (
m_amc->GetMcsFromCqi ((*itCqi).second) );
1120 int tbSize = (
m_amc->GetTbSizeFromMcs (newDci.
m_mcs.at (0), rbgPerTb * rbgSize) / 8);
1121 uint16_t rlcPduSize = tbSize / lcNum;
1122 while ((*it).m_rnti == newEl.
m_rnti)
1124 if ( ((*it).m_rlcTransmissionQueueSize > 0)
1125 || ((*it).m_rlcRetransmissionQueueSize > 0)
1126 || ((*it).m_rlcStatusPduSize > 0) )
1128 std::vector <struct RlcPduListElement_s> newRlcPduLe;
1129 for (uint8_t j = 0; j < nLayer; j++)
1134 newRlcEl.
m_size = rlcPduSize;
1136 newRlcPduLe.push_back (newRlcEl);
1144 NS_FATAL_ERROR (
"Unable to find RlcPdcList in HARQ buffer for RNTI " << (*it).m_rnti);
1146 (*itRlcPdu).second.at (j).at (newDci.
m_harqProcess).push_back (newRlcEl);
1161 uint32_t rbgMask = 0;
1163 NS_LOG_INFO (
this <<
" DL - Allocate user " << newEl.
m_rnti <<
" LCs " << (uint16_t)(*itLcRnti).second <<
" bytes " << tbSize <<
" mcs " << (uint16_t) newDci.
m_mcs.at (0) <<
" harqId " << (uint16_t)newDci.
m_harqProcess <<
" layers " << nLayer);
1165 while (i < rbgPerTb)
1167 if (rbgMap.at (rbgAllocated) ==
false)
1169 rbgMask = rbgMask + (0x1 << rbgAllocated);
1172 rbgMap.at (rbgAllocated) =
true;
1179 for (
int i = 0; i < nLayer; i++)
1182 newDci.
m_ndi.push_back (1);
1183 newDci.
m_rv.push_back (0);
1185 newEl.
m_dci = newDci;
1206 if (rbgAllocatedNum == rbgNum)
1235 std::map <uint16_t,uint8_t>::iterator it;
1236 for (
unsigned int i = 0; i < params.
m_cqiList.size (); i++)
1241 std::map <uint16_t,uint8_t>::iterator it;
1242 uint16_t rnti = params.
m_cqiList.at (i).m_rnti;
1247 m_p10CqiRxed.insert ( std::pair<uint16_t, uint8_t > (rnti, params.
m_cqiList.at (i).m_wbCqi.at (0)) );
1254 (*it).second = params.
m_cqiList.at (i).m_wbCqi.at (0);
1256 std::map <uint16_t,uint32_t>::iterator itTimers;
1284 std::vector <bool> rbMap;
1285 uint16_t rbAllocatedNum = 0;
1286 std::set <uint16_t> rntiAllocated;
1287 std::vector <uint16_t> rbgAllocationMap;
1298 if (rbgAllocationMap.at (i) != 0)
1300 rbMap.at (i) =
true;
1308 for (uint16_t i = 0; i < params.
m_ulInfoList.size (); i++)
1317 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1320 NS_LOG_INFO (
this <<
" UL-HARQ retx RNTI " << rnti <<
" harqId " << (uint16_t)harqId);
1324 NS_LOG_ERROR (
"No info find in UL-HARQ buffer for UE (might change eNB) " << rnti);
1330 NS_LOG_ERROR (
"No info find in HARQ buffer for UE (might change eNB) " << rnti);
1332 if ((*itStat).second.at (harqId) > 3)
1334 NS_LOG_INFO (
"Max number of retransmissions reached (UL)-> drop process");
1340 if (rbMap.at (j) ==
true)
1351 rbMap.at (j) =
true;
1352 rbgAllocationMap.at (j) = dci.
m_rnti;
1360 NS_LOG_INFO (
"Cannot allocate retx due to RACH allocations for UE " << rnti);
1365 (*itStat).second.at ((*itProcId).second) = (*itStat).second.at (harqId) + 1;
1366 (*itStat).second.at (harqId) = 0;
1367 (*itHarq).second.at ((*itProcId).second) = dci;
1369 rntiAllocated.insert (dci.
m_rnti);
1374 std::map <uint16_t,uint32_t>::iterator it;
1379 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1381 NS_LOG_INFO (
this <<
" UE " << (*it).first <<
" queue " << (*it).second);
1382 if (((*it).second > 0)&&(itRnti == rntiAllocated.end ()))
1404 uint16_t rbAllocated = 0;
1425 NS_LOG_INFO (
this <<
" NFlows " << nflows <<
" RB per Flow " << rbPerFlow);
1428 std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
1429 if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
1451 NS_LOG_INFO (
this <<
" try to allocate " << (*it).first);
1453 uldci.
m_rnti = (*it).first;
1455 bool allocated =
false;
1456 NS_LOG_INFO (
this <<
" RB Allocated " << rbAllocated <<
" rbPerFlow " << rbPerFlow <<
" flows " << nflows);
1461 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1463 if (rbMap.at (j) ==
true)
1473 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
1475 rbMap.at (j) =
true;
1477 rbgAllocationMap.at (j) = (*it).first;
1480 rbAllocated += rbPerFlow;
1508 std::map <uint16_t, std::vector <double> >::iterator itCqi =
m_ueCqi.find ((*it).first);
1514 NS_LOG_INFO (
this <<
" UE does not have ULCQI " << (*it).first );
1519 double minSinr = (*itCqi).second.at (uldci.
m_rbStart);
1522 if ((*itCqi).second.at (i) < minSinr)
1524 minSinr = (*itCqi).second.at (i);
1528 double s = log2 ( 1 + (
1529 std::pow (10, minSinr / 10 ) /
1530 ( (-std::log (5.0 * 0.00005 )) / 1.5) ));
1533 cqi =
m_amc->GetCqiFromSpectralEfficiency (s);
1546 rbgAllocationMap.at (i) = 0;
1572 std::map <uint16_t, uint8_t>::iterator itProcId;
1578 harqId = (*itProcId).second;
1584 (*itDci).second.at (harqId) = uldci;
1586 NS_LOG_INFO (
this <<
" UL Allocation - UE " << (*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 <<
" harqId " << (uint16_t)harqId);
1628 std::map <uint16_t,uint32_t>::iterator it;
1630 for (
unsigned int i = 0; i < params.
m_macCeList.size (); i++)
1641 uint32_t buffer = 0;
1642 for (uint8_t lcg = 0; lcg < 4; ++lcg)
1644 uint8_t bsrId = params.
m_macCeList.at (i).m_macCeValue.m_bufferStatus.at (lcg);
1653 m_ceBsrRxed.insert ( std::pair<uint16_t, uint32_t > (rnti, buffer));
1654 NS_LOG_INFO (
this <<
" Insert RNTI " << rnti <<
" queue " << buffer);
1659 (*it).second = buffer;
1660 NS_LOG_INFO (
this <<
" Update RNTI " << rnti <<
" queue " << buffer);
1702 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap;
1703 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1710 for (uint32_t i = 0; i < (*itMap).second.size (); i++)
1714 itCqi =
m_ueCqi.find ((*itMap).second.at (i));
1718 std::vector <double> newCqi;
1723 newCqi.push_back (sinr);
1728 newCqi.push_back (30.0);
1732 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > ((*itMap).second.at (i), newCqi));
1739 (*itCqi).second.at (i) = sinr;
1741 std::map <uint16_t, uint32_t>::iterator itTimers;
1762 rnti = vsp->GetRnti ();
1765 std::map <uint16_t, std::vector <double> >::iterator itCqi;
1770 std::vector <double> newCqi;
1774 newCqi.push_back (sinr);
1775 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" new SRS-CQI for RB " << j <<
" value " << sinr);
1778 m_ueCqi.insert (std::pair <uint16_t, std::vector <double> > (rnti, newCqi));
1788 (*itCqi).second.at (j) = sinr;
1789 NS_LOG_INFO (
this <<
" RNTI " << rnti <<
" update SRS-CQI for RB " << j <<
" value " << sinr);
1792 std::map <uint16_t, uint32_t>::iterator itTimers;
1805 NS_FATAL_ERROR (
"PfFfMacScheduler supports only PUSCH and SRS UL-CQIs");
1820 std::map <uint16_t,uint32_t>::iterator itP10 =
m_p10CqiTimers.begin ();
1824 if ((*itP10).second == 0)
1827 std::map <uint16_t,uint8_t>::iterator itMap =
m_p10CqiRxed.find ((*itP10).first);
1829 NS_LOG_INFO (
this <<
" P10-CQI exired for user " << (*itP10).first);
1831 std::map <uint16_t,uint32_t>::iterator temp = itP10;
1850 std::map <uint16_t,uint32_t>::iterator itUl =
m_ueCqiTimers.begin ();
1854 if ((*itUl).second == 0)
1857 std::map <uint16_t, std::vector <double> >::iterator itMap =
m_ueCqi.find ((*itUl).first);
1858 NS_ASSERT_MSG (itMap !=
m_ueCqi.end (),
" Does not find CQI report for user " << (*itUl).first);
1859 NS_LOG_INFO (
this <<
" UL-CQI exired for user " << (*itUl).first);
1860 (*itMap).second.clear ();
1862 std::map <uint16_t,uint32_t>::iterator temp = itUl;
1880 std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
1883 if (((*it).m_rnti == rnti) && ((*it).m_logicalChannelIdentity == lcid))
1885 NS_LOG_INFO (
this <<
" UE " << rnti <<
" LC " << (uint16_t)lcid <<
" txqueue " << (*it).m_rlcTransmissionQueueSize <<
" retxqueue " << (*it).m_rlcRetransmissionQueueSize <<
" status " << (*it).m_rlcStatusPduSize <<
" decrease " << size);
1888 if (((*it).m_rlcStatusPduSize > 0) && (size >= (*it).m_rlcStatusPduSize))
1890 (*it).m_rlcStatusPduSize = 0;
1892 else if (((*it).m_rlcRetransmissionQueueSize > 0) && (size >= (*it).m_rlcRetransmissionQueueSize))
1894 (*it).m_rlcRetransmissionQueueSize = 0;
1896 else if ((*it).m_rlcTransmissionQueueSize > 0)
1898 uint32_t rlcOverhead;
1913 if ((*it).m_rlcTransmissionQueueSize <= size - rlcOverhead)
1915 (*it).m_rlcTransmissionQueueSize = 0;
1919 (*it).m_rlcTransmissionQueueSize -= size - rlcOverhead;
1932 std::map <uint16_t,uint32_t>::iterator it =
m_ceBsrRxed.find (rnti);
1935 NS_LOG_INFO (
this <<
" Update RLC BSR UE " << rnti <<
" size " << size <<
" BSR " << (*it).second);
1936 if ((*it).second >= size)
1938 (*it).second -= size;
1947 NS_LOG_ERROR (
this <<
" Does not find BSR report info of UE " << rnti);
1956 NS_LOG_FUNCTION (
this <<
" RNTI " << rnti <<
" txMode " << (uint16_t)txMode);
std::vector< struct UlInfoListElement_s > m_ulInfoList
See section 4.3.1 dlDciListElement.
void RefreshUlCqiMaps(void)
virtual void SchedUlMacCtrlInfoReq(const struct SchedUlMacCtrlInfoReqParameters ¶ms)
friend class RrSchedulerMemberCschedSapProvider
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
virtual FfMacSchedSapProvider * GetFfMacSchedSapProvider()
std::map< uint16_t, uint32_t > m_ueCqiTimers
Parameters of the CSCHED_UE_CONFIG_CNF primitive.
Parameters of the CSCHED_UE_RELEASE_REQ primitive.
virtual void SchedDlPagingBufferReq(const struct SchedDlPagingBufferReqParameters ¶ms)
static TypeId GetTypeId(void)
enum ns3::UlCqi_s::Type_e m_type
std::vector< UlDciListElement_s > UlHarqProcessesDciBuffer_t
std::vector< uint16_t > m_sinr
void RefreshDlCqiMaps(void)
std::vector< uint8_t > DlHarqProcessesTimer_t
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
void DoCschedCellConfigReq(const struct FfMacCschedSapProvider::CschedCellConfigReqParameters ¶ms)
std::vector< uint8_t > m_mcs
virtual void SchedDlCqiInfoReq(const struct SchedDlCqiInfoReqParameters ¶ms)
See section 4.3.2 ulDciListElement.
static bool SortRlcBufferReq(FfMacSchedSapProvider::SchedDlRlcBufferReqParameters i, FfMacSchedSapProvider::SchedDlRlcBufferReqParameters j)
virtual void SetFfMacSchedSapUser(FfMacSchedSapUser *s)
set the user part of the FfMacSchedSap that this Scheduler will interact with.
std::vector< struct UlDciListElement_s > m_dciList
See section 4.3.10 buildRARListElement.
virtual void SchedUlCqiInfoReq(const struct SchedUlCqiInfoReqParameters ¶ms)
Parameters of the CSCHED_UE_CONFIG_UPDATE_IND primitive.
FfMacCschedSapProvider * m_cschedSapProvider
Parameters of the CSCHED_LC_RELEASE_REQ primitive.
void DoCschedLcConfigReq(const struct FfMacCschedSapProvider::CschedLcConfigReqParameters ¶ms)
void DoCschedUeConfigReq(const struct FfMacCschedSapProvider::CschedUeConfigReqParameters ¶ms)
uint32_t m_rlcRetransmissionQueueSize
void DoSchedDlRachInfoReq(const struct FfMacSchedSapProvider::SchedDlRachInfoReqParameters ¶ms)
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
uint8_t m_transmissionMode
FfMacSchedSapUser * m_schedSapUser
Parameters of the SCHED_DL_TRIGGER_REQ primitive.
uint8_t m_logicalChannelIdentity
virtual ~RrFfMacScheduler()
Destructor.
friend class RrSchedulerMemberSchedSapProvider
#define NS_FATAL_ERROR(msg)
fatal error handling
uint8_t UpdateHarqProcessId(uint16_t rnti)
Update and return a new process Id for the RNTI specified.
void DoSchedDlPagingBufferReq(const struct FfMacSchedSapProvider::SchedDlPagingBufferReqParameters ¶ms)
RrFfMacScheduler * m_scheduler
std::map< uint16_t, uint8_t > m_ulHarqCurrentProcessId
std::map< uint16_t, DlHarqRlcPduListBuffer_t > m_dlHarqProcessesRlcPduListBuffer
std::vector< RlcPduList_t > DlHarqRlcPduListBuffer_t
Parameters of the SCHED_DL_MAC_BUFFER_REQ primitive.
NS_LOG_COMPONENT_DEFINE("RrFfMacScheduler")
virtual void CschedUeReleaseReq(const struct CschedUeReleaseReqParameters ¶ms)
Parameters of the SCHED_DL_PAGING_BUFFER_REQ primitive.
std::map< uint16_t, uint8_t > m_p10CqiRxed
virtual void CschedUeConfigUpdateInd(const struct CschedUeConfigUpdateIndParameters ¶ms)=0
std::vector< struct VendorSpecificListElement_s > m_vendorSpecificList
FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig
RrSchedulerMemberSchedSapProvider()
Parameters of the SCHED_UL_TRIGGER_REQ primitive.
Hold an unsigned integer type.
std::map< uint16_t, DlHarqProcessesStatus_t > m_dlHarqProcessesStatus
static uint8_t TxMode2LayerNum(uint8_t txMode)
std::vector< uint8_t > m_ndi
virtual void SetFfMacCschedSapUser(FfMacCschedSapUser *s)
set the user part of the FfMacCschedSap that this Scheduler will interact with.
std::map< uint16_t, std::vector< uint16_t > > m_allocationMaps
FfMacCschedSapUser * m_cschedSapUser
void DoSchedDlRlcBufferReq(const struct FfMacSchedSapProvider::SchedDlRlcBufferReqParameters ¶ms)
std::map< uint16_t, UlHarqProcessesDciBuffer_t > m_ulHarqProcessesDciBuffer
std::map< uint16_t, uint32_t > m_p10CqiTimers
uint8_t HarqProcessAvailability(uint16_t rnti)
Return the availability of free process for the RNTI specified.
void DoSchedUlCqiInfoReq(const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ¶ms)
virtual void CschedUeConfigCnf(const struct CschedUeConfigCnfParameters ¶ms)=0
std::vector< uint8_t > m_logicalChannelIdentity
#define NS_LOG_LOGIC(msg)
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 RefreshHarqProcesses()
Refresh HARQ processes according to the timers.
void DoSchedUlSrInfoReq(const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters ¶ms)
virtual void SchedDlConfigInd(const struct SchedDlConfigIndParameters ¶ms)=0
void UpdateUlRlcBufferInfo(uint16_t rnti, uint16_t size)
Parameters of the API primitives.
int8_t m_pdcchPowerOffset
void DoSchedUlMacCtrlInfoReq(const struct FfMacSchedSapProvider::SchedUlMacCtrlInfoReqParameters ¶ms)
std::vector< uint16_t > m_tbsSize
See section 4.3.9 rlcPDU_ListElement.
RrFfMacScheduler * m_scheduler
bool m_harqOn
m_harqOn when false inhibit te HARQ mechanisms (by default active)
int GetRbgSize(int dlbandwidth)
std::list< FfMacSchedSapProvider::SchedDlRlcBufferReqParameters > m_rlcBufferReq
virtual void SchedUlNoiseInterferenceReq(const struct SchedUlNoiseInterferenceReqParameters ¶ms)
virtual void CschedUeConfigReq(const struct CschedUeConfigReqParameters ¶ms)
std::map< uint16_t, std::vector< double > > m_ueCqi
std::vector< DlDciListElement_s > DlHarqProcessesDciBuffer_t
Parameters of the CSCHED_LC_CONFIG_REQ primitive.
virtual void SchedDlRlcBufferReq(const struct SchedDlRlcBufferReqParameters ¶ms)
void DoSchedUlNoiseInterferenceReq(const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters ¶ms)
std::vector< uint8_t > m_rv
virtual void SchedUlConfigInd(const struct SchedUlConfigIndParameters ¶ms)=0
std::map< uint16_t, UlHarqProcessesStatus_t > m_ulHarqProcessesStatus
virtual void SchedDlTriggerReq(const struct SchedDlTriggerReqParameters ¶ms)
UlCqiFilter_t m_ulCqiFilter
void DoCschedLcReleaseReq(const struct FfMacCschedSapProvider::CschedLcReleaseReqParameters ¶ms)
virtual FfMacCschedSapProvider * GetFfMacCschedSapProvider()
This abstract base class identifies the interface by means of which the helper object can plug on the...
#define NS_ASSERT_MSG(condition, message)
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.
std::vector< struct RachListElement_s > m_rachList
static double fpS11dot3toDouble(uint16_t val)
virtual void SchedUlSrInfoReq(const struct SchedUlSrInfoReqParameters ¶ms)
FfMacSchedSapProvider * m_schedSapProvider
Implements the SCHED SAP and CSCHED SAP for a Round Robin scheduler.
std::vector< uint8_t > UlHarqProcessesStatus_t
RrFfMacScheduler()
Constructor.
std::vector< uint8_t > DlHarqProcessesStatus_t
Parameters of the SCHED_UL_CQI_INFO_REQ primitive.
virtual void SchedDlMacBufferReq(const struct SchedDlMacBufferReqParameters ¶ms)
static uint32_t BsrId2BufferSize(uint8_t val)
virtual void CschedLcReleaseReq(const struct CschedLcReleaseReqParameters ¶ms)
std::map< uint16_t, DlHarqProcessesDciBuffer_t > m_dlHarqProcessesDciBuffer
uint8_t m_transmissionMode
std::vector< struct RachListElement_s > m_rachList
void UpdateDlRlcBufferInfo(uint16_t rnti, uint8_t lcid, uint16_t size)
std::map< uint16_t, DlHarqProcessesTimer_t > m_dlHarqProcessesTimer
std::map< uint16_t, uint8_t > m_dlHarqCurrentProcessId
int Type0AllocationRbg[4]
Parameters of the API primitives.
RrSchedulerMemberCschedSapProvider()
Parameters of the SCHED_UL_MAC_CTRL_INFO_REQ primitive.
#define NS_LOG_DEBUG(msg)
void DoSchedDlTriggerReq(const struct FfMacSchedSapProvider::SchedDlTriggerReqParameters ¶ms)
void DoCschedUeReleaseReq(const struct FfMacCschedSapProvider::CschedUeReleaseReqParameters ¶ms)
uint32_t m_cqiTimersThreshold
virtual void SchedUlTriggerReq(const struct SchedUlTriggerReqParameters ¶ms)
Parameters of the SCHED_UL_SR_INFO_REQ primitive.
uint16_t m_rlcStatusPduSize
void DoSchedDlCqiInfoReq(const struct FfMacSchedSapProvider::SchedDlCqiInfoReqParameters ¶ms)
#define NS_LOG_ERROR(msg)
void TransmissionModeConfigurationUpdate(uint16_t rnti, uint8_t txMode)
Parameters of the SCHED_DL_RACH_INFO_REQ primitive.
Parameters of the SCHED_UL_CONFIG_IND primitive.
void DoSchedDlMacBufferReq(const struct FfMacSchedSapProvider::SchedDlMacBufferReqParameters ¶ms)
uint16_t m_rlcTransmissionQueueHolDelay
Parameters of the CSCHED_UE_CONFIG_REQ primitive.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
std::vector< DlInfoListElement_s > m_dlInfoListBuffered
std::map< uint16_t, uint32_t > m_ceBsrRxed
struct DlDciListElement_s m_dci
std::vector< struct BuildRarListElement_s > m_buildRarList
std::vector< uint16_t > m_rachAllocationMap
virtual void SchedDlRachInfoReq(const struct SchedDlRachInfoReqParameters ¶ms)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual void CschedLcConfigReq(const struct CschedLcConfigReqParameters ¶ms)
std::map< uint16_t, uint8_t > m_uesTxMode
virtual void CschedCellConfigReq(const struct CschedCellConfigReqParameters ¶ms)
CSCHED_CELL_CONFIG_REQ.
std::vector< struct BuildDataListElement_s > m_buildDataList
void DoSchedUlTriggerReq(const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters ¶ms)
uint8_t m_ueTxAntennaSelection
See section 4.3.8 builDataListElement.