-
Notifications
You must be signed in to change notification settings - Fork 0
/
core.pb.h
93 lines (73 loc) · 2.6 KB
/
core.pb.h
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.8 */
#ifndef PB_CORE_PB_H_INCLUDED
#define PB_CORE_PB_H_INCLUDED
#include "pb.h"
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _Device {
Device_DEVICE_UNDEFINED = 0,
Device_DASHBOARD = 1,
Device_SUBSYSTEMS = 2,
Device_VIDEO = 3,
Device_AUTONOMY = 4,
Device_FIRMWARE = 5,
Device_ARM = 6,
Device_GRIPPER = 7,
Device_SCIENCE = 8,
Device_DRIVE = 9
} Device;
/* Struct definitions */
/* Used for a simple handshake between devices. */
typedef struct _Connect {
Device sender;
Device receiver;
} Connect;
/* Notifies the recipient that the sender will no longer be connected. */
typedef struct _Disconnect {
Device sender;
} Disconnect;
#ifdef __cplusplus
extern "C" {
#endif
/* Helper constants for enums */
#define _Device_MIN Device_DEVICE_UNDEFINED
#define _Device_MAX Device_DRIVE
#define _Device_ARRAYSIZE ((Device)(Device_DRIVE+1))
#define Connect_sender_ENUMTYPE Device
#define Connect_receiver_ENUMTYPE Device
#define Disconnect_sender_ENUMTYPE Device
/* Initializer values for message structs */
#define Connect_init_default {_Device_MIN, _Device_MIN}
#define Disconnect_init_default {_Device_MIN}
#define Connect_init_zero {_Device_MIN, _Device_MIN}
#define Disconnect_init_zero {_Device_MIN}
/* Field tags (for use in manual encoding/decoding) */
#define Connect_sender_tag 1
#define Connect_receiver_tag 2
#define Disconnect_sender_tag 1
/* Struct field encoding specification for nanopb */
#define Connect_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UENUM, sender, 1) \
X(a, STATIC, SINGULAR, UENUM, receiver, 2)
#define Connect_CALLBACK NULL
#define Connect_DEFAULT NULL
#define Disconnect_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UENUM, sender, 1)
#define Disconnect_CALLBACK NULL
#define Disconnect_DEFAULT NULL
extern const pb_msgdesc_t Connect_msg;
extern const pb_msgdesc_t Disconnect_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define Connect_fields &Connect_msg
#define Disconnect_fields &Disconnect_msg
/* Maximum encoded size of messages (where known) */
#define CORE_PB_H_MAX_SIZE Connect_size
#define Connect_size 4
#define Disconnect_size 2
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif