LCM
eventlog.h
1 #ifndef _LCM_EVENTLOG_H_
2 #define _LCM_EVENTLOG_H_
3 
4 #include <stdint.h>
5 #include <stdio.h>
6 
7 #ifdef LCM_PYTHON
8 #define LCM_EXPORT
9 #else
10 #include "lcm_export.h"
11 #endif
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
31 typedef struct _lcm_eventlog_t lcm_eventlog_t;
36  FILE *f;
37 
41  int64_t eventcount;
42 };
43 
47 typedef struct _lcm_eventlog_event_t lcm_eventlog_event_t;
53  int64_t eventnum;
58  int64_t timestamp;
62  int32_t channellen;
66  int32_t datalen;
67 
71  char *channel;
75  void *data;
76 };
77 
86 LCM_EXPORT
87 lcm_eventlog_t *lcm_eventlog_create(const char *path, const char *mode);
88 
98 LCM_EXPORT
99 lcm_eventlog_event_t *lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog);
100 
106 LCM_EXPORT
107 void lcm_eventlog_free_event(lcm_eventlog_event_t *event);
108 
117 LCM_EXPORT
118 int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts);
119 
129 LCM_EXPORT
130 int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event);
131 
137 LCM_EXPORT
138 void lcm_eventlog_destroy(lcm_eventlog_t *eventlog);
139 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif
int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event)
void lcm_eventlog_destroy(lcm_eventlog_t *eventlog)
lcm_eventlog_t * lcm_eventlog_create(const char *path, const char *mode)
lcm_eventlog_event_t * lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog)
int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts)
void lcm_eventlog_free_event(lcm_eventlog_event_t *event)
Definition: eventlog.h:48
int64_t eventnum
Definition: eventlog.h:53
char * channel
Definition: eventlog.h:71
void * data
Definition: eventlog.h:75
int64_t timestamp
Definition: eventlog.h:58
int32_t channellen
Definition: eventlog.h:62
int32_t datalen
Definition: eventlog.h:66
Definition: eventlog.h:32
int64_t eventcount
Definition: eventlog.h:41
FILE * f
Definition: eventlog.h:36