// These are used by nanopb to generate statically allocable structures
// for memory-limited environments.
+syntax = "proto2";
import "google/protobuf/descriptor.proto";
option java_package = "fi.kapsi.koti.jpa.nanopb";
FT_IGNORE = 3; // Ignore the field completely.
}
+enum IntSize {
+ IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
+ IS_8 = 8;
+ IS_16 = 16;
+ IS_32 = 32;
+ IS_64 = 64;
+}
+
// This is the inner options message, which basically defines options for
// a field. When it is used in message or file scope, it applies to all
// fields.
// Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
+ // Size of integer fields. Can save some memory if you don't need
+ // full 32 bits for the value.
+ optional IntSize int_size = 7 [default = IS_DEFAULT];
+
// Force type of field (callback or static allocation)
optional FieldType type = 3 [default = FT_DEFAULT];
// accesses to variables.
optional bool packed_struct = 5 [default = false];
+ // Add 'packed' attribute to generated enums.
+ optional bool packed_enum = 10 [default = false];
+
// 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];
+
+ // integer type tag for a message
+ optional uint32 msgid = 9;
+
+ // decode oneof as anonymous union
+ optional bool anonymous_oneof = 11 [default = false];
}
// Extensions to protoc 'Descriptor' type in order to define options