New generator options for oneofs: allow skipping or generating as normal 'optional...
[apps/agl-service-can-low-level.git] / generator / proto / nanopb.proto
index 1bde596..a1b2493 100644 (file)
@@ -20,10 +20,10 @@ enum FieldType {
 
 enum IntSize {
     IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
-    IS_8 = 1;
-    IS_16 = 2;
-    IS_32 = 3;
-    IS_64 = 4;
+    IS_8 = 8;
+    IS_16 = 16;
+    IS_32 = 32;
+    IS_64 = 64;
 }
 
 // This is the inner options message, which basically defines options for
@@ -53,6 +53,9 @@ message NanoPBOptions {
   
   // Skip this message
   optional bool skip_message = 6 [default = false];
+
+  // Generate oneof fields as normal optional fields instead of union.
+  optional bool no_unions = 8 [default = false];
 }
 
 // Extensions to protoc 'Descriptor' type in order to define options