Home
last modified time | relevance | path

Searched refs:in (Results 1 – 25 of 82) sorted by relevance

1234

/nanopb-3.4.0/extra/bazel/
Dnanopb_deps.bzl6 # Used in modules: root.
7 if "rules_proto" not in native.existing_rules():
20 # Used in modules: generator.
21 if "rules_python" not in native.existing_rules():
31 # Used in modules: generator/proto.
32 if "rules_proto_grpc" not in native.existing_rules():
Dpython_deps.bzl6 # Used in modules: generator.
7 if "nanopb_pypi" not in native.existing_rules():
/nanopb-3.4.0/docs/
Dwhats_new.md1 # Nanopb: New features in nanopb 0.4
3 ## What's new in nanopb 0.4
5 Long in the making, nanopb 0.4 has seen some wide reaching improvements
6 in reaction to the development of the rest of the protobuf ecosystem.
10 A lot of effort has been spent in retaining backwards and forwards
17 messages is stored in a compact descriptor format, which is iterated in
25 Now in 0.4, the descriptor format was completely decoupled from the
28 between 8 and 32 bytes in size, depending on compilation options and
35 less storage space. Most fields use 2 words, while simple fields in
38 the `AllTypes` test case, 0.3 had data size of 1008 bytes in
[all …]
Dmigration.md6 error indications are included, in order to make it easier to find this
12 ### Updated include path order in FindNanopb.cmake
18 More details in
39 is supported by protoc 3.6.0 and newer (released in 2018).
55 supported already in C99 but does not work with every compiler and can
62 or `PB_NO_STATIC_ASSERT` in `pb.h` or on compiler command line.
71 **Changes:** Back in 2018, it was considered in pull request #241 to
95 code can crash inside `load_descriptor_values()` in
135 **Changes:** Now field information is encoded more efficiently in
136 `uint32_t` array in a variable-length format. Old
[all …]
Dconcepts.md31 Using generator options, you can set maximum sizes for fields in order
44 options](reference.html#proto-file-options) section in the reference
49 Nanopb uses streams for accessing the data in encoded format. The stream
79 The `callback` for output stream may be NULL, in which case the stream
113 6) You don't need to know the length of the message in advance. After
115 `false`. `pb_decode()` will detect this and if the EOF was in a proper
164 2) If there is a special option `(nanopb).max_size` specified in the
217 The maximum lengths are checked in runtime. If string/bytes/array
234 them, as shown in the previous section. However, sometimes you need to be
239 the callback function when it gets to the specific field in the message.
[all …]
Dindex.md3 Nanopb is an ANSI-C library for encoding and decoding messages in
53 6) You can use either encoder or decoder alone to cut the code size in half.
57 8) Callback mechanism for handling messages larger than can fit in available RAM.
65 4) Fields in the generated structs are ordered by the tag number, instead of the natural ordering
67 …ime introspection) is not supported. E.g. you can't request a field by giving its name in a string.
68 7) Numeric arrays are always encoded as packed, even if not marked as packed in .proto.
69 8) Cyclic references between messages are supported only in callback and malloc mode.
85 Save this in `message.proto` and compile it:
89 You should now have in `message.pb.h`:
103 Now in your main program do this to encode a message:
[all …]
Dsecurity.md3 Importance of security in a Protocol Buffers library
21 control of the application writer. Malicious data in these structures
24 1. Callback, pointer and extension fields in message structures given
26 and are generated depending on the message definition in the .proto
35 in these will cause "garbage in, garbage out" behaviour. It will not
40 2. All fields in message structures, except:
84 3. If using stream input, a maximum size should be set in
/nanopb-3.4.0/tests/anonymous_oneof/
DSConscript6 if 'clang' in env['CC'] or 'gcc' in env['CC']:
8 if '-pedantic' in env2['CFLAGS']:
/nanopb-3.4.0/
DCHANGELOG.txt3 Fix handling of spaces in arguments passed through protoc (#810)
7 Fix wrong format in Python Poetry project file (#811)
12 Safeguard substraction in pb_read() with custom streams (#697)
17 Add option NANOPB_PB2_TEMP_DIR to store nanopb_pb2.py in a temporary dir (#601)
32 Fix regression in 0.4.3 where generator did not find all dependencies (#720)
36 Fix infinite recursion in generator/protoc script (#762)
39 Fix options dependency in nanopb.mk (#666)
40 Fix handling of filenames with dot in them in FindNanopb.cmake (#756)
75 Fix compiler error in generated initializer for submessage callback (#631)
76 Fix duplicate union definition in generated file (#637)
[all …]
DREADME.md7 Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is
8 especially suitable for use in microcontrollers, but fits any memory
24 2. Include *pb_encode.c*, *pb_decode.c* and *pb_common.c* in your project.
26 The easiest way to get started is to study the project in "examples/simple".
28 However, for any other kind of build system, see the manual steps in
29 README.txt in that folder.
34 Protocol Buffers messages are defined in a `.proto` file, which follows a standard
66 end in an error, the test cases were successful.
83 takes in the `.proto` files and outputs `.pb.c` definitions.
90 * **Bazel**: `BUILD` in source root
[all …]
/nanopb-3.4.0/tests/any_type/google/protobuf/
Dany.proto5 // Redistribution and use in source and binary forms, with or without
11 // * Redistributions in binary form must reproduce the above
13 // in the documentation and/or other materials provided with the
45 // Protobuf library provides support to pack/unpack Any values in the form
48 // Example 1: Pack and unpack a message in C++.
58 // Example 2: Pack and unpack a message in Java.
67 // Example 3: Pack and unpack a message in Python.
77 // Example 4: Pack and unpack a message in Go
90 // in the type URL, for example "foo.bar.com/x/y.z" will yield type
114 // `value` which holds the custom JSON in addition to the `@type`
[all …]
Dduration.proto5 // Redistribution and use in source and binary forms, with or without
11 // * Redistributions in binary form must reproduce the above
13 // in the documentation and/or other materials provided with the
46 // or "month". It is related to Timestamp in that the difference between
52 // Example 1: Compute Duration from two Timestamps in pseudo code.
69 // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
86 // Example 3: Compute Duration from datetime.timedelta in Python.
95 // object, where the string ends in the suffix "s" (indicating seconds) and
98 // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
99 // be expressed in JSON format as "3.000000001s", and 3 seconds and 1
[all …]
/nanopb-3.4.0/tests/generator_relative_paths/proto/protobuf/
Dany.proto5 // Redistribution and use in source and binary forms, with or without
11 // * Redistributions in binary form must reproduce the above
13 // in the documentation and/or other materials provided with the
45 // Protobuf library provides support to pack/unpack Any values in the form
48 // Example 1: Pack and unpack a message in C++.
58 // Example 2: Pack and unpack a message in Java.
67 // Example 3: Pack and unpack a message in Python.
77 // Example 4: Pack and unpack a message in Go
90 // in the type URL, for example "foo.bar.com/x/y.z" will yield type
114 // `value` which holds the custom JSON in addition to the `@type`
[all …]
/nanopb-3.4.0/tests/oneof/
Doneof.proto10 /* Oneof in a message with other fields */
23 /* Oneof in a message by itself */
/nanopb-3.4.0/generator/proto/google/protobuf/
Ddescriptor.proto5 // Redistribution and use in source and binary forms, with or without
11 // * Redistributions in binary form must reproduce the above
13 // in the documentation and/or other materials provided with the
35 // The messages in this file describe the definitions found in .proto files.
67 // Indexes of the public imported files in the dependency list above.
69 // Indexes of the weak imported files in the dependency list.
73 // All top-level definitions in this file.
115 // fields or extension ranges in the same message. Reserved ranges may
122 // Reserved field names, which may not be used by fields in the same message.
131 // Clients can define custom options in extensions of this message. See above.
[all …]
/nanopb-3.4.0/tests/
DSConstruct30 for var,val in ARGUMENTS.items():
31 if var in list_vars:
63 if platform.system() == "Darwin" and 'CC' not in ARGUMENTS:
66 # Add the builders defined in site_init.py
136 if 'gcc' in env['CC']:
146 if 'gcc' in env['CC']:
154 if 'clang' in env['CC']:
164 if 'gcc' in env['CC']:
172 # enums in some of the tests.
185 elif 'clang' in env['CC']:
[all …]
/nanopb-3.4.0/tests/any_type/
Danytest.proto1 // This file is an example and test case on handling the Any type in nanopb.
2 // The Any type is defined in Google-provided any.proto file:
15 // This does result in unnecessarily copying the data around, so for larger
/nanopb-3.4.0/examples/platformio/
Dplatformio.ini7 ; `$BUILD_DIR/nanopb/md5` - MD5 files to track changes in source .proto/.options
44 ; Warning: the 'src_filter' option cannot be used with ESP-IDF. Select source files to build in the…
45 ; So, we specified source files in src/CMakeLists.txt
/nanopb-3.4.0/generator/proto/
Dnanopb.proto3 // - Maximum number of elements in array
23 IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
46 // a field. When it is used in message or file scope, it applies to all
57 // Allocated number of entries in arrays ('repeated' fields)
118 // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
121 // will be called for all callback fields in a message type.
126 // ok, but if it results in compilation errors you can increase the field
133 // Extra files to include in generated `.pb.h`
143 // Override type of the field in generated C code. Only to be used with related field types
146 // Due to historical reasons, nanopb orders fields in structs by their tag number
[all …]
/nanopb-3.4.0/tests/cxx_callback_datatype/
DSConscript10 # 'offsetof' in C++98 requires POD type, C++11 standard relaxes that to standard-layout class.
12 for std in ["c++11", "c++14", "c++17", "c++20"]:
26 objects = [ e.Object('{}_{}'.format(os.path.basename(s), std), s) for s in sources ]
/nanopb-3.4.0/tests/proto3_optional/
DSConscript2 # This is supported in protoc 3.12 and newer.
8 if 'PROTOC_VERSION' in env:
/nanopb-3.4.0/examples/network_server/
Dfileproto.options2 # in fileproto.proto.
10 # to set a limit on the number of files in the response.
/nanopb-3.4.0/tests/regression/issue_487/
DSConscript2 # Problem in default_value() with nested messages
/nanopb-3.4.0/tests/package_name/
DSConscript9 assert placeholder in data
21 '''Add package name to type names in .c file.'''
26 for name in type_names:
/nanopb-3.4.0/tests/common_unittests/
DSConscript1 # Test functions in pb_common.c

1234