267f785cef00d5fc3ae0df4efa4496963ef63bfd
[apps/agl-service-can-low-level.git] / gen / cpp / openxc.pb.h
1 /* Automatically generated nanopb header */
2 /* Generated by nanopb-0.2.5 at Sat Mar 15 12:44:03 2014. */
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_TRANSLATED = 2,
16     openxc_VehicleMessage_Type_DIAGNOSTIC = 3,
17     openxc_VehicleMessage_Type_CONTROL_COMMAND = 4,
18     openxc_VehicleMessage_Type_COMMAND_RESPONSE = 5
19 } openxc_VehicleMessage_Type;
20
21 typedef enum _openxc_ControlCommand_Type {
22     openxc_ControlCommand_Type_VERSION = 1,
23     openxc_ControlCommand_Type_DEVICE_ID = 2,
24     openxc_ControlCommand_Type_DIAGNOSTIC = 3
25 } openxc_ControlCommand_Type;
26
27 typedef enum _openxc_DynamicField_Type {
28     openxc_DynamicField_Type_STRING = 1,
29     openxc_DynamicField_Type_NUM = 2,
30     openxc_DynamicField_Type_BOOL = 3
31 } openxc_DynamicField_Type;
32
33 typedef enum _openxc_TranslatedMessage_Type {
34     openxc_TranslatedMessage_Type_STRING = 1,
35     openxc_TranslatedMessage_Type_NUM = 2,
36     openxc_TranslatedMessage_Type_BOOL = 3,
37     openxc_TranslatedMessage_Type_EVENTED_STRING = 4,
38     openxc_TranslatedMessage_Type_EVENTED_NUM = 5,
39     openxc_TranslatedMessage_Type_EVENTED_BOOL = 6
40 } openxc_TranslatedMessage_Type;
41
42 /* Struct definitions */
43 typedef struct _openxc_CommandResponse {
44     bool has_type;
45     openxc_ControlCommand_Type type;
46     bool has_message;
47     char message[128];
48 } openxc_CommandResponse;
49
50 typedef struct {
51     size_t size;
52     uint8_t bytes[8];
53 } openxc_DiagnosticRequest_payload_t;
54
55 typedef struct _openxc_DiagnosticRequest {
56     bool has_bus;
57     int32_t bus;
58     bool has_message_id;
59     uint32_t message_id;
60     bool has_mode;
61     uint32_t mode;
62     bool has_pid;
63     uint32_t pid;
64     bool has_payload;
65     openxc_DiagnosticRequest_payload_t payload;
66     bool has_parse_payload;
67     bool parse_payload;
68     bool has_multiple_responses;
69     bool multiple_responses;
70     bool has_factor;
71     double factor;
72     bool has_offset;
73     double offset;
74     bool has_frequency;
75     double frequency;
76     bool has_name;
77     char name[10];
78 } openxc_DiagnosticRequest;
79
80 typedef struct {
81     size_t size;
82     uint8_t bytes[8];
83 } openxc_DiagnosticResponse_payload_t;
84
85 typedef struct _openxc_DiagnosticResponse {
86     bool has_bus;
87     int32_t bus;
88     bool has_message_id;
89     uint32_t message_id;
90     bool has_mode;
91     uint32_t mode;
92     bool has_pid;
93     uint32_t pid;
94     bool has_success;
95     bool success;
96     bool has_negative_response_code;
97     uint32_t negative_response_code;
98     bool has_payload;
99     openxc_DiagnosticResponse_payload_t payload;
100     bool has_value;
101     double value;
102 } openxc_DiagnosticResponse;
103
104 typedef struct _openxc_DynamicField {
105     bool has_type;
106     openxc_DynamicField_Type type;
107     bool has_string_value;
108     char string_value[100];
109     bool has_numeric_value;
110     double numeric_value;
111     bool has_boolean_value;
112     bool boolean_value;
113 } openxc_DynamicField;
114
115 typedef struct {
116     size_t size;
117     uint8_t bytes[8];
118 } openxc_RawMessage_data_t;
119
120 typedef struct _openxc_RawMessage {
121     bool has_bus;
122     int32_t bus;
123     bool has_message_id;
124     uint32_t message_id;
125     bool has_data;
126     openxc_RawMessage_data_t data;
127 } openxc_RawMessage;
128
129 typedef struct _openxc_ControlCommand {
130     bool has_type;
131     openxc_ControlCommand_Type type;
132     bool has_diagnostic_request;
133     openxc_DiagnosticRequest diagnostic_request;
134 } openxc_ControlCommand;
135
136 typedef struct _openxc_TranslatedMessage {
137     bool has_type;
138     openxc_TranslatedMessage_Type type;
139     bool has_name;
140     char name[100];
141     bool has_value;
142     openxc_DynamicField value;
143     bool has_event;
144     openxc_DynamicField event;
145 } openxc_TranslatedMessage;
146
147 typedef struct _openxc_VehicleMessage {
148     bool has_type;
149     openxc_VehicleMessage_Type type;
150     bool has_raw_message;
151     openxc_RawMessage raw_message;
152     bool has_translated_message;
153     openxc_TranslatedMessage translated_message;
154     bool has_diagnostic_response;
155     openxc_DiagnosticResponse diagnostic_response;
156     bool has_control_command;
157     openxc_ControlCommand control_command;
158     bool has_command_response;
159     openxc_CommandResponse command_response;
160 } openxc_VehicleMessage;
161
162 /* Default values for struct fields */
163
164 /* Field tags (for use in manual encoding/decoding) */
165 #define openxc_CommandResponse_type_tag          1
166 #define openxc_CommandResponse_message_tag       2
167 #define openxc_DiagnosticRequest_bus_tag         1
168 #define openxc_DiagnosticRequest_message_id_tag  2
169 #define openxc_DiagnosticRequest_mode_tag        3
170 #define openxc_DiagnosticRequest_pid_tag         4
171 #define openxc_DiagnosticRequest_payload_tag     5
172 #define openxc_DiagnosticRequest_parse_payload_tag 6
173 #define openxc_DiagnosticRequest_multiple_responses_tag 7
174 #define openxc_DiagnosticRequest_factor_tag      8
175 #define openxc_DiagnosticRequest_offset_tag      9
176 #define openxc_DiagnosticRequest_frequency_tag   10
177 #define openxc_DiagnosticRequest_name_tag        11
178 #define openxc_DiagnosticResponse_bus_tag        1
179 #define openxc_DiagnosticResponse_message_id_tag 2
180 #define openxc_DiagnosticResponse_mode_tag       3
181 #define openxc_DiagnosticResponse_pid_tag        4
182 #define openxc_DiagnosticResponse_success_tag    5
183 #define openxc_DiagnosticResponse_negative_response_code_tag 6
184 #define openxc_DiagnosticResponse_payload_tag    7
185 #define openxc_DiagnosticResponse_value_tag      8
186 #define openxc_DynamicField_type_tag             1
187 #define openxc_DynamicField_string_value_tag     2
188 #define openxc_DynamicField_numeric_value_tag    3
189 #define openxc_DynamicField_boolean_value_tag    4
190 #define openxc_RawMessage_bus_tag                1
191 #define openxc_RawMessage_message_id_tag         2
192 #define openxc_RawMessage_data_tag               3
193 #define openxc_ControlCommand_type_tag           1
194 #define openxc_ControlCommand_diagnostic_request_tag 2
195 #define openxc_TranslatedMessage_type_tag        1
196 #define openxc_TranslatedMessage_name_tag        2
197 #define openxc_TranslatedMessage_value_tag       3
198 #define openxc_TranslatedMessage_event_tag       4
199 #define openxc_VehicleMessage_type_tag           1
200 #define openxc_VehicleMessage_raw_message_tag    2
201 #define openxc_VehicleMessage_translated_message_tag 3
202 #define openxc_VehicleMessage_diagnostic_response_tag 4
203 #define openxc_VehicleMessage_control_command_tag 5
204 #define openxc_VehicleMessage_command_response_tag 6
205
206 /* Struct field encoding specification for nanopb */
207 extern const pb_field_t openxc_VehicleMessage_fields[7];
208 extern const pb_field_t openxc_RawMessage_fields[4];
209 extern const pb_field_t openxc_ControlCommand_fields[3];
210 extern const pb_field_t openxc_CommandResponse_fields[3];
211 extern const pb_field_t openxc_DiagnosticRequest_fields[12];
212 extern const pb_field_t openxc_DiagnosticResponse_fields[9];
213 extern const pb_field_t openxc_DynamicField_fields[5];
214 extern const pb_field_t openxc_TranslatedMessage_fields[5];
215
216 /* Maximum encoded size of messages (where known) */
217 #define openxc_VehicleMessage_size               678
218 #define openxc_RawMessage_size                   27
219 #define openxc_ControlCommand_size               90
220 #define openxc_CommandResponse_size              137
221 #define openxc_DiagnosticRequest_size            82
222 #define openxc_DiagnosticResponse_size           56
223 #define openxc_DynamicField_size                 119
224 #define openxc_TranslatedMessage_size            350
225
226 #ifdef __cplusplus
227 } /* extern "C" */
228 #endif
229
230 #endif