summaryrefslogtreecommitdiffstats
path: root/libs/nanopb/tests/mem_release/mem_release.proto
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-20 10:24:05 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-20 10:24:05 +0000
commit32e25cbca210a359b09768537b6f443fe90a3070 (patch)
tree3309794c15d8a8f8e9c1c08cad072ee1378813ba /libs/nanopb/tests/mem_release/mem_release.proto
parent76c43dec62b2e21cd6446360c00d4fe6b437533f (diff)
Separation Generator to a dedicated repo
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'libs/nanopb/tests/mem_release/mem_release.proto')
-rw-r--r--libs/nanopb/tests/mem_release/mem_release.proto35
1 files changed, 35 insertions, 0 deletions
diff --git a/libs/nanopb/tests/mem_release/mem_release.proto b/libs/nanopb/tests/mem_release/mem_release.proto
new file mode 100644
index 00000000..0816dc22
--- /dev/null
+++ b/libs/nanopb/tests/mem_release/mem_release.proto
@@ -0,0 +1,35 @@
+syntax = "proto2";
+import "nanopb.proto";
+
+message SubMessage
+{
+ optional string dynamic_str = 1 [(nanopb).type = FT_POINTER];
+ repeated string dynamic_str_arr = 2 [(nanopb).type = FT_POINTER];
+ repeated SubMessage dynamic_submsg = 3 [(nanopb).type = FT_POINTER];
+}
+
+message TestMessage
+{
+ required SubMessage static_req_submsg = 1 [(nanopb).type = FT_STATIC];
+ optional SubMessage dynamic_submsg = 2 [(nanopb).type = FT_POINTER];
+ optional SubMessage static_opt_submsg = 3 [(nanopb).type = FT_STATIC];
+ repeated SubMessage static_rep_submsg = 4 [(nanopb).type = FT_STATIC, (nanopb).max_count=2];
+ extensions 100 to 200;
+}
+
+extend TestMessage
+{
+ optional SubMessage dynamic_ext = 100 [(nanopb).type = FT_POINTER];
+ optional SubMessage static_ext = 101 [(nanopb).type = FT_STATIC];
+}
+
+message OneofMessage
+{
+ required int32 first = 1;
+ oneof msgs
+ {
+ TestMessage msg1 = 2;
+ SubMessage msg2 = 3;
+ }
+ required int32 last = 4;
+}