Goby v2
time_update.proto
1 
2 import "goby/common/protobuf/option_extensions.proto";
3 import "dccl/option_extensions.proto";
4 
5 package goby.acomms.protobuf;
6 
7 message TimeUpdateRequest
8 {
9  option (dccl.msg).id = 0x0204;
10  option (dccl.msg).max_bytes = 32;
11 
12  required int32 src = 1 [
13  (dccl.field).min = 1,
14  (dccl.field).max = 32,
15  (dccl.field).in_head = true
16  ];
17  optional int32 dest = 2 [
18  (dccl.field).min = 1,
19  (dccl.field).max = 32,
20  (dccl.field).in_head = true
21  ];
22 
23  required uint64 time = 3
24  [(dccl.field).codec = "_time", (dccl.field).in_head = true];
25 
26  required int32 update_time_for_id = 4 [
27  (dccl.field).min = 1,
28  (dccl.field).max = 32,
29  (dccl.field).in_head = true
30  ];
31 }
32 
33 message TimeUpdateResponse
34 {
35  option (dccl.msg).id = 0x0205;
36  option (dccl.msg).max_bytes = 32;
37 
38  required int32 src = 1 [
39  (dccl.field).min = 1,
40  (dccl.field).max = 32,
41  (dccl.field).in_head = true
42  ];
43  optional int32 dest = 2 [
44  (dccl.field).min = 1,
45  (dccl.field).max = 32,
46  (dccl.field).in_head = true
47  ];
48 
49  required uint64 time = 3 [
50  (dccl.field).codec = "_time",
51  (dccl.field).in_head = true,
52  (dccl.field).precision = -3
53  ];
54 
55  required uint64 time_of_flight_microsec = 4 [
56  (dccl.field).min = 0,
57  (dccl.field).max = 20000000,
58  (dccl.field).precision = -3
59  ]; // microsec correction applied to `time` field - good for 20 sec (about
60  // 30km)
61 
62  optional int32 request_src = 5 [(dccl.field).omit = true];
63 }