X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=generator%2Fnanopb.proto;h=fe564b5ca7ffcb07a5bd50baf97b8c6cbcf026e8;hb=6e9e5329278b04a8e76d63f06fed2f3bfa80e2f8;hp=94ce7d9c4bdca922b4a6566119bb32f088f5d74f;hpb=93ffe14a0ae32eeda8275f48106e76ecc650168d;p=apps%2Flow-level-can-service.git diff --git a/generator/nanopb.proto b/generator/nanopb.proto index 94ce7d9..fe564b5 100644 --- a/generator/nanopb.proto +++ b/generator/nanopb.proto @@ -7,12 +7,18 @@ import "google/protobuf/descriptor.proto"; +option java_package = "fi.kapsi.koti.jpa.nanopb"; + enum FieldType { FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. FT_CALLBACK = 1; // Always generate a callback field. FT_STATIC = 2; // Generate a static field or raise an exception if not possible. + FT_IGNORE = 3; // Ignore the field completely. } +// 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. message NanoPBOptions { // Allocated size for 'bytes' and 'string' fields. optional int32 max_size = 1; @@ -25,8 +31,16 @@ message NanoPBOptions { // Use long names for enums, i.e. EnumName_EnumValue. optional bool long_names = 4 [default = true]; + + // Add 'packed' attribute to generated structs. + // Note: this cannot be used on CPUs that break on unaligned + // accesses to variables. + optional bool packed_struct = 5 [default = false]; } +// Extensions to protoc 'Descriptor' type in order to define options +// inside a .proto file. +// // Protocol Buffers extension number registry // -------------------------------- // Project: Nanopb