Add skip_message option to generator.

Update issue 121
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2014-07-20 14:56:12 +03:00
parent 5749606f5d
commit 1d7f60fec3
4 changed files with 17 additions and 3 deletions

View File

@@ -63,11 +63,15 @@ message my_packed_struct
}
// 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];
optional int32 skipped_field = 2 [(nanopb).type = FT_IGNORE];
}
// Message that is skipped
message SkippedMessage
{
option (nanopb_msgopt).skip_message = true;
required int32 foo = 1;
}