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