Merge pull request #9 from dret/master
[apps/low-level-can-service.git] / gen / openxc.pb.h
1 /* Automatically generated nanopb header */
2 /* Generated by nanopb-0.2.4-dev at Tue Oct  1 16:50:34 2013. */
3
4 #ifndef _PB_OPENXC_PB_H_
5 #define _PB_OPENXC_PB_H_
6 #include <pb.h>
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /* Enum definitions */
13 typedef enum _openxc_VehicleMessage_Type {
14     openxc_VehicleMessage_Type_RAW = 1,
15     openxc_VehicleMessage_Type_STRING = 2,
16     openxc_VehicleMessage_Type_NUM = 3,
17     openxc_VehicleMessage_Type_BOOL = 4
18 } openxc_VehicleMessage_Type;
19
20 /* Struct definitions */
21 typedef struct _openxc_RawMessage {
22     bool has_bus;
23     int32_t bus;
24     bool has_message_id;
25     uint32_t message_id;
26     bool has_data;
27     int64_t data;
28 } openxc_RawMessage;
29
30 typedef struct _openxc_TranslatedBooleanMessage {
31     bool has_name;
32     char name[100];
33     bool has_value;
34     bool value;
35 } openxc_TranslatedBooleanMessage;
36
37 typedef struct _openxc_TranslatedNumericMessage {
38     bool has_name;
39     char name[100];
40     bool has_value;
41     double value;
42 } openxc_TranslatedNumericMessage;
43
44 typedef struct _openxc_TranslatedStringMessage {
45     bool has_name;
46     char name[100];
47     bool has_value;
48     char value[100];
49 } openxc_TranslatedStringMessage;
50
51 typedef struct _openxc_VehicleMessage {
52     bool has_type;
53     openxc_VehicleMessage_Type type;
54     bool has_raw_message;
55     openxc_RawMessage raw_message;
56     bool has_string_message;
57     openxc_TranslatedStringMessage string_message;
58     bool has_numerical_message;
59     openxc_TranslatedNumericMessage numerical_message;
60     bool has_boolean_message;
61     openxc_TranslatedBooleanMessage boolean_message;
62 } openxc_VehicleMessage;
63
64 /* Default values for struct fields */
65
66 /* Field tags (for use in manual encoding/decoding) */
67 #define openxc_RawMessage_bus_tag                1
68 #define openxc_RawMessage_message_id_tag         2
69 #define openxc_RawMessage_data_tag               3
70 #define openxc_TranslatedBooleanMessage_name_tag 1
71 #define openxc_TranslatedBooleanMessage_value_tag 2
72 #define openxc_TranslatedNumericMessage_name_tag 1
73 #define openxc_TranslatedNumericMessage_value_tag 2
74 #define openxc_TranslatedStringMessage_name_tag  1
75 #define openxc_TranslatedStringMessage_value_tag 2
76 #define openxc_VehicleMessage_type_tag           1
77 #define openxc_VehicleMessage_raw_message_tag    2
78 #define openxc_VehicleMessage_string_message_tag 3
79 #define openxc_VehicleMessage_numerical_message_tag 4
80 #define openxc_VehicleMessage_boolean_message_tag 5
81
82 /* Struct field encoding specification for nanopb */
83 extern const pb_field_t openxc_VehicleMessage_fields[6];
84 extern const pb_field_t openxc_RawMessage_fields[4];
85 extern const pb_field_t openxc_TranslatedStringMessage_fields[3];
86 extern const pb_field_t openxc_TranslatedNumericMessage_fields[3];
87 extern const pb_field_t openxc_TranslatedBooleanMessage_fields[3];
88
89 /* Maximum encoded size of messages (where known) */
90 #define openxc_VehicleMessage_size               457
91 #define openxc_RawMessage_size                   23
92 #define openxc_TranslatedStringMessage_size      204
93 #define openxc_TranslatedNumericMessage_size     111
94 #define openxc_TranslatedBooleanMessage_size     104
95
96 #ifdef __cplusplus
97 } /* extern "C" */
98 #endif
99
100 #endif