Home
last modified time | relevance | path

Searched refs:pb_read (Results 1 – 7 of 7) sorted by relevance

/external/nanopb-c/
Dpb_decode.c94 bool checkreturn pb_read(pb_istream_t *stream, uint8_t *buf, size_t count) in pb_read() function
103 if (!pb_read(stream, tmp, 16)) in pb_read()
109 return pb_read(stream, tmp, count); in pb_read()
231 if (!pb_read(stream, &byte, 1)) in pb_skip_varint()
243 return pb_read(stream, NULL, length); in pb_skip_string()
277 case PB_WT_64BIT: return pb_read(stream, NULL, 8); in pb_skip_field()
279 case PB_WT_32BIT: return pb_read(stream, NULL, 4); in pb_skip_field()
298 if (!pb_read(stream, buf, 1)) return false; in read_raw_value()
304 return pb_read(stream, buf, 8); in read_raw_value()
308 return pb_read(stream, buf, 4); in read_raw_value()
[all …]
Dpb_decode.h111 bool pb_read(pb_istream_t *stream, uint8_t *buf, size_t count);
/external/nanopb-c/tests/decode_unittests/
Ddecode_unittests.c30 if (!pb_read(stream, &byte, 1)) in callback_check()
50 TEST(pb_read(&stream, buffer2, 6)) in main()
53 TEST(pb_read(&stream, buffer2 + 6, stream.bytes_left)) in main()
56 TEST(!pb_read(&stream, buffer2, 1)) in main()
64 TEST(pb_read(&stream, buffer, 5)) in main()
66 TEST(!pb_read(&stream, buffer, 50)) in main()
68 TEST(!pb_read(&stream, buffer, 5)) in main()
70 TEST(pb_read(&stream, buffer, 15)) in main()
/external/nanopb-c/tests/callbacks/
Ddecode_callbacks.c18 if (!pb_read(stream, buffer, stream->bytes_left)) in print_string()
/external/nanopb-c/tests/alltypes_callback/
Ddecode_alltypes_callback.c63 if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) in read_string()
137 if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) in read_repeated_string()
/external/nanopb-c/docs/
Dreference.rst562 pb_read section in pb_decode.h
566 bool pb_read(pb_istream_t *stream, uint8_t *buf, size_t count);
573 End of file is signalled by *stream->bytes_left* being zero after pb_read returns false.
684 …ou can therefore check the total length in *stream->bytes_left* and read the data using `pb_read`_.
Dconcepts.rst58 #) *bytes_written* and *bytes_left* are updated by pb_write and pb_read.