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
This commit is contained in:
Petteri Aimonen
2013-01-14 17:30:49 +02:00
parent b9baec6b4c
commit d32d322658
4 changed files with 24 additions and 3 deletions

View File

@@ -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];
}