Improve .proto options parsing.
[apps/low-level-can-service.git] / generator / nanopb.proto
1 // Custom options for defining:
2 // - Maximum size of string/bytes
3 // - Maximum number of elements in array
4 //
5 // These are used by nanopb to generate statically allocable structures
6 // for memory-limited environments.
7
8 import "google/protobuf/descriptor.proto";
9
10 message NanoPBOptions {
11   optional int32 max_size = 1;
12   optional int32 max_count = 2;
13 }
14
15 // Protocol Buffers extension number registry
16 // --------------------------------                                                                                                            
17 // Project:  Nanopb                                                                                                                            
18 // Contact:  Petteri Aimonen <jpa@kapsi.fi>                                                                                                    
19 // Web site: http://kapsi.fi/~jpa/nanopb                                                                                                       
20 // Extensions: 1010 (all types)                                                                                                                
21 // --------------------------------   
22
23 extend google.protobuf.FileOptions {
24     optional NanoPBOptions nanopb_fileopt = 1010;
25 }
26
27 extend google.protobuf.MessageOptions {
28     optional NanoPBOptions nanopb_msgopt = 1010;
29 }
30
31 extend google.protobuf.FieldOptions {
32     optional NanoPBOptions nanopb = 1010;
33 }
34