JaiaBot 2.6.0
JaiaBot micro-AUV software
 
Loading...
Searching...
No Matches
jaia_dccl.proto
Go to the documentation of this file.
1syntax = "proto2";
2
3import "dccl/option_extensions.proto";
4import "jaiabot/messages/mission.proto";
5import "jaiabot/messages/geographic_coordinate.proto";
6import "jaiabot/messages/high_control.proto";
7import "goby/middleware/protobuf/coroner.proto";
8import "jaiabot/messages/health.proto";
9import "jaiabot/messages/imu.proto";
10import "jaiabot/messages/option_extensions.proto";
11import "jaiabot/messages/link.proto";
12
13package jaiabot.protobuf;
14
15message Command
16{
17 /*
18 Actual maximum size of message: 196 bytes / 1568 bits
19 dccl.id head...........................8
20 user head..............................0
21 body................................1556
22 padding to full byte...................4
23 Allowed maximum size of message: 250 bytes / 2000 bits
24 */
25 option (dccl.msg) = {
26 id: 80
27 max_bytes: 250
28 codec_version: 4
29 unit_system: "si"
30 };
31
32 required uint32 bot_id = 1 [
33 (dccl.field) = { min: 0 max: 255 },
34 (jaia.field).rest_api.presence = OMITTED // specified in 'targets'
35 ];
36
37 required uint64 time = 2 [
38 (dccl.field) = {
39 codec: "dccl.time2"
40 units { prefix: "micro" derived_dimensions: "time" }
41 precision: -6 // second precision
42
43 },
44 (jaia.field).rest_api.presence = OMITTED // written by API server
45 ];
46
47 // Special case: not sent in message - written upon receipt based on the
48 // Link traversed
49 optional Link link = 3 [(dccl.field).omit = true];
50
51 optional uint32 from_hub_id = 4 [(dccl.field) = { min: 0 max: 30 }];
52
53 enum CommandType
54 {
55 // pre mission
56 MISSION_PLAN = 1 [(jaia.ev).rest_api.presence = GUARANTEED];
57 ACTIVATE = 2 [(jaia.ev).rest_api.presence = GUARANTEED];
58 START_MISSION = 3 [(jaia.ev).rest_api.presence = GUARANTEED];
59 MISSION_PLAN_FRAGMENT = 4;
60
61 // during any mission
62 NEXT_TASK = 10 [(jaia.ev).rest_api.presence = GUARANTEED];
63 RETURN_TO_HOME = 11 [(jaia.ev).rest_api.presence = GUARANTEED];
64 STOP = 12 [(jaia.ev).rest_api.presence = GUARANTEED];
65 PAUSE = 13 [(jaia.ev).rest_api.presence = GUARANTEED];
66 RESUME = 14 [(jaia.ev).rest_api.presence = GUARANTEED];
67
68 // during remote control mission
69 REMOTE_CONTROL_SETPOINT = 20;
70 REMOTE_CONTROL_TASK = 21;
71 REMOTE_CONTROL_RESUME_MOVEMENT = 22;
72
73 // post mission
74 RECOVERED = 30 [(jaia.ev).rest_api.presence = GUARANTEED];
75 SHUTDOWN = 31 [(jaia.ev).rest_api.presence = GUARANTEED];
76 RETRY_DATA_OFFLOAD = 32;
77 DATA_OFFLOAD_COMPLETE = 33;
78 DATA_OFFLOAD_FAILED = 34;
79
80 // debugging low level commands
81 RESTART_ALL_SERVICES = 40;
82 REBOOT_COMPUTER = 41;
83 SHUTDOWN_COMPUTER = 42;
84 }
85
86 required CommandType type = 10
87 [(jaia.field).rest_api.presence = GUARANTEED];
88
89 oneof command_data
90 {
91 // required for type == MISSION_PLAN
92 MissionPlan plan = 20 [(jaia.field).rest_api = {
93 presence: GUARANTEED,
94 doc: "Used with \"command\": { \"type\" : \"MISSION_PLAN\" }"
95 }];
96
97 // required for type == REMOTE_CONTROL_SETPOINT
98 RemoteControl rc = 30 [(jaia.field).rest_api = {
99 presence: GUARANTEED,
100 doc: "Used with \"command\": { \"type\" : \"REMOTE_CONTROL_SETPOINT\" }"
101 }];
102
103 // required for type == REMOTE_CONTROL_TASK
104 MissionTask rc_task = 31;
105 }
106}
107
108message CommandForHub
109{
110 option (dccl.msg) = {
111 unit_system: "si"
112 };
113
114 required uint32 hub_id = 1 [(jaia.field).rest_api.presence = OMITTED];
115 required uint64 time = 2 [
116 (dccl.field) = { units { prefix: "micro" derived_dimensions: "time" } },
117 (jaia.field).rest_api.presence = OMITTED
118 ];
119
120 enum HubCommandType
121 {
122 SCAN_FOR_BOTS = 5;
123 CTD_DATA_OFFLOAD = 6;
124
125 // debugging low level commands
126 RESTART_ALL_SERVICES = 40;
127 REBOOT_COMPUTER = 41;
128 SHUTDOWN_COMPUTER = 42;
129
130 // simulator commands
131 SET_HUB_LOCATION = 80 [(jaia.ev).rest_api.presence = GUARANTEED];
132 }
133
134 required HubCommandType type = 10
135 [(jaia.field).rest_api.presence = GUARANTEED];
136
137 optional uint32 scan_for_bot_id = 11;
138
139 optional GeographicCoordinate hub_location = 80
140 [(jaia.field).rest_api.presence = GUARANTEED];
141}
142
143message BotStatus
144{
145 /*
146 Actual maximum size of message: 48 bytes / 384 bits
147 dccl.id head...........................8
148 user head..............................0
149 body.................................369
150 padding to full byte...................7
151 Allowed maximum size of message: 250 bytes / 2000 bits
152 */
153 option (dccl.msg) = {
154 id: 81
155 max_bytes: 250
156 codec_version: 4
157 unit_system: "si"
158 };
159
160 required uint32 bot_id = 1 [
161 (dccl.field) = { min: 0 max: 255 },
162 (jaia.field).rest_api.presence = GUARANTEED
163 ];
164 required uint64 time = 2 [
165 (dccl.field) = {
166 codec: "dccl.time2"
167 units { prefix: "micro" derived_dimensions: "time" },
168 },
169 (jaia.field).rest_api.presence = GUARANTEED
170 ];
171 optional uint64 last_command_time = 3 [
172 (dccl.field) = {
173 codec: "dccl.time2"
174 units { prefix: "micro" derived_dimensions: "time" }
175 },
176 (jaia.field).rest_api.presence = GUARANTEED
177 ];
178
179 optional goby.middleware.protobuf.HealthState health_state = 4
180 [(jaia.field).rest_api.presence = GUARANTEED];
181 repeated Error error = 5 [
182 (dccl.field).max_repeat = 5,
183 (jaia.field).rest_api.presence = GUARANTEED
184 ];
185 repeated Warning warning = 6 [
186 (dccl.field).max_repeat = 5,
187 (jaia.field).rest_api.presence = GUARANTEED
188 ];
189 enum BotType
190 {
191 HYDRO = 1 [(jaia.ev).rest_api.presence = GUARANTEED];
192 ECHO = 2 [(jaia.ev).rest_api.presence = GUARANTEED];
193 BIO = 3 [(jaia.ev).rest_api.presence = GUARANTEED];
194 }
195 optional BotType bot_type = 7 [(jaia.field).rest_api.presence = GUARANTEED];
196
197 // Special case: not sent in message - written upon receipt based on the
198 // Link traversed
199 optional Link link = 8 [(dccl.field).omit = true];
200
201 optional GeographicCoordinate location = 10
202 [(jaia.field).rest_api.presence = GUARANTEED];
203
204 optional double sensor_depth = 11 [
205 (dccl.field) = {
206 min: -1
207 max: 100
208 precision: 1
209 units: { derived_dimensions: "length" }
210 },
211 (jaia.field).rest_api.presence = GUARANTEED
212 ];
213
214 optional double depth = 12 [
215 (dccl.field) = {
216 min: -1
217 max: 100
218 precision: 1
219 units: { derived_dimensions: "length" }
220 },
221 (jaia.field).rest_api.presence = GUARANTEED
222 ];
223
224 message Attitude
225 {
226 optional double roll = 1 [
227 (dccl.field) = {
228 min: -180
229 max: 180
230 precision: 0
231 units {
232 derived_dimensions: "plane_angle"
233 system: "angle::degree"
234 }
235 },
236 (jaia.field).rest_api.presence = GUARANTEED
237 ];
238 optional double pitch = 2 [
239 (dccl.field) = {
240 min: -180
241 max: 180
242 precision: 0
243 units {
244 derived_dimensions: "plane_angle"
245 system: "angle::degree"
246 }
247 },
248 (jaia.field).rest_api.presence = GUARANTEED
249 ];
250 optional double heading = 3 [
251 (dccl.field) = {
252 min: 0
253 max: 360
254 precision: 0
255 units {
256 derived_dimensions: "plane_angle"
257 system: "angle::degree"
258 }
259 },
260 (jaia.field).rest_api.presence = GUARANTEED
261 ];
262 optional double course_over_ground = 4 [
263 (dccl.field) = {
264 min: 0
265 max: 360
266 precision: 0
267 units {
268 derived_dimensions: "plane_angle"
269 system: "angle::degree"
270 }
271 },
272 (jaia.field).rest_api.presence = GUARANTEED
273 ];
274 }
275 optional Attitude attitude = 20
276 [(jaia.field).rest_api.presence = GUARANTEED];
277
278 message Speed
279 {
280 optional double over_ground = 1 [
281 (dccl.field) = {
282 min: -5
283 max: 10
284 precision: 1
285 units { derived_dimensions: "velocity" }
286 },
287 (jaia.field).rest_api.presence = GUARANTEED
288 ];
289 optional double over_water = 2 [(dccl.field) = {
290 min: -5
291 max: 10
292 precision: 1
293 units { derived_dimensions: "velocity" }
294 }];
295 }
296 optional Speed speed = 30 [(jaia.field).rest_api.presence = GUARANTEED];
297
298 optional MissionState mission_state = 40
299 [(jaia.field).rest_api.presence = GUARANTEED];
300
301 // bounds should match MissionPlan.goal max_repeat value *
302 // expected_fragments max
303 optional int32 active_goal = 41 [
304 (dccl.field) = { min: 0 max: 80 },
305 (jaia.field).rest_api.presence = GUARANTEED
306 ];
307 optional double distance_to_active_goal = 42 [
308 (dccl.field) = {
309 min: 0
310 max: 1000
311 precision: 1
312 units: { derived_dimensions: "length" }
313 },
314 (jaia.field).rest_api.presence = GUARANTEED
315 ];
316 optional uint32 active_goal_timeout = 43 [
317 (dccl.field) = {
318 min: 0
319 max: 3600
320 precision: 0
321 units { base_dimensions: "T" }
322 },
323 (jaia.field).rest_api.presence = GUARANTEED
324 ];
325 optional int32 repeat_index = 44 [
326 (dccl.field) = { min: 0 max: 1000 precision: 0 },
327 (jaia.field).rest_api.presence = GUARANTEED
328 ];
329
330 optional double salinity = 51
331 [(dccl.field) = { min: 0 max: 100 precision: 1 }];
332
333 optional double temperature = 52 [(dccl.field) = {
334 min: -50
335 max: 100
336 precision: 2
337 units { derived_dimensions: "temperature" system: "celsius" }
338 }];
339
340 optional double battery_percent = 53 [
341 (dccl.field) = { min: 0 max: 100 precision: 0 },
342 (jaia.field).rest_api.presence = GUARANTEED
343 ];
344
345 optional int32 calibration_status = 54 [(dccl.field) = { min: 0 max: 3 }];
346
347 optional IMUCalibrationState calibration_state = 55;
348
349 optional double hdop = 56 [(dccl.field) = { min: 0 max: 100 precision: 2 }];
350
351 optional double pdop = 57 [(dccl.field) = { min: 0 max: 100 precision: 2 }];
352
353 optional int32 wifi_link_quality_percentage = 58 [
354 (dccl.field) = { min: 0 max: 100 precision: 0 },
355 (jaia.field).rest_api.presence = GUARANTEED
356 ];
357
358 optional uint64 received_time = 59 [
359 (dccl.field) = {
360 omit: true
361 units { prefix: "micro" derived_dimensions: "time" }
362 },
363 (jaia.field).rest_api.presence = GUARANTEED
364 ];
365}
366
367message DriftPacket
368{
369 option (dccl.msg) = {
370 unit_system: "si"
371 };
372
373 optional int32 drift_duration = 1 [
374 default = 0,
375 (dccl.field) = {
376 min: 0
377 max: 3600
378 precision: -1
379 units { base_dimensions: "T" }
380 },
381 (jaia.field).rest_api.presence = GUARANTEED
382 ];
383
384 message EstimatedDrift
385 {
386 required double speed = 1 [
387 (dccl.field) = {
388 min: 0
389 max: 10
390 precision: 1
391 units { derived_dimensions: "velocity" }
392 },
393 (jaia.field).rest_api.presence = GUARANTEED
394 ];
395
396 optional double heading = 3 [
397 (dccl.field) = {
398 min: 0
399 max: 360
400 precision: 0
401 units {
402 derived_dimensions: "plane_angle"
403 system: "angle::degree"
404 }
405 },
406 (jaia.field).rest_api.presence = GUARANTEED
407 ];
408 }
409
410 // should correspond to ocean current velocity
411 optional EstimatedDrift estimated_drift = 10
412 [(jaia.field).rest_api.presence = GUARANTEED];
413
414 // location C
415 optional GeographicCoordinate start_location = 11
416 [(jaia.field).rest_api.presence = GUARANTEED];
417 // location D
418 optional GeographicCoordinate end_location = 12
419 [(jaia.field).rest_api.presence = GUARANTEED];
420
421 // Significant wave height is defined as the average wave height,
422 // from trough to crest, of the highest one-third of the waves
423 optional double significant_wave_height = 13 [
424 (dccl.field) = {
425 min: 0
426 max: 50
427 precision: 3
428 units: { derived_dimensions: "length" }
429 },
430 (jaia.field).rest_api.presence = GUARANTEED
431 ];
432}
433
434message DivePacket
435{
436 option (dccl.msg) = {
437 unit_system: "si"
438 };
439
440 required double dive_rate = 10 [
441 (dccl.field) = {
442 min: 0
443 max: 10
444 precision: 1
445 units { derived_dimensions: "velocity" }
446 },
447 (jaia.field).rest_api.presence = GUARANTEED
448 ];
449
450 optional double unpowered_rise_rate = 11 [
451 (dccl.field) = {
452 min: 0
453 max: 10
454 precision: 1
455 units { derived_dimensions: "velocity" }
456 },
457 (jaia.field).rest_api.presence = GUARANTEED
458 ];
459
460 optional double powered_rise_rate = 12 [
461 (dccl.field) = {
462 min: 0
463 max: 10
464 precision: 1
465 units { derived_dimensions: "velocity" }
466 },
467 (jaia.field).rest_api.presence = GUARANTEED
468 ];
469
470 required double depth_achieved = 13 [
471 (dccl.field) = {
472 min: 0
473 max: 100
474 precision: 1
475 units: { derived_dimensions: "length" }
476 },
477 (jaia.field).rest_api.presence = GUARANTEED
478 ];
479
480 message Measurements
481 {
482 optional double mean_depth = 1 [
483 (dccl.field) = {
484 min: 0
485 max: 100
486 precision: 1
487 units: { derived_dimensions: "length" }
488 },
489 (jaia.field).rest_api.presence = GUARANTEED
490 ];
491
492 optional double mean_temperature = 2 [
493 (dccl.field) = {
494 min: -1
495 max: 50
496 precision: 1
497 units { derived_dimensions: "temperature" system: "celsius" }
498 },
499 (jaia.field).rest_api.presence = GUARANTEED
500 ];
501
502 optional double mean_salinity = 3 [
503 (dccl.field) = { min: 0 max: 45 precision: 1 },
504 (jaia.field).rest_api.presence = GUARANTEED
505 ];
506 }
507
508 repeated Measurements measurement = 14 [
509 (dccl.field) = { max_repeat: 50 },
510 (jaia.field).rest_api.presence = GUARANTEED
511 ];
512
513 // location A
514 optional GeographicCoordinate start_location = 15
515 [(jaia.field).rest_api.presence = GUARANTEED];
516
517 optional double duration_to_acquire_gps = 16 [
518 (dccl.field) = {
519 min: 0
520 max: 120
521 precision: 1
522 units { base_dimensions: "T" }
523 },
524 (jaia.field).rest_api.presence = GUARANTEED
525 ];
526
527 // Did we reach seafloor?
528 optional bool bottom_dive = 17
529 [default = false, (jaia.field).rest_api.presence = GUARANTEED];
530
531 // Did we reach min depth?
532 optional bool reached_min_depth = 18
533 [default = false, (jaia.field).rest_api.presence = GUARANTEED];
534
535 // If we reached bottom, what was the bottom type
536 enum BottomType
537 {
538 HARD = 1 [(jaia.ev).rest_api.presence = GUARANTEED];
539 SOFT = 2 [(jaia.ev).rest_api.presence = GUARANTEED];
540 }
541
542 optional BottomType bottom_type = 19
543 [(jaia.field).rest_api.presence = GUARANTEED];
544
545 // For bottom characterization
546 optional double max_acceleration = 20 [
547 (dccl.field) = {
548 min: 0
549 max: 100
550 precision: 1
551 units { derived_dimensions: "acceleration" }
552 },
553 (jaia.field).rest_api.presence = GUARANTEED
554 ];
555
556 message SubsurfaceCurrentVector
557 {
558 required double velocity = 1 [
559 (dccl.field) = {
560 min: 0
561 max: 10
562 precision: 1
563 units { derived_dimensions: "velocity" }
564 },
565 (jaia.field).rest_api.presence = GUARANTEED
566 ];
567
568 required double heading = 2 [
569 (dccl.field) = {
570 min: 0
571 max: 360
572 precision: 0
573 units {
574 derived_dimensions: "plane_angle"
575 system: "angle::degree"
576 }
577 },
578 (jaia.field).rest_api.presence = GUARANTEED
579 ];
580 }
581
582 optional SubsurfaceCurrentVector subsurface_current = 21
583 [(jaia.field).rest_api.presence = GUARANTEED];
584}
585
586message TaskPacket
587{
588 /*
589 Actual maximum size of message: 220 bytes / 1760 bits
590 dccl.id head..........................16
591 user head..............................0
592 body................................1744
593 padding to full byte...................0
594 Allowed maximum size of message: 250 bytes / 2000 bits
595 */
596 option (dccl.msg) = {
597 id: 0x5001
598 max_bytes: 250
599 codec_version: 4
600 unit_system: "si"
601 };
602
603 required uint32 bot_id = 1 [
604 (dccl.field) = { min: 0 max: 255 },
605 (jaia.field).rest_api.presence = GUARANTEED
606 ];
607 required uint64 start_time = 2 [
608 (dccl.field) = {
609 codec: "dccl.time2"
610 units { prefix: "micro" derived_dimensions: "time" }
611 },
612 (jaia.field).rest_api.presence = GUARANTEED
613 ];
614 required uint64 end_time = 3 [
615 (dccl.field) = {
616 codec: "dccl.time2"
617 units { prefix: "micro" derived_dimensions: "time" }
618 },
619 (jaia.field).rest_api.presence = GUARANTEED
620 ];
621 required MissionTask.TaskType type = 4
622 [(jaia.field).rest_api.presence = GUARANTEED];
623
624 // Special case: not sent in message - written upon receipt based on the
625 // Link traversed
626 optional Link link = 5 [(dccl.field).omit = true];
627
628 optional DivePacket dive = 10 [(jaia.field).rest_api.presence = GUARANTEED];
629 optional DriftPacket drift = 11
630 [(jaia.field).rest_api.presence = GUARANTEED];
631}
632
633message ContactUpdate
634{
635 option (dccl.msg) = {
636 id: 0x5002
637 max_bytes: 16
638 codec_version: 4
639 unit_system: "si"
640 };
641
642 optional int32 contact = 1 [(dccl.field) = { min: 1, max: 15 }];
643 required GeographicCoordinate location = 2;
644 optional double speed_over_ground = 3 [(dccl.field) = {
645 min: -5
646 max: 10
647 precision: 1
648 units { derived_dimensions: "velocity" }
649 }];
650 optional double heading_or_cog = 5 [(dccl.field) = {
651 min: 0
652 max: 360
653 precision: 0
654 units { derived_dimensions: "plane_angle" system: "angle::degree" }
655 }];
656}
657
658message Hub2HubData
659{
660 option (dccl.msg) = {
661 id: 0x5003
662 max_bytes: 1000
663 codec_version: 4
664 unit_system: "si"
665 };
666
667 required uint32 hub_id = 1 [(dccl.field) = { min: 0 max: 30 }];
668 required uint64 time = 2 [(dccl.field) = {
669 codec: "dccl.time"
670 units { prefix: "micro" derived_dimensions: "time" }
671 precision: -5 // deci-second precision
672 }];
673
674 oneof contents
675 {
676 BotStatus bot_status = 10;
677 TaskPacket task_packet = 11;
678 Command command_for_bot = 12;
679 }
680}