@@ -651,36 +678,38 @@ int flexran_get_tpc(mid_t mod_id, mid_t ue_id) {
}
if(normalized_rx_power>(target_rx_power+1)){
tpc=0;//-1
tpc=0;//-1
}elseif(normalized_rx_power<(target_rx_power-1)){
tpc=2;//+1
tpc=2;//+1
}else{
tpc=1;//0
tpc=1;//0
}
returntpc;
}
intflexran_get_harq(constmid_tmod_id,constuint8_tCC_id,constmid_tue_id,constintframe,constuint8_tsubframe,int*id,int*status){//flag_id_status = 0 then id, else status
intflexran_get_harq(constmid_tmod_id,constuint8_tCC_id,constmid_tue_id,constintframe,constuint8_tsubframe,int*id,int*round){//flag_id_status = 0 then id, else status
/*TODO: Add int TB in function parameters to get the status of the second TB. This can be done to by editing in
* get_ue_active_harq_pid function in line 272 file: phy_procedures_lte_eNB.c to add
/* note for dl_buffer_head_sdu_remaining_size_to_send[i] :
* 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent
*/
if(UE_template->dl_buffer_info[i]>0)
LOG_D(MAC,
"[eNB %d] Frame %d Subframe %d : RLC status for UE %d in LCID%d: total of %d pdus and size %d, head sdu queuing time %d, remaining size %d, is segmeneted %d \n",
if(round2>round1){// Check first if one of the UEs has an active HARQ process which needs service and swap order
swap_UEs(UE_list,UE_id1,UE_id2,0);
}elseif(round2==round1){
// RK->NN : I guess this is for fairness in the scheduling. This doesn't make sense unless all UEs have the same configuration of logical channels. This should be done on the sum of all information that has to be sent. And still it wouldn't ensure fairness. It should be based on throughput seen by each UE or maybe using the head_sdu_creation_time, i.e. swap UEs if one is waiting longer for service.
// first check the buffer status for SRB1 and SRB2