/nanopb-3.4.0/tests/regression/issue_407/ |
D | test_extensions.c | 8 uint8_t buffer[256]; in main() local 29 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 33 TEST(buffer[0] == 0x08); /* varint 1 */ in main() 34 TEST(buffer[1] == 0xD2); /* number = 1234 */ in main() 35 TEST(buffer[2] == 0x09); in main() 36 TEST(buffer[3] == 0xE2); /* submsg 1100 */ in main() 37 TEST(buffer[4] == 0x44); in main() 38 TEST(buffer[5] == 0x03); /* length 3 */ in main() 39 TEST(buffer[6] == 0x08); /* varint 1 */ in main() 40 TEST(buffer[7] == 0xae); /* second_number = 5678 */ in main() [all …]
|
/nanopb-3.4.0/tests/regression/issue_242/ |
D | zero_value.c | 13 uint8_t buffer[256] = {0}; in main() local 23 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 27 TEST(memcmp(buffer, "\x58\x00", 2) == 0); in main() 35 uint8_t buffer[256] = {0}; in main() local 42 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 46 TEST(memcmp(buffer, "\x58\x00", 2) == 0); in main()
|
/nanopb-3.4.0/tests/oneof_callback/ |
D | decode_oneof.c | 25 uint8_t buffer[64]; in SubMsg3_callback() local 28 if (strlen > sizeof(buffer) - 1) in SubMsg3_callback() 31 buffer[strlen] = '\0'; in SubMsg3_callback() 33 if (!pb_read(istream, buffer, strlen)) in SubMsg3_callback() 36 printf(" strvalue: \"%s\"\n", buffer); in SubMsg3_callback() 57 uint8_t buffer[64]; in print_string() local 60 if (strlen > sizeof(buffer) - 1) in print_string() 63 buffer[strlen] = '\0'; in print_string() 65 if (!pb_read(stream, buffer, strlen)) in print_string() 71 printf((char*)*arg, buffer); in print_string() [all …]
|
/nanopb-3.4.0/tests/io_errors/ |
D | io_errors.c | 13 uint8_t *buffer; member 26 *buf++ = *state->buffer++; in read_callback() 40 *state->buffer++ = *buf++; in write_callback() 48 uint8_t buffer[2048]; in main() local 54 msglen = fread(buffer, 1, sizeof(buffer), stdin); in main() 67 fs.buffer = buffer; in main() 85 fs.buffer = buffer; in main() 108 fs.buffer = buffer; in main() 127 fs.buffer = buffer; in main()
|
/nanopb-3.4.0/tests/regression/issue_395/ |
D | test.c | 12 uint8_t buffer[512] = {0}; in main() local 19 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 28 printf("%02X", buffer[i]); in main() 33 TEST(buffer[0] == 0x08); in main() 34 TEST(buffer[1] == 0x01); in main()
|
/nanopb-3.4.0/tests/missing_fields/ |
D | missing_fields.c | 10 uint8_t buffer[512]; in main() local 16 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 30 pb_istream_t stream = pb_istream_from_buffer(buffer, size); in main() 42 pb_istream_t stream = pb_istream_from_buffer(buffer, size); in main()
|
/nanopb-3.4.0/tests/basic_buffer/ |
D | encode_buffer.c | 13 uint8_t buffer[Person_size]; in main() local 23 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 30 fwrite(buffer, 1, stream.bytes_written, stdout); in main()
|
/nanopb-3.4.0/tests/regression/issue_504/ |
D | test.c | 14 uint8_t buffer[512] = {0}; in main() local 23 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 43 printf("%02X", buffer[i]); in main() 58 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 69 printf("%02X", buffer[i]); in main()
|
/nanopb-3.4.0/examples/platformio/src/ |
D | pio_esp32_idf.c | 11 uint8_t buffer[256]; in app_main() local 19 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in app_main() 25 istream = pb_istream_from_buffer(buffer, written); in app_main()
|
D | pio_without_options.c | 12 uint8_t buffer[256]; in main() local 20 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 26 istream = pb_istream_from_buffer(buffer, written); in main()
|
D | pio_with_options.c | 12 uint8_t buffer[256]; in main() local 20 ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 26 istream = pb_istream_from_buffer(buffer, written); in main()
|
/nanopb-3.4.0/examples/simple/ |
D | simple.c | 9 uint8_t buffer[128]; in main() local 25 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 53 pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); in main()
|
/nanopb-3.4.0/examples/cmake_simple/ |
D | simple.c | 9 uint8_t buffer[128]; in main() local 25 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 53 pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); in main()
|
/nanopb-3.4.0/examples/conan_dependency/src/ |
D | simple.c | 9 uint8_t buffer[128]; in main() local 25 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 53 pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); in main()
|
/nanopb-3.4.0/tests/regression/issue_376/ |
D | test_fixarray.c | 12 uint8_t buffer[64]; in main() local 16 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 29 pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); in main()
|
/nanopb-3.4.0/examples/cmake_relpath/ |
D | simple.c | 9 uint8_t buffer[128]; in main() local 25 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 54 pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); in main()
|
/nanopb-3.4.0/tests/encode_unittests/ |
D | encode_unittests.c | 43 memset(buffer, 0xAA, sizeof(buffer)), \ 44 s = pb_ostream_from_buffer(buffer, sizeof(buffer)), \ 46 memcmp(buffer, y, sizeof(y) - 1) == 0 && \ 47 buffer[sizeof(y) - 1] == 0xAA 76 uint8_t buffer[30]; in main() local 89 uint8_t buffer[50]; in main() local 111 uint8_t buffer[50]; in main() local 134 uint8_t buffer[30]; in main() local 143 uint8_t buffer[30]; in main() local 163 uint8_t buffer[30]; in main() local [all …]
|
/nanopb-3.4.0/tests/extensions/ |
D | encode_extensions.c | 14 uint8_t buffer[1024]; in main() local 35 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 41 fwrite(buffer, 1, stream.bytes_written, stdout); in main()
|
/nanopb-3.4.0/tests/map/ |
D | encode_map.c | 11 uint8_t buffer[MyMessage_size]; in main() local 24 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 29 fwrite(buffer, 1, stream.bytes_written, stdout); in main()
|
/nanopb-3.4.0/tests/callbacks/ |
D | decode_callbacks.c | 12 uint8_t buffer[1024] = {0}; in print_string() local 15 if (stream->bytes_left > sizeof(buffer) - 1) in print_string() 18 if (!pb_read(stream, buffer, stream->bytes_left)) in print_string() 24 printf((char*)*arg, buffer); in print_string() 60 uint8_t buffer[1024]; in main() local 70 length = fread(buffer, 1, 1024, stdin); in main() 71 stream = pb_istream_from_buffer(buffer, length); in main()
|
/nanopb-3.4.0/tests/regression/issue_363/ |
D | test_oneofmsg.c | 12 uint8_t buffer[512]; in main() local 16 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 30 pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); in main()
|
/nanopb-3.4.0/tests/any_type/ |
D | decode_any.c | 12 uint8_t buffer[256]; in main() local 19 count = fread(buffer, 1, sizeof(buffer), stdin); in main() 20 stream = pb_istream_from_buffer(buffer, count); in main()
|
D | encode_any.c | 13 uint8_t buffer[256]; in main() local 33 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main() 38 fwrite(buffer, 1, stream.bytes_written, stdout); in main()
|
/nanopb-3.4.0/tests/fuzztest/ |
D | flakystream.c | 18 memcpy(buf, state->buffer + state->position, count); in flakystream_callback() 23 void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_afte… in flakystream_init() argument 29 stream->buffer = buffer; in flakystream_init()
|
/nanopb-3.4.0/tests/mem_release/ |
D | mem_release.c | 45 uint8_t buffer[256]; in test_TestMessage() local 55 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in test_TestMessage() 66 fwrite(buffer, 1, msgsize, stdout); in test_TestMessage() 82 stream = pb_istream_from_buffer(buffer, msgsize); in test_TestMessage() 95 TEST(memcmp(buffer, buffer2, msgsize) == 0); in test_TestMessage() 116 uint8_t buffer[256]; in test_OneofMessage() local 120 pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in test_OneofMessage() 178 pb_istream_t stream = pb_istream_from_buffer(buffer, msgsize); in test_OneofMessage() 213 const uint8_t buffer[] = "I'm only happy when it rains"; in test_Garbage() local 214 const size_t msgsize = sizeof(buffer); in test_Garbage() [all …]
|