eventlog.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
33 #ifndef _LCM_EVENTLOG_H_
34 #define _LCM_EVENTLOG_H_
35 
36 #include <stdio.h>
37 #include <inttypes.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
45 {
46  FILE *f;
47  int64_t eventcount;
48 };
49 
52  int64_t eventnum, timestamp;
53  int32_t channellen, datalen;
54 
55  char *channel;
56  void *data;
57 };
58 
59 // mode must be "r"
60 lcm_eventlog_t *lcm_eventlog_create(const char *path, const char *mode);
61 
62 // when you're done with the log, clean up after yourself!
64 
65 // read the next event.
67 
68 // free the structure returned by lcm_eventlog_read_next_event
70 
71 // seek (approximately) to particular timestamp
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
79 
void lcm_eventlog_destroy(lcm_eventlog_t *l)
Definition: eventlog.cpp:74
lcm_eventlog_event_t * lcm_eventlog_read_next_event(lcm_eventlog_t *l)
Definition: eventlog.cpp:80
int lcm_eventlog_seek_to_timestamp(lcm_eventlog_t *l, int64_t ts)
Definition: eventlog.cpp:151
int64_t eventcount
Definition: eventlog.h:47
void lcm_eventlog_free_event(lcm_eventlog_event_t *le)
Definition: eventlog.cpp:118
lcm_eventlog_t * lcm_eventlog_create(const char *path, const char *mode)
Definition: eventlog.cpp:61


mit_darpa_logs_player
Author(s): Miguel Oliveira
autogenerated on Mon Mar 2 2015 01:32:15