Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
modem_message.proto
Go to the documentation of this file.
1syntax = "proto2";
2import "dccl/option_extensions.proto";
3import "goby/protobuf/option_extensions.proto";
4import "goby/acomms/protobuf/modem_driver_status.proto";
5
6package goby.acomms.protobuf;
7
8message ModemTransmission
9{
10 option (dccl.msg).unit_system = "si";
11
12 optional int32 src = 1 [
13 (dccl.field).min = -1,
14 (dccl.field).max = 30,
15 (goby.field).description =
16 "modem ID of message source. 0 indicates BROADCAST.",
17 default = -1
18 ]; // 0 (BROADCAST), 1-30
19
20 optional int32 dest = 2 [
21 (dccl.field).min = -1,
22 (dccl.field).max = 30,
23 (goby.field).description =
24 "modem ID of message destination. 0 indicates BROADCAST, -1 "
25 "indicates QUERY_DESTINATION_ID (i.e., destination is set to the "
26 "destination of the next available packet",
27 default = -1
28 ]; // 0 (BROADCAST), 1-30, -1 (QUERY_DESTINATION_ID)
29 optional uint64 time = 3 [
30 (dccl.field) = {
31 omit: true,
32 units { prefix: "micro" base_dimensions: "T" }
33 },
34 (goby.field).description =
35 "timestamp (microseconds since UNIX (1970-01-01 00:00:00 UTC) of "
36 "this transmission",
37 (goby.field).cfg.action = NEVER
38 ];
39 enum TimeSource
40 {
41 MODEM_TIME = 1;
42 GOBY_TIME = 2;
43 }
44 optional TimeSource time_source = 5 [
45 (dccl.field).omit = true,
46 default = GOBY_TIME,
47 (goby.field).description = "source of the timestamp given",
48 (goby.field).cfg.action = NEVER
49 ];
50 optional int32 rate = 6 [
51 (dccl.field).min = -1,
52 (dccl.field).max = 14,
53 (goby.field).description =
54 "0 (lowest) - 14 (highest), -1 (QUERY_RATE). QUERY_RATE is "
55 "currently unsupported by Goby-Queue",
56 default = 0
57 ];
58
59 enum TransmissionType
60 {
61 // General (DriverBase) types
62 DATA = 1;
63 ACK = 2;
64 DRIVER_SPECIFIC = 10;
65 }
66
67 optional TransmissionType type = 7 [
68 default = DATA,
69 (goby.field).description =
70 "Type of this transmission. DRIVER_SPECIFIC types are "
71 "enumerated "
72 "in the extensions for the selected driver."
73 ];
74
75 // for type == DATA
76 optional uint32 max_num_frames = 11 [
77 (dccl.field).omit = true,
78 default = 1
79 ]; // set by the modem driver for the given rate
80 optional uint32 max_frame_bytes = 12
81 [(dccl.field).omit = true]; // set by the modem driver for the
82 // given rate, omitted means no maximum
83 optional bool ack_requested = 13
84 [default = true]; // acoustic acknowledgment requested
85 repeated bytes frame = 14 [
86 (dccl.field).omit = true,
87 (goby.field).description =
88 "Data to transmit, represented as ASCII or octal bytes "
89 "preceeded "
90 "by a '\\' (e.g. \\000 is 0x00)"
91 ]; // if omitted, you will be queried for data on signal_data_request.
92 // You can also set some frames here and the rest will be filled by
93 // signalling a data request
94
95 optional uint32 frame_start = 15 [(dccl.field).omit = true, default = 0];
96
97 // for type == ACK
98 repeated int32 acked_frame = 20
99 [(dccl.field).omit = true, (goby.field).cfg.action = NEVER];
100
101 // for AMAC
102 optional double slot_seconds = 30 [
103 (dccl.field) = {
104 min: 0
105 max: 3600
106 precision: 1
107 units { base_dimensions: "T" }
108 },
109 default = 10
110 ]; // length of slot (in seconds) if this transmission is part of a
111 // TDMA cycle
112 optional uint32 unique_id = 31 [
113 (dccl.field).min = 0,
114 (dccl.field).max = 100,
115 (goby.field).example = "0"
116 ]; // used to assign an ID to this slot
117 optional bool always_initiate = 32 [default = false];
118 optional int32 slot_index = 33 [(dccl.field).omit = true];
119
120 // extensions 1000-1100 used by mm_driver.proto
121 // extensions 1201-1202 used by abc_driver.proto (example driver)
122 // extensions 1300-1320 used by ufield_sim_driver.proto
123 // extensions 1321-1340 used by pb_modem_driver.proto
124 // extensions 1341-1360 used by udp_driver.proto
125 // extensions 1361-1380 used by bluefin_driver.proto
126 // extensions 1381-1400 used by iridium_driver.proto
127 // extensions 1401-1420 used by benthos_atm900.proto
128 // extensions 1421-1440 used by mccs_driver.proto
129 // extension 1441 used by popoto_driver.proto
130 // extensions 1500-1509 used by Jaiabot:
131 // https://github.com/jaiarobotics/jaiabot/
132 // extensions 1510-1519 used by Blue Ocean Seismic Services
133 extensions 1000 to max;
134}
135
136message ModemRaw
137{
138 required bytes raw = 7; // "$CARXD,..."
139 optional string description = 8; // "Incoming hexadecimal data"
140}
141
142message ModemReport
143{
144 option (dccl.msg).unit_system = "si";
145
146 optional int32 modem_id = 1 [default = -1];
147
148 enum LinkState
149 {
150 LINK_NOT_AVAILABLE = 1;
151 LINK_AVAILABLE = 2;
152 }
153
154 optional uint64 time = 2
155 [(dccl.field) = { units { prefix: "micro" base_dimensions: "T" } }];
156
157 // default is LINK_AVAILABLE so drivers that do not implement this report
158 // will not be considered to always be unavailable
159 optional LinkState link_state = 3 [default = LINK_AVAILABLE];
160
161 enum LinkQuality
162 {
163 QUALITY_VERY_LOW = 1;
164 QUALITY_LOW = 2;
165 QUALITY_UNKNOWN = 3; // treat unknown quality as just below medium
166 QUALITY_MEDIUM = 4;
167 QUALITY_HIGH = 5;
168 QUALITY_VERY_HIGH = 6;
169 }
170 optional LinkQuality link_quality = 4 [default = QUALITY_UNKNOWN];
171
172 optional ModemDriverStatus.Status driver_status = 5 [default = NOMINAL];
173
174 // same assignment as ModemTransmission
175 extensions 1000 to max;
176}