DCCL v3
test.proto
1 
2 import "dccl/option_extensions.proto";
3 package dccl.test;
4 
5 message EmbeddedMsgOptional
6 {
7  optional double val = 1 [(dccl.field).min=0,
8  (dccl.field).max=126,
9  (dccl.field).precision=3];
10 }
11 
12 message EmbeddedMsgRequired
13 {
14  required double val = 1 [(dccl.field).min=0,
15  (dccl.field).max=126,
16  (dccl.field).precision=3];
17 }
18 
19 message TestMsg
20 {
21  option (dccl.msg).id = 1;
22  option (dccl.msg).max_bytes = 32;
23  option (dccl.msg).codec_version = 3;
24 
25  optional EmbeddedMsgOptional msg1 = 1;
26  repeated EmbeddedMsgOptional msg1_repeat = 3 [(dccl.field).max_repeat=5];
27 
28  // in DCCL v2, these will always be set upon receipt since it has required children. This test validates the fix in v3
29  optional EmbeddedMsgRequired msg2 = 2;
30  repeated EmbeddedMsgRequired msg2_repeat = 4 [(dccl.field).max_repeat=5];
31 
32 }
33