Allow defining field type in .proto.
[apps/agl-service-can-low-level.git] / tests / options.proto
1 /* Test nanopb option parsing.
2  * options.expected lists the patterns that are searched for in the output.
3  */
4
5 import "nanopb.proto";
6
7 // File level options
8 option (nanopb_fileopt).max_size = 20;
9
10 message Message1
11 {
12     required string filesize = 1;
13 }
14
15 // Message level options
16 message Message2
17 {
18     option (nanopb_msgopt).max_size = 30;
19     required string msgsize = 1;
20 }
21
22 // Field level options
23 message Message3
24 {
25     required string fieldsize = 1 [(nanopb).max_size = 40];
26 }
27
28 // Forced callback field
29 message Message4
30 {
31     required int32 int32_callback = 1 [(nanopb).type = FT_CALLBACK];
32 }
33