Home
last modified time | relevance | path

Searched refs:callback (Results 1 – 25 of 29) sorted by relevance

12

/nanopb-2.7.6/tests/oneof_callback/
Doneof.proto5 // Repeated callback inside submessage inside oneof
11 // String callback inside submessage inside oneof
17 // String callback directly inside oneof
DSConscript1 # Test decoder callback support inside oneofs.
/nanopb-2.7.6/tests/basic_stream/
Ddecode_stream.c58 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() function
76 pb_istream_t stream = {&callback, NULL, SIZE_MAX}; in main()
/nanopb-2.7.6/docs/
Dconcepts.md52 callback function.
54 There are a few generic rules for callback functions:
61 4) Your callback may be used with substreams. In this case
73 bool (*callback)(pb_ostream_t *stream, const uint8_t *buf, size_t count);
79 The `callback` for output stream may be NULL, in which case the stream
101 bool callback(pb_ostream_t `stream, const uint8_t `buf, size_t count)
107 pb_ostream_t stdoutstream = {&callback, stdout, SIZE_MAX, 0};
122 bool (*callback)(pb_istream_t *stream, uint8_t *buf, size_t count);
127 The `callback` must always be a function pointer. `Bytes_left` is an
129 SIZE_MAX if your callback handles EOF as described above.
[all …]
Dwhats_new.md81 once. So far the callback functions have been stored in the message
88 store the callback pointers either.
92 for most applications that have a single callback function for each
99 that object in custom way in your callback.
105 ### Message level callback for oneofs
111 Setting this option to true will cause a new message level callback to
112 be added before the `which_field` of the oneof. This callback will be
114 message is decoded. The callback can either choose to set callback
116 there and then. If any unread data remains after the callback returns,
Dreference.md38 …use `FT_CALLBACK`, `FT_POINTER`, `FT_STATIC` or `FT_IGNORE` to select a callback field, a dynamica…
204 | `PB_LTYPE_SUBMSG_W_CB` |0x09 |Submessage with pre-decoding callback.
228 …|0x40 |A field with dynamic storage size. Struct field contains a pointer to a callback function.
252 |`field_callback` | Function used to handle all callback fields in this message. By default `pb_def…
329 A pointer to the *arg* is passed to the callback when calling. It can be
330 used to store any information that the callback might need. Note that
332 `&data` in your main code, in the callback you can access it like this:
376 as for normal callback fields, except that they get called for any
395 | type | Pointer to the structure that defines the callback functions.
396 … to the variable that stores the field value (as used by the default extension callback functions.)
[all …]
/nanopb-2.7.6/tests/cxx_callback_datatype/
Dmessage.proto12 // Instead of std::vector<SubMessage> callback handles wrapping/unwrapping of the int.
/nanopb-2.7.6/tests/regression/issue_249/
DSConscript1 # Regression test for Issue 249: proto3 mode pb_decode() corrupts callback fields
/nanopb-2.7.6/tests/cyclic_messages/
DSConscript3 # Encode cyclic messages with callback fields
Dcyclic.proto2 // These can only be handled in pointer/callback mode,
/nanopb-2.7.6/tests/regression/issue_544/
DSConscript2 # Decoding whole submessage in submessage callback causes "missing required field"
/nanopb-2.7.6/
Dpb_encode.h36 int *callback; member
38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
Dpb_decode.h35 int *callback; member
37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count);
Dpb_encode.c68 stream.callback = (void*)1; /* Just a marker value */ in pb_ostream_from_buffer()
70 stream.callback = &buf_write; in pb_ostream_from_buffer()
83 if (count > 0 && stream->callback != NULL) in pb_write()
95 if (!stream->callback(stream, buf, count)) in pb_write()
174 if (stream->callback == NULL) in encode_array()
730 if (stream->callback == NULL) in pb_encode_submessage()
738 substream.callback = stream->callback; in pb_encode_submessage()
924 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_enc_submessage() local
925 if (callback->funcs.encode) in pb_enc_submessage()
927 if (!callback->funcs.encode(stream, field, &callback->arg)) in pb_enc_submessage()
DCHANGELOG.txt7 Fix compiler error in generated initializer for submessage callback (#631)
64 Fix "missing required field" error with submessage callback (#544)
123 Allow specifying a per-message callback. (#175)
124 Improve callback handling inside oneofs. (#175)
179 Don't call stream read callback with count=0 (#421)
184 Fix fixed size and callback repeated fields inside proto3 submessages (#376, #382, #386)
301 Fix crash when callback is inside oneof field. (issue 148)
388 Fix generator error with bytes callback fields (issue 99)
430 NOTE: The default callback function signature has changed.
433 Change the callback function to use void** (issue 69)
[all …]
Dpb_decode.c91 if (buf == NULL && stream->callback != buf_read) in pb_read()
111 if (!stream->callback(stream, buf, count)) in pb_read()
130 if (!stream->callback(stream, buf, 1)) in pb_readbyte()
153 stream.callback = NULL; in pb_istream_from_buffer()
155 stream.callback = &buf_read; in pb_istream_from_buffer()
1586 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_dec_submessage() local
1587 if (callback->funcs.decode) in pb_dec_submessage()
1589 status = callback->funcs.decode(&substream, field, &callback->arg); in pb_dec_submessage()
/nanopb-2.7.6/spm_headers/nanopb/
Dpb_encode.h36 int *callback; member
38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
Dpb_decode.h35 int *callback; member
37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count);
/nanopb-2.7.6/generator/proto/
Dnanopb.proto15 FT_CALLBACK = 1; // Always generate a callback field.
64 // Force type of field (callback or static allocation)
106 // Generate message-level callback that is called before decoding submessages.
107 // This can be used to set callback fields for submsgs inside oneofs.
114 // Data type for storage associated with callback fields.
118 // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
120 // fields. Instead, a new method allows specifying a per-message callback that
121 // will be called for all callback fields in a message type.
/nanopb-2.7.6/tests/callbacks/
DSConscript1 # Test the functionality of the callback fields.
/nanopb-2.7.6/tests/regression/issue_259/
DSConscript1 # Check that callback fields inside malloc()ed messages
/nanopb-2.7.6/tests/fuzztest/
Dflakystream.c26 stream->stream.callback = flakystream_callback; in flakystream_init()
/nanopb-2.7.6/tests/raw_decode/
Draw_decode.c17 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() function
184 pb_istream_t stream = {&callback, NULL, SIZE_MAX}; in main()
/nanopb-2.7.6/tests/common/
Dunittestproto.proto23 // Nanopb does not care about the actual defined data type for callback
/nanopb-2.7.6/examples/network_server/
Dfileproto.options9 # On the other hand, using the callback interface, it is not necessary

12