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
wangjie
OpenXG-RAN
Commits
e1c4e78b
Commit
e1c4e78b
authored
Nov 29, 2016
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into develop
parents
31541601
86039424
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
240 additions
and
56 deletions
+240
-56
common/utils/T/tracer/enb.c
common/utils/T/tracer/enb.c
+166
-54
common/utils/T/tracer/filter/filter.c
common/utils/T/tracer/filter/filter.c
+30
-1
common/utils/T/tracer/filter/filter.h
common/utils/T/tracer/filter/filter.h
+2
-0
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui.h
+2
-0
common/utils/T/tracer/gui/gui_defs.h
common/utils/T/tracer/gui/gui_defs.h
+1
-1
common/utils/T/tracer/gui/label.c
common/utils/T/tracer/gui/label.c
+18
-0
common/utils/T/tracer/gui/xy_plot.c
common/utils/T/tracer/gui/xy_plot.c
+19
-0
common/utils/T/tracer/logger/logger.c
common/utils/T/tracer/logger/logger.c
+2
-0
No files found.
common/utils/T/tracer/enb.c
View file @
e1c4e78b
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/filter/filter.c
View file @
e1c4e78b
...
@@ -13,6 +13,7 @@ struct filter {
...
@@ -13,6 +13,7 @@ struct filter {
}
v
;
}
v
;
int
(
*
eval
)(
struct
filter
*
this
,
event
e
);
int
(
*
eval
)(
struct
filter
*
this
,
event
e
);
void
(
*
free
)(
struct
filter
*
this
);
};
};
/****************************************************************************/
/****************************************************************************/
...
@@ -52,7 +53,23 @@ int eval_evarg(struct filter *f, event e)
...
@@ -52,7 +53,23 @@ int eval_evarg(struct filter *f, event e)
}
}
/****************************************************************************/
/****************************************************************************/
/* filter construction functions */
/* free memory functions */
/****************************************************************************/
void
free_op2
(
struct
filter
*
f
)
{
free_filter
(
f
->
v
.
op2
.
a
);
free_filter
(
f
->
v
.
op2
.
b
);
free
(
f
);
}
void
free_noop
(
struct
filter
*
f
)
{
free
(
f
);
}
/****************************************************************************/
/* filter construction/destruction functions */
/****************************************************************************/
/****************************************************************************/
filter
*
filter_and
(
filter
*
a
,
filter
*
b
)
filter
*
filter_and
(
filter
*
a
,
filter
*
b
)
...
@@ -60,6 +77,7 @@ filter *filter_and(filter *a, filter *b)
...
@@ -60,6 +77,7 @@ filter *filter_and(filter *a, filter *b)
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
if
(
ret
==
NULL
)
abort
();
if
(
ret
==
NULL
)
abort
();
ret
->
eval
=
eval_and
;
ret
->
eval
=
eval_and
;
ret
->
free
=
free_op2
;
ret
->
v
.
op2
.
a
=
a
;
ret
->
v
.
op2
.
a
=
a
;
ret
->
v
.
op2
.
b
=
b
;
ret
->
v
.
op2
.
b
=
b
;
return
ret
;
return
ret
;
...
@@ -70,6 +88,7 @@ filter *filter_eq(filter *a, filter *b)
...
@@ -70,6 +88,7 @@ filter *filter_eq(filter *a, filter *b)
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
if
(
ret
==
NULL
)
abort
();
if
(
ret
==
NULL
)
abort
();
ret
->
eval
=
eval_eq
;
ret
->
eval
=
eval_eq
;
ret
->
free
=
free_op2
;
ret
->
v
.
op2
.
a
=
a
;
ret
->
v
.
op2
.
a
=
a
;
ret
->
v
.
op2
.
b
=
b
;
ret
->
v
.
op2
.
b
=
b
;
return
ret
;
return
ret
;
...
@@ -80,6 +99,7 @@ filter *filter_int(int v)
...
@@ -80,6 +99,7 @@ filter *filter_int(int v)
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
struct
filter
*
ret
=
calloc
(
1
,
sizeof
(
struct
filter
));
if
(
ret
==
NULL
)
abort
();
if
(
ret
==
NULL
)
abort
();
ret
->
eval
=
eval_int
;
ret
->
eval
=
eval_int
;
ret
->
free
=
free_noop
;
ret
->
v
.
v
=
v
;
ret
->
v
.
v
=
v
;
return
ret
;
return
ret
;
}
}
...
@@ -97,6 +117,7 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
...
@@ -97,6 +117,7 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
f
=
get_format
(
database
,
event_id
);
f
=
get_format
(
database
,
event_id
);
ret
->
eval
=
eval_evarg
;
ret
->
eval
=
eval_evarg
;
ret
->
free
=
free_noop
;
ret
->
v
.
evarg
.
event_type
=
event_id
;
ret
->
v
.
evarg
.
event_type
=
event_id
;
ret
->
v
.
evarg
.
arg_index
=
-
1
;
ret
->
v
.
evarg
.
arg_index
=
-
1
;
...
@@ -114,6 +135,14 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
...
@@ -114,6 +135,14 @@ filter *filter_evarg(void *database, char *event_name, char *varname)
return
ret
;
return
ret
;
}
}
void
free_filter
(
filter
*
_f
)
{
struct
filter
*
f
;
if
(
_f
==
NULL
)
return
;
f
=
_f
;
f
->
free
(
f
);
}
/****************************************************************************/
/****************************************************************************/
/* eval function */
/* eval function */
/****************************************************************************/
/****************************************************************************/
...
...
common/utils/T/tracer/filter/filter.h
View file @
e1c4e78b
...
@@ -12,4 +12,6 @@ filter *filter_evarg(void *database, char *event_name, char *varname);
...
@@ -12,4 +12,6 @@ filter *filter_evarg(void *database, char *event_name, char *varname);
int
filter_eval
(
filter
*
f
,
event
e
);
int
filter_eval
(
filter
*
f
,
event
e
);
void
free_filter
(
filter
*
f
);
#endif
/* _FILTER_H_ */
#endif
/* _FILTER_H_ */
common/utils/T/tracer/gui/gui.h
View file @
e1c4e78b
...
@@ -39,6 +39,7 @@ widget *new_space(gui *gui, int width, int height);
...
@@ -39,6 +39,7 @@ widget *new_space(gui *gui, int width, int height);
widget
*
new_image
(
gui
*
gui
,
unsigned
char
*
data
,
int
length
);
widget
*
new_image
(
gui
*
gui
,
unsigned
char
*
data
,
int
length
);
void
label_set_clickable
(
gui
*
gui
,
widget
*
label
,
int
clickable
);
void
label_set_clickable
(
gui
*
gui
,
widget
*
label
,
int
clickable
);
void
label_set_text
(
gui
*
gui
,
widget
*
label
,
char
*
text
);
void
container_set_child_growable
(
gui
*
_gui
,
widget
*
_this
,
void
container_set_child_growable
(
gui
*
_gui
,
widget
*
_this
,
widget
*
child
,
int
growable
);
widget
*
child
,
int
growable
);
...
@@ -49,6 +50,7 @@ void xy_plot_set_range(gui *gui, widget *this,
...
@@ -49,6 +50,7 @@ void xy_plot_set_range(gui *gui, widget *this,
void
xy_plot_set_points
(
gui
*
gui
,
widget
*
this
,
void
xy_plot_set_points
(
gui
*
gui
,
widget
*
this
,
int
plot
,
int
npoints
,
float
*
x
,
float
*
y
);
int
plot
,
int
npoints
,
float
*
x
,
float
*
y
);
void
xy_plot_get_dimensions
(
gui
*
gui
,
widget
*
this
,
int
*
width
,
int
*
height
);
void
xy_plot_get_dimensions
(
gui
*
gui
,
widget
*
this
,
int
*
width
,
int
*
height
);
void
xy_plot_set_title
(
gui
*
gui
,
widget
*
this
,
char
*
label
);
void
textlist_add
(
gui
*
gui
,
widget
*
this
,
const
char
*
text
,
int
position
,
void
textlist_add
(
gui
*
gui
,
widget
*
this
,
const
char
*
text
,
int
position
,
int
color
);
int
color
);
...
...
common/utils/T/tracer/gui/gui_defs.h
View file @
e1c4e78b
...
@@ -141,7 +141,7 @@ struct button_widget {
...
@@ -141,7 +141,7 @@ struct button_widget {
struct
label_widget
{
struct
label_widget
{
struct
widget
common
;
struct
widget
common
;
c
onst
c
har
*
t
;
char
*
t
;
int
color
;
int
color
;
int
width
;
/* as given by the graphic's backend */
int
width
;
/* as given by the graphic's backend */
int
height
;
/* as given by the graphic's backend */
int
height
;
/* as given by the graphic's backend */
...
...
common/utils/T/tracer/gui/label.c
View file @
e1c4e78b
...
@@ -81,3 +81,21 @@ void label_set_clickable(gui *_g, widget *_this, int clickable)
...
@@ -81,3 +81,21 @@ void label_set_clickable(gui *_g, widget *_this, int clickable)
gunlock
(
g
);
gunlock
(
g
);
}
}
void
label_set_text
(
gui
*
_g
,
widget
*
_this
,
char
*
text
)
{
struct
gui
*
g
=
_g
;
struct
label_widget
*
this
=
_this
;
glock
(
g
);
free
(
this
->
t
);
this
->
t
=
strdup
(
text
);
if
(
this
->
t
==
NULL
)
OOM
;
x_text_get_dimensions
(
g
->
x
,
DEFAULT_FONT
,
text
,
&
this
->
width
,
&
this
->
height
,
&
this
->
baseline
);
send_event
(
g
,
REPACK
,
this
->
common
.
id
);
gunlock
(
g
);
}
common/utils/T/tracer/gui/xy_plot.c
View file @
e1c4e78b
...
@@ -290,3 +290,22 @@ void xy_plot_get_dimensions(gui *_gui, widget *_this, int *width, int *height)
...
@@ -290,3 +290,22 @@ void xy_plot_get_dimensions(gui *_gui, widget *_this, int *width, int *height)
gunlock
(
g
);
gunlock
(
g
);
}
}
void
xy_plot_set_title
(
gui
*
_gui
,
widget
*
_this
,
char
*
label
)
{
struct
gui
*
g
=
_gui
;
struct
xy_plot_widget
*
this
=
_this
;
glock
(
g
);
free
(
this
->
label
);
this
->
label
=
strdup
(
label
);
if
(
this
->
label
==
NULL
)
OOM
;
/* TODO: be sure calling X there is valid wrt "global model" (we are
* not in the "gui thread") */
x_text_get_dimensions
(
g
->
x
,
DEFAULT_FONT
,
label
,
&
this
->
label_width
,
&
this
->
label_height
,
&
this
->
label_baseline
);
send_event
(
g
,
REPACK
,
this
->
common
.
id
);
gunlock
(
g
);
}
common/utils/T/tracer/logger/logger.c
View file @
e1c4e78b
#include "logger.h"
#include "logger.h"
#include "logger_defs.h"
#include "logger_defs.h"
#include "filter/filter.h"
#include <stdlib.h>
#include <stdlib.h>
void
logger_add_view
(
logger
*
_l
,
view
*
v
)
void
logger_add_view
(
logger
*
_l
,
view
*
v
)
...
@@ -13,5 +14,6 @@ void logger_add_view(logger *_l, view *v)
...
@@ -13,5 +14,6 @@ void logger_add_view(logger *_l, view *v)
void
logger_set_filter
(
logger
*
_l
,
void
*
filter
)
void
logger_set_filter
(
logger
*
_l
,
void
*
filter
)
{
{
struct
logger
*
l
=
_l
;
struct
logger
*
l
=
_l
;
free_filter
(
l
->
filter
);
l
->
filter
=
filter
;
l
->
filter
=
filter
;
}
}
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