Re-build with nanopb v0.3.1.
[apps/low-level-can-service.git] / gen / cpp / openxc.pb.h
1 /* Automatically generated nanopb header */
2 /* Generated by nanopb-0.3.1 at Tue Sep 16 23:03:27 2014. */
3
4 #ifndef PB_OPENXC_PB_H_INCLUDED
5 #define PB_OPENXC_PB_H_INCLUDED
6 #include <pb.h>
7
8 #if PB_PROTO_HEADER_VERSION != 30
9 #error Regenerate this file with the current version of nanopb generator.
10 #endif
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 /* Enum definitions */
17 typedef enum _openxc_VehicleMessage_Type {
18     openxc_VehicleMessage_Type_RAW = 1,
19     openxc_VehicleMessage_Type_TRANSLATED = 2,
20     openxc_VehicleMessage_Type_DIAGNOSTIC = 3,
21     openxc_VehicleMessage_Type_CONTROL_COMMAND = 4,
22     openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5
23 } openxc_VehicleMessage_Type;
24
25 typedef enum _openxc_ControlCommand_Type {
26     openxc_ControlCommand_Type_VERSION = 1,
27     openxc_ControlCommand_Type_DEVICE_ID = 2,
28     openxc_ControlCommand_Type_DIAGNOSTIC = 3
29 } openxc_ControlCommand_Type;
30
31 typedef enum _openxc_ControlCommand_Action {
32     openxc_ControlCommand_Action_ADD = 1,
33     openxc_ControlCommand_Action_CANCEL = 2
34 } openxc_ControlCommand_Action;
35
36 typedef enum _openxc_DiagnosticRequest_DecodedType {
37     openxc_DiagnosticRequest_DecodedType_NONE = 1,
38     openxc_DiagnosticRequest_DecodedType_OBD2 = 2
39 } openxc_DiagnosticRequest_DecodedType;
40
41 typedef enum _openxc_DynamicField_Type {
42     openxc_DynamicField_Type_STRING = 1,
43     openxc_DynamicField_Type_NUM = 2,
44     openxc_DynamicField_Type_BOOL = 3
45 } openxc_DynamicField_Type;
46
47 typedef enum _openxc_TranslatedMessage_Type {
48     openxc_TranslatedMessage_Type_STRING = 1,
49     openxc_TranslatedMessage_Type_NUM = 2,
50     openxc_TranslatedMessage_Type_BOOL = 3,
51     openxc_TranslatedMessage_Type_EVENTED_STRING = 4,
52     openxc_TranslatedMessage_Type_EVENTED_NUM = 5,
53     openxc_TranslatedMessage_Type_EVENTED_BOOL = 6
54 } openxc_TranslatedMessage_Type;
55
56 /* Struct definitions */
57 typedef struct _openxc_CommandResponse {
58     bool has_type;
59     openxc_ControlCommand_Type type;
60     bool has_message;
61     char message[128];
62     bool has_status;
63     bool status;
64 } openxc_CommandResponse;
65
66 typedef PB_BYTES_ARRAY_T(8) openxc_DiagnosticRequest_payload_t;
67
68 typedef struct _openxc_DiagnosticRequest {
69     bool has_bus;
70     int32_t bus;
71     bool has_message_id;
72     uint32_t message_id;
73     bool has_mode;
74     uint32_t mode;
75     bool has_pid;
76     uint32_t pid;
77     bool has_payload;
78     openxc_DiagnosticRequest_payload_t payload;
79     bool has_multiple_responses;
80     bool multiple_responses;
81     bool has_frequency;
82     double frequency;
83     bool has_name;
84     char name[10];
85     bool has_decoded_type;
86     openxc_DiagnosticRequest_DecodedType decoded_type;
87 } openxc_DiagnosticRequest;
88
89 typedef PB_BYTES_ARRAY_T(8) openxc_DiagnosticResponse_payload_t;
90
91 typedef struct _openxc_DiagnosticResponse {
92     bool has_bus;
93     int32_t bus;
94     bool has_message_id;
95     uint32_t message_id;
96     bool has_mode;
97     uint32_t mode;
98     bool has_pid;
99     uint32_t pid;
100     bool has_success;
101     bool success;
102     bool has_negative_response_code;
103     uint32_t negative_response_code;
104     bool has_payload;
105     openxc_DiagnosticResponse_payload_t payload;
106     bool has_value;
107     double value;
108 } openxc_DiagnosticResponse;
109
110 typedef struct _openxc_DynamicField {
111     bool has_type;
112     openxc_DynamicField_Type type;
113     bool has_string_value;
114     char string_value[100];
115     bool has_numeric_value;
116     double numeric_value;
117     bool has_boolean_value;
118     bool boolean_value;
119 } openxc_DynamicField;
120
121 typedef PB_BYTES_ARRAY_T(8) openxc_RawMessage_data_t;
122
123 typedef struct _openxc_RawMessage {
124     bool has_bus;
125     int32_t bus;
126     bool has_message_id;
127     uint32_t message_id;
128     bool has_data;
129     openxc_RawMessage_data_t data;
130 } openxc_RawMessage;
131
132 typedef struct _openxc_ControlCommand {
133     bool has_type;
134     openxc_ControlCommand_Type type;
135     bool has_diagnostic_request;
136     openxc_DiagnosticRequest diagnostic_request;
137     bool has_action;
138     openxc_ControlCommand_Action action;
139 } openxc_ControlCommand;
140
141 typedef struct _openxc_TranslatedMessage {
142     bool has_type;
143     openxc_TranslatedMessage_Type type;
144     bool has_name;
145     char name[100];
146     bool has_value;
147     openxc_DynamicField value;
148     bool has_event;
149     openxc_DynamicField event;
150 } openxc_TranslatedMessage;
151
152 typedef struct _openxc_VehicleMessage {
153     bool has_type;
154     openxc_VehicleMessage_Type type;
155     bool has_raw_message;
156     openxc_RawMessage raw_message;
157     bool has_translated_message;
158     openxc_TranslatedMessage translated_message;
159     bool has_diagnostic_response;
160     openxc_DiagnosticResponse diagnostic_response;
161     bool has_control_command;
162     openxc_ControlCommand control_command;
163     bool has_command_response;
164     openxc_CommandResponse command_response;
165 } openxc_VehicleMessage;
166
167 /* Default values for struct fields */
168
169 /* Initializer values for message structs */
170 #define openxc_VehicleMessage_init_default       {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_default, false, openxc_TranslatedMessage_init_default, false, openxc_DiagnosticResponse_init_default, false, openxc_ControlCommand_init_default, false, openxc_CommandResponse_init_default}
171 #define openxc_RawMessage_init_default           {false, 0, false, 0, false, {0, {0}}}
172 #define openxc_ControlCommand_init_default       {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticRequest_init_default, false, (openxc_ControlCommand_Action)0}
173 #define openxc_CommandResponse_init_default      {false, (openxc_ControlCommand_Type)0, false, "", false, 0}
174 #define openxc_DiagnosticRequest_init_default    {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0}
175 #define openxc_DiagnosticResponse_init_default   {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0}
176 #define openxc_DynamicField_init_default         {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0}
177 #define openxc_TranslatedMessage_init_default    {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_default, false, openxc_DynamicField_init_default}
178 #define openxc_VehicleMessage_init_zero          {false, (openxc_VehicleMessage_Type)0, false, openxc_RawMessage_init_zero, false, openxc_TranslatedMessage_init_zero, false, openxc_DiagnosticResponse_init_zero, false, openxc_ControlCommand_init_zero, false, openxc_CommandResponse_init_zero}
179 #define openxc_RawMessage_init_zero              {false, 0, false, 0, false, {0, {0}}}
180 #define openxc_ControlCommand_init_zero          {false, (openxc_ControlCommand_Type)0, false, openxc_DiagnosticRequest_init_zero, false, (openxc_ControlCommand_Action)0}
181 #define openxc_CommandResponse_init_zero         {false, (openxc_ControlCommand_Type)0, false, "", false, 0}
182 #define openxc_DiagnosticRequest_init_zero       {false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0, false, 0, false, "", false, (openxc_DiagnosticRequest_DecodedType)0}
183 #define openxc_DiagnosticResponse_init_zero      {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, {0, {0}}, false, 0}
184 #define openxc_DynamicField_init_zero            {false, (openxc_DynamicField_Type)0, false, "", false, 0, false, 0}
185 #define openxc_TranslatedMessage_init_zero       {false, (openxc_TranslatedMessage_Type)0, false, "", false, openxc_DynamicField_init_zero, false, openxc_DynamicField_init_zero}
186
187 /* Field tags (for use in manual encoding/decoding) */
188 #define openxc_CommandResponse_type_tag          1
189 #define openxc_CommandResponse_message_tag       2
190 #define openxc_CommandResponse_status_tag        3
191 #define openxc_DiagnosticRequest_bus_tag         1
192 #define openxc_DiagnosticRequest_message_id_tag  2
193 #define openxc_DiagnosticRequest_mode_tag        3
194 #define openxc_DiagnosticRequest_pid_tag         4
195 #define openxc_DiagnosticRequest_payload_tag     5
196 #define openxc_DiagnosticRequest_multiple_responses_tag 6
197 #define openxc_DiagnosticRequest_frequency_tag   7
198 #define openxc_DiagnosticRequest_name_tag        8
199 #define openxc_DiagnosticRequest_decoded_type_tag 9
200 #define openxc_DiagnosticResponse_bus_tag        1
201 #define openxc_DiagnosticResponse_message_id_tag 2
202 #define openxc_DiagnosticResponse_mode_tag       3
203 #define openxc_DiagnosticResponse_pid_tag        4
204 #define openxc_DiagnosticResponse_success_tag    5
205 #define openxc_DiagnosticResponse_negative_response_code_tag 6
206 #define openxc_DiagnosticResponse_payload_tag    7
207 #define openxc_DiagnosticResponse_value_tag      8
208 #define openxc_DynamicField_type_tag             1
209 #define openxc_DynamicField_string_value_tag     2
210 #define openxc_DynamicField_numeric_value_tag    3
211 #define openxc_DynamicField_boolean_value_tag    4
212 #define openxc_RawMessage_bus_tag                1
213 #define openxc_RawMessage_message_id_tag         2
214 #define openxc_RawMessage_data_tag               3
215 #define openxc_ControlCommand_type_tag           1
216 #define openxc_ControlCommand_diagnostic_request_tag 2
217 #define openxc_ControlCommand_action_tag         3
218 #define openxc_TranslatedMessage_type_tag        1
219 #define openxc_TranslatedMessage_name_tag        2
220 #define openxc_TranslatedMessage_value_tag       3
221 #define openxc_TranslatedMessage_event_tag       4
222 #define openxc_VehicleMessage_type_tag           1
223 #define openxc_VehicleMessage_raw_message_tag    2
224 #define openxc_VehicleMessage_translated_message_tag 3
225 #define openxc_VehicleMessage_diagnostic_response_tag 4
226 #define openxc_VehicleMessage_control_command_tag 5
227 #define openxc_VehicleMessage_command_response_tag 6
228
229 /* Struct field encoding specification for nanopb */
230 extern const pb_field_t openxc_VehicleMessage_fields[7];
231 extern const pb_field_t openxc_RawMessage_fields[4];
232 extern const pb_field_t openxc_ControlCommand_fields[4];
233 extern const pb_field_t openxc_CommandResponse_fields[4];
234 extern const pb_field_t openxc_DiagnosticRequest_fields[10];
235 extern const pb_field_t openxc_DiagnosticResponse_fields[9];
236 extern const pb_field_t openxc_DynamicField_fields[5];
237 extern const pb_field_t openxc_TranslatedMessage_fields[5];
238
239 /* Maximum encoded size of messages (where known) */
240 #define openxc_VehicleMessage_size               672
241 #define openxc_RawMessage_size                   27
242 #define openxc_ControlCommand_size               82
243 #define openxc_CommandResponse_size              139
244 #define openxc_DiagnosticRequest_size            68
245 #define openxc_DiagnosticResponse_size           56
246 #define openxc_DynamicField_size                 119
247 #define openxc_TranslatedMessage_size            350
248
249 #ifdef __cplusplus
250 } /* extern "C" */
251 #endif
252
253 #endif