summaryrefslogtreecommitdiffstats
path: root/tests/options.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-14 17:30:49 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-14 17:30:49 +0200
commitd32d3226580baf52f60fb7dee3921d8cc9aab67c (patch)
treea2da002b9aa8db7a67b49ee266fab7619ed769fd /tests/options.proto
parentb9baec6b4c3a04136ea0430109bc7bc1eda12685 (diff)
Add field type FT_IGNORE to generator.
This allows ignoring fields that are unnecessary or too large for an embedded system using nanopb, while allowing them to remain in the .proto for other platforms. Update issue 51 Status: FixedInGit
Diffstat (limited to 'tests/options.proto')
-rw-r--r--tests/options.proto9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/options.proto b/tests/options.proto
index 3e9383cd..b5badcfd 100644
--- a/tests/options.proto
+++ b/tests/options.proto
@@ -62,3 +62,12 @@ message my_packed_struct
optional int32 myfield = 1;
}
+// Message with ignored field
+// Note: doesn't really test if the field is missing in the output,
+// but atleast tests that the output compiles.
+message Message6
+{
+ required int32 field1 = 1;
+ optional int32 field2 = 2 [(nanopb).type = FT_IGNORE];
+}
+