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