1 // Copyright 2012-2023:
2 // GobySoft, LLC (2013-)
3 // Massachusetts Institute of Technology (2007-2014)
4 // Community contributors (see AUTHORS file)
6 // Toby Schneider <toby@gobysoft.org>
7 // Chris Murphy <cmurphy@aphysci.com>
10 // This file is part of the Dynamic Compact Control Language Library
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.
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.
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/>.
27 import "dccl/ccl/protobuf/ccl_extensions.proto";
28 import "dccl/option_extensions.proto";
30 package dccl.legacyccl.protobuf;
34 // unsigned char mode;
37 // MODEM_MSG_DATA_EMPTY;
41 // prefix CCL IDs with 0x0CC1 to get out of normal 0x0000 prefix
42 option (dccl.msg).id = 0x0CC10006;
43 option (dccl.msg).max_bytes = 32;
44 option (dccl.msg).codec_version = 2;
46 required bytes spare = 1 [(dccl.field).max_length = 31];
51 // unsigned char mode;
53 // unsigned char message_number;
54 // LATLON_COMPRESSED lat;
55 // // Center of search area
56 // LATLON_COMPRESSED lon;
57 // // Center of search area
58 // char speed_depth_flags;
59 // unsigned short depth_goal_encoded_transit;
60 // char speed_encoded_transit;
61 // unsigned char device_cmd_transit;
62 // // Sidescan, DIDSON range.
63 // unsigned short depth_goal_encoded_survey;
64 // char speed_encoded_survey;
65 // unsigned char device_cmd_survey;
66 // // Sidescan, DIDSON range.
67 // unsigned char num_rows;
69 // unsigned short row_length;
71 // unsigned char spacing_0;
73 // unsigned char spacing_1;
75 // char heading_encoded;
76 // LATLON_COMPRESSED lat_start;
77 // // ack only, where redirect started
78 // LATLON_COMPRESSED lon_start;
81 // MODEM_MSG_DATA_REDIRECT;
82 message CCLMDATRedirect
84 option (dccl.msg).id = 0x0CC10007;
85 option (dccl.msg).max_bytes = 32;
86 option (dccl.msg).codec_version = 2;
88 required uint32 message_number = 1
89 [(dccl.field).min = 0, (dccl.field).max = 0xff];
91 required double latitude = 2 [
92 (dccl.field).codec = "_ccl_latloncompressed",
93 (dccl.field).description = "Center of search area: latitude in degrees"
96 required double longitude = 3 [
97 (dccl.field).codec = "_ccl_latloncompressed",
98 (dccl.field).description = "Center of search area: longitude in degrees"
101 // replaces speed_depth_flags field
116 METERS_PER_SECOND = 1;
119 required VerticalMode transit_vertical_mode = 4;
120 required ThrustMode transit_thrust_mode = 5;
121 required VerticalMode survey_vertical_mode = 6;
122 required ThrustMode survey_thrust_mode = 7;
124 required float depth_goal_transit = 8
125 [(dccl.field).codec = "_ccl_depth", (dccl.field).(ccl).bit_size = 16];
127 required float speed_transit = 9 [
128 (dccl.field).codec = "_ccl_speed",
129 (dccl.field).(ccl).thrust_mode_tag = 5
132 required uint32 device_cmd_transit = 10
133 [(dccl.field).min = 0, (dccl.field).max = 0xff];
135 required float depth_goal_survey = 11
136 [(dccl.field).codec = "_ccl_depth", (dccl.field).(ccl).bit_size = 16];
138 required float speed_survey = 12 [
139 (dccl.field).codec = "_ccl_speed",
140 (dccl.field).(ccl).thrust_mode_tag = 7
143 required uint32 device_cmd_survey = 13
144 [(dccl.field).min = 0, (dccl.field).max = 0xff];
146 required uint32 num_rows = 14
147 [(dccl.field).min = 0, (dccl.field).max = 0xff];
149 required uint32 row_length = 15
150 [(dccl.field).min = 0, (dccl.field).max = 0xffff];
152 required uint32 spacing_0 = 16
153 [(dccl.field).min = 0, (dccl.field).max = 0xff];
155 required uint32 spacing_1 = 17
156 [(dccl.field).min = 0, (dccl.field).max = 0xff];
158 required float heading = 18 [
159 (dccl.field).codec = "_ccl_heading",
160 (dccl.field).description = "Heading in degrees"
163 required double lat_start = 19
164 [(dccl.field).codec = "_ccl_latloncompressed"];
165 required double lon_start = 20
166 [(dccl.field).codec = "_ccl_latloncompressed"];
168 required bytes spare = 21 [(dccl.field).max_length = 3];
173 // unsigned char mode;
174 // unsigned char spare;
175 // unsigned short depth[3];
176 // unsigned short altitude[3];
177 // LATLON_COMPRESSED latitude[3];
178 // LATLON_COMPRESSED longitude[3];
180 // MODEM_MSG_DATA_BATHY;
183 option (dccl.msg).id = 0x0CC10009;
184 option (dccl.msg).max_bytes = 32;
185 option (dccl.msg).codec_version = 2;
187 required bytes spare = 1 [(dccl.field).max_length = 1];
189 repeated float depth = 2 [
190 (dccl.field).codec = "_ccl_depth",
191 (dccl.field).(ccl).bit_size = 16,
192 (dccl.field).max_repeat = 3
195 repeated float altitude = 3 [
196 (dccl.field).codec = "_ccl_hires_altitude",
197 (dccl.field).max_repeat = 3
200 repeated double latitude = 4 [
201 (dccl.field).codec = "_ccl_latloncompressed",
202 (dccl.field).max_repeat = 3
205 repeated double longitude = 5 [
206 (dccl.field).codec = "_ccl_latloncompressed",
207 (dccl.field).max_repeat = 3
213 // unsigned char mode;
215 // unsigned char spare;
216 // unsigned char salinity[2];
217 // unsigned char temperature[2];
218 // unsigned short depth[2];
219 // unsigned char sound_speed[2];
220 // LATLON_COMPRESSED latitude[2];
221 // LATLON_COMPRESSED longitude[2];
224 // MODEM_MSG_DATA_CTD;
226 // untested, CCL spec does not give test case
229 option (dccl.msg).id = 0x0CC1000A;
230 option (dccl.msg).max_bytes = 32;
231 option (dccl.msg).codec_version = 2;
233 required bytes spare = 1 [(dccl.field).max_length = 1];
235 repeated float salinity = 2
236 [(dccl.field).codec = "_ccl_salinity", (dccl.field).max_repeat = 2];
238 repeated float temperature = 3
239 [(dccl.field).codec = "_ccl_temperature", (dccl.field).max_repeat = 2];
241 repeated float depth = 4 [
242 (dccl.field).codec = "_ccl_depth",
243 (dccl.field).(ccl).bit_size = 16,
244 (dccl.field).max_repeat = 2
247 repeated float sound_speed = 5
248 [(dccl.field).codec = "_ccl_sound_speed", (dccl.field).max_repeat = 2];
250 repeated double latitude = 6 [
251 (dccl.field).codec = "_ccl_latloncompressed",
252 (dccl.field).max_repeat = 2
255 repeated double longitude = 7 [
256 (dccl.field).codec = "_ccl_latloncompressed",
257 (dccl.field).max_repeat = 2
260 required bytes spare2 = 8 [(dccl.field).max_length = 8];
265 // unsigned char mode;
266 // unsigned char spare;
267 // unsigned short command;
268 // char parameter[28];
270 // MODEM_MSG_DATA_COMMAND;
271 message CCLMDATCommand
273 option (dccl.msg).id = 0x0CC1000B;
274 option (dccl.msg).max_bytes = 32;
275 option (dccl.msg).codec_version = 2;
277 required bytes spare = 1 [(dccl.field).max_length = 1];
282 ABORT_TO_END_POSITION_OF_MISSION = 1;
283 ABORT_IMMEDIATELY = 2;
285 RELEASE_DESCENT_WEIGHT = 4;
286 RELEASE_ASCENT_WEIGHT = 5;
287 RELEASE_PICKUP_FLOAT = 6;
288 ENABLE_MODEM_RANGER_PING = 7;
289 DISABLE_MODEM_RANGER_PING = 8;
295 ACCEPT_NEXT_FIX = 14;
296 DUMP_REDIRECT_COMMANDS = 15;
298 ABORT_TO_MISSION_START_LOCATION = 17;
299 ABORT_TO_DESTINATION = 18;
300 DUMP_REDIRECT_COMMANDS_EXCEPT_CURRENT = 19;
301 ABORT_DROP_ASCENT_WEIGHT_AND_POWER_TO_SURFACE = 20;
314 required Command command = 2;
316 // placeholder for the unenumerated commands
317 required uint32 reserved_command = 3
318 [(dccl.field).min = 0, (dccl.field).max = 0x7ff];
320 required bytes parameter = 4 [(dccl.field).max_length = 28];
325 // unsigned char mode;
327 // LATLON_COMPRESSED latitude;
329 // LATLON_COMPRESSED longitude;
330 // unsigned char fix_age
331 // TIME_DATE time_date;
333 // unsigned char heading;
334 // // 1.5 degree resolution
335 // unsigned short mission_mode_depth;
337 // unsigned long faults;
338 // unsigned char faults_2;
339 // unsigned char mission_leg;
340 // char est_velocity;
341 // char objective_index;
342 // unsigned char watts_encoded;
343 // LATLON_COMPRESSED lat_goal;
345 // LATLON_COMPRESSED lon_goal;
347 // unsigned char battery_percent;
348 // unsigned short gfi_pitch_oil_encoded;
349 // // 5 bits gfi,6 bits pitch,
352 // MODEM_MSG_DATA_STATE;
356 option (dccl.msg).id = 0x0CC1000E;
357 option (dccl.msg).max_bytes = 32;
358 option (dccl.msg).codec_version = 2;
360 required double latitude = 1 [
361 (dccl.field).codec = "_ccl_latloncompressed",
362 (dccl.field).description = "Latitude in degrees"
365 required double longitude = 2 [
366 (dccl.field).codec = "_ccl_latloncompressed",
367 (dccl.field).description = "Longitude in degrees"
370 required uint32 fix_age = 3 [
371 (dccl.field).codec = "_ccl_fix_age",
372 (dccl.field).description = "Fix age in seconds"
375 required uint64 time_date = 4 [
376 (dccl.field).codec = "_ccl_time_date",
377 (dccl.field).description =
378 "Microseconds since UNIX 1970/01/01 00:00:00 UTC"
380 required float heading = 5 [
381 (dccl.field).codec = "_ccl_heading",
382 (dccl.field).description = "Heading in degrees"
384 required float depth = 6 [
385 (dccl.field).codec = "_ccl_depth",
386 (dccl.field).description = "Depth in meters",
387 (dccl.field).(ccl).bit_size = 13
388 ]; // 13 since MissionMode is stuck in the top three bits
392 MISSION_COMPLETED = 0;
397 REDIRECT_MISSION_IN_PROGRESS = 5;
402 required MissionMode mission_mode = 7;
404 required bytes faults = 8 [(dccl.field).max_length = 4];
405 required bytes faults_2 = 9 [(dccl.field).max_length = 1];
406 required uint32 mission_leg = 10
407 [(dccl.field).max = 0xff, (dccl.field).min = 0];
408 required float est_velocity = 11 [
409 (dccl.field).codec = "_ccl_velocity",
410 (dccl.field).description = "Velocity from ADCP or prop turns in m/s"
412 required bytes objective_index = 12 [(dccl.field).max_length = 1];
413 required float watts = 13 [(dccl.field).codec = "_ccl_watts"];
414 required double lat_goal = 14 [
415 (dccl.field).codec = "_ccl_latloncompressed",
416 (dccl.field).description = "Latitude goal in degrees"
418 required double lon_goal = 15 [
419 (dccl.field).codec = "_ccl_latloncompressed",
420 (dccl.field).description = "Longitude goal in degrees"
422 required uint32 battery_percent = 16
423 [(dccl.field).max = 0xff, (dccl.field).min = 0];
427 required float gfi = 1
428 [(dccl.field).description = "Percentage ground fault (0-100)"];
429 required float pitch = 2
430 [(dccl.field).description = "Pitch of the vehicle in degrees"];
431 required float oil = 3 [
432 (dccl.field).description =
433 "Percentage of the available capacity remaining in the oil compensation system, or 0 if no such system"
436 required GFIPitchOil gfi_pitch_oil = 17
437 [(dccl.field).codec = "_ccl_gfi_pitch_oil"];
442 // unsigned char mode;
445 // MODEM_MSG_ERROR_MSG;
448 // prefix CCL IDs with 0x0CC1 to get out of normal 0x0000 prefix
449 option (dccl.msg).id = 0x0CC1000F;
450 option (dccl.msg).max_bytes = 32;
451 option (dccl.msg).codec_version = 2;
453 required bytes message = 1 [(dccl.field).max_length = 31];