Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
68106e4a
Commit
68106e4a
authored
May 01, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start working on the event selector window
parent
bd50539f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
8 deletions
+63
-8
common/utils/T/tracer/Makefile
common/utils/T/tracer/Makefile
+1
-0
common/utils/T/tracer/Makefile.remote
common/utils/T/tracer/Makefile.remote
+1
-1
common/utils/T/tracer/event_selector.c
common/utils/T/tracer/event_selector.c
+41
-0
common/utils/T/tracer/event_selector.h
common/utils/T/tracer/event_selector.h
+8
-0
common/utils/T/tracer/remote.c
common/utils/T/tracer/remote.c
+12
-7
No files found.
common/utils/T/tracer/Makefile
View file @
68106e4a
...
...
@@ -5,6 +5,7 @@ local:
remote
:
make
-f
Makefile.remote
make
-f
Makefile.remote textlog
clean
:
make
-f
Makefile.local clean
...
...
common/utils/T/tracer/Makefile.remote
View file @
68106e4a
...
...
@@ -12,7 +12,7 @@ $(PROG): gui/gui.a $(OBJS)
$(CC)
$(CFLAGS)
-o
$(PROG)
$(OBJS)
gui/gui.a
$(LIBS)
textlog
:
utils.o remote.o database.o event.o handler.o textlog.o
\
view/view.a gui/gui.a
event_selector.o
view/view.a gui/gui.a
$(CC)
$(CFLAGS)
-o
textlog
$^
$(LIBS)
.PHONY
:
gui/gui.a view/view.a
...
...
common/utils/T/tracer/event_selector.c
0 → 100644
View file @
68106e4a
#include "event_selector.h"
#include "gui/gui.h"
void
setup_event_selector
(
gui
*
g
,
void
*
database
,
int
socket
,
int
*
is_on
)
{
widget
*
win
;
widget
*
main_container
;
widget
*
container
;
widget
*
left
,
*
right
;
widget
*
events
,
*
groups
;
win
=
new_toplevel_window
(
g
,
610
,
800
,
"event selector"
);
main_container
=
new_container
(
g
,
VERTICAL
);
widget_add_child
(
g
,
win
,
main_container
,
-
1
);
container
=
new_container
(
g
,
HORIZONTAL
);
widget_add_child
(
g
,
main_container
,
container
,
-
1
);
container_set_child_growable
(
g
,
main_container
,
container
,
1
);
widget_add_child
(
g
,
main_container
,
new_label
(
g
,
"mouse scroll to scroll - "
"left click to activate - "
"right click to deactivate"
),
-
1
);
left
=
new_container
(
g
,
VERTICAL
);
right
=
new_container
(
g
,
VERTICAL
);
widget_add_child
(
g
,
container
,
left
,
-
1
);
widget_add_child
(
g
,
container
,
right
,
-
1
);
container_set_child_growable
(
g
,
container
,
left
,
1
);
container_set_child_growable
(
g
,
container
,
right
,
1
);
widget_add_child
(
g
,
left
,
new_label
(
g
,
"Events"
),
-
1
);
widget_add_child
(
g
,
right
,
new_label
(
g
,
"Groups"
),
-
1
);
events
=
new_text_list
(
g
,
300
,
10
,
new_color
(
g
,
"#ccccff"
));
groups
=
new_text_list
(
g
,
300
,
10
,
new_color
(
g
,
"#ccffee"
));
widget_add_child
(
g
,
left
,
events
,
-
1
);
widget_add_child
(
g
,
right
,
groups
,
-
1
);
container_set_child_growable
(
g
,
left
,
events
,
1
);
container_set_child_growable
(
g
,
right
,
groups
,
1
);
}
common/utils/T/tracer/event_selector.h
0 → 100644
View file @
68106e4a
#ifndef _EVENT_SELECTOR_H_
#define _EVENT_SELECTOR_H_
#include "gui/gui.h"
void
setup_event_selector
(
gui
*
g
,
void
*
database
,
int
socket
,
int
*
is_on
);
#endif
/* _EVENT_SELECTOR_H_ */
common/utils/T/tracer/remote.c
View file @
68106e4a
...
...
@@ -12,6 +12,7 @@
#include "gui/gui.h"
#include "utils.h"
#include "../T_defs.h"
#include "event_selector.h"
#define DEFAULT_REMOTE_PORT 2021
...
...
@@ -115,6 +116,7 @@ int main(int n, char **v)
int
l
;
event_handler
*
h
;
textlog
*
textlog
;
gui
*
g
;
int
gui_mode
=
0
;
on_off_name
=
malloc
(
n
*
sizeof
(
char
*
));
if
(
on_off_name
==
NULL
)
abort
();
...
...
@@ -155,17 +157,18 @@ int main(int n, char **v)
"ENB_UL_CHANNEL_ESTIMATE"
,
"ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]"
);
g
=
gui_init
();
new_thread
(
gui_thread
,
g
);
if
(
gui_mode
)
{
view
*
tout
;
gui
*
g
;
widget
*
w
,
*
win
;
g
=
gui_init
(
);
w
=
new_text_list
(
g
,
600
,
20
,
0
);
// w = new_text_list(g, 600, 20, 0
);
w
=
new_text_list
(
g
,
600
,
20
,
new_color
(
g
,
"#ffabab"
)
);
win
=
new_toplevel_window
(
g
,
600
,
20
*
12
,
"textlog"
);
widget_add_child
(
g
,
win
,
w
,
-
1
);
//tout = new_textlist(1000, 10, g, w);
tout
=
new_textlist
(
7
,
4
,
g
,
w
);
new_thread
(
gui_thread
,
g
);
tout
=
new_textlist
(
1000
,
10
,
g
,
w
);
//tout = new_textlist(7, 4, g, w);
textlog_add_view
(
textlog
,
tout
);
}
else
{
view
*
sout
=
new_stdout
();
...
...
@@ -175,7 +178,7 @@ int main(int n, char **v)
for
(
i
=
0
;
i
<
on_off_n
;
i
++
)
on_off
(
database
,
on_off_name
[
i
],
is_on
,
on_off_action
[
i
]);
s
=
get_connection
(
"
127.0.0.1
"
,
port
);
s
=
get_connection
(
"
0.0.0.0
"
,
port
);
/* send the first message - activate selected traces */
t
=
0
;
...
...
@@ -187,6 +190,8 @@ int main(int n, char **v)
if
(
is_on
[
l
])
if
(
write
(
s
,
&
l
,
sizeof
(
int
))
!=
sizeof
(
int
))
abort
();
setup_event_selector
(
g
,
database
,
s
,
is_on
);
/* read messages */
while
(
1
)
{
char
v
[
T_BUFFER_MAX
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment