DCCL v5
Loading...
Searching...
No Matches
test.proto
1// Copyright 2026:
2// GobySoft, LLC (2013-)
3// Community contributors (see AUTHORS file)
4//
5//
6// This file is part of the Dynamic Compact Control Language Library
7// ("DCCL").
8//
9// DCCL is free software: you can redistribute it and/or modify
10// it under the terms of the GNU Lesser General Public License as published by
11// the Free Software Foundation, either version 2.1 of the License, or
12// (at your option) any later version.
13//
14// DCCL is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17// GNU Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public License
20// along with DCCL. If not, see <http://www.gnu.org/licenses/>.
21syntax = "proto2";
22import "dccl/option_extensions.proto";
23
24package dccl.test.python;
25
26message NormalMsg
27{
28 option (dccl.msg).id = 201;
29 option (dccl.msg).max_bytes = 32;
30 option (dccl.msg).codec_version = 5;
31
32 required double d = 1 [
33 (dccl.field).min = -100,
34 (dccl.field).max = 100,
35 (dccl.field).precision = 2
36 ];
37 optional int32 i = 2 [(dccl.field).min = -20, (dccl.field).max = 3000];
38}
39
40// A second normal message with a different ID to exercise mismatched-ID error
41// handling in decode_with_full_name.
42message AnotherMsg
43{
44 option (dccl.msg).id = 202;
45 option (dccl.msg).max_bytes = 32;
46 option (dccl.msg).codec_version = 5;
47
48 required float f = 1 [
49 (dccl.field).min = -10,
50 (dccl.field).max = 10,
51 (dccl.field).precision = 1
52 ];
53}
54
55message OmitIdMsg
56{
57 option (dccl.msg).omit_id = true;
58 option (dccl.msg).max_bytes = 32;
59 option (dccl.msg).codec_version = 5;
60
61 required double d = 1 [
62 (dccl.field).min = -100,
63 (dccl.field).max = 100,
64 (dccl.field).precision = 2
65 ];
66 optional int32 i = 2 [(dccl.field).min = -20, (dccl.field).max = 3000];
67}