LOG_E(PHY,"Fatal error in HARQ entity due to unknown process identity %d at line %d in function %s of file %s \n",harq_pid,__LINE__,__func__,__FILE__);
assert(0);
}
/* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */
if((harq_processes[harq_pid].first_tx==1)&&(rnti_type==_C_RNTI_)){/* no transmission yet on this process so consider its harq buffer as empty */
harq_processes[harq_pid].first_tx=0;
harq_processes[harq_pid].ndi=ndi;/* store first value of ndi */
harq_processes[harq_pid].round=0;
result_harq=NEW_TRANSMISSION_HARQ;
LOG_D(PHY,"[HARQ-UL-PUSCH harqId : %d] first new transmission \n",harq_pid);
}
/* 38.321 5.4.2.1 2> if the received grant was not addressed to a Temporary C-RNTI on PDCCH, and the NDI provided in the associated HARQ */
/* information has been toggled compared to the value in the previous transmission of this TB of this HARQ process */
elseif((harq_processes[harq_pid].ndi!=ndi)&&(rnti_type!=_TC_RNTI_)){/* is ndi toogled so this is a new grant ? */
harq_processes[harq_pid].ndi=ndi;/* store first value of ndi */
harq_processes[harq_pid].round=0;
result_harq=NEW_TRANSMISSION_HARQ;
LOG_D(PHY,"[HARQ-UL-PUSCH harqId : %d] new transmission due to toogle of ndi \n",harq_pid);