Goby v2
test.proto
1 
2 import "dccl/option_extensions.proto";
3 import "dccl/arithmetic/protobuf/arithmetic_extensions.proto";
4 
5 enum Enum1
6 {
7  ENUM_A = 1;
8  ENUM_B = 2;
9  ENUM_C = 3;
10 }
11 
12 enum Enum2
13 {
14  ENUM2_A = 1;
15  ENUM2_B = 2;
16  ENUM2_C = 3;
17  ENUM2_D = 4;
18  ENUM2_E = 5;
19 }
20 
21 message ArithmeticDoubleTestMsg
22 {
23  option (dccl.msg).id = 1;
24  option (dccl.msg).max_bytes = 512;
25 
26  repeated double value = 101 [
27  (dccl.field).codec = "_arithmetic",
28  (dccl.field).(arithmetic).model = "model",
29  (dccl.field).(arithmetic).debug_assert = true,
30  (dccl.field).max_repeat = 4
31  ];
32 }
33 message ArithmeticEnumTestMsg
34 {
35  option (dccl.msg).id = 2;
36  option (dccl.msg).max_bytes = 512;
37 
38  repeated Enum1 value = 114 [
39  (dccl.field).codec = "_arithmetic",
40  (dccl.field).(arithmetic).model = "model",
41  (dccl.field).(arithmetic).debug_assert = true,
42  (dccl.field).max_repeat = 4
43  ];
44 }
45 
46 message ArithmeticSingleEnumTestMsg
47 {
48  option (dccl.msg).id = 3;
49  option (dccl.msg).max_bytes = 512;
50 
51  required Enum1 value = 114 [
52  (dccl.field).codec = "_arithmetic",
53  (dccl.field).(arithmetic).model = "model",
54  (dccl.field).(arithmetic).debug_assert = true
55  ];
56 }
57 
58 message ArithmeticEnum2TestMsg
59 {
60  option (dccl.msg).id = 4;
61  option (dccl.msg).max_bytes = 512;
62 
63  repeated Enum2 value = 114 [
64  (dccl.field).codec = "_arithmetic",
65  (dccl.field).(arithmetic).model = "model",
66  (dccl.field).(arithmetic).debug_assert = true,
67  (dccl.field).max_repeat = 8
68  ];
69 }
70 
71 message ArithmeticDouble2TestMsg
72 {
73  option (dccl.msg).id = 5;
74  option (dccl.msg).max_bytes = 10000;
75 
76  repeated int32 value = 101 [
77  (dccl.field).codec = "_arithmetic",
78  (dccl.field).(arithmetic).model = "model",
79  (dccl.field).(arithmetic).debug_assert = true,
80  (dccl.field).max_repeat = 100
81  ];
82 }
83 
84 message ArithmeticDouble3TestMsg
85 {
86  option (dccl.msg).id = 6;
87  option (dccl.msg).max_bytes = 10000;
88 
89  repeated int32 value = 101 [
90  (dccl.field).codec = "_arithmetic",
91  (dccl.field).(arithmetic).model = "model",
92  (dccl.field).max_repeat = 4,
93  (dccl.field).(arithmetic).debug_assert = true
94  ];
95 }
96 
97 // repeated float float_arithmetic_repeat = 102 [(dccl.field).(arithmetic).model
98 // = "float_model",
99 // (dccl.field).max_repeat=4];
100 
101 // repeated int32 int32_arithmetic_repeat = 103 [(dccl.field).(arithmetic).model
102 // = "int_model",
103 // (dccl.field).max_repeat=4];
104 
105 // repeated bool bool_arithmetic_repeat = 113 [(dccl.field).(arithmetic).model =
106 // "bool_model",
107 // (dccl.field).max_repeat=4];