summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/nanopb_generator.py4
-rw-r--r--generator/proto/nanopb.proto3
2 files changed, 7 insertions, 0 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index 8ef4f187..2d2071e1 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -639,6 +639,10 @@ def parse_file(fdesc, file_options):
for names, message in iterate_messages(fdesc, base_name):
message_options = get_nanopb_suboptions(message, file_options, names)
+
+ if message_options.skip_message:
+ continue
+
messages.append(Message(names, message, message_options))
for enum in message.enum_type:
enum_options = get_nanopb_suboptions(enum, message_options, names + enum.name)
diff --git a/generator/proto/nanopb.proto b/generator/proto/nanopb.proto
index 2be2f803..9a4d6578 100644
--- a/generator/proto/nanopb.proto
+++ b/generator/proto/nanopb.proto
@@ -37,6 +37,9 @@ message NanoPBOptions {
// Note: this cannot be used on CPUs that break on unaligned
// accesses to variables.
optional bool packed_struct = 5 [default = false];
+
+ // Skip this message
+ optional bool skip_message = 6 [default = false];
}
// Extensions to protoc 'Descriptor' type in order to define options