1 /* Automatically generated nanopb header */
2 /* Generated by nanopb-0.4.0-dev */
3 
4 #ifndef PB_ALLTYPES_LEGACY_H_INCLUDED
5 #define PB_ALLTYPES_LEGACY_H_INCLUDED
6 #include <pb.h>
7 
8 /* @@protoc_insertion_point(includes) */
9 #if PB_PROTO_HEADER_VERSION != 40
10 #error Regenerate this file with the current version of nanopb generator.
11 #endif
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /* Enum definitions */
18 typedef enum _HugeEnum {
19     HugeEnum_Negative = -2147483647,
20     HugeEnum_Positive = 2147483647
21 } HugeEnum;
22 #define _HugeEnum_MIN HugeEnum_Negative
23 #define _HugeEnum_MAX HugeEnum_Positive
24 #define _HugeEnum_ARRAYSIZE ((HugeEnum)(HugeEnum_Positive+1))
25 
26 typedef enum _MyEnum {
27     MyEnum_Zero = 0,
28     MyEnum_First = 1,
29     MyEnum_Second = 2,
30     MyEnum_Truth = 42
31 } MyEnum;
32 #define _MyEnum_MIN MyEnum_Zero
33 #define _MyEnum_MAX MyEnum_Truth
34 #define _MyEnum_ARRAYSIZE ((MyEnum)(MyEnum_Truth+1))
35 
36 /* Struct definitions */
37 typedef struct _EmptyMessage {
38     char dummy_field;
39 /* @@protoc_insertion_point(struct:EmptyMessage) */
40 } EmptyMessage;
41 
42 
43 typedef struct _Limits {
44     int32_t int32_min;
45     int32_t int32_max;
46     uint32_t uint32_min;
47     uint32_t uint32_max;
48     int64_t int64_min;
49     int64_t int64_max;
50     uint64_t uint64_min;
51     uint64_t uint64_max;
52     HugeEnum enum_min;
53     HugeEnum enum_max;
54 /* @@protoc_insertion_point(struct:Limits) */
55 } Limits;
56 
57 
58 typedef struct _SubMessage {
59     char substuff1[16];
60     int32_t substuff2;
61     bool has_substuff3;
62     uint32_t substuff3;
63 /* @@protoc_insertion_point(struct:SubMessage) */
64 } SubMessage;
65 
66 
67 typedef PB_BYTES_ARRAY_T(16) AllTypes_req_bytes_t;
68 typedef PB_BYTES_ARRAY_T(16) AllTypes_rep_bytes_t;
69 typedef PB_BYTES_ARRAY_T(16) AllTypes_opt_bytes_t;
70 typedef struct _AllTypes {
71     int32_t req_int32;
72     int64_t req_int64;
73     uint32_t req_uint32;
74     uint64_t req_uint64;
75     int32_t req_sint32;
76     int64_t req_sint64;
77     bool req_bool;
78     uint32_t req_fixed32;
79     int32_t req_sfixed32;
80     float req_float;
81     uint64_t req_fixed64;
82     int64_t req_sfixed64;
83     double req_double;
84     char req_string[16];
85     AllTypes_req_bytes_t req_bytes;
86     SubMessage req_submsg;
87     MyEnum req_enum;
88     pb_size_t rep_int32_count;
89     int32_t rep_int32[5];
90     pb_size_t rep_int64_count;
91     int64_t rep_int64[5];
92     pb_size_t rep_uint32_count;
93     uint32_t rep_uint32[5];
94     pb_size_t rep_uint64_count;
95     uint64_t rep_uint64[5];
96     pb_size_t rep_sint32_count;
97     int32_t rep_sint32[5];
98     pb_size_t rep_sint64_count;
99     int64_t rep_sint64[5];
100     pb_size_t rep_bool_count;
101     bool rep_bool[5];
102     pb_size_t rep_fixed32_count;
103     uint32_t rep_fixed32[5];
104     pb_size_t rep_sfixed32_count;
105     int32_t rep_sfixed32[5];
106     pb_size_t rep_float_count;
107     float rep_float[5];
108     pb_size_t rep_fixed64_count;
109     uint64_t rep_fixed64[5];
110     pb_size_t rep_sfixed64_count;
111     int64_t rep_sfixed64[5];
112     pb_size_t rep_double_count;
113     double rep_double[5];
114     pb_size_t rep_string_count;
115     char rep_string[5][16];
116     pb_size_t rep_bytes_count;
117     AllTypes_rep_bytes_t rep_bytes[5];
118     pb_size_t rep_submsg_count;
119     SubMessage rep_submsg[5];
120     pb_size_t rep_enum_count;
121     MyEnum rep_enum[5];
122     bool has_opt_int32;
123     int32_t opt_int32;
124     bool has_opt_int64;
125     int64_t opt_int64;
126     bool has_opt_uint32;
127     uint32_t opt_uint32;
128     bool has_opt_uint64;
129     uint64_t opt_uint64;
130     bool has_opt_sint32;
131     int32_t opt_sint32;
132     bool has_opt_sint64;
133     int64_t opt_sint64;
134     bool has_opt_bool;
135     bool opt_bool;
136     bool has_opt_fixed32;
137     uint32_t opt_fixed32;
138     bool has_opt_sfixed32;
139     int32_t opt_sfixed32;
140     bool has_opt_float;
141     float opt_float;
142     bool has_opt_fixed64;
143     uint64_t opt_fixed64;
144     bool has_opt_sfixed64;
145     int64_t opt_sfixed64;
146     bool has_opt_double;
147     double opt_double;
148     bool has_opt_string;
149     char opt_string[16];
150     bool has_opt_bytes;
151     AllTypes_opt_bytes_t opt_bytes;
152     bool has_opt_submsg;
153     SubMessage opt_submsg;
154     bool has_opt_enum;
155     MyEnum opt_enum;
156     int32_t end;
157     pb_extension_t *extensions;
158 /* @@protoc_insertion_point(struct:AllTypes) */
159 } AllTypes;
160 
161 
162 /* Initializer values for message structs */
163 #define SubMessage_init_default                  {"1", 2, false, 3u}
164 #define EmptyMessage_init_default                {0}
165 #define Limits_init_default                      {2147483647, -2147483647, 4294967295u, 0u, 9223372036854775807ll, -9223372036854775807ll, 18446744073709551615ull, 0ull, HugeEnum_Positive, HugeEnum_Negative}
166 #define AllTypes_init_default                    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", {0, {0}}, SubMessage_init_default, _MyEnum_MIN, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {"", "", "", "", ""}, 0, {{0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}, 0, {SubMessage_init_default, SubMessage_init_default, SubMessage_init_default, SubMessage_init_default, SubMessage_init_default}, 0, {_MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN}, false, 4041, false, 4042ll, false, 4043u, false, 4044ull, false, 4045, false, 4046, false, false, false, 4048u, false, 4049, false, 4050, false, 4051ull, false, 4052ll, false, 4053, false, "4054", false, {4, {0x34,0x30,0x35,0x35}}, false, SubMessage_init_default, false, MyEnum_Second, 0, NULL}
167 #define SubMessage_init_zero                     {"", 0, false, 0}
168 #define EmptyMessage_init_zero                   {0}
169 #define Limits_init_zero                         {0, 0, 0, 0, 0, 0, 0, 0, _HugeEnum_MIN, _HugeEnum_MIN}
170 #define AllTypes_init_zero                       {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", {0, {0}}, SubMessage_init_zero, _MyEnum_MIN, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {"", "", "", "", ""}, 0, {{0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}, 0, {SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero}, 0, {_MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN}, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, "", false, {0, {0}}, false, SubMessage_init_zero, false, _MyEnum_MIN, 0, NULL}
171 
172 /* Field tags (for use in manual encoding/decoding) */
173 #define Limits_int32_min_tag                     1
174 #define Limits_int32_max_tag                     2
175 #define Limits_uint32_min_tag                    3
176 #define Limits_uint32_max_tag                    4
177 #define Limits_int64_min_tag                     5
178 #define Limits_int64_max_tag                     6
179 #define Limits_uint64_min_tag                    7
180 #define Limits_uint64_max_tag                    8
181 #define Limits_enum_min_tag                      9
182 #define Limits_enum_max_tag                      10
183 #define SubMessage_substuff1_tag                 1
184 #define SubMessage_substuff2_tag                 2
185 #define SubMessage_substuff3_tag                 3
186 #define AllTypes_req_int32_tag                   1
187 #define AllTypes_req_int64_tag                   2
188 #define AllTypes_req_uint32_tag                  3
189 #define AllTypes_req_uint64_tag                  4
190 #define AllTypes_req_sint32_tag                  5
191 #define AllTypes_req_sint64_tag                  6
192 #define AllTypes_req_bool_tag                    7
193 #define AllTypes_req_fixed32_tag                 8
194 #define AllTypes_req_sfixed32_tag                9
195 #define AllTypes_req_float_tag                   10
196 #define AllTypes_req_fixed64_tag                 11
197 #define AllTypes_req_sfixed64_tag                12
198 #define AllTypes_req_double_tag                  13
199 #define AllTypes_req_string_tag                  14
200 #define AllTypes_req_bytes_tag                   15
201 #define AllTypes_req_submsg_tag                  16
202 #define AllTypes_req_enum_tag                    17
203 #define AllTypes_rep_int32_tag                   21
204 #define AllTypes_rep_int64_tag                   22
205 #define AllTypes_rep_uint32_tag                  23
206 #define AllTypes_rep_uint64_tag                  24
207 #define AllTypes_rep_sint32_tag                  25
208 #define AllTypes_rep_sint64_tag                  26
209 #define AllTypes_rep_bool_tag                    27
210 #define AllTypes_rep_fixed32_tag                 28
211 #define AllTypes_rep_sfixed32_tag                29
212 #define AllTypes_rep_float_tag                   30
213 #define AllTypes_rep_fixed64_tag                 31
214 #define AllTypes_rep_sfixed64_tag                32
215 #define AllTypes_rep_double_tag                  33
216 #define AllTypes_rep_string_tag                  34
217 #define AllTypes_rep_bytes_tag                   35
218 #define AllTypes_rep_submsg_tag                  36
219 #define AllTypes_rep_enum_tag                    37
220 #define AllTypes_opt_int32_tag                   41
221 #define AllTypes_opt_int64_tag                   42
222 #define AllTypes_opt_uint32_tag                  43
223 #define AllTypes_opt_uint64_tag                  44
224 #define AllTypes_opt_sint32_tag                  45
225 #define AllTypes_opt_sint64_tag                  46
226 #define AllTypes_opt_bool_tag                    47
227 #define AllTypes_opt_fixed32_tag                 48
228 #define AllTypes_opt_sfixed32_tag                49
229 #define AllTypes_opt_float_tag                   50
230 #define AllTypes_opt_fixed64_tag                 51
231 #define AllTypes_opt_sfixed64_tag                52
232 #define AllTypes_opt_double_tag                  53
233 #define AllTypes_opt_string_tag                  54
234 #define AllTypes_opt_bytes_tag                   55
235 #define AllTypes_opt_submsg_tag                  56
236 #define AllTypes_opt_enum_tag                    57
237 #define AllTypes_end_tag                         99
238 
239 /* Struct field encoding specification for nanopb */
240 #define SubMessage_FIELDLIST(X, a) \
241 X(a, STATIC, REQUIRED, STRING, substuff1, 1) \
242 X(a, STATIC, REQUIRED, INT32, substuff2, 2) \
243 X(a, STATIC, OPTIONAL, FIXED32, substuff3, 3)
244 #define SubMessage_CALLBACK NULL
245 
246 #define EmptyMessage_FIELDLIST(X, a) \
247 
248 #define EmptyMessage_CALLBACK NULL
249 
250 #define Limits_FIELDLIST(X, a) \
251 X(a, STATIC, REQUIRED, INT32, int32_min, 1) \
252 X(a, STATIC, REQUIRED, INT32, int32_max, 2) \
253 X(a, STATIC, REQUIRED, UINT32, uint32_min, 3) \
254 X(a, STATIC, REQUIRED, UINT32, uint32_max, 4) \
255 X(a, STATIC, REQUIRED, INT64, int64_min, 5) \
256 X(a, STATIC, REQUIRED, INT64, int64_max, 6) \
257 X(a, STATIC, REQUIRED, UINT64, uint64_min, 7) \
258 X(a, STATIC, REQUIRED, UINT64, uint64_max, 8) \
259 X(a, STATIC, REQUIRED, ENUM, enum_min, 9) \
260 X(a, STATIC, REQUIRED, ENUM, enum_max, 10)
261 #define Limits_CALLBACK NULL
262 
263 #define AllTypes_FIELDLIST(X, a) \
264 X(a, STATIC, REQUIRED, INT32, req_int32, 1) \
265 X(a, STATIC, REQUIRED, INT64, req_int64, 2) \
266 X(a, STATIC, REQUIRED, UINT32, req_uint32, 3) \
267 X(a, STATIC, REQUIRED, UINT64, req_uint64, 4) \
268 X(a, STATIC, REQUIRED, SINT32, req_sint32, 5) \
269 X(a, STATIC, REQUIRED, SINT64, req_sint64, 6) \
270 X(a, STATIC, REQUIRED, BOOL, req_bool, 7) \
271 X(a, STATIC, REQUIRED, FIXED32, req_fixed32, 8) \
272 X(a, STATIC, REQUIRED, SFIXED32, req_sfixed32, 9) \
273 X(a, STATIC, REQUIRED, FLOAT, req_float, 10) \
274 X(a, STATIC, REQUIRED, FIXED64, req_fixed64, 11) \
275 X(a, STATIC, REQUIRED, SFIXED64, req_sfixed64, 12) \
276 X(a, STATIC, REQUIRED, DOUBLE, req_double, 13) \
277 X(a, STATIC, REQUIRED, STRING, req_string, 14) \
278 X(a, STATIC, REQUIRED, BYTES, req_bytes, 15) \
279 X(a, STATIC, REQUIRED, MESSAGE, req_submsg, 16) \
280 X(a, STATIC, REQUIRED, UENUM, req_enum, 17) \
281 X(a, STATIC, REPEATED, INT32, rep_int32, 21) \
282 X(a, STATIC, REPEATED, INT64, rep_int64, 22) \
283 X(a, STATIC, REPEATED, UINT32, rep_uint32, 23) \
284 X(a, STATIC, REPEATED, UINT64, rep_uint64, 24) \
285 X(a, STATIC, REPEATED, SINT32, rep_sint32, 25) \
286 X(a, STATIC, REPEATED, SINT64, rep_sint64, 26) \
287 X(a, STATIC, REPEATED, BOOL, rep_bool, 27) \
288 X(a, STATIC, REPEATED, FIXED32, rep_fixed32, 28) \
289 X(a, STATIC, REPEATED, SFIXED32, rep_sfixed32, 29) \
290 X(a, STATIC, REPEATED, FLOAT, rep_float, 30) \
291 X(a, STATIC, REPEATED, FIXED64, rep_fixed64, 31) \
292 X(a, STATIC, REPEATED, SFIXED64, rep_sfixed64, 32) \
293 X(a, STATIC, REPEATED, DOUBLE, rep_double, 33) \
294 X(a, STATIC, REPEATED, STRING, rep_string, 34) \
295 X(a, STATIC, REPEATED, BYTES, rep_bytes, 35) \
296 X(a, STATIC, REPEATED, MESSAGE, rep_submsg, 36) \
297 X(a, STATIC, REPEATED, UENUM, rep_enum, 37) \
298 X(a, STATIC, OPTIONAL, INT32, opt_int32, 41) \
299 X(a, STATIC, OPTIONAL, INT64, opt_int64, 42) \
300 X(a, STATIC, OPTIONAL, UINT32, opt_uint32, 43) \
301 X(a, STATIC, OPTIONAL, UINT64, opt_uint64, 44) \
302 X(a, STATIC, OPTIONAL, SINT32, opt_sint32, 45) \
303 X(a, STATIC, OPTIONAL, SINT64, opt_sint64, 46) \
304 X(a, STATIC, OPTIONAL, BOOL, opt_bool, 47) \
305 X(a, STATIC, OPTIONAL, FIXED32, opt_fixed32, 48) \
306 X(a, STATIC, OPTIONAL, SFIXED32, opt_sfixed32, 49) \
307 X(a, STATIC, OPTIONAL, FLOAT, opt_float, 50) \
308 X(a, STATIC, OPTIONAL, FIXED64, opt_fixed64, 51) \
309 X(a, STATIC, OPTIONAL, SFIXED64, opt_sfixed64, 52) \
310 X(a, STATIC, OPTIONAL, DOUBLE, opt_double, 53) \
311 X(a, STATIC, OPTIONAL, STRING, opt_string, 54) \
312 X(a, STATIC, OPTIONAL, BYTES, opt_bytes, 55) \
313 X(a, STATIC, OPTIONAL, MESSAGE, opt_submsg, 56) \
314 X(a, STATIC, OPTIONAL, UENUM, opt_enum, 57) \
315 X(a, STATIC, REQUIRED, INT32, end, 99) \
316 X(a, CALLBACK, OPTIONAL, EXTENSION, extensions, 200)
317 #define AllTypes_CALLBACK pb_default_field_callback
318 #define AllTypes_req_submsg_MSGTYPE SubMessage
319 #define AllTypes_rep_submsg_MSGTYPE SubMessage
320 #define AllTypes_opt_submsg_MSGTYPE SubMessage
321 
322 extern const pb_msgdesc_t SubMessage_msg;
323 extern pb_byte_t SubMessage_default[];
324 extern const pb_msgdesc_t EmptyMessage_msg;
325 extern pb_byte_t EmptyMessage_default[];
326 extern const pb_msgdesc_t Limits_msg;
327 extern pb_byte_t Limits_default[];
328 extern const pb_msgdesc_t AllTypes_msg;
329 extern pb_byte_t AllTypes_default[];
330 
331 /* Defines for backwards compatibility with code written before nanopb-0.4.0 */
332 #define SubMessage_fields &SubMessage_msg
333 #define EmptyMessage_fields &EmptyMessage_msg
334 #define Limits_fields &Limits_msg
335 #define AllTypes_fields &AllTypes_msg
336 
337 /* Maximum encoded size of messages (where known) */
338 #define SubMessage_size                          33
339 #define EmptyMessage_size                        0
340 #define Limits_size                              100
341 #define AllTypes_size                            1320
342 
343 #ifdef __cplusplus
344 } /* extern "C" */
345 #endif
346 /* @@protoc_insertion_point(eof) */
347 
348 #endif
349