1 /* Automatically generated nanopb header */
2 /* This is a file generated using nanopb-0.2.0-dev.
3 * It is used as a part of test suite in order to detect any
4 * incompatible changes made to the generator in future versions.
7 #ifndef _PB_ALLTYPES_PB_H_
8 #define _PB_ALLTYPES_PB_H_
15 /* Enum definitions */
16 typedef enum _MyEnum {
23 /* Struct definitions */
24 typedef struct _SubMessage {
34 } AllTypes_req_bytes_t;
39 } AllTypes_rep_bytes_t;
44 } AllTypes_opt_bytes_t;
46 typedef struct _AllTypes {
61 AllTypes_req_bytes_t req_bytes;
62 SubMessage req_submsg;
64 size_t rep_int32_count;
66 size_t rep_int64_count;
68 size_t rep_uint32_count;
69 uint32_t rep_uint32[5];
70 size_t rep_uint64_count;
71 uint64_t rep_uint64[5];
72 size_t rep_sint32_count;
73 int32_t rep_sint32[5];
74 size_t rep_sint64_count;
75 int64_t rep_sint64[5];
76 size_t rep_bool_count;
78 size_t rep_fixed32_count;
79 uint32_t rep_fixed32[5];
80 size_t rep_sfixed32_count;
81 int32_t rep_sfixed32[5];
82 size_t rep_float_count;
84 size_t rep_fixed64_count;
85 uint64_t rep_fixed64[5];
86 size_t rep_sfixed64_count;
87 int64_t rep_sfixed64[5];
88 size_t rep_double_count;
90 size_t rep_string_count;
91 char rep_string[5][16];
92 size_t rep_bytes_count;
93 AllTypes_rep_bytes_t rep_bytes[5];
94 size_t rep_submsg_count;
95 SubMessage rep_submsg[5];
96 size_t rep_enum_count;
112 bool has_opt_fixed32;
113 uint32_t opt_fixed32;
114 bool has_opt_sfixed32;
115 int32_t opt_sfixed32;
118 bool has_opt_fixed64;
119 uint64_t opt_fixed64;
120 bool has_opt_sfixed64;
121 int64_t opt_sfixed64;
127 AllTypes_opt_bytes_t opt_bytes;
129 SubMessage opt_submsg;
135 /* Default values for struct fields */
136 extern const char SubMessage_substuff1_default[16];
137 extern const int32_t SubMessage_substuff2_default;
138 extern const uint32_t SubMessage_substuff3_default;
139 extern const int32_t AllTypes_opt_int32_default;
140 extern const int64_t AllTypes_opt_int64_default;
141 extern const uint32_t AllTypes_opt_uint32_default;
142 extern const uint64_t AllTypes_opt_uint64_default;
143 extern const int32_t AllTypes_opt_sint32_default;
144 extern const int64_t AllTypes_opt_sint64_default;
145 extern const bool AllTypes_opt_bool_default;
146 extern const uint32_t AllTypes_opt_fixed32_default;
147 extern const int32_t AllTypes_opt_sfixed32_default;
148 extern const float AllTypes_opt_float_default;
149 extern const uint64_t AllTypes_opt_fixed64_default;
150 extern const int64_t AllTypes_opt_sfixed64_default;
151 extern const double AllTypes_opt_double_default;
152 extern const char AllTypes_opt_string_default[16];
153 extern const AllTypes_opt_bytes_t AllTypes_opt_bytes_default;
154 extern const MyEnum AllTypes_opt_enum_default;
156 /* Struct field encoding specification for nanopb */
157 extern const pb_field_t SubMessage_fields[4];
158 extern const pb_field_t AllTypes_fields[53];
160 /* Check that field information fits in pb_field_t */
161 #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
162 STATIC_ASSERT((pb_membersize(AllTypes, req_submsg) < 256 && pb_membersize(AllTypes, rep_submsg[0]) < 256 && pb_membersize(AllTypes, opt_submsg) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_SubMessage_AllTypes)
165 #if !defined(PB_FIELD_32BIT)
166 STATIC_ASSERT((pb_membersize(AllTypes, req_submsg) < 65536 && pb_membersize(AllTypes, rep_submsg[0]) < 65536 && pb_membersize(AllTypes, opt_submsg) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_SubMessage_AllTypes)
169 /* On some platforms (such as AVR), double is really float.
170 * These are not directly supported by nanopb, but see example_avr_double.
172 STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)