1 // Copyright 2013-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";
31 option (dccl.msg).id = 10;
32 option (dccl.msg).max_bytes = 32;
33 option (dccl.msg).codec_version = 4;
35 optional double a = 1 [
36 (dccl.field).max = 180,
37 (dccl.field).min = -180,
38 (dccl.field).precision = 12,
39 (dccl.field).in_head = true
42 optional double b = 2 [
43 (dccl.field).max = 18,
44 (dccl.field).min = -18,
45 (dccl.field).precision = 4
48 // max is 2^64 rounded to 1e5
49 required uint64 u1 = 3 [
50 (dccl.field).max = 18446744073709500000,
52 (dccl.field).precision = -5
55 // max is 2^64 rounded to 1e5
56 required uint64 u2 = 4 [
57 (dccl.field).max = 18446744073709500000,
59 (dccl.field).precision = -5
63 message NegativePrecisionNumericMsg
65 option (dccl.msg).id = 10;
66 option (dccl.msg).max_bytes = 32;
67 option (dccl.msg).codec_version = 4;
69 optional double a = 1 [
70 (dccl.field).min = -20,
71 (dccl.field).max = 20,
72 (dccl.field).precision = -1
75 optional int32 b = 2 [
76 (dccl.field).min = -500000,
77 (dccl.field).max = 500000,
78 (dccl.field).precision = -3
82 message TooBigNumericMsg
84 option (dccl.msg).id = 11;
85 option (dccl.msg).max_bytes = 32;
86 option (dccl.msg).codec_version = 4;
88 optional double a = 1 [
89 (dccl.field).max = 180,
90 (dccl.field).min = -180,
91 (dccl.field).precision = 15