Document new generator options
This commit is contained in:
10
CHANGELOG
10
CHANGELOG
@@ -1,3 +1,13 @@
|
|||||||
|
nanopb-0.1.7 (not yet released)
|
||||||
|
Remove "skip" mode from pb_istream_t callbacks. Example implementation had a bug. (issue 37)
|
||||||
|
Add option to use shorter names for enum values (issue 38)
|
||||||
|
Improve options support in generator (issues 12, 30)
|
||||||
|
Add nanopb version number to generated files (issue 36)
|
||||||
|
Add extern "C" to generated headers (issue 35)
|
||||||
|
Add names for structs to allow forward declaration (issue 39)
|
||||||
|
Add buffer size check in example (issue 34)
|
||||||
|
Fix build warnings on MS compilers (issue 33)
|
||||||
|
|
||||||
nanopb-0.1.6
|
nanopb-0.1.6
|
||||||
Reorganize the field decoder interface (issue 2)
|
Reorganize the field decoder interface (issue 2)
|
||||||
Improve performance in submessage decoding (issue 28)
|
Improve performance in submessage decoding (issue 28)
|
||||||
|
|||||||
@@ -38,6 +38,20 @@ This file, in turn, requires the file *google/protobuf/descriptor.proto*. This i
|
|||||||
|
|
||||||
protoc -I/usr/include -Inanopb/generator -I. -omessage.pb message.proto
|
protoc -I/usr/include -Inanopb/generator -I. -omessage.pb message.proto
|
||||||
|
|
||||||
|
The options can be defined in file, message and field scopes::
|
||||||
|
|
||||||
|
option (nanopb_fileopt).max_size = 20; // File scope
|
||||||
|
message Message
|
||||||
|
{
|
||||||
|
option (nanopb_msgopt).max_size = 30; // Message scope
|
||||||
|
required string fieldsize = 1 [(nanopb).max_size = 40]; // Field scope
|
||||||
|
}
|
||||||
|
|
||||||
|
It is also possible to give the options on command line, but then they will affect the whole file. For example::
|
||||||
|
|
||||||
|
user@host:~$ python ../generator/nanopb_generator.py -s 'max_size: 20' message.pb
|
||||||
|
|
||||||
|
|
||||||
Streams
|
Streams
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user