JaiaBot  1.19.0
JaiaBot micro-AUV software
engineering.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 
3 import "dccl/option_extensions.proto";
4 import "jaiabot/messages/bounds.proto";
5 import "jaiabot/messages/echo.proto";
6 import "jaiabot/messages/mission.proto";
7 import "jaiabot/messages/link.proto";
8 
9 package jaiabot.protobuf;
10 
11 message PIDControl {
12  option (dccl.msg) = {
13  unit_system: "si"
14  };
15 
16  message PIDSettings
17  {
18  optional double target = 1 [(dccl.field) = {
19  min: -360
20  max: 360
21  precision: 0
22  units { derived_dimensions: "plane_angle" system: "angle::degree" }
23  }];
24  optional double Kp = 2
25  [(dccl.field) = { min: 0 max: 100 precision: 8 }];
26  optional double Ki = 3
27  [(dccl.field) = { min: 0 max: 100 precision: 8 }];
28  optional double Kd = 4
29  [(dccl.field) = { min: 0 max: 100 precision: 8 }];
30  }
31 
32  optional uint32 timeout = 3 [(dccl.field) = {
33  min: 0
34  max: 100
35  precision: 0
36  units { derived_dimensions: "time" }
37  }];
38 
39  optional double throttle = 4
40  [(dccl.field) = { min: -100 max: 100 precision: 0 }];
41 
42  optional PIDSettings speed = 5;
43 
44  optional double rudder = 6
45  [(dccl.field) = { min: -100 max: 100 precision: 0 }];
46 
47  optional PIDSettings heading = 7;
48 
49  optional double port_elevator = 8
50  [(dccl.field) = { min: -100 max: 100 precision: 0 }];
51 
52  optional double stbd_elevator = 9
53  [(dccl.field) = { min: -100 max: 100 precision: 0 }];
54 
55  optional PIDSettings roll = 10;
56 
57  optional PIDSettings pitch = 11;
58 
59  optional PIDSettings depth = 12;
60 
61  optional bool led_switch_on = 13;
62 
63  optional PIDSettings heading_constant = 14;
64 }
65 
66 enum BotStatusRate
67 {
68  BotStatusRate_2_Hz = 0;
69  BotStatusRate_1_Hz = 1;
70  BotStatusRate_2_SECONDS = 2;
71  BotStatusRate_5_SECONDS = 3;
72  BotStatusRate_10_SECONDS = 4;
73  BotStatusRate_20_SECONDS = 5;
74  BotStatusRate_40_SECONDS = 6;
75  BotStatusRate_60_SECONDS = 7;
76  BotStatusRate_NO_RF = 8;
77 }
78 
79 message GPSRequirements
80 {
81  option (dccl.msg) = {
82  unit_system: "si"
83  };
84 
85  optional double transit_hdop_req = 1 [(dccl.field) = { min: 1 max: 100 precision: 2 }];
86 
87  optional double transit_pdop_req = 2 [(dccl.field) = { min: 1 max: 100 precision: 2 }];
88 
89  optional double after_dive_hdop_req = 3 [(dccl.field) = { min: 1 max: 100 precision: 2 }];
90 
91  optional double after_dive_pdop_req = 4 [(dccl.field) = { min: 1 max: 100 precision: 2 }];
92 
93  optional uint32 transit_gps_fix_checks = 5 [(dccl.field) = { min: 1 max: 100 }];
94 
95  optional uint32 transit_gps_degraded_fix_checks = 6 [(dccl.field) = { min: 1 max: 100 }];
96 
97  optional uint32 after_dive_gps_fix_checks = 7 [(dccl.field) = { min: 1 max: 100 }];
98 }
99 
100 message RFDisableOptions
101 {
102  optional bool rf_disable = 1 [default = false];
103  optional int32 rf_disable_timeout_mins = 2 [default = 10, (dccl.field) = { min: 1 max: 255 }];
104 }
105 
106 message IMUCalibration
107 {
108  option (dccl.msg) = {
109  unit_system: "si"
110  };
111 
112  optional bool run_cal = 1 [default = false];
113 }
114 
115 message Echo
116 {
117  option (dccl.msg) = {
118  unit_system: "si"
119  };
120 
121  optional bool start_echo = 1 [default = false];
122  optional bool stop_echo = 2 [default = false];
123  optional EchoState echo_state = 3 [default = BOOTING];
124 }
125 
126 message Engineering
127 {
128  /*
129  Actual maximum size of message: 113 bytes / 904 bits
130  dccl.id head...........................8
131  user head..............................0
132  body.................................889
133  padding to full byte...................7
134  Allowed maximum size of message: 250 bytes / 2000 bits
135  */
136  option (dccl.msg) = {
137  id: 127
138  max_bytes: 250
139  codec_version: 4
140  unit_system: "si"
141  };
142 
143  required uint32 bot_id = 1 [(dccl.field) = { min: 0 max: 255 }];
144  optional uint64 time = 2 [(dccl.field) = {
145  codec: "dccl.time2"
146  units { prefix: "micro" derived_dimensions: "time" }
147  }];
148 
149  optional PIDControl pid_control = 3;
150 
151  optional bool query_engineering_status = 4 [default = false];
152 
153  optional bool query_bot_status = 5 [default = false];
154 
155  optional bool engineering_messages_enabled = 13;
156 
157  optional BotStatusRate bot_status_rate = 14 [default = BotStatusRate_1_Hz];
158 
159  optional GPSRequirements gps_requirements = 15;
160 
161  optional RFDisableOptions rf_disable_options = 16;
162 
163  optional BottomDepthSafetyParams bottom_depth_safety_params = 17;
164 
165  optional IMUCalibration imu_cal = 18;
166 
167  optional Echo echo = 19;
168 
169  // For User flagging of events
170  optional uint32 flag = 100 [(dccl.field) = { min: 0 max: 1024 }];
171 
172  // For calibration/configuration of Arduino motor/rudder bounds
173  optional Bounds bounds = 101;
174 
175  // Special case: not sent in message - written upon receipt based on the Link traversed
176  optional Link link = 200 [(dccl.field).omit = true];
177 
178 }