Commit 7d1665fe authored by Cedric Roux's avatar Cedric Roux
Browse files

add a timelog to enb.c

parent b50fb79d
......@@ -119,6 +119,11 @@ static void enb_main_gui(gui *g, event_handler *h, void *database)
widget *input_signal_plot;
logger *input_signal_log;
view *input_signal_view;
widget *timeline_plot;
logger *input_signal_timelog;
view *input_signal_timeview;
view *input_signal_subview;
int i;
main_window = new_toplevel_window(g, 800, 600, "eNB tracer");
top_container = new_container(g, VERTICAL);
......@@ -138,6 +143,20 @@ static void enb_main_gui(gui *g, event_handler *h, void *database)
input_signal_view = new_view_xy(7680*10, 10,
g, input_signal_plot, new_color(g, "#0c0c72"));
logger_add_view(input_signal_log, input_signal_view);
line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 16, 5);
widget_add_child(g, line, timeline_plot, -1);
container_set_child_growable(g, line, timeline_plot, 1);
for (i = 0; i < 16; i++)
timeline_set_subline_background_color(g, timeline_plot, i,
new_color(g, i & 1 ? "#ddd" : "#eee"));
input_signal_timelog = new_timelog(h, database, "ENB_INPUT_SIGNAL");
input_signal_timeview = new_view_time(3600, 10, g, timeline_plot);
input_signal_subview = new_subview_time(input_signal_timeview,
0, FOREGROUND_COLOR);
logger_add_view(input_signal_timelog, input_signal_subview);
}
int main(int n, char **v)
......
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