DCCL v3
ccl.proto
1 
2 import "dccl/ccl/protobuf/ccl_extensions.proto";
3 import "dccl/option_extensions.proto";
4 
5 package dccl.legacyccl.protobuf;
6 
7 // typedef struct
8 // {
9 // unsigned char mode;
10 // char spare[31];
11 // }
12 // MODEM_MSG_DATA_EMPTY;
13 
14 message CCLMDATEmpty
15 {
16  // prefix CCL IDs with 0x0CC1 to get out of normal 0x0000 prefix
17  option (dccl.msg).id = 0x0CC10006;
18  option (dccl.msg).max_bytes = 32;
19 
20  required bytes spare = 1 [(dccl.field).max_length=31];
21 }
22 
23 
24 // typedef struct
25 // {
26 // unsigned char mode;
27 // // MDAT_REDIRECT
28 // unsigned char message_number;
29 // LATLON_COMPRESSED lat;
30 // // Center of search area
31 // LATLON_COMPRESSED lon;
32 // // Center of search area
33 // char speed_depth_flags;
34 // unsigned short depth_goal_encoded_transit;
35 // char speed_encoded_transit;
36 // unsigned char device_cmd_transit;
37 // // Sidescan, DIDSON range.
38 // unsigned short depth_goal_encoded_survey;
39 // char speed_encoded_survey;
40 // unsigned char device_cmd_survey;
41 // // Sidescan, DIDSON range.
42 // unsigned char num_rows;
43 // // 0 if not rows.
44 // unsigned short row_length;
45 // // in meters
46 // unsigned char spacing_0;
47 // // in meters
48 // unsigned char spacing_1;
49 // // in meters
50 // char heading_encoded;
51 // LATLON_COMPRESSED lat_start;
52 // // ack only, where redirect started
53 // LATLON_COMPRESSED lon_start;
54 // char spare[3];
55 // }
56 // MODEM_MSG_DATA_REDIRECT;
57 message CCLMDATRedirect
58 {
59  option (dccl.msg).id = 0x0CC10007;
60  option (dccl.msg).max_bytes = 32;
61 
62  required uint32 message_number = 1 [(dccl.field).min=0,
63  (dccl.field).max=0xff];
64 
65  required double latitude = 2 [(dccl.field).codec="_ccl_latloncompressed",
66  (dccl.field).description="Center of search area: latitude in degrees"];
67 
68  required double longitude = 3 [(dccl.field).codec="_ccl_latloncompressed", (dccl.field).description="Center of search area: longitude in degrees"];
69 
70  // replaces speed_depth_flags field
71  enum VerticalMode
72  {
73  DEPTH = 0;
74  ALTITUDE = 1;
75  RESERVED_2 = 2;
76  RESERVED_3 = 3;
77  RESERVED_4 = 4;
78  RESERVED_5 = 5;
79  RESERVED_6 = 6;
80  RESERVED_7 = 7;
81  }
82  enum ThrustMode
83  {
84  RPM = 0;
85  METERS_PER_SECOND = 1;
86  }
87 
88  required VerticalMode transit_vertical_mode = 4;
89  required ThrustMode transit_thrust_mode = 5;
90  required VerticalMode survey_vertical_mode = 6;
91  required ThrustMode survey_thrust_mode = 7;
92 
93  required float depth_goal_transit = 8 [(dccl.field).codec="_ccl_depth",
94  (dccl.field).(ccl).bit_size=16];
95 
96  required float speed_transit = 9 [(dccl.field).codec="_ccl_speed",
97  (dccl.field).(ccl).thrust_mode_tag=5];
98 
99  required uint32 device_cmd_transit = 10 [(dccl.field).min=0,
100  (dccl.field).max=0xff];
101 
102  required float depth_goal_survey = 11 [(dccl.field).codec="_ccl_depth",
103  (dccl.field).(ccl).bit_size=16];
104 
105  required float speed_survey = 12 [(dccl.field).codec="_ccl_speed",
106  (dccl.field).(ccl).thrust_mode_tag=7];
107 
108  required uint32 device_cmd_survey = 13 [(dccl.field).min=0,
109  (dccl.field).max=0xff];
110 
111  required uint32 num_rows = 14 [(dccl.field).min=0,
112  (dccl.field).max=0xff];
113 
114  required uint32 row_length = 15 [(dccl.field).min=0,
115  (dccl.field).max=0xffff];
116 
117  required uint32 spacing_0 = 16 [(dccl.field).min=0,
118  (dccl.field).max=0xff];
119 
120  required uint32 spacing_1 = 17 [(dccl.field).min=0,
121  (dccl.field).max=0xff];
122 
123  required float heading = 18 [(dccl.field).codec="_ccl_heading",
124  (dccl.field).description="Heading in degrees"];
125 
126  required double lat_start = 19 [(dccl.field).codec="_ccl_latloncompressed"];
127  required double lon_start = 20 [(dccl.field).codec="_ccl_latloncompressed"];
128 
129  required bytes spare = 21 [(dccl.field).max_length=3];
130 
131 }
132 
133 
134 // typedef struct
135 // {
136 // unsigned char mode;
137 // unsigned char spare;
138 // unsigned short depth[3];
139 // unsigned short altitude[3];
140 // LATLON_COMPRESSED latitude[3];
141 // LATLON_COMPRESSED longitude[3];
142 // }
143 // MODEM_MSG_DATA_BATHY;
144 message CCLMDATBathy
145 {
146  option (dccl.msg).id = 0x0CC10009;
147  option (dccl.msg).max_bytes = 32;
148 
149  required bytes spare = 1 [(dccl.field).max_length=1];
150 
151  repeated float depth = 2 [(dccl.field).codec="_ccl_depth",
152  (dccl.field).(ccl).bit_size=16,
153  (dccl.field).max_repeat=3];
154 
155  repeated float altitude = 3 [(dccl.field).codec="_ccl_hires_altitude",
156  (dccl.field).max_repeat=3];
157 
158  repeated double latitude = 4 [(dccl.field).codec="_ccl_latloncompressed",
159  (dccl.field).max_repeat=3];
160 
161  repeated double longitude = 5 [(dccl.field).codec="_ccl_latloncompressed",
162  (dccl.field).max_repeat=3];
163 }
164 
165 
166 
167 
168 // typedef struct
169 // {
170 // unsigned char mode;
171 // // MDAT_CTD
172 // unsigned char spare;
173 // unsigned char salinity[2];
174 // unsigned char temperature[2];
175 // unsigned short depth[2];
176 // unsigned char sound_speed[2];
177 // LATLON_COMPRESSED latitude[2];
178 // LATLON_COMPRESSED longitude[2];
179 // char spare2[8];
180 // }
181 // MODEM_MSG_DATA_CTD;
182 
183 // untested, CCL spec does not give test case
184 message CCLMDATCTD
185 {
186  option (dccl.msg).id = 0x0CC1000A;
187  option (dccl.msg).max_bytes = 32;
188 
189  required bytes spare = 1 [(dccl.field).max_length=1];
190 
191  repeated float salinity = 2 [(dccl.field).codec="_ccl_salinity",
192  (dccl.field).max_repeat=2];
193 
194  repeated float temperature = 3 [(dccl.field).codec="_ccl_temperature",
195  (dccl.field).max_repeat=2];
196 
197  repeated float depth = 4 [(dccl.field).codec="_ccl_depth",
198  (dccl.field).(ccl).bit_size=16,
199  (dccl.field).max_repeat=2];
200 
201  repeated float sound_speed = 5 [(dccl.field).codec="_ccl_sound_speed",
202  (dccl.field).max_repeat=2];
203 
204 
205  repeated double latitude = 6 [(dccl.field).codec="_ccl_latloncompressed",
206  (dccl.field).max_repeat=2];
207 
208  repeated double longitude = 7 [(dccl.field).codec="_ccl_latloncompressed",
209  (dccl.field).max_repeat=2];
210 
211  required bytes spare2 = 8 [(dccl.field).max_length=8];
212 
213 }
214 
215 
216 // typedef struct
217 // {
218 // unsigned char mode;
219 // unsigned char spare;
220 // unsigned short command;
221 // char parameter[28];
222 // }
223 // MODEM_MSG_DATA_COMMAND;
224 message CCLMDATCommand
225 {
226  option (dccl.msg).id = 0x0CC1000B;
227  option (dccl.msg).max_bytes = 32;
228 
229  required bytes spare = 1 [(dccl.field).max_length=1];
230 
231  enum Command
232  {
233  RESERVED_0 = 0;
234  ABORT_TO_END_POSITION_OF_MISSION = 1;
235  ABORT_IMMEDIATELY = 2;
236  START_MISSION = 3;
237  RELEASE_DESCENT_WEIGHT = 4;
238  RELEASE_ASCENT_WEIGHT = 5;
239  RELEASE_PICKUP_FLOAT = 6;
240  ENABLE_MODEM_RANGER_PING = 7;
241  DISABLE_MODEM_RANGER_PING = 8;
242  OBSOLETE_9 = 9;
243  OBSOLETE_10 = 10;
244  OBSOLETE_11 = 11;
245  OBSOLETE_12 = 12;
246  OBSOLETE_13 = 13;
247  ACCEPT_NEXT_FIX = 14;
248  DUMP_REDIRECT_COMMANDS = 15;
249  GET_GPS_FIX = 16;
250  ABORT_TO_MISSION_START_LOCATION = 17;
251  ABORT_TO_DESTINATION = 18;
252  DUMP_REDIRECT_COMMANDS_EXCEPT_CURRENT = 19;
253  ABORT_DROP_ASCENT_WEIGHT_AND_POWER_TO_SURFACE = 20;
254  RESERVED_21 = 21;
255  RESERVED_22 = 22;
256  RESERVED_23 = 23;
257  RESERVED_24 = 24;
258  RESERVED_25 = 25;
259  RESERVED_26 = 26;
260  RESERVED_27 = 27;
261  RESERVED_28 = 28;
262  RESERVED_29 = 29;
263  RESERVED_30 = 30;
264  RESERVED_31 = 31;
265  }
266  required Command command = 2;
267 
268  // placeholder for the unenumerated commands
269  required uint32 reserved_command = 3 [(dccl.field).min=0,
270  (dccl.field).max=0x7ff];
271 
272  required bytes parameter = 4 [(dccl.field).max_length=28];
273 
274 }
275 
276 
277 // typedef struct
278 // {
279 // unsigned char mode;
280 // // MDAT_STATE
281 // LATLON_COMPRESSED latitude;
282 // // 3 bytes
283 // LATLON_COMPRESSED longitude;
284 // unsigned char fix_age
285 // TIME_DATE time_date;
286 // // 3 bytes;
287 // unsigned char heading;
288 // // 1.5 degree resolution
289 // unsigned short mission_mode_depth;
290 // //
291 // unsigned long faults;
292 // unsigned char faults_2;
293 // unsigned char mission_leg;
294 // char est_velocity;
295 // char objective_index;
296 // unsigned char watts_encoded;
297 // LATLON_COMPRESSED lat_goal;
298 // // 3 bytes
299 // LATLON_COMPRESSED lon_goal;
300 // // 3 bytes
301 // unsigned char battery_percent;
302 // unsigned short gfi_pitch_oil_encoded;
303 // // 5 bits gfi,6 bits pitch,
304 // // 5 bits oil
305 // }
306 // MODEM_MSG_DATA_STATE;
307 
308 message CCLMDATState
309 {
310  option (dccl.msg).id = 0x0CC1000E;
311  option (dccl.msg).max_bytes = 32;
312 
313  required double latitude = 1 [(dccl.field).codec="_ccl_latloncompressed",
314  (dccl.field).description="Latitude in degrees"];
315 
316  required double longitude = 2 [(dccl.field).codec="_ccl_latloncompressed",
317  (dccl.field).description="Longitude in degrees"];
318 
319  required uint32 fix_age = 3 [(dccl.field).codec="_ccl_fix_age",
320  (dccl.field).description="Fix age in seconds"];
321 
322  required uint64 time_date = 4 [(dccl.field).codec="_ccl_time_date",
323  (dccl.field).description="Microseconds since UNIX 1970/01/01 00:00:00 UTC"];
324  required float heading = 5 [(dccl.field).codec="_ccl_heading",
325  (dccl.field).description="Heading in degrees"];
326  required float depth = 6 [(dccl.field).codec="_ccl_depth",
327  (dccl.field).description="Depth in meters",
328  (dccl.field).(ccl).bit_size=13]; // 13 since MissionMode is stuck in the top three bits
329 
330 
331  enum MissionMode
332  {
333  MISSION_COMPLETED = 0;
334  MANUAL_MODE = 1;
335  TEST = 2;
336  FAULT = 3;
337  UNKNOWN_MODE_4 = 4;
338  REDIRECT_MISSION_IN_PROGRESS = 5;
339  NORMAL = 6;
340  UNKNOWN_MODE_7 = 7;
341  };
342 
343  required MissionMode mission_mode = 7;
344 
345  required bytes faults = 8 [(dccl.field).max_length=4];
346  required bytes faults_2 = 9 [(dccl.field).max_length=1];
347  required uint32 mission_leg = 10 [(dccl.field).max=0xff, (dccl.field).min=0];
348  required float est_velocity = 11 [(dccl.field).codec="_ccl_velocity",
349  (dccl.field).description="Velocity from ADCP or prop turns in m/s"];
350  required bytes objective_index = 12 [(dccl.field).max_length=1];
351  required float watts = 13 [(dccl.field).codec="_ccl_watts"];
352  required double lat_goal = 14 [(dccl.field).codec="_ccl_latloncompressed",
353  (dccl.field).description="Latitude goal in degrees"];
354  required double lon_goal = 15 [(dccl.field).codec="_ccl_latloncompressed",
355  (dccl.field).description="Longitude goal in degrees"];
356  required uint32 battery_percent = 16 [(dccl.field).max=0xff, (dccl.field).min=0];
357 
358  message GFIPitchOil
359  {
360  required float gfi = 1 [(dccl.field).description="Percentage ground fault (0-100)"];
361  required float pitch = 2 [(dccl.field).description="Pitch of the vehicle in degrees"];
362  required float oil = 3 [(dccl.field).description="Percentage of the available capacity remaining in the oil compensation system, or 0 if no such system"];
363  }
364  required GFIPitchOil gfi_pitch_oil = 17 [(dccl.field).codec="_ccl_gfi_pitch_oil"];
365 }
366 
367 // typedef struct
368 // {
369 // unsigned char mode;
370 // char message[31];
371 // }
372 // MODEM_MSG_ERROR_MSG;
373 message CCLMDATError
374 {
375  // prefix CCL IDs with 0x0CC1 to get out of normal 0x0000 prefix
376  option (dccl.msg).id = 0x0CC1000F;
377  option (dccl.msg).max_bytes = 32;
378 
379  required bytes message = 1 [(dccl.field).max_length=31];
380 }
381