DCCL v3
test.proto
1 
2 import "dccl/option_extensions.proto";
3 
4 package dccl.test;
5 
6 message TestMsg
7 {
8  option (dccl.msg).id = 2;
9  option (dccl.msg).max_bytes = 64;
10  option (dccl.msg).codec_version = 3;
11 
12  // test default enc/dec
13  required double d = 1 [(dccl.field).min=-100,
14  (dccl.field).max=126,
15  (dccl.field).precision=2,
16  (dccl.field).in_head=true];
17  optional int32 i = 3 [(dccl.field).min=-20,
18  (dccl.field).max=3000];
19  optional string s2 = 13 [(dccl.field).max_length=8,
20  (dccl.field).codec="dccl.default2"];
21  optional string s = 14 [(dccl.field).max_length=8];
22  optional bytes b = 15 [(dccl.field).max_length=9];
23  optional bytes vb = 16 [(dccl.field).max_length=9,
24  (dccl.field).codec="dccl.var_bytes"];
25 
26  repeated int32 ri = 17 [(dccl.field).min=-20,
27  (dccl.field).max=3000,
28  (dccl.field).max_repeat=3];
29 }
30