Document new generator options
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 29 Oct 2012 17:33:33 +0000 (19:33 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Mon, 29 Oct 2012 17:33:33 +0000 (19:33 +0200)
CHANGELOG
docs/concepts.rst

index 1effb16..c720289 100644 (file)
--- a/CHANGELOG
+++ b/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
  Reorganize the field decoder interface (issue 2)
  Improve performance in submessage decoding (issue 28)
index 355af25..b18c505 100644 (file)
@@ -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
 
+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
 =======