Commit e38d2c4a authored by Navid Nikaein's avatar Navid Nikaein

update the x2 ho status

parent eacf5525
......@@ -534,8 +534,10 @@ typedef struct UE_RRC_INST_s {
// X2 HO stats and measurments
uint8_t rrc_ue_do_meas; // flag to start the meas only once
time_stats_t rrc_ue_x2_src_enb; // form connected to idle : include x2 delay
uint32_t rrc_ue_x2_src_enb_ms; // form connected to idle : include x2 delay
struct list rrc_ue_x2_src_enb_list;
time_stats_t rrc_ue_x2_target_enb; // from idle to connected
uint32_t rrc_ue_x2_target_enb_ms; // from idle to connected
struct list rrc_ue_x2_target_enb_list;
} UE_RRC_INST;
......
......@@ -1968,10 +1968,12 @@ rrc_ue_decode_dcch(
if (target_eNB_index != 0xFF) {
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas=0;
stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0;
//stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
//double t_x2_src_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_src_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms;
push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_list, t_x2_src_enb);
start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe ;
init_meas_timers(ctxt_pP); // Initialize handover measurement timers
rrc_ue_generate_RRCConnectionReconfigurationComplete(
ctxt_pP,
......@@ -3694,7 +3696,8 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con
if (UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas == 0 ){
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_do_meas = 1;
start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
//start_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb);
UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_src_enb_ms = ctxt_pP->frame*10+ctxt_pP->subframe ;
}
rrc_ue_generate_MeasurementReport(
ctxt_pP,
......
......@@ -371,7 +371,10 @@ rrc_top_cleanup(
double x2_src_median = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/2];
double x2_src_q1 = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q1
double x2_src_q3 = x2_src_table[3*UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size/4]; // Q3
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_src_median,x2_src_q1,x2_src_q3,UE_rrc_inst[module_id].rrc_ue_x2_src_enb.min, UE_rrc_inst[module_id].rrc_ue_x2_src_enb.max);
double x2_src_min = x2_src_table[0]; // Q3
double x2_src_max = x2_src_table[UE_rrc_inst[module_id].rrc_ue_x2_src_enb_list.size-1]; // Q3
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_src_median,x2_src_q1,x2_src_q3,x2_src_min,x2_src_max);
}
LOG_I(RRC,"[DST]median;q1;q3;min;max;\n");
for (module_id = 0; module_id < NB_UE_INST; module_id++) {
......@@ -382,7 +385,9 @@ rrc_top_cleanup(
double x2_target_median = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/2];
double x2_target_q1 = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q1
double x2_target_q3 = x2_target_table[3*UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size/4]; // Q3
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_target_median,x2_target_q1,x2_target_q3,UE_rrc_inst[module_id].rrc_ue_x2_target_enb.min, UE_rrc_inst[module_id].rrc_ue_x2_target_enb.max);
double x2_target_min = x2_target_table[0]; // MIN
double x2_target_max = x2_target_table[UE_rrc_inst[module_id].rrc_ue_x2_target_enb_list.size-1]; // mAX
LOG_I(RRC,"%lf;%lf;%lf;%d;%d;\n",x2_target_median,x2_target_q1,x2_target_q3,x2_target_min, x2_target_max);
}
}
......
......@@ -4294,8 +4294,9 @@ rrc_eNB_decode_dcch(
rrcConnectionReconfigurationComplete_r8);
if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION){
stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0;
//stop_meas(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb);
//double t_x2_target_enb = (double)UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb.p_time/get_cpu_freq_GHz()/1000.0;
double t_x2_target_enb = (double)ctxt_pP->frame*10+ctxt_pP->subframe - UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_ms;
push_front(&UE_rrc_inst[ctxt_pP->module_id].rrc_ue_x2_target_enb_list, t_x2_target_enb);
}
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment