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
canghaiwuhen
OpenXG-RAN
Commits
df5afaa9
Commit
df5afaa9
authored
May 12, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store received time in events for later processing
parent
e5689a5b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
common/utils/T/tracer/event.c
common/utils/T/tracer/event.c
+8
-0
common/utils/T/tracer/event.h
common/utils/T/tracer/event.h
+11
-0
common/utils/T/tracer/textlog.c
common/utils/T/tracer/textlog.c
+4
-0
No files found.
common/utils/T/tracer/event.c
View file @
df5afaa9
...
...
@@ -4,13 +4,21 @@
#include <stdlib.h>
#include <string.h>
#ifdef T_SEND_TIME
event
new_event
(
struct
timespec
sending_time
,
int
type
,
int
length
,
char
*
buffer
,
void
*
database
)
#else
event
new_event
(
int
type
,
int
length
,
char
*
buffer
,
void
*
database
)
#endif
{
database_event_format
f
;
event
e
;
int
i
;
int
offset
;
#ifdef T_SEND_TIME
e
.
sending_time
=
sending_time
;
#endif
e
.
type
=
type
;
e
.
buffer
=
buffer
;
...
...
common/utils/T/tracer/event.h
View file @
df5afaa9
...
...
@@ -2,6 +2,9 @@
#define _EVENT_H_
#include "../T_defs.h"
#ifdef T_SEND_TIME
#include <time.h>
#endif
enum
event_arg_type
{
EVENT_INT
,
...
...
@@ -23,12 +26,20 @@ typedef struct {
}
event_arg
;
typedef
struct
{
#ifdef T_SEND_TIME
struct
timespec
sending_time
;
#endif
int
type
;
char
*
buffer
;
event_arg
e
[
T_MAX_ARGS
];
int
ecount
;
}
event
;
#ifdef T_SEND_TIME
event
new_event
(
struct
timespec
sending_time
,
int
type
,
int
length
,
char
*
buffer
,
void
*
database
);
#else
event
new_event
(
int
type
,
int
length
,
char
*
buffer
,
void
*
database
);
#endif
#endif
/* _EVENT_H_ */
common/utils/T/tracer/textlog.c
View file @
df5afaa9
...
...
@@ -99,7 +99,11 @@ event get_event(int s, char *v, void *d)
length
-=
sizeof
(
int
);
fullread
(
s
,
v
,
length
);
#ifdef T_SEND_TIME
return
new_event
(
t
,
type
,
length
,
v
,
d
);
#else
return
new_event
(
type
,
length
,
v
,
d
);
#endif
}
static
void
*
gui_thread
(
void
*
_g
)
...
...
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