1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/** THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT MODIFY
* BY HAND!!
*
* Generated by lcm-gen
**/
#include "lcm.h"
#include "lcmtype.h"
#include <stdint.h>
#include <stdlib.h>
#ifndef _laser_t_h
#define _laser_t_h
// 若为C++代码,需加上extern "C",表明以下按照C的方式进行编译
// 否则会出现链接错误
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _laser_t laser_t;
struct _laser_t {
int64_t utime;
int32_t nranges;
float *ranges;
int32_t nintensities;
float *intensities;
float rad0;
float radstep;
};
laser_t *laser_t_copy(const laser_t *p);
void laser_t_destroy(laser_t *p);
typedef struct _laser_t_subscription_t laser_t_subscription_t;
typedef void (*laser_t_handler_t)(const lcm_recv_buf_t *rbuf,
const char *channel, const laser_t *msg,
void *user);
int laser_t_publish(lcm_t *lcm, const char *channel, const laser_t *p);
laser_t_subscription_t *laser_t_subscribe(lcm_t *lcm, const char *channel,
laser_t_handler_t f, void *userdata);
int laser_t_unsubscribe(lcm_t *lcm, laser_t_subscription_t *hid);
int laser_t_subscription_set_queue_capacity(laser_t_subscription_t *subs,
int num_messages);
int laser_t_encode(void *buf, int offset, int maxlen, const laser_t *p);
int laser_t_decode(const void *buf, int offset, int maxlen, laser_t *p);
int laser_t_decode_cleanup(laser_t *p);
int laser_t_encoded_size(const laser_t *p);
// LCM support functions. Users should not call these
int64_t __laser_t_get_hash(void);
int64_t __laser_t_hash_recursive(const __lcm_hash_ptr *p);
int __laser_t_encode_array(void *buf, int offset, int maxlen, const laser_t *p,
int elements);
int __laser_t_decode_array(const void *buf, int offset, int maxlen, laser_t *p,
int elements);
int __laser_t_decode_array_cleanup(laser_t *p, int elements);
int __laser_t_encoded_array_size(const laser_t *p, int elements);
int __laser_t_clone_array(const laser_t *p, laser_t *q, int elements);
#ifdef __cplusplus
}
#endif
#endif
|