From 437f83b6023aee92e2f0d618f186c0e3e42a8b43 Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Thu, 22 Aug 2013 08:15:34 +0000 Subject: [PATCH] bugfix in config of OTG in oaisim, extended eNB stats in oaisim to multiple eNBs git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4090 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- targets/SIMU/USER/oaisim.c | 27 ++++++++++++++++----------- targets/SIMU/USER/oaisim_config.c | 5 +++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index 442ce09f0a..2ca7dc54f0 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -388,8 +388,9 @@ int #ifdef PRINT_STATS int len; - FILE *UE_stats[NUMBER_OF_UE_MAX], *UE_stats_th[NUMBER_OF_UE_MAX], *eNB_stats, *eNB_avg_thr, *eNB_l2_stats; + 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 @@ -456,11 +457,13 @@ int #ifdef PRINT_STATS for (UE_id=0;UE_idframe,(PHY_vars_eNB_g[eNB_id]->total_system_throughput)/((PHY_vars_eNB_g[eNB_id]->frame+1)*10)); - if (eNB_stats) { + if (eNB_stats[eNB_id]) { len = dump_eNB_stats(PHY_vars_eNB_g[eNB_id], stats_buffer, 0); - rewind (eNB_stats); - fwrite (stats_buffer, 1, len, eNB_stats); - fflush(eNB_stats); + rewind (eNB_stats[eNB_id]); + fwrite (stats_buffer, 1, len, eNB_stats[eNB_id]); + fflush(eNB_stats[eNB_id]); } #ifdef OPENAIR2 if (eNB_l2_stats) { @@ -947,14 +950,16 @@ int #endif #ifdef PRINT_STATS - for(UE_id=0;UE_idapplication_idx[source_id_index][destination_id_index]+=1; LOG_I(OTG,"configure OTG through options %s\n", oai_emulation.info.otg_traffic); for (i=0; inum_nodes; i++){ for (j=0; jnum_nodes; j++){ - for (k=0; k<4; k++){ + g_otg->application_idx[i][j]=1; + for (k=0; kapplication_idx[i][j]; k++){ g_otg->application_type[i][j][k] = map_str_to_int(otg_app_type_names, oai_emulation.info.otg_traffic); g_otg->background[i][j][k]=oai_emulation.info.otg_bg_traffic_enabled;