1 // Copyright 2011-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";
39 optional double val = 1 [
41 (dccl.field).max = 126,
42 (dccl.field).precision = 3
44 optional EmbeddedMsg2 msg = 2;
49 optional double val = 1 [
51 (dccl.field).max = 126,
52 (dccl.field).precision = 2
54 optional string sval = 2 [(dccl.field).max_length = 10];
55 optional Enum1 enum_default = 3;
60 option (dccl.msg).id = 2;
61 option (dccl.msg).max_bytes = 512;
62 option (dccl.msg).codec_version = 4;
64 // test default enc/dec
65 optional double double_default_optional = 1 [
66 (dccl.field).min = -100,
67 (dccl.field).max = 126,
68 (dccl.field).precision = 2,
69 (dccl.field).in_head = true
71 optional float float_default_optional = 2 [
72 (dccl.field).min = -20,
73 (dccl.field).max = 150,
74 (dccl.field).precision = 3
76 optional int32 int32_default_optional = 3
77 [(dccl.field).min = -20, (dccl.field).max = 3000];
78 optional int64 int64_default_optional = 4
79 [(dccl.field).min = -710, (dccl.field).max = 3000];
80 optional uint32 uint32_default_optional = 5
81 [(dccl.field).min = 0, (dccl.field).max = 3000];
82 optional uint64 uint64_default_optional = 6
83 [(dccl.field).min = 5, (dccl.field).max = 3000];
84 optional sint32 sint32_default_optional = 7
85 [(dccl.field).min = -60, (dccl.field).max = 3000];
86 optional sint64 sint64_default_optional = 8
87 [(dccl.field).min = -70, (dccl.field).max = 3000];
88 optional fixed32 fixed32_default_optional = 9
89 [(dccl.field).min = 0, (dccl.field).max = 400];
90 optional fixed64 fixed64_default_optional = 10
91 [(dccl.field).min = 0, (dccl.field).max = 3000];
92 optional sfixed32 sfixed32_default_optional = 11
93 [(dccl.field).min = 11, (dccl.field).max = 3000];
94 optional sfixed64 sfixed64_default_optional = 12
95 [(dccl.field).min = -12, (dccl.field).max = 3000];
97 optional bool bool_default_optional = 13;
99 optional string string_default_optional = 14 [(dccl.field).max_length = 8];
100 optional bytes bytes_default_optional = 15 [(dccl.field).max_length = 9];
102 optional Enum1 enum_default_optional = 16;
104 optional EmbeddedMsg1 msg_default_optional = 17;
106 required double double_default_required = 21 [
107 (dccl.field).min = -100,
108 (dccl.field).max = 126,
109 (dccl.field).precision = 2,
110 (dccl.field).in_head = true
112 required float float_default_required = 22 [
113 (dccl.field).min = -20,
114 (dccl.field).max = 150,
115 (dccl.field).precision = 3
117 required int32 int32_default_required = 23
118 [(dccl.field).min = -20, (dccl.field).max = 3000];
119 required int64 int64_default_required = 24
120 [(dccl.field).min = -710, (dccl.field).max = 3000];
121 required uint32 uint32_default_required = 25
122 [(dccl.field).min = 0, (dccl.field).max = 3000];
123 required uint64 uint64_default_required = 26
124 [(dccl.field).min = 5, (dccl.field).max = 3000];
125 required sint32 sint32_default_required = 27
126 [(dccl.field).min = -60, (dccl.field).max = 3000];
127 required sint64 sint64_default_required = 28
128 [(dccl.field).min = -70, (dccl.field).max = 3000];
129 required fixed32 fixed32_default_required = 29
130 [(dccl.field).min = 0, (dccl.field).max = 400];
131 required fixed64 fixed64_default_required = 30
132 [(dccl.field).min = 0, (dccl.field).max = 3000];
133 required sfixed32 sfixed32_default_required = 31
134 [(dccl.field).min = 11, (dccl.field).max = 3000];
135 required sfixed64 sfixed64_default_required = 32
136 [(dccl.field).min = -120, (dccl.field).max = 3000];
138 required bool bool_default_required = 33;
140 required string string_default_required = 34 [(dccl.field).max_length = 8];
141 required bytes bytes_default_required = 35 [(dccl.field).max_length = 9];
143 required Enum1 enum_default_required = 36;
145 required EmbeddedMsg1 msg_default_required = 37;
147 repeated double double_default_repeat = 101 [
148 (dccl.field).min = 0,
149 (dccl.field).max = 100,
150 (dccl.field).precision = 3,
151 (dccl.field).max_repeat = 4
153 repeated float float_default_repeat = 102 [
154 (dccl.field).min = 0,
155 (dccl.field).max = 100,
156 (dccl.field).precision = 3,
157 (dccl.field).max_repeat = 4
160 repeated int32 int32_default_repeat = 103 [
161 (dccl.field).min = 0,
162 (dccl.field).max = 100,
163 (dccl.field).max_repeat = 4
165 repeated int64 int64_default_repeat = 104 [
166 (dccl.field).min = -100,
167 (dccl.field).max = 100,
168 (dccl.field).max_repeat = 4
170 repeated uint32 uint32_default_repeat = 105 [
171 (dccl.field).min = 0,
172 (dccl.field).max = 100,
173 (dccl.field).max_repeat = 4
175 repeated uint64 uint64_default_repeat = 106 [
176 (dccl.field).min = 0,
177 (dccl.field).max = 100,
178 (dccl.field).max_repeat = 4
180 repeated sint32 sint32_default_repeat = 107 [
181 (dccl.field).min = -60,
182 (dccl.field).max = 100,
183 (dccl.field).max_repeat = 4
185 repeated sint64 sint64_default_repeat = 108 [
186 (dccl.field).min = -600,
187 (dccl.field).max = 100,
188 (dccl.field).max_repeat = 4
190 repeated fixed32 fixed32_default_repeat = 109 [
191 (dccl.field).min = 0,
192 (dccl.field).max = 100,
193 (dccl.field).max_repeat = 4
195 repeated fixed64 fixed64_default_repeat = 110 [
196 (dccl.field).min = 0,
197 (dccl.field).max = 100,
198 (dccl.field).max_repeat = 4
200 repeated sfixed32 sfixed32_default_repeat = 111 [
201 (dccl.field).min = 0,
202 (dccl.field).max = 100,
203 (dccl.field).max_repeat = 4
205 repeated sfixed64 sfixed64_default_repeat = 112 [
206 (dccl.field).min = -500,
207 (dccl.field).max = 100,
208 (dccl.field).max_repeat = 4
211 repeated bool bool_default_repeat = 113 [(dccl.field).max_repeat = 4];
213 repeated string string_default_repeat = 114
214 [(dccl.field).max_length = 4, (dccl.field).max_repeat = 4];
215 repeated bytes bytes_default_repeat = 115
216 [(dccl.field).max_length = 4, (dccl.field).max_repeat = 4];
218 repeated Enum1 enum_default_repeat = 116 [(dccl.field).max_repeat = 4];
220 repeated EmbeddedMsg1 msg_default_repeat = 117
221 [(dccl.field).max_repeat = 4];