aboutsummaryrefslogtreecommitdiffstats
path: root/example_unions/unionproto.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-09-13 12:59:31 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-09-13 12:59:31 +0300
commitf47410ea4b8ae43e19facd378be4cf1073e1813b (patch)
tree53fdc4bac6615f07e830d7d538c90abbea1ead4b /example_unions/unionproto.proto
parentfd9a79a06db00c6199a5dcaee22ed2cd8e3c3e9b (diff)
Move examples into subfolders, add READMEs
Diffstat (limited to 'example_unions/unionproto.proto')
-rw-r--r--example_unions/unionproto.proto30
1 files changed, 0 insertions, 30 deletions
diff --git a/example_unions/unionproto.proto b/example_unions/unionproto.proto
deleted file mode 100644
index d7c9de2d..00000000
--- a/example_unions/unionproto.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-// This is an example of how to handle 'union' style messages
-// with nanopb, without allocating memory for all the message types.
-//
-// There is no official type in Protocol Buffers for describing unions,
-// but they are commonly implemented by filling out exactly one of
-// several optional fields.
-
-message MsgType1
-{
- required int32 value = 1;
-}
-
-message MsgType2
-{
- required bool value = 1;
-}
-
-message MsgType3
-{
- required int32 value1 = 1;
- required int32 value2 = 2;
-}
-
-message UnionMessage
-{
- optional MsgType1 msg1 = 1;
- optional MsgType2 msg2 = 2;
- optional MsgType3 msg3 = 3;
-}
-