src/lte/model/lte-enb-mac.cc
changeset 8888 d70ef2af2572
parent 8729 74de12409ee5
child 9047 284d30c8dd42
child 9337 ae7126b266ce
equal deleted inserted replaced
8887:90cbd09c8ff6 8888:d70ef2af2572
   577   if (it == m_ulInfoListElements.end ())
   577   if (it == m_ulInfoListElements.end ())
   578     {
   578     {
   579       // new RNTI
   579       // new RNTI
   580       UlInfoListElement_s ulinfonew;
   580       UlInfoListElement_s ulinfonew;
   581       ulinfonew.m_rnti = tag.GetRnti ();
   581       ulinfonew.m_rnti = tag.GetRnti ();
   582       std::vector <uint16_t>::iterator it = ulinfonew.m_ulReception.begin ();
   582       // always allocate full size of ulReception vector, initializing all elements to 0
   583       ulinfonew.m_ulReception.insert (it + (tag.GetLcid () - 1), p->GetSize ());
   583       ulinfonew.m_ulReception.assign (MAX_LC_LIST+1, 0);
       
   584       // set the element for the current LCID
       
   585       ulinfonew.m_ulReception.at (tag.GetLcid ()) = p->GetSize ();
   584       ulinfonew.m_receptionStatus = UlInfoListElement_s::Ok;
   586       ulinfonew.m_receptionStatus = UlInfoListElement_s::Ok;
   585       ulinfonew.m_tpc = 0; // Tx power control not implemented at this stage
   587       ulinfonew.m_tpc = 0; // Tx power control not implemented at this stage
   586       m_ulInfoListElements.insert (std::pair<uint16_t, UlInfoListElement_s > (tag.GetRnti (), ulinfonew));
   588       m_ulInfoListElements.insert (std::pair<uint16_t, UlInfoListElement_s > (tag.GetRnti (), ulinfonew));
   587 
   589 
   588     }
   590     }
   589   else
   591   else
   590     {
   592     {
   591       if ((*it).second.m_ulReception.size () < tag.GetLcid ())
   593       // existing RNTI: we just set the value for the current
   592         {
   594       // LCID. Note that the corresponding element had already been
   593           std::vector <uint16_t>::iterator itV = (*it).second.m_ulReception.begin ();
   595       // allocated previously.
   594           (*it).second.m_ulReception.insert (itV + (tag.GetLcid () - 1), p->GetSize ());
   596       NS_ASSERT_MSG ((*it).second.m_ulReception.at (tag.GetLcid ()) == 0, "would overwrite previously written ulReception element");
   595         }
   597       (*it).second.m_ulReception.at (tag.GetLcid ()) = p->GetSize ();
   596       else
       
   597         {
       
   598           (*it).second.m_ulReception.at (tag.GetLcid () - 1) += p->GetSize ();
       
   599         }
       
   600       (*it).second.m_receptionStatus = UlInfoListElement_s::Ok;
   598       (*it).second.m_receptionStatus = UlInfoListElement_s::Ok;
   601     }
   599     }
   602 
   600 
   603 
   601 
   604 
   602