Commit b2821c1f authored by Raymond Knopp's avatar Raymond Knopp

T tracer configuration identical for all executables, no ref to T Tracer...

T tracer configuration identical for all executables, no ref to T Tracer config variables (T_port, T_wait...) outside the T tracer
parent 719762cc
...@@ -571,6 +571,7 @@ extern T_cache_t *T_cache; ...@@ -571,6 +571,7 @@ extern T_cache_t *T_cache;
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_STDOUT "print log messges on console\n" #define CONFIG_HLP_STDOUT "print log messges on console\n"
#define TTRACER_CONFIG_PREFIX "TTracer" #define TTRACER_CONFIG_PREFIX "TTracer"
/*------------------------------------------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------------------------------------*/
/* configuration parameters for TTRACE utility */ /* configuration parameters for TTRACE utility */
...@@ -585,8 +586,7 @@ extern T_cache_t *T_cache; ...@@ -585,8 +586,7 @@ extern T_cache_t *T_cache;
extern int *T_active; /* log on stdout */
extern int T_stdout; /* log on stdout */
void T_init(int remote_port, int wait_for_tracer, int dont_fork); void T_init(int remote_port, int wait_for_tracer, int dont_fork);
void T_Config_Init(void); void T_Config_Init(void);
#else /* T_TRACER */ #else /* T_TRACER */
......
...@@ -566,10 +566,7 @@ static void get_options(void) { ...@@ -566,10 +566,7 @@ static void get_options(void) {
logInit_log_mem(); logInit_log_mem();
} }
#if T_TRACER
paramdef_t cmdline_ttraceparams[] =CMDLINE_TTRACEPARAMS_DESC ;
config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL);
#endif
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) {
memset((void*)&RC,0,sizeof(RC)); memset((void*)&RC,0,sizeof(RC));
...@@ -590,11 +587,6 @@ static void get_options(void) { ...@@ -590,11 +587,6 @@ static void get_options(void) {
} }
#if T_TRACER
int T_nowait = 0; /* by default we wait for the tracer */
int T_port = 2021; /* default port to listen to to wait for the tracer */
int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
#endif
...@@ -969,7 +961,7 @@ int main( int argc, char **argv ) ...@@ -969,7 +961,7 @@ int main( int argc, char **argv )
#if T_TRACER #if T_TRACER
T_init(T_port, 1-T_nowait, T_dont_fork); T_Config_Init();
#endif #endif
......
...@@ -578,10 +578,6 @@ static void get_options(void) { ...@@ -578,10 +578,6 @@ static void get_options(void) {
tx_gain[0][CC_id] = tx_gain[0][0]; tx_gain[0][CC_id] = tx_gain[0][0];
} }
#if T_TRACER
paramdef_t cmdline_ttraceparams[] =CMDLINE_TTRACEPARAMS_DESC ;
config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL);
#endif
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) { if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) {
// Here the configuration file is the XER encoded UE capabilities // Here the configuration file is the XER encoded UE capabilities
...@@ -594,14 +590,6 @@ static void get_options(void) { ...@@ -594,14 +590,6 @@ static void get_options(void) {
} }
#if T_TRACER
int T_nowait = 0; /* by default we wait for the tracer */
int T_port = 2021; /* default port to listen to to wait for the tracer */
int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
#endif
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
int CC_id; int CC_id;
...@@ -841,7 +829,7 @@ int main( int argc, char **argv ) ...@@ -841,7 +829,7 @@ int main( int argc, char **argv )
#if T_TRACER #if T_TRACER
T_init(T_port, 1-T_nowait, T_dont_fork); T_Config_Init();
#endif #endif
......
...@@ -283,11 +283,6 @@ help (void) ...@@ -283,11 +283,6 @@ help (void)
printf ("-Z Reserved\n"); printf ("-Z Reserved\n");
printf ("--xforms Activate the grapical scope\n"); printf ("--xforms Activate the grapical scope\n");
#if T_TRACER
printf ("--T_port [port] use given port\n");
printf ("--T_nowait don't wait for tracer, start immediately\n");
printf ("--T_dont_fork to ease debugging with gdb\n");
#endif
} }
pthread_t log_thread; pthread_t log_thread;
...@@ -993,12 +988,6 @@ int restart_L1L2(int enb_id) ...@@ -993,12 +988,6 @@ int restart_L1L2(int enb_id)
return 0; return 0;
} }
#if T_TRACER
int T_wait = 1; /* by default we wait for the tracer */
int T_port = 2021; /* default port to listen to to wait for the tracer */
int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
#endif
void wait_RUs(void) void wait_RUs(void)
{ {
...@@ -1120,7 +1109,7 @@ int main (int argc, char **argv) ...@@ -1120,7 +1109,7 @@ int main (int argc, char **argv)
get_simulation_options (argc, argv); //Command-line options get_simulation_options (argc, argv); //Command-line options
#if T_TRACER #if T_TRACER
T_init(T_port, T_wait, T_dont_fork); T_Config_Init();
#endif #endif
// Initialize VCD LOG module // Initialize VCD LOG module
......
...@@ -198,11 +198,6 @@ void get_simulation_options(int argc, char *argv[]) ...@@ -198,11 +198,6 @@ void get_simulation_options(int argc, char *argv[])
LONG_OPTION_PHYTEST, LONG_OPTION_PHYTEST,
LONG_OPTION_XFORMS, LONG_OPTION_XFORMS,
#if T_TRACER
LONG_OPTION_T_PORT,
LONG_OPTION_T_NOWAIT,
LONG_OPTION_T_DONT_FORK,
#endif
}; };
static struct option long_options[] = { static struct option long_options[] = {
...@@ -237,12 +232,6 @@ void get_simulation_options(int argc, char *argv[]) ...@@ -237,12 +232,6 @@ void get_simulation_options(int argc, char *argv[])
{"phy-test", no_argument, NULL, LONG_OPTION_PHYTEST}, {"phy-test", no_argument, NULL, LONG_OPTION_PHYTEST},
{"xforms", no_argument, 0, LONG_OPTION_XFORMS}, {"xforms", no_argument, 0, LONG_OPTION_XFORMS},
#if T_TRACER
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
{"T_dont_fork", no_argument, 0, LONG_OPTION_T_DONT_FORK},
#endif
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
...@@ -410,26 +399,6 @@ void get_simulation_options(int argc, char *argv[]) ...@@ -410,26 +399,6 @@ void get_simulation_options(int argc, char *argv[])
xforms=1; xforms=1;
break; break;
#if T_TRACER
case LONG_OPTION_T_PORT: {
extern int T_port;
if (optarg == NULL) abort(); /* should not happen */
T_port = atoi(optarg);
break;
}
case LONG_OPTION_T_NOWAIT: {
extern int T_wait;
T_wait = 0;
break;
}
case LONG_OPTION_T_DONT_FORK: {
extern int T_dont_fork;
T_dont_fork = 1;
break;
}
#endif
case 'a': case 'a':
abstraction_flag = 1; abstraction_flag = 1;
......
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