Goby v2
simple_status.proto
1 
2 // include the DCCL extensions to Google Protobuf
3 import "dccl/option_extensions.proto";
4 
5 package goby.example;
6 
7 message SimpleStatus
8 {
9  option (dccl.msg).id = 20;
10  option (dccl.msg).max_bytes = 32;
11  optional double timestamp = 1
12  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
13  optional int32 src = 2 [
14  (dccl.field).max = 31,
15  (dccl.field).min = 0,
16  (dccl.field).in_head = true
17  ];
18  optional int32 dest = 3 [
19  (dccl.field).max = 31,
20  (dccl.field).min = 0,
21  (dccl.field).in_head = true
22  ];
23 
24  optional double x = 10 [
25  (dccl.field).max = 100000,
26  (dccl.field).min = -100000,
27  (dccl.field).precision = 0
28  ];
29  optional double y = 11 [
30  (dccl.field).max = 100000,
31  (dccl.field).min = -100000,
32  (dccl.field).precision = 0
33  ];
34  optional double speed = 12 [
35  (dccl.field).max = 20.0,
36  (dccl.field).min = -2.0,
37  (dccl.field).precision = 1
38  ];
39  optional double heading = 13 [
40  (dccl.field).max = 360.00,
41  (dccl.field).min = 0.00,
42  (dccl.field).precision = 2
43  ];
44  optional double depth = 14 [
45  (dccl.field).max = 6400.0,
46  (dccl.field).min = 0.0,
47  (dccl.field).precision = 1
48  ];
49 }