add makefile support for DB stats, fix minor issues for jitter calculation
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4030 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
+27
-15
@@ -65,6 +65,13 @@ ifdef XFORMS
|
||||
CFLAGS += -DXFORMS
|
||||
endif
|
||||
|
||||
# Check if libmysqlclient is installed and use it if found to store simulation data for postprocessing
|
||||
ENABLE_DB = $(shell if [ `dpkg -l | grep libmysqlclient -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
|
||||
ifeq ($(ENABLE_DB), 1)
|
||||
CFLAGS +=-I/usr/include/mysql -L/usr/lib/mysql -DENABLE_DB_STATS
|
||||
DB_LDFLAGS = -lmysqlclient
|
||||
endif
|
||||
|
||||
ifdef PRINT_STATS
|
||||
CFLAGS += -DPRINT_STATS
|
||||
endif
|
||||
@@ -309,7 +316,7 @@ oaisim : $(ASN1_MSG_OBJS1) $(OBJ) oaisim.c $(LFDS_DIR)/bin/liblfds611.a
|
||||
endif
|
||||
@echo "Compiling oaisim.c ..."
|
||||
@$(CC) -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) -I$(ASN1_MSG_INC) $(S1AP_Incl) -o oaisim $(CFLAGS) $(EXTRA_CFLAGS) $^ \
|
||||
-lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt $(LFDS_DIR)/bin/liblfds611.a $(PGM_LDFLAGS)
|
||||
-lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt $(LFDS_DIR)/bin/liblfds611.a $(PGM_LDFLAGS) $(DB_LDFLAGS)
|
||||
|
||||
ifeq ($(rrc_cellular_eNB),1)
|
||||
mv oaisim oaisim_eNB
|
||||
@@ -320,22 +327,22 @@ endif
|
||||
|
||||
oaisimCROWN : $(OBJ) $(ASN1_MSG_OBJS1) oaisimCROWN.c
|
||||
@echo "Compiling oaisimCROWN.c ..."
|
||||
@$(CC) oaisimCROWN.c -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) -I$(ASN1_MSG_INC) $(S1AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt
|
||||
@$(CC) oaisimCROWN.c -I$(TOP_DIR) $(L2_incl) $(UTIL_incl) -I$(ASN1_MSG_INC) $(S1AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms -lxml2 -lX11 -lXpm -lrt
|
||||
|
||||
test_nasmesh_fix:
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink_address_fix.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko)
|
||||
(cp $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko . )
|
||||
nasmesh_fix:
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink_address_fix.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink_address_fix.ko)
|
||||
(sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
|
||||
nasmesh_nl:
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
|
||||
(cd $(OPENAIR2_DIR) && make nasmesh_netlink.ko)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink.ko)
|
||||
(sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
|
||||
rb_tool:
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
|
||||
(cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && $(MAKE))
|
||||
|
||||
nasmesh_install:
|
||||
(sudo rmmod nasmesh)
|
||||
@@ -399,13 +406,15 @@ cleancell:
|
||||
rm -f $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR/*.d
|
||||
|
||||
print:
|
||||
@echo $(cygwin)
|
||||
@echo $(OCG_FLAG)
|
||||
@echo $(CFLAGS)
|
||||
@echo $(EXTRA_CFLAGS)
|
||||
# @echo $(cygwin)
|
||||
@echo $(OBJ)
|
||||
@echo $(IS_REL10)
|
||||
@echo $(IS_REL8)
|
||||
@echo $(OCG_FLAG)
|
||||
@echo "CFLAGS are " $(CFLAGS)
|
||||
@echo "EXTRA_CFLAGS are" $(EXTRA_CFLAGS)
|
||||
|
||||
@echo "IS_REL8 is " $(IS_REL10)
|
||||
@echo "IS_REL8 is " $(IS_REL8)
|
||||
@echo "ENABLE_DB is " $(ENABLE_DB)
|
||||
|
||||
showcflags:
|
||||
@echo $(CFLAGS)
|
||||
@@ -428,6 +437,9 @@ otg_gp:
|
||||
otg_gp_bg:
|
||||
export TITLE="Background Goodput(Kb/s)"
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_GP_bg.dat" "[$(COL1):$(COL2)]"
|
||||
otg_jitter:
|
||||
export TITLE="Aplication Jitter(ms)"
|
||||
$(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_jitter.dat" "[$(COL1):$(COL2)]"
|
||||
|
||||
pexpect = $(shell if [ `dpkg -l | grep pexpect -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
|
||||
|
||||
|
||||
@@ -489,6 +489,8 @@ int
|
||||
LOG_I(OCM,"Running with frame_type %d, Nid_cell %d, N_RB_DL %d, EP %d, mode %d, target dl_mcs %d, rate adaptation %d, nframes %d, abstraction %d, channel %s\n",
|
||||
oai_emulation.info.frame_type, Nid_cell, oai_emulation.info.N_RB_DL, oai_emulation.info.extended_prefix_flag, oai_emulation.info.transmission_mode,target_dl_mcs,rate_adaptation_flag,oai_emulation.info.n_frames,abstraction_flag,oai_emulation.environment_system_config.fading.small_scale.selected_option);
|
||||
|
||||
set_seed = oai_emulation.emulation_config.seed.value;
|
||||
|
||||
init_seed(set_seed);
|
||||
|
||||
init_openair1();
|
||||
|
||||
@@ -123,6 +123,9 @@ mapping otg_distribution_names[] =
|
||||
{"gamma", 8},
|
||||
{"cauchy",9},
|
||||
{"log_normal",10},
|
||||
{"tarma",11},
|
||||
{"video",12},
|
||||
{"background_dist",13},
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
@@ -816,7 +819,7 @@ int ocg_config_app(){
|
||||
g_otg->holding_time_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=oai_emulation.application_config.customized_traffic.holding_time_off_pe[customized_traffic_config_index];
|
||||
g_otg->holding_time_pe_off[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=oai_emulation.application_config.customized_traffic.holding_time_pe_off[customized_traffic_config_index];
|
||||
|
||||
LOG_I(OTG,"customized:: OCG_config_OTG: (1) FORMAT (%d:%d) source = %d, dest = %d, Application = %d, background %d\n", sid_start, sid_end, source_id_index, destination_id_index, g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]], g_otg->background[source_id_index][destination_id_index]);
|
||||
LOG_I(OTG,"customized:: OCG_config_OTG: (1) FORMAT (%d:%d) source = %d, dest = %d, Application = %d, state %d, background %d IDT DIST %d \n", sid_start, sid_end, source_id_index, destination_id_index, g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]], state, g_otg->background[source_id_index][destination_id_index], g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state]);
|
||||
g_otg->application_idx[source_id_index][destination_id_index]+=1;
|
||||
}
|
||||
}
|
||||
@@ -986,7 +989,8 @@ int ocg_config_emu(){
|
||||
LOG_I(OCG, "number of frames in emulation is set to infinity\n");
|
||||
|
||||
oai_emulation.info.seed = (oai_emulation.emulation_config.seed.value == 0) ? oai_emulation.info.seed : oai_emulation.emulation_config.seed.value;
|
||||
|
||||
LOG_I (OCG,"The seed value is set to %d \n", oai_emulation.info.seed );
|
||||
|
||||
if (oai_emulation.info.cli_enabled == 1){
|
||||
if (cli_server_init(cli_server_recv) < 0) {
|
||||
LOG_E(EMU,"cli server init failed \n");
|
||||
|
||||
Reference in New Issue
Block a user