blob: 22031dcf6a17b334ef528cda88a22b137f7ef689 (
plain)
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
|
#pragma once
#include <mpack.h>
#include "pb-types.h"
#ifdef __cplusplus
extern "C" {
#endif
#define __pb_cmd(name) \
pb_ser_r_t pb_ser_r_##name; \
pb_ser_w_t pb_ser_w_##name; \
pb_ser_free_t pb_ser_free_##name;
typedef void pb_ser_w_t(mpack_writer_t * writer, const pb_msg_t * msg);
pb_ser_w_t pb_ser_w;
typedef void pb_ser_r_t(mpack_reader_t * reader, pb_msg_t * msg);
pb_ser_r_t pb_ser_r;
typedef void pb_ser_free_t(pb_msg_t * msg);
pb_ser_free_t pb_ser_free;
__pb_cmd(msg_header)
__pb_cmd(cmd_req_read)
__pb_cmd(cmd_res_read)
__pb_cmd(cmd_req_write)
__pb_cmd(cmd_req_state)
__pb_cmd(cmd_res_state)
__pb_cmd(cmd_req_set_state)
__pb_cmd(cmd_req_magic)
__pb_cmd(cmd_res_magic)
#ifdef __cplusplus
}
#endif
|