DCCL v5
Loading...
Searching...
No Matches
test2.proto
1// Copyright 2023:
2// GobySoft, LLC (2013-)
3// Community contributors (see AUTHORS file)
4// File authors:
5// Toby Schneider <toby@gobysoft.org>
6//
7//
8// This file is part of the Dynamic Compact Control Language Library
9// ("DCCL").
10//
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.
15//
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.
20//
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/>.
23
24// DCCL-equivalent message in proto2 syntax to the proto3 message in test3.proto.
25
26syntax = "proto2";
27import "dccl/option_extensions.proto";
28package dccl.test;
29
30message Child2
31{
32 required double req_dbl = 1 [(dccl.field) = { min: -1, max: 1, resolution: 0.1 }];
33}
34
35message Proto2Msg
36{
37 option (dccl.msg).id = 10;
38 option (dccl.msg).max_bytes = 32;
39 option (dccl.msg).codec_version = 5;
40
41 required int32 req_i32 = 1 [(dccl.field) = { min: -100, max: 500 }];
42 required uint32 req_ui32 = 2 [(dccl.field) = { min: 10, max: 1022 }];
43
44 oneof _opt_i32
45 {
46 int32 opt_i32 = 3 [(dccl.field) = { min: -100, max: 500 }];
47 }
48 oneof _opt_ui32
49 {
50 uint32 opt_ui32 = 4 [(dccl.field) = { min: 0, max: 1022 }];
51 }
52
53 optional Child2 child = 5;
54}