From 3959290bc77ae26772bc107128b0a4edd3930361 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sun, 31 Jul 2011 12:55:09 +0000 Subject: First version of header generator git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9 --- generator/nanopb.proto | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 generator/nanopb.proto (limited to 'generator/nanopb.proto') diff --git a/generator/nanopb.proto b/generator/nanopb.proto new file mode 100644 index 0000000..813d5b7 --- /dev/null +++ b/generator/nanopb.proto @@ -0,0 +1,18 @@ +// Custom options for defining: +// - Maximum size of string/bytes +// - Maximum number of elements in array +// +// These are used by nanopb to generate statically allocable structures +// for memory-limited environments. + +import "google/protobuf/descriptor.proto"; + +message NanoPBOptions { + optional int32 max_size = 1; + optional int32 max_count = 2; +} + +extend google.protobuf.FieldOptions { + optional NanoPBOptions nanopb = 52001; +} + -- cgit 1.2.3-korg