1 // This is an example of how to handle 'union' style messages
2 // with nanopb, without allocating memory for all the message types.
4 // There is no official type in Protocol Buffers for describing unions,
5 // but they are commonly implemented by filling out exactly one of
6 // several optional fields.
10 required int32 value = 1;
15 required bool value = 1;
20 required int32 value1 = 1;
21 required int32 value2 = 2;
26 optional MsgType1 msg1 = 1;
27 optional MsgType2 msg2 = 2;
28 optional MsgType3 msg3 = 3;