Loading...
Searching...
No Matches
eventlog.h
#ifndef _LCM_EVENTLOG_H_
#define _LCM_EVENTLOG_H_
#include <stdint.h>
#include <stdio.h>
#ifdef LCM_PYTHON
#define LCM_EXPORT
#else
#include "lcm_export.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _lcm_eventlog_t lcm_eventlog_t;
struct _lcm_eventlog_t {
FILE *f;
int64_t eventcount;
};
typedef struct _lcm_eventlog_event_t lcm_eventlog_event_t;
struct _lcm_eventlog_event_t {
int64_t eventnum;
int64_t timestamp;
int32_t channellen;
int32_t datalen;
char *channel;
void *data;
};
LCM_EXPORT
lcm_eventlog_t *lcm_eventlog_create(const char *path, const char *mode);
LCM_EXPORT
lcm_eventlog_event_t *lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog);
LCM_EXPORT
void lcm_eventlog_free_event(lcm_eventlog_event_t *event);
LCM_EXPORT
int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts);
LCM_EXPORT
int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event);
LCM_EXPORT
void lcm_eventlog_destroy(lcm_eventlog_t *eventlog);
#ifdef __cplusplus
}
#endif
#endif
lcm_eventlog_create
lcm_eventlog_t * lcm_eventlog_create(const char *path, const char *mode)
lcm_eventlog_write_event
int lcm_eventlog_write_event(lcm_eventlog_t *eventlog, lcm_eventlog_event_t *event)
lcm_eventlog_destroy
void lcm_eventlog_destroy(lcm_eventlog_t *eventlog)
lcm_eventlog_read_next_event
lcm_eventlog_event_t * lcm_eventlog_read_next_event(lcm_eventlog_t *eventlog)
lcm_eventlog_seek_to_timestamp
int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *eventlog, int64_t ts)
lcm_eventlog_free_event
void lcm_eventlog_free_event(lcm_eventlog_event_t *event)
_lcm_eventlog_event_t
Definition eventlog.h:48
_lcm_eventlog_event_t::eventnum
int64_t eventnum
Definition eventlog.h:53
_lcm_eventlog_event_t::channel
char * channel
Definition eventlog.h:71
_lcm_eventlog_event_t::data
void * data
Definition eventlog.h:75
_lcm_eventlog_event_t::timestamp
int64_t timestamp
Definition eventlog.h:58
_lcm_eventlog_event_t::channellen
int32_t channellen
Definition eventlog.h:62
_lcm_eventlog_event_t::datalen
int32_t datalen
Definition eventlog.h:66
_lcm_eventlog_t
Definition eventlog.h:32
_lcm_eventlog_t::eventcount
int64_t eventcount
Definition eventlog.h:41
_lcm_eventlog_t::f
FILE * f
Definition eventlog.h:36