DCCL v4
test.proto
1 // Copyright 2011-2023:
2 // GobySoft, LLC (2013-)
3 // Massachusetts Institute of Technology (2007-2014)
4 // Community contributors (see AUTHORS file)
5 // File authors:
6 // Toby Schneider <toby@gobysoft.org>
7 // Chris Murphy <cmurphy@aphysci.com>
8 //
9 //
10 // This file is part of the Dynamic Compact Control Language Library
11 // ("DCCL").
12 //
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.
17 //
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.
22 //
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/>.
25 syntax = "proto2";
26 import "dccl/option_extensions.proto";
27 package dccl.test;
28 
29 message MiniUser
30 {
31  option (dccl.msg).id = 1000001;
32  option (dccl.msg).max_bytes = 2;
33  option (dccl.msg).codec_version = 4;
34 
35  required uint32 user = 1 [
36  (dccl.field).min = 0,
37  (dccl.field).max = 0x03FF,
38  (dccl.field).in_head = true
39  ];
40 }
41 
42 message MiniOWTT
43 {
44  option (dccl.msg).id = 1000002;
45  option (dccl.msg).max_bytes = 2;
46  option (dccl.msg).codec_version = 4;
47 
48  required uint32 clock_mode = 1 [
49  (dccl.field).min = 0,
50  (dccl.field).max = 3,
51  (dccl.field).in_head = true
52  ];
53 
54  required uint32 tod = 2 [
55  (dccl.field).min = 0,
56  (dccl.field).max = 0x0F,
57  (dccl.field).in_head = true
58  ];
59 
60  required uint32 user = 3 [
61  (dccl.field).min = 0,
62  (dccl.field).max = 0x0F,
63  (dccl.field).in_head = true
64  ];
65 }
66 
67 message MiniAbort
68 {
69  option (dccl.msg).id = 1000003;
70  option (dccl.msg).max_bytes = 2;
71  option (dccl.msg).codec_version = 4;
72 
73  required uint32 user = 1 [
74  (dccl.field).min = 0,
75  (dccl.field).max = 0x03FF,
76  (dccl.field).in_head = true
77  ];
78 }