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#ifdef LCM_PYTHON
8#define LCM_EXPORT
9#else
10#include "lcm_export.h"
11#endif
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
31typedef struct _lcm_eventlog_t lcm_eventlog_t;
36 FILE *f;
37
41 int64_t eventcount;
42};
43
47typedef 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
86LCM_EXPORT
87lcm_eventlog_t *lcm_eventlog_create(const char *path, const char *mode);
88
98LCM_EXPORT
99lcm_eventlog_event_t *lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog);
100
106LCM_EXPORT
107void lcm_eventlog_free_event(lcm_eventlog_event_t *event);
108
117LCM_EXPORT
118int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts);
119
129LCM_EXPORT
130int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event);
131
137LCM_EXPORT
138void lcm_eventlog_destroy(lcm_eventlog_t *eventlog);
139
144#ifdef __cplusplus
145}
146#endif
147
148#endif
lcm_eventlog_t * lcm_eventlog_create(const char *path, const char *mode)
int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event)
void lcm_eventlog_destroy(lcm_eventlog_t *eventlog)
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