LCM
Loading...
Searching...
No Matches
eventlog.h
1#ifndef _LCM_EVENTLOG_H_
2#define _LCM_EVENTLOG_H_
3
4#include <stdint.h>
5#include <stdio.h>
6
7#include "lcm_c_namespace.h"
8
9#ifdef LCM_PYTHON
10#define LCM_EXPORT
11#else
12#include "lcm_export.h"
13#endif
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#define lcm_eventlog_create LCM_C_NAMESPACED(eventlog_create)
20#define lcm_eventlog_read_next_event LCM_C_NAMESPACED(eventlog_read_next_event)
21#define lcm_eventlog_free_event LCM_C_NAMESPACED(eventlog_free_event)
22#define lcm_eventlog_seek_to_timestamp LCM_C_NAMESPACED(eventlog_seek_to_timestamp)
23#define lcm_eventlog_write_event LCM_C_NAMESPACED(eventlog_write_event)
24#define lcm_eventlog_destroy LCM_C_NAMESPACED(eventlog_destroy)
25
40typedef struct _lcm_eventlog_t lcm_eventlog_t;
45 FILE *f;
46
50 int64_t eventcount;
51};
52
56typedef struct _lcm_eventlog_event_t lcm_eventlog_event_t;
62 int64_t eventnum;
67 int64_t timestamp;
71 int32_t channellen;
75 int32_t datalen;
76
80 char *channel;
84 void *data;
85};
86
95LCM_EXPORT
96lcm_eventlog_t *lcm_eventlog_create(const char *path, const char *mode);
97
107LCM_EXPORT
108lcm_eventlog_event_t *lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog);
109
115LCM_EXPORT
116void lcm_eventlog_free_event(lcm_eventlog_event_t *event);
117
126LCM_EXPORT
127int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts);
128
138LCM_EXPORT
139int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event);
140
146LCM_EXPORT
147void lcm_eventlog_destroy(lcm_eventlog_t *eventlog);
148
153#ifdef __cplusplus
154}
155#endif
156
157#endif
Definition eventlog.h:57
int64_t eventnum
Definition eventlog.h:62
char * channel
Definition eventlog.h:80
void * data
Definition eventlog.h:84
int64_t timestamp
Definition eventlog.h:67
int32_t channellen
Definition eventlog.h:71
int32_t datalen
Definition eventlog.h:75
Definition eventlog.h:41
int64_t eventcount
Definition eventlog.h:50
FILE * f
Definition eventlog.h:45