aboutsummaryrefslogtreecommitdiffstats
path: root/lcmtype/robot_control_t.h
blob: d28de92cf2011c6bda8b4a7be082cdb46c6a05d0 (plain) (blame)
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
68
69
70
71
72
73
74
75
76
/** THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
 * BY HAND!!
 *
 * Generated by lcm-gen
 **/

#include "lcmtype.h"
#include <stdint.h>
#include <stdlib.h>

#ifndef _robot_control_t_h
#define _robot_control_t_h

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _robot_control_t robot_control_t;
struct _robot_control_t {
    int64_t utime;
    int8_t commandid;
    int8_t robotid;
    int8_t ndparams;
    double *dparams;
    int8_t niparams;
    int8_t *iparams;
    int8_t nsparams;
    char **sparams;
    int64_t nbparams;
    uint8_t *bparams;
};

robot_control_t *robot_control_t_copy(const robot_control_t *p);
void robot_control_t_destroy(robot_control_t *p);

typedef struct _robot_control_t_subscription_t robot_control_t_subscription_t;
typedef void (*robot_control_t_handler_t)(const lcm_recv_buf_t *rbuf,
                                          const char *channel,
                                          const robot_control_t *msg,
                                          void *user);

int robot_control_t_publish(lcm_t *lcm, const char *channel,
                            const robot_control_t *p);
robot_control_t_subscription_t *
robot_control_t_subscribe(lcm_t *lcm, const char *channel,
                          robot_control_t_handler_t f, void *userdata);
int robot_control_t_unsubscribe(lcm_t *lcm,
                                robot_control_t_subscription_t *hid);
int robot_control_t_subscription_set_queue_capacity(
    robot_control_t_subscription_t *subs, int num_messages);

int robot_control_t_encode(void *buf, int offset, int maxlen,
                           const robot_control_t *p);
int robot_control_t_decode(const void *buf, int offset, int maxlen,
                           robot_control_t *p);
int robot_control_t_decode_cleanup(robot_control_t *p);
int robot_control_t_encoded_size(const robot_control_t *p);

// LCM support functions. Users should not call these
int64_t __robot_control_t_get_hash(void);
int64_t __robot_control_t_hash_recursive(const __lcm_hash_ptr *p);
int __robot_control_t_encode_array(void *buf, int offset, int maxlen,
                                   const robot_control_t *p, int elements);
int __robot_control_t_decode_array(const void *buf, int offset, int maxlen,
                                   robot_control_t *p, int elements);
int __robot_control_t_decode_array_cleanup(robot_control_t *p, int elements);
int __robot_control_t_encoded_array_size(const robot_control_t *p,
                                         int elements);
int __robot_control_t_clone_array(const robot_control_t *p, robot_control_t *q,
                                  int elements);

#ifdef __cplusplus
}
#endif

#endif