src/lte/model/fdmt-ff-mac-scheduler.cc
changeset 10070 85d6cfdea125
parent 10063 6b30859ebd37
child 10071 29c757ce7d46
equal deleted inserted replaced
10068:e90d8998de7d 10070:85d6cfdea125
  1492     {
  1492     {
  1493       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
  1493       std::set <uint16_t>::iterator itRnti = rntiAllocated.find ((*it).first);
  1494       if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
  1494       if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
  1495         {
  1495         {
  1496           // UE already allocated for UL-HARQ -> skip it
  1496           // UE already allocated for UL-HARQ -> skip it
       
  1497           NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
  1497           it++;
  1498           it++;
  1498           if (it == m_ceBsrRxed.end ())
  1499           if (it == m_ceBsrRxed.end ())
  1499             {
  1500             {
  1500               // restart from the first
  1501               // restart from the first
  1501               it = m_ceBsrRxed.begin ();
  1502               it = m_ceBsrRxed.begin ();
  1516 
  1517 
  1517       UlDciListElement_s uldci;
  1518       UlDciListElement_s uldci;
  1518       uldci.m_rnti = (*it).first;
  1519       uldci.m_rnti = (*it).first;
  1519       uldci.m_rbLen = rbPerFlow;
  1520       uldci.m_rbLen = rbPerFlow;
  1520       bool allocated = false;
  1521       bool allocated = false;
  1521       NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
  1522       NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
  1522       while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
  1523       while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
  1523         {
  1524         {
  1524           // check availability
  1525           // check availability
  1525           bool free = true;
  1526           bool free = true;
  1526           for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
  1527           for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
  1610               it++;
  1611               it++;
  1611               if (it == m_ceBsrRxed.end ())
  1612               if (it == m_ceBsrRxed.end ())
  1612                 {
  1613                 {
  1613                   // restart from the first
  1614                   // restart from the first
  1614                   it = m_ceBsrRxed.begin ();
  1615                   it = m_ceBsrRxed.begin ();
       
  1616                 }
       
  1617               NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
       
  1618               // remove UE from allocation map
       
  1619               for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
       
  1620                 {
       
  1621                   rbgAllocationMap.at (i) = 0;
  1615                 }
  1622                 }
  1616               continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
  1623               continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
  1617             }
  1624             }
  1618           uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
  1625           uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
  1619         }
  1626         }