1 // Copyright 2012-2023:
2 // GobySoft, LLC (2013-)
3 // Massachusetts Institute of Technology (2007-2014)
4 // Community contributors (see AUTHORS file)
6 // Toby Schneider <toby@gobysoft.org>
7 // Chris Murphy <cmurphy@aphysci.com>
10 // This file is part of the Dynamic Compact Control Language Library
13 // DCCL is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published by
15 // the Free Software Foundation, either version 2.1 of the License, or
16 // (at your option) any later version.
18 // DCCL is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with DCCL. If not, see <http://www.gnu.org/licenses/>.
26 import "dccl/option_extensions.proto";
27 import "dccl/arithmetic/protobuf/arithmetic_extensions.proto";
28 package dccl.test.arith;
46 message ArithmeticDoubleTestMsg
48 option (dccl.msg).id = 1;
49 option (dccl.msg).max_bytes = 512;
50 option (dccl.msg).codec_version = 4;
52 repeated double value = 101 [
53 (dccl.field).codec = "dccl.arithmetic",
54 (dccl.field).(arithmetic).model = "model",
55 (dccl.field).(arithmetic).debug_assert = true,
56 (dccl.field).max_repeat = 4
59 message ArithmeticEnumTestMsg
61 option (dccl.msg).id = 2;
62 option (dccl.msg).max_bytes = 512;
63 option (dccl.msg).codec_version = 4;
65 repeated Enum1 value = 114 [
66 (dccl.field).codec = "dccl.arithmetic",
67 (dccl.field).(arithmetic).model = "model",
68 (dccl.field).(arithmetic).debug_assert = true,
69 (dccl.field).max_repeat = 4
73 message ArithmeticSingleEnumTestMsg
75 option (dccl.msg).id = 3;
76 option (dccl.msg).max_bytes = 512;
77 option (dccl.msg).codec_version = 4;
79 required Enum1 value = 114 [
80 (dccl.field).codec = "dccl.arithmetic",
81 (dccl.field).(arithmetic).model = "model",
82 (dccl.field).(arithmetic).debug_assert = true
86 message ArithmeticEnum2TestMsg
88 option (dccl.msg).id = 4;
89 option (dccl.msg).max_bytes = 512;
90 option (dccl.msg).codec_version = 4;
92 repeated Enum2 value = 114 [
93 (dccl.field).codec = "dccl.arithmetic",
94 (dccl.field).(arithmetic).model = "model",
95 (dccl.field).(arithmetic).debug_assert = true,
96 (dccl.field).max_repeat = 8
100 message ArithmeticDouble2TestMsg
102 option (dccl.msg).id = 5;
103 option (dccl.msg).max_bytes = 10000;
104 option (dccl.msg).codec_version = 4;
106 repeated int32 value = 101 [
107 (dccl.field).codec = "dccl.arithmetic",
108 (dccl.field).(arithmetic).model = "model",
109 (dccl.field).(arithmetic).debug_assert = true,
110 (dccl.field).max_repeat = 100
114 message ArithmeticDouble3TestMsg
116 option (dccl.msg).id = 6;
117 option (dccl.msg).max_bytes = 10000;
118 option (dccl.msg).codec_version = 4;
120 repeated int32 value = 101 [
121 (dccl.field).codec = "dccl.arithmetic",
122 (dccl.field).(arithmetic).model = "model",
123 (dccl.field).max_repeat = 4,
124 (dccl.field).(arithmetic).debug_assert = true
128 // repeated float float_arithmetic_repeat = 102 [(dccl.field).(arithmetic).model
130 // (dccl.field).max_repeat=4];
132 // repeated int32 int32_arithmetic_repeat = 103 [(dccl.field).(arithmetic).model
134 // (dccl.field).max_repeat=4];
136 // repeated bool bool_arithmetic_repeat = 113 [(dccl.field).(arithmetic).model =
138 // (dccl.field).max_repeat=4];