src/lte/model/lte-spectrum-phy.cc
changeset 9367 b4fcfc26791f
parent 9360 197c71f20845
child 9368 f5eaecb7acc2
equal deleted inserted replaced
9366:07ad04acbee1 9367:b4fcfc26791f
   835                 }
   835                 }
   836             }
   836             }
   837           TbStats_t tbStats = LteMiErrorModel::GetTbDecodificationStats (m_sinrPerceived, (*itTb).second.rbBitmap, (*itTb).second.size, (*itTb).second.mcs, harqInfoList);
   837           TbStats_t tbStats = LteMiErrorModel::GetTbDecodificationStats (m_sinrPerceived, (*itTb).second.rbBitmap, (*itTb).second.size, (*itTb).second.mcs, harqInfoList);
   838           (*itTb).second.mi = tbStats.mi;
   838           (*itTb).second.mi = tbStats.mi;
   839           (*itTb).second.corrupt = m_random->GetValue () > tbStats.tbler ? false : true;
   839           (*itTb).second.corrupt = m_random->GetValue () > tbStats.tbler ? false : true;
   840           // DEBUG: force error for testing HARQ
       
   841 //           if ((*itTb).second.downlink)
       
   842 //           {
       
   843 // //             if (((*itTb).second.harqProcessId == 0)&&(Simulator::Now ().GetNanoSeconds ()<=20000000))
       
   844 //             if ((errors<4) && ((*itTb).second.harqProcessId == 0) && ( ((*itTb).first.m_rnti==1)||((*itTb).first.m_rnti==3)) )
       
   845 //               {
       
   846 //                 (*itTb).second.corrupt = true;
       
   847 //                 errors++;
       
   848 //               }
       
   849 //           }
       
   850           NS_LOG_DEBUG (this << "RNTI " << (*itTb).first.m_rnti << " size " << (*itTb).second.size << " mcs " << (uint32_t)(*itTb).second.mcs << " bitmap " << (*itTb).second.rbBitmap.size () << " layer " << (uint16_t)(*itTb).first.m_layer << " TBLER " << tbStats.tbler << " corrupted " << (*itTb).second.corrupt);
   840           NS_LOG_DEBUG (this << "RNTI " << (*itTb).first.m_rnti << " size " << (*itTb).second.size << " mcs " << (uint32_t)(*itTb).second.mcs << " bitmap " << (*itTb).second.rbBitmap.size () << " layer " << (uint16_t)(*itTb).first.m_layer << " TBLER " << tbStats.tbler << " corrupted " << (*itTb).second.corrupt);
   851        }
   841        }
   852       
   842       
   853 //       for (uint16_t i = 0; i < (*itTb).second.rbBitmap.size (); i++)
       
   854 //         {
       
   855 //           NS_LOG_DEBUG (this << " RB " << (*itTb).second.rbBitmap.at (i) << " SINR " << m_sinrPerceived[(*itTb).second.rbBitmap.at (i)]);
       
   856 //         }
       
   857       itTb++;
   843       itTb++;
   858     }
   844     }
   859     std::map <uint16_t, DlInfoListElement_s> harqDlInfoMap;
   845     std::map <uint16_t, DlInfoListElement_s> harqDlInfoMap;
   860     for (std::list<Ptr<PacketBurst> >::const_iterator i = m_rxPacketBurstList.begin (); 
   846     for (std::list<Ptr<PacketBurst> >::const_iterator i = m_rxPacketBurstList.begin (); 
   861     i != m_rxPacketBurstList.end (); ++i)
   847     i != m_rxPacketBurstList.end (); ++i)