diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index 8b182ef380..9fb7915544 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -387,6 +387,86 @@ static void *l2l1_task(void *args_p) { char fname[64], vname[64]; + +#ifdef XFORMS + // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) + // at eNB 0, an UL scope for every UE + FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX]; + FD_lte_phy_scope_enb *form_enb[NUMBER_OF_UE_MAX]; + char title[255]; + char xname[32] = "oaisim"; + int xargc=1; + char *xargv[1]; +#endif + +#ifdef PRINT_STATS + int len; + FILE *UE_stats[NUMBER_OF_UE_MAX], *UE_stats_th[NUMBER_OF_UE_MAX], *eNB_stats[NUMBER_OF_eNB_MAX], *eNB_avg_thr, *eNB_l2_stats; + char UE_stats_filename[255]; + char eNB_stats_filename[255]; + char UE_stats_th_filename[255]; + char eNB_stats_th_filename[255]; +#endif + +#ifdef XFORMS + xargv[0] = xname; + fl_initialize (&xargc, xargv, NULL, 0, 0); + eNB_id = 0; + for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) { + // DL scope at UEs + form_ue[UE_id] = create_lte_phy_scope_ue(); + sprintf (title, "LTE DL SCOPE eNB %d to UE %d", eNB_id, UE_id); + fl_show_form (form_ue[UE_id]->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); + + // UL scope at eNB 0 + form_enb[UE_id] = create_lte_phy_scope_enb(); + sprintf (title, "LTE UL SCOPE UE %d to eNB %d", UE_id, eNB_id); + fl_show_form (form_enb[UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); + + if (openair_daq_vars.use_ia_receiver == 1) { + fl_set_button(form_ue[UE_id]->button_0,1); + fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver ON"); + fl_set_object_color(form_ue[UE_id]->button_0, FL_GREEN, FL_GREEN); + } + + } +#endif + + +#ifdef PRINT_STATS + for (UE_id=0;UE_idlte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); - - // UL scope at eNB 0 - fl_initialize (&argc, argv, NULL, 0, 0); - form_enb[UE_id] = create_lte_phy_scope_enb(); - sprintf (title, "LTE UL SCOPE UE %d to eNB %d", UE_id, eNB_id); - fl_show_form (form_enb[UE_id]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); - - if (openair_daq_vars.use_ia_receiver == 1) { - fl_set_button(form_ue[UE_id]->button_0,1); - fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver ON"); - fl_set_object_color(form_ue[UE_id]->button_0, FL_GREEN, FL_GREEN); - } - - } -#endif - #ifdef SMBV smbv_init_config(smbv_fname, smbv_nframes); smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms); @@ -1170,24 +1192,6 @@ int main(int argc, char **argv) { mac_top_cleanup (); #endif -#ifdef PRINT_STATS - for (UE_id=0;UE_id