Lines Matching refs:field
166 to a structure containing a char array and a size field.
171 repeated field, it maps to an array of whatever type is being
172 repeated. Another field will be created for the actual number of
175 `(nanopb).max_count` is also set, the field for the actual number
181 **Simple integer field:**\
201 **Bytes field with known maximum size:**\
205 **Bytes field with fixed length:**\
220 > **Note:** For the `bytes` datatype, the field length checking may not be
226 `(nanopb).max_size=5` on a `bytes` field, you may be able to store 6
227 bytes there. For the `string` field type, the length limit is exact.
229 …field at a time. Usually this it not an issue because all elements of a repeated field occur end-t…
239 the callback function when it gets to the specific field in the message.
240 Your code can then handle the field in custom ways, for example decode
245 passing data to the callback. If the function pointer is NULL, the field
251 should write out everything, including field tags. In decoding mode, the
254 To write more complex field callbacks, it is recommended to read the
259 bool (*encode)(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg);
264 | `field` | Iterator for the field currently being encoded or decoded. |
265 | `arg` | Pointer to the `arg` field in the `pb_callback_t` structure. |
268 the wire type and field number tag. It can write as many or as few
270 `repeated` field, you should do it all in a single call.
272 Usually you can use [pb_encode_tag_for_field](reference.html#pb-encode-tag-for-field) to
273 encode the wire type and tag number of the field. However, if you want
274 to encode a repeated field as a packed array, you must call
285 bool write_string(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg)
288 if (!pb_encode_tag_for_field(stream, field))
296 bool (*decode)(pb_istream_t *stream, const pb_field_iter_t *field, void **arg);
301 | `field` | Iterator for the field currently being encoded or decoded. |
302 | `arg` | Pointer to the `arg` field in the `pb_callback_t` structure. |
305 reads the contents of a single field. The field tag has already been
316 bool read_ints(pb_istream_t *stream, const pb_field_iter_t *field, void **arg)
330 …ool MyMessage_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field);
336 | `field` | Iterator for the field currently being encoded or decoded. |
396 use it to process each field in the message.
431 Nanopb will generate `payload` as a C union and add an additional field
447 The user is expected to set the field manually using the correct field
454 Notice that neither `which_payload` field nor the unused fields in
457 When a field inside `oneof` contains `pb_callback_t`
484 additional callback field called `extensions`. The field and associated
486 unknown field is encountered, the decoder calls each handler in turn
487 until either one of them handles the field, or the list is exhausted.
502 1. Allocate storage for your field, matching the datatype in the
503 .proto. For example, for a `int32` field, you need a `int32_t`
576 5) Exceeding the max_size/max_count of a string or array field
580 9) Invalid field descriptors (would usually mean a bug in the generator).