This is turned on by passing -p to nanopb_generator.py or setting the (nanopb).pointer option for a .proto field. git-svn-id: https://svn.kapsi.fi/jpa/nanopb-dev@1081 e3a754e5-d11d-0410-8d38-ebb782a927b9
29 lines
1.3 KiB
Protocol Buffer
29 lines
1.3 KiB
Protocol Buffer
// Custom options for defining:
|
|
// - Maximum size of string/bytes
|
|
// - Maximum number of elements in array
|
|
// - Pointer or in-line representation of non-scalar fields
|
|
//
|
|
// These are used by nanopb to generate statically allocable structures
|
|
// for memory-limited environments.
|
|
|
|
import "google/protobuf/descriptor.proto";
|
|
|
|
message NanoPBOptions {
|
|
optional int32 max_size = 1;
|
|
optional int32 max_count = 2;
|
|
optional bool pointer = 3;
|
|
}
|
|
|
|
// Protocol Buffers extension number registry
|
|
// --------------------------------
|
|
// Project: Nanopb
|
|
// Contact: Petteri Aimonen <jpa@kapsi.fi>
|
|
// Web site: http://kapsi.fi/~jpa/nanopb
|
|
// Extensions: 1010 (all types)
|
|
// --------------------------------
|
|
|
|
extend google.protobuf.FieldOptions {
|
|
optional NanoPBOptions nanopb = 1010;
|
|
}
|
|
|