From 32302fc233a8167df3618eae0a266f7c4130605c Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 25 May 2016 17:59:13 +0200 Subject: [PATCH] add legacy logs to enb.c --- common/utils/T/tracer/enb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/common/utils/T/tracer/enb.c b/common/utils/T/tracer/enb.c index a0431b7175d..11e90769b4a 100644 --- a/common/utils/T/tracer/enb.c +++ b/common/utils/T/tracer/enb.c @@ -16,6 +16,7 @@ typedef struct { view *rrcview; + view *legacy; } enb_gui; #define DEFAULT_REMOTE_PORT 2021 @@ -173,6 +174,13 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database) container_set_child_growable(g, col, text, 1); textview = new_view_textlist(10000, 10, g, text); e->rrcview = textview; + + /* legacy logs (LOG_I, LOG_D, ...) */ + widget_add_child(g, top_container, new_label(g, "LEGACY"), -1); + text = new_textlist(g, 100, 10, new_color(g, "#eeb")); + widget_add_child(g, top_container, text, -1); + container_set_child_growable(g, top_container, text, 1); + e->legacy = new_view_textlist(10000, 10, g, text); } void view_add_log(view *v, char *log, event_handler *h, void *database, @@ -251,6 +259,17 @@ int main(int n, char **v) enb_main_gui(&eg, g, h, database); + for (i = 0; i < number_of_events; i++) { + logger *textlog; + char *name, *desc; + database_get_generic_description(database, i, &name, &desc); + if (strncmp(name, "LEGACY_", 7) != 0) continue; + textlog = new_textlog(h, database, name, desc); + logger_add_view(textlog, eg.legacy); + free(name); + free(desc); + } + on_off(database, "ENB_INPUT_SIGNAL", is_on, 1); on_off(database, "ENB_UL_TICK", is_on, 1); on_off(database, "ENB_DL_TICK", is_on, 1); -- GitLab