Move ControlCommand inside VehicleMessage so it can be on same stream.
[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 Tue Mar  4 12:52:45 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;
19
20 typedef enum _openxc_ControlCommand_Type {
21     openxc_ControlCommand_Type_VERSION = 1,
22     openxc_ControlCommand_Type_DEVICE_ID = 2,
23     openxc_ControlCommand_Type_DIAGNOSTIC = 3
24 } openxc_ControlCommand_Type;
25
26 typedef enum _openxc_TranslatedMessage_Type {
27     openxc_TranslatedMessage_Type_STRING = 1,
28     openxc_TranslatedMessage_Type_NUM = 2,
29     openxc_TranslatedMessage_Type_BOOL = 3,
30     openxc_TranslatedMessage_Type_EVENTED_STRING = 4,
31     openxc_TranslatedMessage_Type_EVENTED_NUM = 5,
32     openxc_TranslatedMessage_Type_EVENTED_BOOL = 6
33 } openxc_TranslatedMessage_Type;
34
35 /* Struct definitions */
36 typedef struct {
37     size_t size;
38     uint8_t bytes[8];
39 } openxc_DiagnosticRequest_payload_t;
40
41 typedef struct _openxc_DiagnosticRequest {
42     bool has_bus;
43     int32_t bus;
44     bool has_message_id;
45     uint32_t message_id;
46     bool has_mode;
47     uint32_t mode;
48     bool has_pid;
49     uint32_t pid;
50     bool has_payload;
51     openxc_DiagnosticRequest_payload_t payload;
52     bool has_parse_payload;
53     bool parse_payload;
54     bool has_factor;
55     double factor;
56     bool has_offset;
57     double offset;
58     bool has_frequency;
59     double frequency;
60 } openxc_DiagnosticRequest;
61
62 typedef struct {
63     size_t size;
64     uint8_t bytes[8];
65 } openxc_DiagnosticResponse_payload_t;
66
67 typedef struct _openxc_DiagnosticResponse {
68     bool has_bus;
69     int32_t bus;
70     bool has_message_id;
71     uint32_t message_id;
72     bool has_mode;
73     uint32_t mode;
74     bool has_pid;
75     uint32_t pid;
76     bool has_success;
77     bool success;
78     bool has_negative_response_code;
79     uint32_t negative_response_code;
80     bool has_payload;
81     openxc_DiagnosticResponse_payload_t payload;
82     bool has_value;
83     double value;
84 } openxc_DiagnosticResponse;
85
86 typedef struct {
87     size_t size;
88     uint8_t bytes[8];
89 } openxc_RawMessage_data_t;
90
91 typedef struct _openxc_RawMessage {
92     bool has_bus;
93     int32_t bus;
94     bool has_message_id;
95     uint32_t message_id;
96     bool has_data;
97     openxc_RawMessage_data_t data;
98 } openxc_RawMessage;
99
100 typedef struct _openxc_TranslatedMessage {
101     bool has_type;
102     openxc_TranslatedMessage_Type type;
103     bool has_name;
104     char name[100];
105     bool has_string_value;
106     char string_value[100];
107     bool has_numeric_value;
108     double numeric_value;
109     bool has_boolean_value;
110     bool boolean_value;
111     bool has_string_event;
112     char string_event[100];
113     bool has_numeric_event;
114     double numeric_event;
115     bool has_boolean_event;
116     bool boolean_event;
117 } openxc_TranslatedMessage;
118
119 typedef struct _openxc_ControlCommand {
120     bool has_type;
121     openxc_ControlCommand_Type type;
122     bool has_diagnostic_request;
123     openxc_DiagnosticRequest diagnostic_request;
124 } openxc_ControlCommand;
125
126 typedef struct _openxc_VehicleMessage {
127     bool has_type;
128     openxc_VehicleMessage_Type type;
129     bool has_raw_message;
130     openxc_RawMessage raw_message;
131     bool has_translated_message;
132     openxc_TranslatedMessage translated_message;
133     bool has_diagnostic_response;
134     openxc_DiagnosticResponse diagnostic_response;
135     bool has_control_command;
136     openxc_ControlCommand control_command;
137 } openxc_VehicleMessage;
138
139 /* Default values for struct fields */
140
141 /* Field tags (for use in manual encoding/decoding) */
142 #define openxc_DiagnosticRequest_bus_tag         1
143 #define openxc_DiagnosticRequest_message_id_tag  2
144 #define openxc_DiagnosticRequest_mode_tag        3
145 #define openxc_DiagnosticRequest_pid_tag         4
146 #define openxc_DiagnosticRequest_payload_tag     5
147 #define openxc_DiagnosticRequest_parse_payload_tag 6
148 #define openxc_DiagnosticRequest_factor_tag      7
149 #define openxc_DiagnosticRequest_offset_tag      8
150 #define openxc_DiagnosticRequest_frequency_tag   9
151 #define openxc_DiagnosticResponse_bus_tag        1
152 #define openxc_DiagnosticResponse_message_id_tag 2
153 #define openxc_DiagnosticResponse_mode_tag       3
154 #define openxc_DiagnosticResponse_pid_tag        4
155 #define openxc_DiagnosticResponse_success_tag    5
156 #define openxc_DiagnosticResponse_negative_response_code_tag 6
157 #define openxc_DiagnosticResponse_payload_tag    7
158 #define openxc_DiagnosticResponse_value_tag      8
159 #define openxc_RawMessage_bus_tag                1
160 #define openxc_RawMessage_message_id_tag         2
161 #define openxc_RawMessage_data_tag               3
162 #define openxc_TranslatedMessage_type_tag        1
163 #define openxc_TranslatedMessage_name_tag        2
164 #define openxc_TranslatedMessage_string_value_tag 3
165 #define openxc_TranslatedMessage_numeric_value_tag 4
166 #define openxc_TranslatedMessage_boolean_value_tag 5
167 #define openxc_TranslatedMessage_string_event_tag 6
168 #define openxc_TranslatedMessage_numeric_event_tag 7
169 #define openxc_TranslatedMessage_boolean_event_tag 8
170 #define openxc_ControlCommand_type_tag           1
171 #define openxc_ControlCommand_diagnostic_request_tag 2
172 #define openxc_VehicleMessage_type_tag           1
173 #define openxc_VehicleMessage_raw_message_tag    2
174 #define openxc_VehicleMessage_translated_message_tag 3
175 #define openxc_VehicleMessage_diagnostic_response_tag 4
176 #define openxc_VehicleMessage_control_command_tag 5
177
178 /* Struct field encoding specification for nanopb */
179 extern const pb_field_t openxc_VehicleMessage_fields[6];
180 extern const pb_field_t openxc_RawMessage_fields[4];
181 extern const pb_field_t openxc_ControlCommand_fields[3];
182 extern const pb_field_t openxc_DiagnosticRequest_fields[10];
183 extern const pb_field_t openxc_DiagnosticResponse_fields[9];
184 extern const pb_field_t openxc_TranslatedMessage_fields[9];
185
186 /* Maximum encoded size of messages (where known) */
187 #define openxc_VehicleMessage_size               508
188 #define openxc_RawMessage_size                   27
189 #define openxc_ControlCommand_size               76
190 #define openxc_DiagnosticRequest_size            68
191 #define openxc_DiagnosticResponse_size           56
192 #define openxc_TranslatedMessage_size            334
193
194 #ifdef __cplusplus
195 } /* extern "C" */
196 #endif
197
198 #endif