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