1 // Copyright 2019-2023:
2 // GobySoft, LLC (2013-)
3 // Community contributors (see AUTHORS file)
5 // Toby Schneider <toby@gobysoft.org>
8 // This file is part of the Dynamic Compact Control Language Library
11 // DCCL is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU Lesser General Public License as published by
13 // the Free Software Foundation, either version 2.1 of the License, or
14 // (at your option) any later version.
16 // DCCL is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Lesser General Public License for more details.
21 // You should have received a copy of the GNU Lesser General Public License
22 // along with DCCL. If not, see <http://www.gnu.org/licenses/>.
24 import "dccl/option_extensions.proto";
30 option (dccl.msg).omit_id = true;
31 option (dccl.msg).max_bytes = 32;
32 option (dccl.msg).codec_version = 4;
34 // test default enc/dec
35 required double d = 1 [
36 (dccl.field).min = -100,
37 (dccl.field).max = 126,
38 (dccl.field).precision = 2
40 optional int32 i = 3 [(dccl.field).min = -20, (dccl.field).max = 3000];
45 option (dccl.msg).omit_id = true;
46 option (dccl.msg).max_bytes = 32;
47 option (dccl.msg).codec_version = 4;
49 required uint32 u = 1 [(dccl.field).min = 10, (dccl.field).max = 20];
54 option (dccl.msg).id = 2;
55 option (dccl.msg).max_bytes = 32;
56 option (dccl.msg).codec_version = 4;
58 required float f = 1 [
59 (dccl.field).min = -10,
60 (dccl.field).max = 10,
61 (dccl.field).precision = 1
66 message TestMsgNormalId3
68 option (dccl.msg).id = 3;
69 option (dccl.msg).max_bytes = 32;
70 option (dccl.msg).codec_version = 4;
72 required float f = 1 [
73 (dccl.field).min = -10,
74 (dccl.field).max = 10,
75 (dccl.field).precision = 1