// Custom options for defining: // - Maximum size of string/bytes // - Maximum number of elements in array // // These are used by nanopb to generate statically allocable structures // for memory-limited environments. import "google/protobuf/descriptor.proto"; 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. } message NanoPBOptions { // Allocated size for 'bytes' and 'string' fields. optional int32 max_size = 1; // Allocated number of entries in arrays ('repeated' fields) optional int32 max_count = 2; // Force type of field (callback or static allocation) optional FieldType type = 3 [default = FT_DEFAULT]; // Use long names for enums, i.e. EnumName_EnumValue. optional bool long_names = 4 [default = true]; // Add 'packed' attribute to generated structs. optional bool packed_struct = 5 [default = false]; } // Protocol Buffers extension number registry // -------------------------------- // Project: Nanopb // Contact: Petteri Aimonen // Web site: http://kapsi.fi/~jpa/nanopb // Extensions: 1010 (all types) // -------------------------------- extend google.protobuf.FileOptions { optional NanoPBOptions nanopb_fileopt = 1010; } extend google.protobuf.MessageOptions { optional NanoPBOptions nanopb_msgopt = 1010; } extend google.protobuf.EnumOptions { optional NanoPBOptions nanopb_enumopt = 1010; } extend google.protobuf.FieldOptions { optional NanoPBOptions nanopb = 1010; }