Commit c5a3b8a9 authored by winckel's avatar winckel

Modified timer log to use oaisim / lte-softmodem logging rather than fprintf when available.

Moved itti initialization in oaisim to have log initialized just before.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4594 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b566d59d
......@@ -41,14 +41,19 @@
#include "assertions.h"
#include "intertask_interface.h"
#include "timer.h"
#include "log.h"
#include "queue.h"
#if defined (LOG_D) && defined (LOG_E)
# define TMR_DEBUG(x, args...) LOG_D(TMR, x, ##args)
# define TMR_ERROR(x, args...) LOG_E(TMR, x, ##args)
#endif
#ifndef TMR_DEBUG
# define TMR_DEBUG(x, args...) do { fprintf(stdout, "[TMR][D]"x, ##args); } while(0)
# define TMR_DEBUG(x, args...) do { fprintf(stdout, "[TMR][D]"x, ##args); } while(0)
#endif
#ifndef TMR_ERROR
# define TMR_ERROR(x, args...) do { fprintf(stdout, "[TMR][E]"x, ##args); } while(0)
# define TMR_ERROR(x, args...) do { fprintf(stdout, "[TMR][E]"x, ##args); } while(0)
#endif
int timer_handle_signal(siginfo_t *info);
......@@ -204,6 +209,8 @@ int timer_setup(
pthread_mutex_lock(&timer_desc.timer_list_mutex);
STAILQ_INSERT_TAIL(&timer_desc.timer_queue, timer_p, entries);
pthread_mutex_unlock(&timer_desc.timer_list_mutex);
#else
return -1;
#endif
return 0;
......
......@@ -74,7 +74,7 @@ char smbv_ip[16];
#include "enb_app.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface_init.h"
# include "intertask_interface.h"
# include "timer.h"
# if defined(ENABLE_USE_MME)
# include "s1ap_eNB.h"
......@@ -963,10 +963,6 @@ int main(int argc, char **argv) {
// get command-line options
get_simulation_options (argc, argv); //Command-line options
#if defined(ENABLE_ITTI)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, oai_emulation.info.itti_dump_file);
#endif
// Initialize VCD LOG module
vcd_signal_dumper_init ("openair_dump.vcd");
......
......@@ -14,6 +14,10 @@
#include "UTIL/OTG/otg_vars.h"
#include "oml.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface_init.h"
#endif
mapping log_level_names[] =
{
{"emerg", LOG_EMERG},
......@@ -381,6 +385,10 @@ void oaisim_config() {
//initialize the log generator
logInit();
#if defined(ENABLE_ITTI)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, oai_emulation.info.itti_dump_file);
#endif
// init ocg if enabled, otherwise take the params form the init_oai_emulation()
// and command line options given by the user
if (oai_emulation.info.ocg_enabled == 1){ // activate OCG: xml-based scenario parser
......@@ -1007,9 +1015,12 @@ int ocg_config_emu(){
if (oai_emulation.emulation_config.emulation_time_ms != 0) {
oai_emulation.info.n_frames = (int) oai_emulation.emulation_config.emulation_time_ms / 10; // configure the number of frame
oai_emulation.info.n_frames_flag = 1;
}
if (oai_emulation.info.n_frames_flag) {
LOG_I(OCG, "number of frames in emulation is set to %d\n", oai_emulation.info.n_frames);
} else
} else {
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 );
......
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