@blueyerobotics/protocol-definitions 3.4.0-8187f91a → 3.4.0-efe27311

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,9 @@
5
5
  // source: mission_planning.proto
6
6
  /* eslint-disable */
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
- import { LatLongPosition, MultibeamServo, TiltAngle } from "./message_formats.js";
8
+ import { Duration } from "./google/protobuf/duration.js";
9
+ import { Timestamp } from "./google/protobuf/timestamp.js";
10
+ import { Annotation, cameraFromJSON, cameraToJSON, guestPortDeviceIDFromJSON, guestPortDeviceIDToJSON, Laser, LatLongPosition, Lights, MultibeamConfig, MultibeamServo, storageLocationFromJSON, storageLocationToJSON, TiltAngle, TiltStabilizationState, } from "./message_formats.js";
9
11
  /**
10
12
  * Mission Planning Protocol.
11
13
  *
@@ -108,6 +110,8 @@ export var ControlModeHorizontal;
108
110
  ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_AUTO_HEADING"] = 2] = "CONTROL_MODE_HORIZONTAL_AUTO_HEADING";
109
111
  /** CONTROL_MODE_HORIZONTAL_STATION_KEEPING - Station keeping control mode. */
110
112
  ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_STATION_KEEPING"] = 3] = "CONTROL_MODE_HORIZONTAL_STATION_KEEPING";
113
+ /** CONTROL_MODE_HORIZONTAL_WEATHER_VANING - Weather vaning control mode (station keeping into the current). */
114
+ ControlModeHorizontal[ControlModeHorizontal["CONTROL_MODE_HORIZONTAL_WEATHER_VANING"] = 4] = "CONTROL_MODE_HORIZONTAL_WEATHER_VANING";
111
115
  ControlModeHorizontal[ControlModeHorizontal["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
112
116
  })(ControlModeHorizontal || (ControlModeHorizontal = {}));
113
117
  export function controlModeHorizontalFromJSON(object) {
@@ -124,6 +128,9 @@ export function controlModeHorizontalFromJSON(object) {
124
128
  case 3:
125
129
  case "CONTROL_MODE_HORIZONTAL_STATION_KEEPING":
126
130
  return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_STATION_KEEPING;
131
+ case 4:
132
+ case "CONTROL_MODE_HORIZONTAL_WEATHER_VANING":
133
+ return ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_WEATHER_VANING;
127
134
  case -1:
128
135
  case "UNRECOGNIZED":
129
136
  default:
@@ -140,11 +147,109 @@ export function controlModeHorizontalToJSON(object) {
140
147
  return "CONTROL_MODE_HORIZONTAL_AUTO_HEADING";
141
148
  case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_STATION_KEEPING:
142
149
  return "CONTROL_MODE_HORIZONTAL_STATION_KEEPING";
150
+ case ControlModeHorizontal.CONTROL_MODE_HORIZONTAL_WEATHER_VANING:
151
+ return "CONTROL_MODE_HORIZONTAL_WEATHER_VANING";
143
152
  case ControlModeHorizontal.UNRECOGNIZED:
144
153
  default:
145
154
  return "UNRECOGNIZED";
146
155
  }
147
156
  }
157
+ /** Which condition a Trigger carries. The values are the field numbers of the Trigger oneof. */
158
+ export var TriggerKind;
159
+ (function (TriggerKind) {
160
+ /** TRIGGER_KIND_UNSPECIFIED - No condition is set. */
161
+ TriggerKind[TriggerKind["TRIGGER_KIND_UNSPECIFIED"] = 0] = "TRIGGER_KIND_UNSPECIFIED";
162
+ /** TRIGGER_KIND_DETECTION - A DetectionTrigger. */
163
+ TriggerKind[TriggerKind["TRIGGER_KIND_DETECTION"] = 1] = "TRIGGER_KIND_DETECTION";
164
+ /** TRIGGER_KIND_DEPTH - A DepthTrigger. */
165
+ TriggerKind[TriggerKind["TRIGGER_KIND_DEPTH"] = 2] = "TRIGGER_KIND_DEPTH";
166
+ /** TRIGGER_KIND_ALTITUDE - An AltitudeTrigger. */
167
+ TriggerKind[TriggerKind["TRIGGER_KIND_ALTITUDE"] = 3] = "TRIGGER_KIND_ALTITUDE";
168
+ /** TRIGGER_KIND_LOCATION - A LocationTrigger. */
169
+ TriggerKind[TriggerKind["TRIGGER_KIND_LOCATION"] = 4] = "TRIGGER_KIND_LOCATION";
170
+ TriggerKind[TriggerKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
171
+ })(TriggerKind || (TriggerKind = {}));
172
+ export function triggerKindFromJSON(object) {
173
+ switch (object) {
174
+ case 0:
175
+ case "TRIGGER_KIND_UNSPECIFIED":
176
+ return TriggerKind.TRIGGER_KIND_UNSPECIFIED;
177
+ case 1:
178
+ case "TRIGGER_KIND_DETECTION":
179
+ return TriggerKind.TRIGGER_KIND_DETECTION;
180
+ case 2:
181
+ case "TRIGGER_KIND_DEPTH":
182
+ return TriggerKind.TRIGGER_KIND_DEPTH;
183
+ case 3:
184
+ case "TRIGGER_KIND_ALTITUDE":
185
+ return TriggerKind.TRIGGER_KIND_ALTITUDE;
186
+ case 4:
187
+ case "TRIGGER_KIND_LOCATION":
188
+ return TriggerKind.TRIGGER_KIND_LOCATION;
189
+ case -1:
190
+ case "UNRECOGNIZED":
191
+ default:
192
+ return TriggerKind.UNRECOGNIZED;
193
+ }
194
+ }
195
+ export function triggerKindToJSON(object) {
196
+ switch (object) {
197
+ case TriggerKind.TRIGGER_KIND_UNSPECIFIED:
198
+ return "TRIGGER_KIND_UNSPECIFIED";
199
+ case TriggerKind.TRIGGER_KIND_DETECTION:
200
+ return "TRIGGER_KIND_DETECTION";
201
+ case TriggerKind.TRIGGER_KIND_DEPTH:
202
+ return "TRIGGER_KIND_DEPTH";
203
+ case TriggerKind.TRIGGER_KIND_ALTITUDE:
204
+ return "TRIGGER_KIND_ALTITUDE";
205
+ case TriggerKind.TRIGGER_KIND_LOCATION:
206
+ return "TRIGGER_KIND_LOCATION";
207
+ case TriggerKind.UNRECOGNIZED:
208
+ default:
209
+ return "UNRECOGNIZED";
210
+ }
211
+ }
212
+ /** Which lights a LightsCommand applies to. */
213
+ export var LightTarget;
214
+ (function (LightTarget) {
215
+ /** LIGHT_TARGET_UNSPECIFIED - Unspecified, treated as the main lights. */
216
+ LightTarget[LightTarget["LIGHT_TARGET_UNSPECIFIED"] = 0] = "LIGHT_TARGET_UNSPECIFIED";
217
+ /** LIGHT_TARGET_MAIN - The drone's own lights. */
218
+ LightTarget[LightTarget["LIGHT_TARGET_MAIN"] = 1] = "LIGHT_TARGET_MAIN";
219
+ /** LIGHT_TARGET_GUESTPORT - Lights connected to a guest port. */
220
+ LightTarget[LightTarget["LIGHT_TARGET_GUESTPORT"] = 2] = "LIGHT_TARGET_GUESTPORT";
221
+ LightTarget[LightTarget["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
222
+ })(LightTarget || (LightTarget = {}));
223
+ export function lightTargetFromJSON(object) {
224
+ switch (object) {
225
+ case 0:
226
+ case "LIGHT_TARGET_UNSPECIFIED":
227
+ return LightTarget.LIGHT_TARGET_UNSPECIFIED;
228
+ case 1:
229
+ case "LIGHT_TARGET_MAIN":
230
+ return LightTarget.LIGHT_TARGET_MAIN;
231
+ case 2:
232
+ case "LIGHT_TARGET_GUESTPORT":
233
+ return LightTarget.LIGHT_TARGET_GUESTPORT;
234
+ case -1:
235
+ case "UNRECOGNIZED":
236
+ default:
237
+ return LightTarget.UNRECOGNIZED;
238
+ }
239
+ }
240
+ export function lightTargetToJSON(object) {
241
+ switch (object) {
242
+ case LightTarget.LIGHT_TARGET_UNSPECIFIED:
243
+ return "LIGHT_TARGET_UNSPECIFIED";
244
+ case LightTarget.LIGHT_TARGET_MAIN:
245
+ return "LIGHT_TARGET_MAIN";
246
+ case LightTarget.LIGHT_TARGET_GUESTPORT:
247
+ return "LIGHT_TARGET_GUESTPORT";
248
+ case LightTarget.UNRECOGNIZED:
249
+ default:
250
+ return "UNRECOGNIZED";
251
+ }
252
+ }
148
253
  /** List of available camera actions. */
149
254
  export var CameraAction;
150
255
  (function (CameraAction) {
@@ -245,6 +350,30 @@ export var InstructionType;
245
350
  InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_HOME"] = 12] = "INSTRUCTION_TYPE_GO_TO_HOME";
246
351
  /** INSTRUCTION_TYPE_SURVEY - Execute a survey pattern over a polygon area. */
247
352
  InstructionType[InstructionType["INSTRUCTION_TYPE_SURVEY"] = 13] = "INSTRUCTION_TYPE_SURVEY";
353
+ /** INSTRUCTION_TYPE_RECORD_MULTIBEAM - Start or stop multibeam recording. */
354
+ InstructionType[InstructionType["INSTRUCTION_TYPE_RECORD_MULTIBEAM"] = 14] = "INSTRUCTION_TYPE_RECORD_MULTIBEAM";
355
+ /** INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM - Start or stop the multibeam driver. */
356
+ InstructionType[InstructionType["INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM"] = 15] = "INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM";
357
+ /** INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG - Change the multibeam configuration. */
358
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG"] = 16] = "INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG";
359
+ /** INSTRUCTION_TYPE_SET_LIGHTS - Set the lights. */
360
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_LIGHTS"] = 17] = "INSTRUCTION_TYPE_SET_LIGHTS";
361
+ /** INSTRUCTION_TYPE_SET_LASER - Set the laser. */
362
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_LASER"] = 18] = "INSTRUCTION_TYPE_SET_LASER";
363
+ /** INSTRUCTION_TYPE_SET_TILT_STABILIZATION - Enable or disable tilt stabilization. */
364
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_TILT_STABILIZATION"] = 19] = "INSTRUCTION_TYPE_SET_TILT_STABILIZATION";
365
+ /** INSTRUCTION_TYPE_SET_CV_MODEL - Start or stop a computer vision model. */
366
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_CV_MODEL"] = 20] = "INSTRUCTION_TYPE_SET_CV_MODEL";
367
+ /** INSTRUCTION_TYPE_ANNOTATION - Record an annotation. */
368
+ InstructionType[InstructionType["INSTRUCTION_TYPE_ANNOTATION"] = 21] = "INSTRUCTION_TYPE_ANNOTATION";
369
+ /** INSTRUCTION_TYPE_GO_TO_HEADING - Turn to a heading. */
370
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_HEADING"] = 22] = "INSTRUCTION_TYPE_GO_TO_HEADING";
371
+ /** INSTRUCTION_TYPE_TRANSECT - Drive a straight line. */
372
+ InstructionType[InstructionType["INSTRUCTION_TYPE_TRANSECT"] = 23] = "INSTRUCTION_TYPE_TRANSECT";
373
+ /** INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH - Change the depth by an amount. */
374
+ InstructionType[InstructionType["INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH"] = 24] = "INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH";
375
+ /** INSTRUCTION_TYPE_SET_CRUISE_SPEED - Change the cruise speed. */
376
+ InstructionType[InstructionType["INSTRUCTION_TYPE_SET_CRUISE_SPEED"] = 25] = "INSTRUCTION_TYPE_SET_CRUISE_SPEED";
248
377
  InstructionType[InstructionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
249
378
  })(InstructionType || (InstructionType = {}));
250
379
  export function instructionTypeFromJSON(object) {
@@ -291,6 +420,42 @@ export function instructionTypeFromJSON(object) {
291
420
  case 13:
292
421
  case "INSTRUCTION_TYPE_SURVEY":
293
422
  return InstructionType.INSTRUCTION_TYPE_SURVEY;
423
+ case 14:
424
+ case "INSTRUCTION_TYPE_RECORD_MULTIBEAM":
425
+ return InstructionType.INSTRUCTION_TYPE_RECORD_MULTIBEAM;
426
+ case 15:
427
+ case "INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM":
428
+ return InstructionType.INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM;
429
+ case 16:
430
+ case "INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG":
431
+ return InstructionType.INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG;
432
+ case 17:
433
+ case "INSTRUCTION_TYPE_SET_LIGHTS":
434
+ return InstructionType.INSTRUCTION_TYPE_SET_LIGHTS;
435
+ case 18:
436
+ case "INSTRUCTION_TYPE_SET_LASER":
437
+ return InstructionType.INSTRUCTION_TYPE_SET_LASER;
438
+ case 19:
439
+ case "INSTRUCTION_TYPE_SET_TILT_STABILIZATION":
440
+ return InstructionType.INSTRUCTION_TYPE_SET_TILT_STABILIZATION;
441
+ case 20:
442
+ case "INSTRUCTION_TYPE_SET_CV_MODEL":
443
+ return InstructionType.INSTRUCTION_TYPE_SET_CV_MODEL;
444
+ case 21:
445
+ case "INSTRUCTION_TYPE_ANNOTATION":
446
+ return InstructionType.INSTRUCTION_TYPE_ANNOTATION;
447
+ case 22:
448
+ case "INSTRUCTION_TYPE_GO_TO_HEADING":
449
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_HEADING;
450
+ case 23:
451
+ case "INSTRUCTION_TYPE_TRANSECT":
452
+ return InstructionType.INSTRUCTION_TYPE_TRANSECT;
453
+ case 24:
454
+ case "INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH":
455
+ return InstructionType.INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH;
456
+ case 25:
457
+ case "INSTRUCTION_TYPE_SET_CRUISE_SPEED":
458
+ return InstructionType.INSTRUCTION_TYPE_SET_CRUISE_SPEED;
294
459
  case -1:
295
460
  case "UNRECOGNIZED":
296
461
  default:
@@ -327,6 +492,30 @@ export function instructionTypeToJSON(object) {
327
492
  return "INSTRUCTION_TYPE_GO_TO_HOME";
328
493
  case InstructionType.INSTRUCTION_TYPE_SURVEY:
329
494
  return "INSTRUCTION_TYPE_SURVEY";
495
+ case InstructionType.INSTRUCTION_TYPE_RECORD_MULTIBEAM:
496
+ return "INSTRUCTION_TYPE_RECORD_MULTIBEAM";
497
+ case InstructionType.INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM:
498
+ return "INSTRUCTION_TYPE_ACTIVATE_MULTIBEAM";
499
+ case InstructionType.INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG:
500
+ return "INSTRUCTION_TYPE_SET_MULTIBEAM_CONFIG";
501
+ case InstructionType.INSTRUCTION_TYPE_SET_LIGHTS:
502
+ return "INSTRUCTION_TYPE_SET_LIGHTS";
503
+ case InstructionType.INSTRUCTION_TYPE_SET_LASER:
504
+ return "INSTRUCTION_TYPE_SET_LASER";
505
+ case InstructionType.INSTRUCTION_TYPE_SET_TILT_STABILIZATION:
506
+ return "INSTRUCTION_TYPE_SET_TILT_STABILIZATION";
507
+ case InstructionType.INSTRUCTION_TYPE_SET_CV_MODEL:
508
+ return "INSTRUCTION_TYPE_SET_CV_MODEL";
509
+ case InstructionType.INSTRUCTION_TYPE_ANNOTATION:
510
+ return "INSTRUCTION_TYPE_ANNOTATION";
511
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_HEADING:
512
+ return "INSTRUCTION_TYPE_GO_TO_HEADING";
513
+ case InstructionType.INSTRUCTION_TYPE_TRANSECT:
514
+ return "INSTRUCTION_TYPE_TRANSECT";
515
+ case InstructionType.INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH:
516
+ return "INSTRUCTION_TYPE_GO_TO_RELATIVE_DEPTH";
517
+ case InstructionType.INSTRUCTION_TYPE_SET_CRUISE_SPEED:
518
+ return "INSTRUCTION_TYPE_SET_CRUISE_SPEED";
330
519
  case InstructionType.UNRECOGNIZED:
331
520
  default:
332
521
  return "UNRECOGNIZED";
@@ -415,6 +604,267 @@ export function missionStateToJSON(object) {
415
604
  return "UNRECOGNIZED";
416
605
  }
417
606
  }
607
+ /** How a mission run ended. */
608
+ export var MissionResult;
609
+ (function (MissionResult) {
610
+ /** MISSION_RESULT_UNSPECIFIED - No mission has ended since the drone started. */
611
+ MissionResult[MissionResult["MISSION_RESULT_UNSPECIFIED"] = 0] = "MISSION_RESULT_UNSPECIFIED";
612
+ /**
613
+ * MISSION_RESULT_COMPLETED - The run reached the end of the mission. Instructions can have been skipped on the way, for a device
614
+ * that is not connected: see MissionOutcome.skipped_instruction_ids.
615
+ */
616
+ MissionResult[MissionResult["MISSION_RESULT_COMPLETED"] = 1] = "MISSION_RESULT_COMPLETED";
617
+ /** MISSION_RESULT_ABORTED - The drone stopped the mission, see MissionOutcome.abort_reason. */
618
+ MissionResult[MissionResult["MISSION_RESULT_ABORTED"] = 2] = "MISSION_RESULT_ABORTED";
619
+ /** MISSION_RESULT_CANCELLED - A client cleared or replaced the mission while it was running or paused. */
620
+ MissionResult[MissionResult["MISSION_RESULT_CANCELLED"] = 3] = "MISSION_RESULT_CANCELLED";
621
+ MissionResult[MissionResult["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
622
+ })(MissionResult || (MissionResult = {}));
623
+ export function missionResultFromJSON(object) {
624
+ switch (object) {
625
+ case 0:
626
+ case "MISSION_RESULT_UNSPECIFIED":
627
+ return MissionResult.MISSION_RESULT_UNSPECIFIED;
628
+ case 1:
629
+ case "MISSION_RESULT_COMPLETED":
630
+ return MissionResult.MISSION_RESULT_COMPLETED;
631
+ case 2:
632
+ case "MISSION_RESULT_ABORTED":
633
+ return MissionResult.MISSION_RESULT_ABORTED;
634
+ case 3:
635
+ case "MISSION_RESULT_CANCELLED":
636
+ return MissionResult.MISSION_RESULT_CANCELLED;
637
+ case -1:
638
+ case "UNRECOGNIZED":
639
+ default:
640
+ return MissionResult.UNRECOGNIZED;
641
+ }
642
+ }
643
+ export function missionResultToJSON(object) {
644
+ switch (object) {
645
+ case MissionResult.MISSION_RESULT_UNSPECIFIED:
646
+ return "MISSION_RESULT_UNSPECIFIED";
647
+ case MissionResult.MISSION_RESULT_COMPLETED:
648
+ return "MISSION_RESULT_COMPLETED";
649
+ case MissionResult.MISSION_RESULT_ABORTED:
650
+ return "MISSION_RESULT_ABORTED";
651
+ case MissionResult.MISSION_RESULT_CANCELLED:
652
+ return "MISSION_RESULT_CANCELLED";
653
+ case MissionResult.UNRECOGNIZED:
654
+ default:
655
+ return "UNRECOGNIZED";
656
+ }
657
+ }
658
+ /** Why the drone aborted a mission. A client that does not know a value treats it as unspecified. */
659
+ export var MissionAbortReason;
660
+ (function (MissionAbortReason) {
661
+ /** MISSION_ABORT_REASON_UNSPECIFIED - Unspecified, see MissionOutcome.reason. */
662
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_UNSPECIFIED"] = 0] = "MISSION_ABORT_REASON_UNSPECIFIED";
663
+ /** MISSION_ABORT_REASON_CONTROL_MODE_LOST - A control mode the instruction needs was refused or lost. */
664
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_CONTROL_MODE_LOST"] = 1] = "MISSION_ABORT_REASON_CONTROL_MODE_LOST";
665
+ /** MISSION_ABORT_REASON_POSITION_UNKNOWN - The instruction needs the drone's position, which is unknown. */
666
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_POSITION_UNKNOWN"] = 2] = "MISSION_ABORT_REASON_POSITION_UNKNOWN";
667
+ /** MISSION_ABORT_REASON_STUCK - The drone stopped making progress towards its target. */
668
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_STUCK"] = 3] = "MISSION_ABORT_REASON_STUCK";
669
+ /** MISSION_ABORT_REASON_WAYPOINT_TOO_FAR - A waypoint is farther away than the drone goes. */
670
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_WAYPOINT_TOO_FAR"] = 4] = "MISSION_ABORT_REASON_WAYPOINT_TOO_FAR";
671
+ /** MISSION_ABORT_REASON_HEADING_UNKNOWN - A turn needs the drone's heading, which is unknown. */
672
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_HEADING_UNKNOWN"] = 5] = "MISSION_ABORT_REASON_HEADING_UNKNOWN";
673
+ /** MISSION_ABORT_REASON_HEADING_NOT_REACHED - A turn did not reach its heading in time. */
674
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_HEADING_NOT_REACHED"] = 6] = "MISSION_ABORT_REASON_HEADING_NOT_REACHED";
675
+ /** MISSION_ABORT_REASON_DEVICE_TIMEOUT - A camera, multibeam or other device did not confirm a command in time. */
676
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_DEVICE_TIMEOUT"] = 7] = "MISSION_ABORT_REASON_DEVICE_TIMEOUT";
677
+ /** MISSION_ABORT_REASON_DURATION_TOO_LONG - The time left to complete the mission grew past the limit. */
678
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_DURATION_TOO_LONG"] = 8] = "MISSION_ABORT_REASON_DURATION_TOO_LONG";
679
+ /**
680
+ * MISSION_ABORT_REASON_SUPERVISOR - The drone's supervisor stopped the mission: the pilot took control, the controlling client stopped
681
+ * answering, or the drone lost its position or attitude.
682
+ */
683
+ MissionAbortReason[MissionAbortReason["MISSION_ABORT_REASON_SUPERVISOR"] = 9] = "MISSION_ABORT_REASON_SUPERVISOR";
684
+ MissionAbortReason[MissionAbortReason["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
685
+ })(MissionAbortReason || (MissionAbortReason = {}));
686
+ export function missionAbortReasonFromJSON(object) {
687
+ switch (object) {
688
+ case 0:
689
+ case "MISSION_ABORT_REASON_UNSPECIFIED":
690
+ return MissionAbortReason.MISSION_ABORT_REASON_UNSPECIFIED;
691
+ case 1:
692
+ case "MISSION_ABORT_REASON_CONTROL_MODE_LOST":
693
+ return MissionAbortReason.MISSION_ABORT_REASON_CONTROL_MODE_LOST;
694
+ case 2:
695
+ case "MISSION_ABORT_REASON_POSITION_UNKNOWN":
696
+ return MissionAbortReason.MISSION_ABORT_REASON_POSITION_UNKNOWN;
697
+ case 3:
698
+ case "MISSION_ABORT_REASON_STUCK":
699
+ return MissionAbortReason.MISSION_ABORT_REASON_STUCK;
700
+ case 4:
701
+ case "MISSION_ABORT_REASON_WAYPOINT_TOO_FAR":
702
+ return MissionAbortReason.MISSION_ABORT_REASON_WAYPOINT_TOO_FAR;
703
+ case 5:
704
+ case "MISSION_ABORT_REASON_HEADING_UNKNOWN":
705
+ return MissionAbortReason.MISSION_ABORT_REASON_HEADING_UNKNOWN;
706
+ case 6:
707
+ case "MISSION_ABORT_REASON_HEADING_NOT_REACHED":
708
+ return MissionAbortReason.MISSION_ABORT_REASON_HEADING_NOT_REACHED;
709
+ case 7:
710
+ case "MISSION_ABORT_REASON_DEVICE_TIMEOUT":
711
+ return MissionAbortReason.MISSION_ABORT_REASON_DEVICE_TIMEOUT;
712
+ case 8:
713
+ case "MISSION_ABORT_REASON_DURATION_TOO_LONG":
714
+ return MissionAbortReason.MISSION_ABORT_REASON_DURATION_TOO_LONG;
715
+ case 9:
716
+ case "MISSION_ABORT_REASON_SUPERVISOR":
717
+ return MissionAbortReason.MISSION_ABORT_REASON_SUPERVISOR;
718
+ case -1:
719
+ case "UNRECOGNIZED":
720
+ default:
721
+ return MissionAbortReason.UNRECOGNIZED;
722
+ }
723
+ }
724
+ export function missionAbortReasonToJSON(object) {
725
+ switch (object) {
726
+ case MissionAbortReason.MISSION_ABORT_REASON_UNSPECIFIED:
727
+ return "MISSION_ABORT_REASON_UNSPECIFIED";
728
+ case MissionAbortReason.MISSION_ABORT_REASON_CONTROL_MODE_LOST:
729
+ return "MISSION_ABORT_REASON_CONTROL_MODE_LOST";
730
+ case MissionAbortReason.MISSION_ABORT_REASON_POSITION_UNKNOWN:
731
+ return "MISSION_ABORT_REASON_POSITION_UNKNOWN";
732
+ case MissionAbortReason.MISSION_ABORT_REASON_STUCK:
733
+ return "MISSION_ABORT_REASON_STUCK";
734
+ case MissionAbortReason.MISSION_ABORT_REASON_WAYPOINT_TOO_FAR:
735
+ return "MISSION_ABORT_REASON_WAYPOINT_TOO_FAR";
736
+ case MissionAbortReason.MISSION_ABORT_REASON_HEADING_UNKNOWN:
737
+ return "MISSION_ABORT_REASON_HEADING_UNKNOWN";
738
+ case MissionAbortReason.MISSION_ABORT_REASON_HEADING_NOT_REACHED:
739
+ return "MISSION_ABORT_REASON_HEADING_NOT_REACHED";
740
+ case MissionAbortReason.MISSION_ABORT_REASON_DEVICE_TIMEOUT:
741
+ return "MISSION_ABORT_REASON_DEVICE_TIMEOUT";
742
+ case MissionAbortReason.MISSION_ABORT_REASON_DURATION_TOO_LONG:
743
+ return "MISSION_ABORT_REASON_DURATION_TOO_LONG";
744
+ case MissionAbortReason.MISSION_ABORT_REASON_SUPERVISOR:
745
+ return "MISSION_ABORT_REASON_SUPERVISOR";
746
+ case MissionAbortReason.UNRECOGNIZED:
747
+ default:
748
+ return "UNRECOGNIZED";
749
+ }
750
+ }
751
+ /** Outcome of an instruction started with RunInstructionCtrl. */
752
+ export var InstructionResultState;
753
+ (function (InstructionResultState) {
754
+ /** INSTRUCTION_RESULT_STATE_UNSPECIFIED - Unspecified. */
755
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_UNSPECIFIED"] = 0] = "INSTRUCTION_RESULT_STATE_UNSPECIFIED";
756
+ /** INSTRUCTION_RESULT_STATE_ACCEPTED - The instruction was accepted and has started. */
757
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_ACCEPTED"] = 1] = "INSTRUCTION_RESULT_STATE_ACCEPTED";
758
+ /** INSTRUCTION_RESULT_STATE_REJECTED - The instruction was not started, see reason. */
759
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_REJECTED"] = 2] = "INSTRUCTION_RESULT_STATE_REJECTED";
760
+ /** INSTRUCTION_RESULT_STATE_COMPLETED - The instruction completed. */
761
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_COMPLETED"] = 3] = "INSTRUCTION_RESULT_STATE_COMPLETED";
762
+ /** INSTRUCTION_RESULT_STATE_FAILED - The instruction stopped before completing, see reason. */
763
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_FAILED"] = 4] = "INSTRUCTION_RESULT_STATE_FAILED";
764
+ /** INSTRUCTION_RESULT_STATE_CANCELLED - The instruction was cancelled by a client or by the drone. */
765
+ InstructionResultState[InstructionResultState["INSTRUCTION_RESULT_STATE_CANCELLED"] = 5] = "INSTRUCTION_RESULT_STATE_CANCELLED";
766
+ InstructionResultState[InstructionResultState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
767
+ })(InstructionResultState || (InstructionResultState = {}));
768
+ export function instructionResultStateFromJSON(object) {
769
+ switch (object) {
770
+ case 0:
771
+ case "INSTRUCTION_RESULT_STATE_UNSPECIFIED":
772
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_UNSPECIFIED;
773
+ case 1:
774
+ case "INSTRUCTION_RESULT_STATE_ACCEPTED":
775
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_ACCEPTED;
776
+ case 2:
777
+ case "INSTRUCTION_RESULT_STATE_REJECTED":
778
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_REJECTED;
779
+ case 3:
780
+ case "INSTRUCTION_RESULT_STATE_COMPLETED":
781
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_COMPLETED;
782
+ case 4:
783
+ case "INSTRUCTION_RESULT_STATE_FAILED":
784
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_FAILED;
785
+ case 5:
786
+ case "INSTRUCTION_RESULT_STATE_CANCELLED":
787
+ return InstructionResultState.INSTRUCTION_RESULT_STATE_CANCELLED;
788
+ case -1:
789
+ case "UNRECOGNIZED":
790
+ default:
791
+ return InstructionResultState.UNRECOGNIZED;
792
+ }
793
+ }
794
+ export function instructionResultStateToJSON(object) {
795
+ switch (object) {
796
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_UNSPECIFIED:
797
+ return "INSTRUCTION_RESULT_STATE_UNSPECIFIED";
798
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_ACCEPTED:
799
+ return "INSTRUCTION_RESULT_STATE_ACCEPTED";
800
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_REJECTED:
801
+ return "INSTRUCTION_RESULT_STATE_REJECTED";
802
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_COMPLETED:
803
+ return "INSTRUCTION_RESULT_STATE_COMPLETED";
804
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_FAILED:
805
+ return "INSTRUCTION_RESULT_STATE_FAILED";
806
+ case InstructionResultState.INSTRUCTION_RESULT_STATE_CANCELLED:
807
+ return "INSTRUCTION_RESULT_STATE_CANCELLED";
808
+ case InstructionResultState.UNRECOGNIZED:
809
+ default:
810
+ return "UNRECOGNIZED";
811
+ }
812
+ }
813
+ /** MissionRuleState is where a rule is in its episode. */
814
+ export var MissionRuleState;
815
+ (function (MissionRuleState) {
816
+ /** MISSION_RULE_STATE_UNSPECIFIED - Unspecified. */
817
+ MissionRuleState[MissionRuleState["MISSION_RULE_STATE_UNSPECIFIED"] = 0] = "MISSION_RULE_STATE_UNSPECIFIED";
818
+ /** MISSION_RULE_STATE_IDLE - Waiting for the trigger. */
819
+ MissionRuleState[MissionRuleState["MISSION_RULE_STATE_IDLE"] = 1] = "MISSION_RULE_STATE_IDLE";
820
+ /** MISSION_RULE_STATE_ACTIVE - The rule has fired and has not released yet. */
821
+ MissionRuleState[MissionRuleState["MISSION_RULE_STATE_ACTIVE"] = 2] = "MISSION_RULE_STATE_ACTIVE";
822
+ /** MISSION_RULE_STATE_COOLDOWN - Released; waiting for the cooldown before it can fire again. */
823
+ MissionRuleState[MissionRuleState["MISSION_RULE_STATE_COOLDOWN"] = 3] = "MISSION_RULE_STATE_COOLDOWN";
824
+ /** MISSION_RULE_STATE_DISABLED - The rule is disabled. */
825
+ MissionRuleState[MissionRuleState["MISSION_RULE_STATE_DISABLED"] = 4] = "MISSION_RULE_STATE_DISABLED";
826
+ MissionRuleState[MissionRuleState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
827
+ })(MissionRuleState || (MissionRuleState = {}));
828
+ export function missionRuleStateFromJSON(object) {
829
+ switch (object) {
830
+ case 0:
831
+ case "MISSION_RULE_STATE_UNSPECIFIED":
832
+ return MissionRuleState.MISSION_RULE_STATE_UNSPECIFIED;
833
+ case 1:
834
+ case "MISSION_RULE_STATE_IDLE":
835
+ return MissionRuleState.MISSION_RULE_STATE_IDLE;
836
+ case 2:
837
+ case "MISSION_RULE_STATE_ACTIVE":
838
+ return MissionRuleState.MISSION_RULE_STATE_ACTIVE;
839
+ case 3:
840
+ case "MISSION_RULE_STATE_COOLDOWN":
841
+ return MissionRuleState.MISSION_RULE_STATE_COOLDOWN;
842
+ case 4:
843
+ case "MISSION_RULE_STATE_DISABLED":
844
+ return MissionRuleState.MISSION_RULE_STATE_DISABLED;
845
+ case -1:
846
+ case "UNRECOGNIZED":
847
+ default:
848
+ return MissionRuleState.UNRECOGNIZED;
849
+ }
850
+ }
851
+ export function missionRuleStateToJSON(object) {
852
+ switch (object) {
853
+ case MissionRuleState.MISSION_RULE_STATE_UNSPECIFIED:
854
+ return "MISSION_RULE_STATE_UNSPECIFIED";
855
+ case MissionRuleState.MISSION_RULE_STATE_IDLE:
856
+ return "MISSION_RULE_STATE_IDLE";
857
+ case MissionRuleState.MISSION_RULE_STATE_ACTIVE:
858
+ return "MISSION_RULE_STATE_ACTIVE";
859
+ case MissionRuleState.MISSION_RULE_STATE_COOLDOWN:
860
+ return "MISSION_RULE_STATE_COOLDOWN";
861
+ case MissionRuleState.MISSION_RULE_STATE_DISABLED:
862
+ return "MISSION_RULE_STATE_DISABLED";
863
+ case MissionRuleState.UNRECOGNIZED:
864
+ default:
865
+ return "UNRECOGNIZED";
866
+ }
867
+ }
418
868
  function createBaseMission() {
419
869
  return {
420
870
  id: 0,
@@ -426,6 +876,9 @@ function createBaseMission() {
426
876
  defaultSurgeSpeed: 0,
427
877
  defaultHeaveSpeed: 0,
428
878
  defaultCircleOfAcceptance: 0,
879
+ revision: 0,
880
+ uuid: "",
881
+ loadId: 0,
429
882
  };
430
883
  }
431
884
  export const Mission = {
@@ -457,6 +910,15 @@ export const Mission = {
457
910
  if (message.defaultCircleOfAcceptance !== 0) {
458
911
  writer.uint32(77).float(message.defaultCircleOfAcceptance);
459
912
  }
913
+ if (message.revision !== 0) {
914
+ writer.uint32(80).uint32(message.revision);
915
+ }
916
+ if (message.uuid !== "") {
917
+ writer.uint32(90).string(message.uuid);
918
+ }
919
+ if (message.loadId !== 0) {
920
+ writer.uint32(96).uint64(message.loadId);
921
+ }
460
922
  return writer;
461
923
  },
462
924
  decode(input, length) {
@@ -529,6 +991,27 @@ export const Mission = {
529
991
  message.defaultCircleOfAcceptance = reader.float();
530
992
  continue;
531
993
  }
994
+ case 10: {
995
+ if (tag !== 80) {
996
+ break;
997
+ }
998
+ message.revision = reader.uint32();
999
+ continue;
1000
+ }
1001
+ case 11: {
1002
+ if (tag !== 90) {
1003
+ break;
1004
+ }
1005
+ message.uuid = reader.string();
1006
+ continue;
1007
+ }
1008
+ case 12: {
1009
+ if (tag !== 96) {
1010
+ break;
1011
+ }
1012
+ message.loadId = longToNumber(reader.uint64());
1013
+ continue;
1014
+ }
532
1015
  }
533
1016
  if ((tag & 7) === 4 || tag === 0) {
534
1017
  break;
@@ -554,6 +1037,9 @@ export const Mission = {
554
1037
  defaultCircleOfAcceptance: isSet(object.defaultCircleOfAcceptance)
555
1038
  ? gt.Number(object.defaultCircleOfAcceptance)
556
1039
  : 0,
1040
+ revision: isSet(object.revision) ? gt.Number(object.revision) : 0,
1041
+ uuid: isSet(object.uuid) ? gt.String(object.uuid) : "",
1042
+ loadId: isSet(object.loadId) ? gt.Number(object.loadId) : 0,
557
1043
  };
558
1044
  },
559
1045
  toJSON(message) {
@@ -585,6 +1071,15 @@ export const Mission = {
585
1071
  if (message.defaultCircleOfAcceptance !== 0) {
586
1072
  obj.defaultCircleOfAcceptance = message.defaultCircleOfAcceptance;
587
1073
  }
1074
+ if (message.revision !== 0) {
1075
+ obj.revision = Math.round(message.revision);
1076
+ }
1077
+ if (message.uuid !== "") {
1078
+ obj.uuid = message.uuid;
1079
+ }
1080
+ if (message.loadId !== 0) {
1081
+ obj.loadId = Math.round(message.loadId);
1082
+ }
588
1083
  return obj;
589
1084
  },
590
1085
  create(base) {
@@ -601,6 +1096,9 @@ export const Mission = {
601
1096
  message.defaultSurgeSpeed = object.defaultSurgeSpeed ?? 0;
602
1097
  message.defaultHeaveSpeed = object.defaultHeaveSpeed ?? 0;
603
1098
  message.defaultCircleOfAcceptance = object.defaultCircleOfAcceptance ?? 0;
1099
+ message.revision = object.revision ?? 0;
1100
+ message.uuid = object.uuid ?? "";
1101
+ message.loadId = object.loadId ?? 0;
604
1102
  return message;
605
1103
  },
606
1104
  };
@@ -608,7 +1106,7 @@ function createBaseInstruction() {
608
1106
  return {
609
1107
  id: 0,
610
1108
  groupId: 0,
611
- autoContinue: false,
1109
+ pauseOnCompletion: false,
612
1110
  waypointCommand: undefined,
613
1111
  depthSetPointCommand: undefined,
614
1112
  cameraCommand: undefined,
@@ -620,6 +1118,18 @@ function createBaseInstruction() {
620
1118
  goToSeabedCommand: undefined,
621
1119
  goToHomeCommand: undefined,
622
1120
  surveyCommand: undefined,
1121
+ recordMultibeamCommand: undefined,
1122
+ activateMultibeamCommand: undefined,
1123
+ multibeamConfigCommand: undefined,
1124
+ lightsCommand: undefined,
1125
+ laserCommand: undefined,
1126
+ tiltStabilizationCommand: undefined,
1127
+ cvModelStateCommand: undefined,
1128
+ annotationCommand: undefined,
1129
+ headingCommand: undefined,
1130
+ transectCommand: undefined,
1131
+ relativeDepthCommand: undefined,
1132
+ cruiseSpeedCommand: undefined,
623
1133
  };
624
1134
  }
625
1135
  export const Instruction = {
@@ -630,8 +1140,8 @@ export const Instruction = {
630
1140
  if (message.groupId !== 0) {
631
1141
  writer.uint32(16).uint32(message.groupId);
632
1142
  }
633
- if (message.autoContinue !== false) {
634
- writer.uint32(24).bool(message.autoContinue);
1143
+ if (message.pauseOnCompletion !== false) {
1144
+ writer.uint32(216).bool(message.pauseOnCompletion);
635
1145
  }
636
1146
  if (message.waypointCommand !== undefined) {
637
1147
  WaypointCommand.encode(message.waypointCommand, writer.uint32(34).fork()).join();
@@ -666,6 +1176,42 @@ export const Instruction = {
666
1176
  if (message.surveyCommand !== undefined) {
667
1177
  SurveyCommand.encode(message.surveyCommand, writer.uint32(114).fork()).join();
668
1178
  }
1179
+ if (message.recordMultibeamCommand !== undefined) {
1180
+ RecordMultibeamCommand.encode(message.recordMultibeamCommand, writer.uint32(122).fork()).join();
1181
+ }
1182
+ if (message.activateMultibeamCommand !== undefined) {
1183
+ ActivateMultibeamCommand.encode(message.activateMultibeamCommand, writer.uint32(130).fork()).join();
1184
+ }
1185
+ if (message.multibeamConfigCommand !== undefined) {
1186
+ MultibeamConfigCommand.encode(message.multibeamConfigCommand, writer.uint32(138).fork()).join();
1187
+ }
1188
+ if (message.lightsCommand !== undefined) {
1189
+ LightsCommand.encode(message.lightsCommand, writer.uint32(146).fork()).join();
1190
+ }
1191
+ if (message.laserCommand !== undefined) {
1192
+ LaserCommand.encode(message.laserCommand, writer.uint32(154).fork()).join();
1193
+ }
1194
+ if (message.tiltStabilizationCommand !== undefined) {
1195
+ TiltStabilizationCommand.encode(message.tiltStabilizationCommand, writer.uint32(162).fork()).join();
1196
+ }
1197
+ if (message.cvModelStateCommand !== undefined) {
1198
+ CvModelStateCommand.encode(message.cvModelStateCommand, writer.uint32(170).fork()).join();
1199
+ }
1200
+ if (message.annotationCommand !== undefined) {
1201
+ AnnotationCommand.encode(message.annotationCommand, writer.uint32(178).fork()).join();
1202
+ }
1203
+ if (message.headingCommand !== undefined) {
1204
+ HeadingCommand.encode(message.headingCommand, writer.uint32(186).fork()).join();
1205
+ }
1206
+ if (message.transectCommand !== undefined) {
1207
+ TransectCommand.encode(message.transectCommand, writer.uint32(194).fork()).join();
1208
+ }
1209
+ if (message.relativeDepthCommand !== undefined) {
1210
+ RelativeDepthCommand.encode(message.relativeDepthCommand, writer.uint32(202).fork()).join();
1211
+ }
1212
+ if (message.cruiseSpeedCommand !== undefined) {
1213
+ CruiseSpeedCommand.encode(message.cruiseSpeedCommand, writer.uint32(210).fork()).join();
1214
+ }
669
1215
  return writer;
670
1216
  },
671
1217
  decode(input, length) {
@@ -689,11 +1235,11 @@ export const Instruction = {
689
1235
  message.groupId = reader.uint32();
690
1236
  continue;
691
1237
  }
692
- case 3: {
693
- if (tag !== 24) {
1238
+ case 27: {
1239
+ if (tag !== 216) {
694
1240
  break;
695
1241
  }
696
- message.autoContinue = reader.bool();
1242
+ message.pauseOnCompletion = reader.bool();
697
1243
  continue;
698
1244
  }
699
1245
  case 4: {
@@ -773,6 +1319,90 @@ export const Instruction = {
773
1319
  message.surveyCommand = SurveyCommand.decode(reader, reader.uint32());
774
1320
  continue;
775
1321
  }
1322
+ case 15: {
1323
+ if (tag !== 122) {
1324
+ break;
1325
+ }
1326
+ message.recordMultibeamCommand = RecordMultibeamCommand.decode(reader, reader.uint32());
1327
+ continue;
1328
+ }
1329
+ case 16: {
1330
+ if (tag !== 130) {
1331
+ break;
1332
+ }
1333
+ message.activateMultibeamCommand = ActivateMultibeamCommand.decode(reader, reader.uint32());
1334
+ continue;
1335
+ }
1336
+ case 17: {
1337
+ if (tag !== 138) {
1338
+ break;
1339
+ }
1340
+ message.multibeamConfigCommand = MultibeamConfigCommand.decode(reader, reader.uint32());
1341
+ continue;
1342
+ }
1343
+ case 18: {
1344
+ if (tag !== 146) {
1345
+ break;
1346
+ }
1347
+ message.lightsCommand = LightsCommand.decode(reader, reader.uint32());
1348
+ continue;
1349
+ }
1350
+ case 19: {
1351
+ if (tag !== 154) {
1352
+ break;
1353
+ }
1354
+ message.laserCommand = LaserCommand.decode(reader, reader.uint32());
1355
+ continue;
1356
+ }
1357
+ case 20: {
1358
+ if (tag !== 162) {
1359
+ break;
1360
+ }
1361
+ message.tiltStabilizationCommand = TiltStabilizationCommand.decode(reader, reader.uint32());
1362
+ continue;
1363
+ }
1364
+ case 21: {
1365
+ if (tag !== 170) {
1366
+ break;
1367
+ }
1368
+ message.cvModelStateCommand = CvModelStateCommand.decode(reader, reader.uint32());
1369
+ continue;
1370
+ }
1371
+ case 22: {
1372
+ if (tag !== 178) {
1373
+ break;
1374
+ }
1375
+ message.annotationCommand = AnnotationCommand.decode(reader, reader.uint32());
1376
+ continue;
1377
+ }
1378
+ case 23: {
1379
+ if (tag !== 186) {
1380
+ break;
1381
+ }
1382
+ message.headingCommand = HeadingCommand.decode(reader, reader.uint32());
1383
+ continue;
1384
+ }
1385
+ case 24: {
1386
+ if (tag !== 194) {
1387
+ break;
1388
+ }
1389
+ message.transectCommand = TransectCommand.decode(reader, reader.uint32());
1390
+ continue;
1391
+ }
1392
+ case 25: {
1393
+ if (tag !== 202) {
1394
+ break;
1395
+ }
1396
+ message.relativeDepthCommand = RelativeDepthCommand.decode(reader, reader.uint32());
1397
+ continue;
1398
+ }
1399
+ case 26: {
1400
+ if (tag !== 210) {
1401
+ break;
1402
+ }
1403
+ message.cruiseSpeedCommand = CruiseSpeedCommand.decode(reader, reader.uint32());
1404
+ continue;
1405
+ }
776
1406
  }
777
1407
  if ((tag & 7) === 4 || tag === 0) {
778
1408
  break;
@@ -785,7 +1415,7 @@ export const Instruction = {
785
1415
  return {
786
1416
  id: isSet(object.id) ? gt.Number(object.id) : 0,
787
1417
  groupId: isSet(object.groupId) ? gt.Number(object.groupId) : 0,
788
- autoContinue: isSet(object.autoContinue) ? gt.Boolean(object.autoContinue) : false,
1418
+ pauseOnCompletion: isSet(object.pauseOnCompletion) ? gt.Boolean(object.pauseOnCompletion) : false,
789
1419
  waypointCommand: isSet(object.waypointCommand) ? WaypointCommand.fromJSON(object.waypointCommand) : undefined,
790
1420
  depthSetPointCommand: isSet(object.depthSetPointCommand)
791
1421
  ? DepthSetPointCommand.fromJSON(object.depthSetPointCommand)
@@ -809,6 +1439,34 @@ export const Instruction = {
809
1439
  : undefined,
810
1440
  goToHomeCommand: isSet(object.goToHomeCommand) ? GoToHomeCommand.fromJSON(object.goToHomeCommand) : undefined,
811
1441
  surveyCommand: isSet(object.surveyCommand) ? SurveyCommand.fromJSON(object.surveyCommand) : undefined,
1442
+ recordMultibeamCommand: isSet(object.recordMultibeamCommand)
1443
+ ? RecordMultibeamCommand.fromJSON(object.recordMultibeamCommand)
1444
+ : undefined,
1445
+ activateMultibeamCommand: isSet(object.activateMultibeamCommand)
1446
+ ? ActivateMultibeamCommand.fromJSON(object.activateMultibeamCommand)
1447
+ : undefined,
1448
+ multibeamConfigCommand: isSet(object.multibeamConfigCommand)
1449
+ ? MultibeamConfigCommand.fromJSON(object.multibeamConfigCommand)
1450
+ : undefined,
1451
+ lightsCommand: isSet(object.lightsCommand) ? LightsCommand.fromJSON(object.lightsCommand) : undefined,
1452
+ laserCommand: isSet(object.laserCommand) ? LaserCommand.fromJSON(object.laserCommand) : undefined,
1453
+ tiltStabilizationCommand: isSet(object.tiltStabilizationCommand)
1454
+ ? TiltStabilizationCommand.fromJSON(object.tiltStabilizationCommand)
1455
+ : undefined,
1456
+ cvModelStateCommand: isSet(object.cvModelStateCommand)
1457
+ ? CvModelStateCommand.fromJSON(object.cvModelStateCommand)
1458
+ : undefined,
1459
+ annotationCommand: isSet(object.annotationCommand)
1460
+ ? AnnotationCommand.fromJSON(object.annotationCommand)
1461
+ : undefined,
1462
+ headingCommand: isSet(object.headingCommand) ? HeadingCommand.fromJSON(object.headingCommand) : undefined,
1463
+ transectCommand: isSet(object.transectCommand) ? TransectCommand.fromJSON(object.transectCommand) : undefined,
1464
+ relativeDepthCommand: isSet(object.relativeDepthCommand)
1465
+ ? RelativeDepthCommand.fromJSON(object.relativeDepthCommand)
1466
+ : undefined,
1467
+ cruiseSpeedCommand: isSet(object.cruiseSpeedCommand)
1468
+ ? CruiseSpeedCommand.fromJSON(object.cruiseSpeedCommand)
1469
+ : undefined,
812
1470
  };
813
1471
  },
814
1472
  toJSON(message) {
@@ -819,8 +1477,8 @@ export const Instruction = {
819
1477
  if (message.groupId !== 0) {
820
1478
  obj.groupId = Math.round(message.groupId);
821
1479
  }
822
- if (message.autoContinue !== false) {
823
- obj.autoContinue = message.autoContinue;
1480
+ if (message.pauseOnCompletion !== false) {
1481
+ obj.pauseOnCompletion = message.pauseOnCompletion;
824
1482
  }
825
1483
  if (message.waypointCommand !== undefined) {
826
1484
  obj.waypointCommand = WaypointCommand.toJSON(message.waypointCommand);
@@ -855,6 +1513,42 @@ export const Instruction = {
855
1513
  if (message.surveyCommand !== undefined) {
856
1514
  obj.surveyCommand = SurveyCommand.toJSON(message.surveyCommand);
857
1515
  }
1516
+ if (message.recordMultibeamCommand !== undefined) {
1517
+ obj.recordMultibeamCommand = RecordMultibeamCommand.toJSON(message.recordMultibeamCommand);
1518
+ }
1519
+ if (message.activateMultibeamCommand !== undefined) {
1520
+ obj.activateMultibeamCommand = ActivateMultibeamCommand.toJSON(message.activateMultibeamCommand);
1521
+ }
1522
+ if (message.multibeamConfigCommand !== undefined) {
1523
+ obj.multibeamConfigCommand = MultibeamConfigCommand.toJSON(message.multibeamConfigCommand);
1524
+ }
1525
+ if (message.lightsCommand !== undefined) {
1526
+ obj.lightsCommand = LightsCommand.toJSON(message.lightsCommand);
1527
+ }
1528
+ if (message.laserCommand !== undefined) {
1529
+ obj.laserCommand = LaserCommand.toJSON(message.laserCommand);
1530
+ }
1531
+ if (message.tiltStabilizationCommand !== undefined) {
1532
+ obj.tiltStabilizationCommand = TiltStabilizationCommand.toJSON(message.tiltStabilizationCommand);
1533
+ }
1534
+ if (message.cvModelStateCommand !== undefined) {
1535
+ obj.cvModelStateCommand = CvModelStateCommand.toJSON(message.cvModelStateCommand);
1536
+ }
1537
+ if (message.annotationCommand !== undefined) {
1538
+ obj.annotationCommand = AnnotationCommand.toJSON(message.annotationCommand);
1539
+ }
1540
+ if (message.headingCommand !== undefined) {
1541
+ obj.headingCommand = HeadingCommand.toJSON(message.headingCommand);
1542
+ }
1543
+ if (message.transectCommand !== undefined) {
1544
+ obj.transectCommand = TransectCommand.toJSON(message.transectCommand);
1545
+ }
1546
+ if (message.relativeDepthCommand !== undefined) {
1547
+ obj.relativeDepthCommand = RelativeDepthCommand.toJSON(message.relativeDepthCommand);
1548
+ }
1549
+ if (message.cruiseSpeedCommand !== undefined) {
1550
+ obj.cruiseSpeedCommand = CruiseSpeedCommand.toJSON(message.cruiseSpeedCommand);
1551
+ }
858
1552
  return obj;
859
1553
  },
860
1554
  create(base) {
@@ -864,7 +1558,7 @@ export const Instruction = {
864
1558
  const message = createBaseInstruction();
865
1559
  message.id = object.id ?? 0;
866
1560
  message.groupId = object.groupId ?? 0;
867
- message.autoContinue = object.autoContinue ?? false;
1561
+ message.pauseOnCompletion = object.pauseOnCompletion ?? false;
868
1562
  message.waypointCommand = (object.waypointCommand !== undefined && object.waypointCommand !== null)
869
1563
  ? WaypointCommand.fromPartial(object.waypointCommand)
870
1564
  : undefined;
@@ -899,6 +1593,46 @@ export const Instruction = {
899
1593
  message.surveyCommand = (object.surveyCommand !== undefined && object.surveyCommand !== null)
900
1594
  ? SurveyCommand.fromPartial(object.surveyCommand)
901
1595
  : undefined;
1596
+ message.recordMultibeamCommand =
1597
+ (object.recordMultibeamCommand !== undefined && object.recordMultibeamCommand !== null)
1598
+ ? RecordMultibeamCommand.fromPartial(object.recordMultibeamCommand)
1599
+ : undefined;
1600
+ message.activateMultibeamCommand =
1601
+ (object.activateMultibeamCommand !== undefined && object.activateMultibeamCommand !== null)
1602
+ ? ActivateMultibeamCommand.fromPartial(object.activateMultibeamCommand)
1603
+ : undefined;
1604
+ message.multibeamConfigCommand =
1605
+ (object.multibeamConfigCommand !== undefined && object.multibeamConfigCommand !== null)
1606
+ ? MultibeamConfigCommand.fromPartial(object.multibeamConfigCommand)
1607
+ : undefined;
1608
+ message.lightsCommand = (object.lightsCommand !== undefined && object.lightsCommand !== null)
1609
+ ? LightsCommand.fromPartial(object.lightsCommand)
1610
+ : undefined;
1611
+ message.laserCommand = (object.laserCommand !== undefined && object.laserCommand !== null)
1612
+ ? LaserCommand.fromPartial(object.laserCommand)
1613
+ : undefined;
1614
+ message.tiltStabilizationCommand =
1615
+ (object.tiltStabilizationCommand !== undefined && object.tiltStabilizationCommand !== null)
1616
+ ? TiltStabilizationCommand.fromPartial(object.tiltStabilizationCommand)
1617
+ : undefined;
1618
+ message.cvModelStateCommand = (object.cvModelStateCommand !== undefined && object.cvModelStateCommand !== null)
1619
+ ? CvModelStateCommand.fromPartial(object.cvModelStateCommand)
1620
+ : undefined;
1621
+ message.annotationCommand = (object.annotationCommand !== undefined && object.annotationCommand !== null)
1622
+ ? AnnotationCommand.fromPartial(object.annotationCommand)
1623
+ : undefined;
1624
+ message.headingCommand = (object.headingCommand !== undefined && object.headingCommand !== null)
1625
+ ? HeadingCommand.fromPartial(object.headingCommand)
1626
+ : undefined;
1627
+ message.transectCommand = (object.transectCommand !== undefined && object.transectCommand !== null)
1628
+ ? TransectCommand.fromPartial(object.transectCommand)
1629
+ : undefined;
1630
+ message.relativeDepthCommand = (object.relativeDepthCommand !== undefined && object.relativeDepthCommand !== null)
1631
+ ? RelativeDepthCommand.fromPartial(object.relativeDepthCommand)
1632
+ : undefined;
1633
+ message.cruiseSpeedCommand = (object.cruiseSpeedCommand !== undefined && object.cruiseSpeedCommand !== null)
1634
+ ? CruiseSpeedCommand.fromPartial(object.cruiseSpeedCommand)
1635
+ : undefined;
902
1636
  return message;
903
1637
  },
904
1638
  };
@@ -1196,20 +1930,32 @@ export const ControlModeCommand = {
1196
1930
  return message;
1197
1931
  },
1198
1932
  };
1199
- function createBaseWaypointCommand() {
1200
- return { waypoint: undefined };
1933
+ function createBaseDetectionTrigger() {
1934
+ return { classNames: [], modelName: "", camera: 0, minConfidence: 0, minAreaFraction: 0 };
1201
1935
  }
1202
- export const WaypointCommand = {
1936
+ export const DetectionTrigger = {
1203
1937
  encode(message, writer = new BinaryWriter()) {
1204
- if (message.waypoint !== undefined) {
1205
- Waypoint.encode(message.waypoint, writer.uint32(10).fork()).join();
1938
+ for (const v of message.classNames) {
1939
+ writer.uint32(10).string(v);
1940
+ }
1941
+ if (message.modelName !== "") {
1942
+ writer.uint32(18).string(message.modelName);
1943
+ }
1944
+ if (message.camera !== 0) {
1945
+ writer.uint32(24).int32(message.camera);
1946
+ }
1947
+ if (message.minConfidence !== 0) {
1948
+ writer.uint32(37).float(message.minConfidence);
1949
+ }
1950
+ if (message.minAreaFraction !== 0) {
1951
+ writer.uint32(45).float(message.minAreaFraction);
1206
1952
  }
1207
1953
  return writer;
1208
1954
  },
1209
1955
  decode(input, length) {
1210
1956
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1211
1957
  const end = length === undefined ? reader.len : reader.pos + length;
1212
- const message = createBaseWaypointCommand();
1958
+ const message = createBaseDetectionTrigger();
1213
1959
  while (reader.pos < end) {
1214
1960
  const tag = reader.uint32();
1215
1961
  switch (tag >>> 3) {
@@ -1217,7 +1963,35 @@ export const WaypointCommand = {
1217
1963
  if (tag !== 10) {
1218
1964
  break;
1219
1965
  }
1220
- message.waypoint = Waypoint.decode(reader, reader.uint32());
1966
+ message.classNames.push(reader.string());
1967
+ continue;
1968
+ }
1969
+ case 2: {
1970
+ if (tag !== 18) {
1971
+ break;
1972
+ }
1973
+ message.modelName = reader.string();
1974
+ continue;
1975
+ }
1976
+ case 3: {
1977
+ if (tag !== 24) {
1978
+ break;
1979
+ }
1980
+ message.camera = reader.int32();
1981
+ continue;
1982
+ }
1983
+ case 4: {
1984
+ if (tag !== 37) {
1985
+ break;
1986
+ }
1987
+ message.minConfidence = reader.float();
1988
+ continue;
1989
+ }
1990
+ case 5: {
1991
+ if (tag !== 45) {
1992
+ break;
1993
+ }
1994
+ message.minAreaFraction = reader.float();
1221
1995
  continue;
1222
1996
  }
1223
1997
  }
@@ -1229,40 +2003,1623 @@ export const WaypointCommand = {
1229
2003
  return message;
1230
2004
  },
1231
2005
  fromJSON(object) {
1232
- return { waypoint: isSet(object.waypoint) ? Waypoint.fromJSON(object.waypoint) : undefined };
2006
+ return {
2007
+ classNames: gt.Array.isArray(object?.classNames) ? object.classNames.map((e) => gt.String(e)) : [],
2008
+ modelName: isSet(object.modelName) ? gt.String(object.modelName) : "",
2009
+ camera: isSet(object.camera) ? cameraFromJSON(object.camera) : 0,
2010
+ minConfidence: isSet(object.minConfidence) ? gt.Number(object.minConfidence) : 0,
2011
+ minAreaFraction: isSet(object.minAreaFraction) ? gt.Number(object.minAreaFraction) : 0,
2012
+ };
1233
2013
  },
1234
2014
  toJSON(message) {
1235
2015
  const obj = {};
1236
- if (message.waypoint !== undefined) {
1237
- obj.waypoint = Waypoint.toJSON(message.waypoint);
2016
+ if (message.classNames?.length) {
2017
+ obj.classNames = message.classNames;
2018
+ }
2019
+ if (message.modelName !== "") {
2020
+ obj.modelName = message.modelName;
2021
+ }
2022
+ if (message.camera !== 0) {
2023
+ obj.camera = cameraToJSON(message.camera);
2024
+ }
2025
+ if (message.minConfidence !== 0) {
2026
+ obj.minConfidence = message.minConfidence;
2027
+ }
2028
+ if (message.minAreaFraction !== 0) {
2029
+ obj.minAreaFraction = message.minAreaFraction;
2030
+ }
2031
+ return obj;
2032
+ },
2033
+ create(base) {
2034
+ return DetectionTrigger.fromPartial(base ?? {});
2035
+ },
2036
+ fromPartial(object) {
2037
+ const message = createBaseDetectionTrigger();
2038
+ message.classNames = object.classNames?.map((e) => e) || [];
2039
+ message.modelName = object.modelName ?? "";
2040
+ message.camera = object.camera ?? 0;
2041
+ message.minConfidence = object.minConfidence ?? 0;
2042
+ message.minAreaFraction = object.minAreaFraction ?? 0;
2043
+ return message;
2044
+ },
2045
+ };
2046
+ function createBaseDepthTrigger() {
2047
+ return { minDepth: 0, maxDepth: 0 };
2048
+ }
2049
+ export const DepthTrigger = {
2050
+ encode(message, writer = new BinaryWriter()) {
2051
+ if (message.minDepth !== 0) {
2052
+ writer.uint32(13).float(message.minDepth);
2053
+ }
2054
+ if (message.maxDepth !== 0) {
2055
+ writer.uint32(21).float(message.maxDepth);
2056
+ }
2057
+ return writer;
2058
+ },
2059
+ decode(input, length) {
2060
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2061
+ const end = length === undefined ? reader.len : reader.pos + length;
2062
+ const message = createBaseDepthTrigger();
2063
+ while (reader.pos < end) {
2064
+ const tag = reader.uint32();
2065
+ switch (tag >>> 3) {
2066
+ case 1: {
2067
+ if (tag !== 13) {
2068
+ break;
2069
+ }
2070
+ message.minDepth = reader.float();
2071
+ continue;
2072
+ }
2073
+ case 2: {
2074
+ if (tag !== 21) {
2075
+ break;
2076
+ }
2077
+ message.maxDepth = reader.float();
2078
+ continue;
2079
+ }
2080
+ }
2081
+ if ((tag & 7) === 4 || tag === 0) {
2082
+ break;
2083
+ }
2084
+ reader.skip(tag & 7);
2085
+ }
2086
+ return message;
2087
+ },
2088
+ fromJSON(object) {
2089
+ return {
2090
+ minDepth: isSet(object.minDepth) ? gt.Number(object.minDepth) : 0,
2091
+ maxDepth: isSet(object.maxDepth) ? gt.Number(object.maxDepth) : 0,
2092
+ };
2093
+ },
2094
+ toJSON(message) {
2095
+ const obj = {};
2096
+ if (message.minDepth !== 0) {
2097
+ obj.minDepth = message.minDepth;
2098
+ }
2099
+ if (message.maxDepth !== 0) {
2100
+ obj.maxDepth = message.maxDepth;
2101
+ }
2102
+ return obj;
2103
+ },
2104
+ create(base) {
2105
+ return DepthTrigger.fromPartial(base ?? {});
2106
+ },
2107
+ fromPartial(object) {
2108
+ const message = createBaseDepthTrigger();
2109
+ message.minDepth = object.minDepth ?? 0;
2110
+ message.maxDepth = object.maxDepth ?? 0;
2111
+ return message;
2112
+ },
2113
+ };
2114
+ function createBaseAltitudeTrigger() {
2115
+ return { minAltitude: 0, maxAltitude: 0 };
2116
+ }
2117
+ export const AltitudeTrigger = {
2118
+ encode(message, writer = new BinaryWriter()) {
2119
+ if (message.minAltitude !== 0) {
2120
+ writer.uint32(13).float(message.minAltitude);
2121
+ }
2122
+ if (message.maxAltitude !== 0) {
2123
+ writer.uint32(21).float(message.maxAltitude);
2124
+ }
2125
+ return writer;
2126
+ },
2127
+ decode(input, length) {
2128
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2129
+ const end = length === undefined ? reader.len : reader.pos + length;
2130
+ const message = createBaseAltitudeTrigger();
2131
+ while (reader.pos < end) {
2132
+ const tag = reader.uint32();
2133
+ switch (tag >>> 3) {
2134
+ case 1: {
2135
+ if (tag !== 13) {
2136
+ break;
2137
+ }
2138
+ message.minAltitude = reader.float();
2139
+ continue;
2140
+ }
2141
+ case 2: {
2142
+ if (tag !== 21) {
2143
+ break;
2144
+ }
2145
+ message.maxAltitude = reader.float();
2146
+ continue;
2147
+ }
2148
+ }
2149
+ if ((tag & 7) === 4 || tag === 0) {
2150
+ break;
2151
+ }
2152
+ reader.skip(tag & 7);
2153
+ }
2154
+ return message;
2155
+ },
2156
+ fromJSON(object) {
2157
+ return {
2158
+ minAltitude: isSet(object.minAltitude) ? gt.Number(object.minAltitude) : 0,
2159
+ maxAltitude: isSet(object.maxAltitude) ? gt.Number(object.maxAltitude) : 0,
2160
+ };
2161
+ },
2162
+ toJSON(message) {
2163
+ const obj = {};
2164
+ if (message.minAltitude !== 0) {
2165
+ obj.minAltitude = message.minAltitude;
2166
+ }
2167
+ if (message.maxAltitude !== 0) {
2168
+ obj.maxAltitude = message.maxAltitude;
2169
+ }
2170
+ return obj;
2171
+ },
2172
+ create(base) {
2173
+ return AltitudeTrigger.fromPartial(base ?? {});
2174
+ },
2175
+ fromPartial(object) {
2176
+ const message = createBaseAltitudeTrigger();
2177
+ message.minAltitude = object.minAltitude ?? 0;
2178
+ message.maxAltitude = object.maxAltitude ?? 0;
2179
+ return message;
2180
+ },
2181
+ };
2182
+ function createBaseLocationTrigger() {
2183
+ return { position: undefined, circleOfAcceptance: 0 };
2184
+ }
2185
+ export const LocationTrigger = {
2186
+ encode(message, writer = new BinaryWriter()) {
2187
+ if (message.position !== undefined) {
2188
+ LatLongPosition.encode(message.position, writer.uint32(10).fork()).join();
2189
+ }
2190
+ if (message.circleOfAcceptance !== 0) {
2191
+ writer.uint32(21).float(message.circleOfAcceptance);
2192
+ }
2193
+ return writer;
2194
+ },
2195
+ decode(input, length) {
2196
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2197
+ const end = length === undefined ? reader.len : reader.pos + length;
2198
+ const message = createBaseLocationTrigger();
2199
+ while (reader.pos < end) {
2200
+ const tag = reader.uint32();
2201
+ switch (tag >>> 3) {
2202
+ case 1: {
2203
+ if (tag !== 10) {
2204
+ break;
2205
+ }
2206
+ message.position = LatLongPosition.decode(reader, reader.uint32());
2207
+ continue;
2208
+ }
2209
+ case 2: {
2210
+ if (tag !== 21) {
2211
+ break;
2212
+ }
2213
+ message.circleOfAcceptance = reader.float();
2214
+ continue;
2215
+ }
2216
+ }
2217
+ if ((tag & 7) === 4 || tag === 0) {
2218
+ break;
2219
+ }
2220
+ reader.skip(tag & 7);
2221
+ }
2222
+ return message;
2223
+ },
2224
+ fromJSON(object) {
2225
+ return {
2226
+ position: isSet(object.position) ? LatLongPosition.fromJSON(object.position) : undefined,
2227
+ circleOfAcceptance: isSet(object.circleOfAcceptance) ? gt.Number(object.circleOfAcceptance) : 0,
2228
+ };
2229
+ },
2230
+ toJSON(message) {
2231
+ const obj = {};
2232
+ if (message.position !== undefined) {
2233
+ obj.position = LatLongPosition.toJSON(message.position);
2234
+ }
2235
+ if (message.circleOfAcceptance !== 0) {
2236
+ obj.circleOfAcceptance = message.circleOfAcceptance;
2237
+ }
2238
+ return obj;
2239
+ },
2240
+ create(base) {
2241
+ return LocationTrigger.fromPartial(base ?? {});
2242
+ },
2243
+ fromPartial(object) {
2244
+ const message = createBaseLocationTrigger();
2245
+ message.position = (object.position !== undefined && object.position !== null)
2246
+ ? LatLongPosition.fromPartial(object.position)
2247
+ : undefined;
2248
+ message.circleOfAcceptance = object.circleOfAcceptance ?? 0;
2249
+ return message;
2250
+ },
2251
+ };
2252
+ function createBaseTrigger() {
2253
+ return {
2254
+ detectionTrigger: undefined,
2255
+ depthTrigger: undefined,
2256
+ altitudeTrigger: undefined,
2257
+ locationTrigger: undefined,
2258
+ };
2259
+ }
2260
+ export const Trigger = {
2261
+ encode(message, writer = new BinaryWriter()) {
2262
+ if (message.detectionTrigger !== undefined) {
2263
+ DetectionTrigger.encode(message.detectionTrigger, writer.uint32(10).fork()).join();
2264
+ }
2265
+ if (message.depthTrigger !== undefined) {
2266
+ DepthTrigger.encode(message.depthTrigger, writer.uint32(18).fork()).join();
2267
+ }
2268
+ if (message.altitudeTrigger !== undefined) {
2269
+ AltitudeTrigger.encode(message.altitudeTrigger, writer.uint32(26).fork()).join();
2270
+ }
2271
+ if (message.locationTrigger !== undefined) {
2272
+ LocationTrigger.encode(message.locationTrigger, writer.uint32(34).fork()).join();
2273
+ }
2274
+ return writer;
2275
+ },
2276
+ decode(input, length) {
2277
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2278
+ const end = length === undefined ? reader.len : reader.pos + length;
2279
+ const message = createBaseTrigger();
2280
+ while (reader.pos < end) {
2281
+ const tag = reader.uint32();
2282
+ switch (tag >>> 3) {
2283
+ case 1: {
2284
+ if (tag !== 10) {
2285
+ break;
2286
+ }
2287
+ message.detectionTrigger = DetectionTrigger.decode(reader, reader.uint32());
2288
+ continue;
2289
+ }
2290
+ case 2: {
2291
+ if (tag !== 18) {
2292
+ break;
2293
+ }
2294
+ message.depthTrigger = DepthTrigger.decode(reader, reader.uint32());
2295
+ continue;
2296
+ }
2297
+ case 3: {
2298
+ if (tag !== 26) {
2299
+ break;
2300
+ }
2301
+ message.altitudeTrigger = AltitudeTrigger.decode(reader, reader.uint32());
2302
+ continue;
2303
+ }
2304
+ case 4: {
2305
+ if (tag !== 34) {
2306
+ break;
2307
+ }
2308
+ message.locationTrigger = LocationTrigger.decode(reader, reader.uint32());
2309
+ continue;
2310
+ }
2311
+ }
2312
+ if ((tag & 7) === 4 || tag === 0) {
2313
+ break;
2314
+ }
2315
+ reader.skip(tag & 7);
2316
+ }
2317
+ return message;
2318
+ },
2319
+ fromJSON(object) {
2320
+ return {
2321
+ detectionTrigger: isSet(object.detectionTrigger) ? DetectionTrigger.fromJSON(object.detectionTrigger) : undefined,
2322
+ depthTrigger: isSet(object.depthTrigger) ? DepthTrigger.fromJSON(object.depthTrigger) : undefined,
2323
+ altitudeTrigger: isSet(object.altitudeTrigger) ? AltitudeTrigger.fromJSON(object.altitudeTrigger) : undefined,
2324
+ locationTrigger: isSet(object.locationTrigger) ? LocationTrigger.fromJSON(object.locationTrigger) : undefined,
2325
+ };
2326
+ },
2327
+ toJSON(message) {
2328
+ const obj = {};
2329
+ if (message.detectionTrigger !== undefined) {
2330
+ obj.detectionTrigger = DetectionTrigger.toJSON(message.detectionTrigger);
2331
+ }
2332
+ if (message.depthTrigger !== undefined) {
2333
+ obj.depthTrigger = DepthTrigger.toJSON(message.depthTrigger);
2334
+ }
2335
+ if (message.altitudeTrigger !== undefined) {
2336
+ obj.altitudeTrigger = AltitudeTrigger.toJSON(message.altitudeTrigger);
2337
+ }
2338
+ if (message.locationTrigger !== undefined) {
2339
+ obj.locationTrigger = LocationTrigger.toJSON(message.locationTrigger);
2340
+ }
2341
+ return obj;
2342
+ },
2343
+ create(base) {
2344
+ return Trigger.fromPartial(base ?? {});
2345
+ },
2346
+ fromPartial(object) {
2347
+ const message = createBaseTrigger();
2348
+ message.detectionTrigger = (object.detectionTrigger !== undefined && object.detectionTrigger !== null)
2349
+ ? DetectionTrigger.fromPartial(object.detectionTrigger)
2350
+ : undefined;
2351
+ message.depthTrigger = (object.depthTrigger !== undefined && object.depthTrigger !== null)
2352
+ ? DepthTrigger.fromPartial(object.depthTrigger)
2353
+ : undefined;
2354
+ message.altitudeTrigger = (object.altitudeTrigger !== undefined && object.altitudeTrigger !== null)
2355
+ ? AltitudeTrigger.fromPartial(object.altitudeTrigger)
2356
+ : undefined;
2357
+ message.locationTrigger = (object.locationTrigger !== undefined && object.locationTrigger !== null)
2358
+ ? LocationTrigger.fromPartial(object.locationTrigger)
2359
+ : undefined;
2360
+ return message;
2361
+ },
2362
+ };
2363
+ function createBaseMissionRule() {
2364
+ return {
2365
+ id: 0,
2366
+ name: "",
2367
+ disabled: false,
2368
+ enterInstructions: [],
2369
+ exitInstructions: [],
2370
+ triggers: [],
2371
+ holdDuration: undefined,
2372
+ releaseDuration: undefined,
2373
+ cooldownDuration: undefined,
2374
+ };
2375
+ }
2376
+ export const MissionRule = {
2377
+ encode(message, writer = new BinaryWriter()) {
2378
+ if (message.id !== 0) {
2379
+ writer.uint32(8).uint32(message.id);
2380
+ }
2381
+ if (message.name !== "") {
2382
+ writer.uint32(18).string(message.name);
2383
+ }
2384
+ if (message.disabled !== false) {
2385
+ writer.uint32(24).bool(message.disabled);
2386
+ }
2387
+ for (const v of message.enterInstructions) {
2388
+ Instruction.encode(v, writer.uint32(42).fork()).join();
2389
+ }
2390
+ for (const v of message.exitInstructions) {
2391
+ Instruction.encode(v, writer.uint32(50).fork()).join();
2392
+ }
2393
+ for (const v of message.triggers) {
2394
+ Trigger.encode(v, writer.uint32(58).fork()).join();
2395
+ }
2396
+ if (message.holdDuration !== undefined) {
2397
+ Duration.encode(message.holdDuration, writer.uint32(66).fork()).join();
2398
+ }
2399
+ if (message.releaseDuration !== undefined) {
2400
+ Duration.encode(message.releaseDuration, writer.uint32(74).fork()).join();
2401
+ }
2402
+ if (message.cooldownDuration !== undefined) {
2403
+ Duration.encode(message.cooldownDuration, writer.uint32(82).fork()).join();
2404
+ }
2405
+ return writer;
2406
+ },
2407
+ decode(input, length) {
2408
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2409
+ const end = length === undefined ? reader.len : reader.pos + length;
2410
+ const message = createBaseMissionRule();
2411
+ while (reader.pos < end) {
2412
+ const tag = reader.uint32();
2413
+ switch (tag >>> 3) {
2414
+ case 1: {
2415
+ if (tag !== 8) {
2416
+ break;
2417
+ }
2418
+ message.id = reader.uint32();
2419
+ continue;
2420
+ }
2421
+ case 2: {
2422
+ if (tag !== 18) {
2423
+ break;
2424
+ }
2425
+ message.name = reader.string();
2426
+ continue;
2427
+ }
2428
+ case 3: {
2429
+ if (tag !== 24) {
2430
+ break;
2431
+ }
2432
+ message.disabled = reader.bool();
2433
+ continue;
2434
+ }
2435
+ case 5: {
2436
+ if (tag !== 42) {
2437
+ break;
2438
+ }
2439
+ message.enterInstructions.push(Instruction.decode(reader, reader.uint32()));
2440
+ continue;
2441
+ }
2442
+ case 6: {
2443
+ if (tag !== 50) {
2444
+ break;
2445
+ }
2446
+ message.exitInstructions.push(Instruction.decode(reader, reader.uint32()));
2447
+ continue;
2448
+ }
2449
+ case 7: {
2450
+ if (tag !== 58) {
2451
+ break;
2452
+ }
2453
+ message.triggers.push(Trigger.decode(reader, reader.uint32()));
2454
+ continue;
2455
+ }
2456
+ case 8: {
2457
+ if (tag !== 66) {
2458
+ break;
2459
+ }
2460
+ message.holdDuration = Duration.decode(reader, reader.uint32());
2461
+ continue;
2462
+ }
2463
+ case 9: {
2464
+ if (tag !== 74) {
2465
+ break;
2466
+ }
2467
+ message.releaseDuration = Duration.decode(reader, reader.uint32());
2468
+ continue;
2469
+ }
2470
+ case 10: {
2471
+ if (tag !== 82) {
2472
+ break;
2473
+ }
2474
+ message.cooldownDuration = Duration.decode(reader, reader.uint32());
2475
+ continue;
2476
+ }
2477
+ }
2478
+ if ((tag & 7) === 4 || tag === 0) {
2479
+ break;
2480
+ }
2481
+ reader.skip(tag & 7);
2482
+ }
2483
+ return message;
2484
+ },
2485
+ fromJSON(object) {
2486
+ return {
2487
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
2488
+ name: isSet(object.name) ? gt.String(object.name) : "",
2489
+ disabled: isSet(object.disabled) ? gt.Boolean(object.disabled) : false,
2490
+ enterInstructions: gt.Array.isArray(object?.enterInstructions)
2491
+ ? object.enterInstructions.map((e) => Instruction.fromJSON(e))
2492
+ : [],
2493
+ exitInstructions: gt.Array.isArray(object?.exitInstructions)
2494
+ ? object.exitInstructions.map((e) => Instruction.fromJSON(e))
2495
+ : [],
2496
+ triggers: gt.Array.isArray(object?.triggers) ? object.triggers.map((e) => Trigger.fromJSON(e)) : [],
2497
+ holdDuration: isSet(object.holdDuration) ? Duration.fromJSON(object.holdDuration) : undefined,
2498
+ releaseDuration: isSet(object.releaseDuration) ? Duration.fromJSON(object.releaseDuration) : undefined,
2499
+ cooldownDuration: isSet(object.cooldownDuration) ? Duration.fromJSON(object.cooldownDuration) : undefined,
2500
+ };
2501
+ },
2502
+ toJSON(message) {
2503
+ const obj = {};
2504
+ if (message.id !== 0) {
2505
+ obj.id = Math.round(message.id);
2506
+ }
2507
+ if (message.name !== "") {
2508
+ obj.name = message.name;
2509
+ }
2510
+ if (message.disabled !== false) {
2511
+ obj.disabled = message.disabled;
2512
+ }
2513
+ if (message.enterInstructions?.length) {
2514
+ obj.enterInstructions = message.enterInstructions.map((e) => Instruction.toJSON(e));
2515
+ }
2516
+ if (message.exitInstructions?.length) {
2517
+ obj.exitInstructions = message.exitInstructions.map((e) => Instruction.toJSON(e));
2518
+ }
2519
+ if (message.triggers?.length) {
2520
+ obj.triggers = message.triggers.map((e) => Trigger.toJSON(e));
2521
+ }
2522
+ if (message.holdDuration !== undefined) {
2523
+ obj.holdDuration = Duration.toJSON(message.holdDuration);
2524
+ }
2525
+ if (message.releaseDuration !== undefined) {
2526
+ obj.releaseDuration = Duration.toJSON(message.releaseDuration);
2527
+ }
2528
+ if (message.cooldownDuration !== undefined) {
2529
+ obj.cooldownDuration = Duration.toJSON(message.cooldownDuration);
2530
+ }
2531
+ return obj;
2532
+ },
2533
+ create(base) {
2534
+ return MissionRule.fromPartial(base ?? {});
2535
+ },
2536
+ fromPartial(object) {
2537
+ const message = createBaseMissionRule();
2538
+ message.id = object.id ?? 0;
2539
+ message.name = object.name ?? "";
2540
+ message.disabled = object.disabled ?? false;
2541
+ message.enterInstructions = object.enterInstructions?.map((e) => Instruction.fromPartial(e)) || [];
2542
+ message.exitInstructions = object.exitInstructions?.map((e) => Instruction.fromPartial(e)) || [];
2543
+ message.triggers = object.triggers?.map((e) => Trigger.fromPartial(e)) || [];
2544
+ message.holdDuration = (object.holdDuration !== undefined && object.holdDuration !== null)
2545
+ ? Duration.fromPartial(object.holdDuration)
2546
+ : undefined;
2547
+ message.releaseDuration = (object.releaseDuration !== undefined && object.releaseDuration !== null)
2548
+ ? Duration.fromPartial(object.releaseDuration)
2549
+ : undefined;
2550
+ message.cooldownDuration = (object.cooldownDuration !== undefined && object.cooldownDuration !== null)
2551
+ ? Duration.fromPartial(object.cooldownDuration)
2552
+ : undefined;
2553
+ return message;
2554
+ },
2555
+ };
2556
+ function createBaseMissionRuleStatus() {
2557
+ return { id: 0, state: 0, episodes: 0, lastFired: undefined, lastResult: 0, lastReason: "", triggers: [] };
2558
+ }
2559
+ export const MissionRuleStatus = {
2560
+ encode(message, writer = new BinaryWriter()) {
2561
+ if (message.id !== 0) {
2562
+ writer.uint32(8).uint32(message.id);
2563
+ }
2564
+ if (message.state !== 0) {
2565
+ writer.uint32(16).int32(message.state);
2566
+ }
2567
+ if (message.episodes !== 0) {
2568
+ writer.uint32(24).uint32(message.episodes);
2569
+ }
2570
+ if (message.lastFired !== undefined) {
2571
+ Timestamp.encode(toTimestamp(message.lastFired), writer.uint32(34).fork()).join();
2572
+ }
2573
+ if (message.lastResult !== 0) {
2574
+ writer.uint32(40).int32(message.lastResult);
2575
+ }
2576
+ if (message.lastReason !== "") {
2577
+ writer.uint32(50).string(message.lastReason);
2578
+ }
2579
+ for (const v of message.triggers) {
2580
+ TriggerStatus.encode(v, writer.uint32(58).fork()).join();
2581
+ }
2582
+ return writer;
2583
+ },
2584
+ decode(input, length) {
2585
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2586
+ const end = length === undefined ? reader.len : reader.pos + length;
2587
+ const message = createBaseMissionRuleStatus();
2588
+ while (reader.pos < end) {
2589
+ const tag = reader.uint32();
2590
+ switch (tag >>> 3) {
2591
+ case 1: {
2592
+ if (tag !== 8) {
2593
+ break;
2594
+ }
2595
+ message.id = reader.uint32();
2596
+ continue;
2597
+ }
2598
+ case 2: {
2599
+ if (tag !== 16) {
2600
+ break;
2601
+ }
2602
+ message.state = reader.int32();
2603
+ continue;
2604
+ }
2605
+ case 3: {
2606
+ if (tag !== 24) {
2607
+ break;
2608
+ }
2609
+ message.episodes = reader.uint32();
2610
+ continue;
2611
+ }
2612
+ case 4: {
2613
+ if (tag !== 34) {
2614
+ break;
2615
+ }
2616
+ message.lastFired = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2617
+ continue;
2618
+ }
2619
+ case 5: {
2620
+ if (tag !== 40) {
2621
+ break;
2622
+ }
2623
+ message.lastResult = reader.int32();
2624
+ continue;
2625
+ }
2626
+ case 6: {
2627
+ if (tag !== 50) {
2628
+ break;
2629
+ }
2630
+ message.lastReason = reader.string();
2631
+ continue;
2632
+ }
2633
+ case 7: {
2634
+ if (tag !== 58) {
2635
+ break;
2636
+ }
2637
+ message.triggers.push(TriggerStatus.decode(reader, reader.uint32()));
2638
+ continue;
2639
+ }
2640
+ }
2641
+ if ((tag & 7) === 4 || tag === 0) {
2642
+ break;
2643
+ }
2644
+ reader.skip(tag & 7);
2645
+ }
2646
+ return message;
2647
+ },
2648
+ fromJSON(object) {
2649
+ return {
2650
+ id: isSet(object.id) ? gt.Number(object.id) : 0,
2651
+ state: isSet(object.state) ? missionRuleStateFromJSON(object.state) : 0,
2652
+ episodes: isSet(object.episodes) ? gt.Number(object.episodes) : 0,
2653
+ lastFired: isSet(object.lastFired) ? fromJsonTimestamp(object.lastFired) : undefined,
2654
+ lastResult: isSet(object.lastResult) ? instructionResultStateFromJSON(object.lastResult) : 0,
2655
+ lastReason: isSet(object.lastReason) ? gt.String(object.lastReason) : "",
2656
+ triggers: gt.Array.isArray(object?.triggers) ? object.triggers.map((e) => TriggerStatus.fromJSON(e)) : [],
2657
+ };
2658
+ },
2659
+ toJSON(message) {
2660
+ const obj = {};
2661
+ if (message.id !== 0) {
2662
+ obj.id = Math.round(message.id);
2663
+ }
2664
+ if (message.state !== 0) {
2665
+ obj.state = missionRuleStateToJSON(message.state);
2666
+ }
2667
+ if (message.episodes !== 0) {
2668
+ obj.episodes = Math.round(message.episodes);
2669
+ }
2670
+ if (message.lastFired !== undefined) {
2671
+ obj.lastFired = message.lastFired.toISOString();
2672
+ }
2673
+ if (message.lastResult !== 0) {
2674
+ obj.lastResult = instructionResultStateToJSON(message.lastResult);
2675
+ }
2676
+ if (message.lastReason !== "") {
2677
+ obj.lastReason = message.lastReason;
2678
+ }
2679
+ if (message.triggers?.length) {
2680
+ obj.triggers = message.triggers.map((e) => TriggerStatus.toJSON(e));
2681
+ }
2682
+ return obj;
2683
+ },
2684
+ create(base) {
2685
+ return MissionRuleStatus.fromPartial(base ?? {});
2686
+ },
2687
+ fromPartial(object) {
2688
+ const message = createBaseMissionRuleStatus();
2689
+ message.id = object.id ?? 0;
2690
+ message.state = object.state ?? 0;
2691
+ message.episodes = object.episodes ?? 0;
2692
+ message.lastFired = object.lastFired ?? undefined;
2693
+ message.lastResult = object.lastResult ?? 0;
2694
+ message.lastReason = object.lastReason ?? "";
2695
+ message.triggers = object.triggers?.map((e) => TriggerStatus.fromPartial(e)) || [];
2696
+ return message;
2697
+ },
2698
+ };
2699
+ function createBaseTriggerStatus() {
2700
+ return { kind: 0, satisfied: false, sensorUnavailable: false };
2701
+ }
2702
+ export const TriggerStatus = {
2703
+ encode(message, writer = new BinaryWriter()) {
2704
+ if (message.kind !== 0) {
2705
+ writer.uint32(8).int32(message.kind);
2706
+ }
2707
+ if (message.satisfied !== false) {
2708
+ writer.uint32(16).bool(message.satisfied);
2709
+ }
2710
+ if (message.sensorUnavailable !== false) {
2711
+ writer.uint32(24).bool(message.sensorUnavailable);
2712
+ }
2713
+ return writer;
2714
+ },
2715
+ decode(input, length) {
2716
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2717
+ const end = length === undefined ? reader.len : reader.pos + length;
2718
+ const message = createBaseTriggerStatus();
2719
+ while (reader.pos < end) {
2720
+ const tag = reader.uint32();
2721
+ switch (tag >>> 3) {
2722
+ case 1: {
2723
+ if (tag !== 8) {
2724
+ break;
2725
+ }
2726
+ message.kind = reader.int32();
2727
+ continue;
2728
+ }
2729
+ case 2: {
2730
+ if (tag !== 16) {
2731
+ break;
2732
+ }
2733
+ message.satisfied = reader.bool();
2734
+ continue;
2735
+ }
2736
+ case 3: {
2737
+ if (tag !== 24) {
2738
+ break;
2739
+ }
2740
+ message.sensorUnavailable = reader.bool();
2741
+ continue;
2742
+ }
2743
+ }
2744
+ if ((tag & 7) === 4 || tag === 0) {
2745
+ break;
2746
+ }
2747
+ reader.skip(tag & 7);
2748
+ }
2749
+ return message;
2750
+ },
2751
+ fromJSON(object) {
2752
+ return {
2753
+ kind: isSet(object.kind) ? triggerKindFromJSON(object.kind) : 0,
2754
+ satisfied: isSet(object.satisfied) ? gt.Boolean(object.satisfied) : false,
2755
+ sensorUnavailable: isSet(object.sensorUnavailable) ? gt.Boolean(object.sensorUnavailable) : false,
2756
+ };
2757
+ },
2758
+ toJSON(message) {
2759
+ const obj = {};
2760
+ if (message.kind !== 0) {
2761
+ obj.kind = triggerKindToJSON(message.kind);
2762
+ }
2763
+ if (message.satisfied !== false) {
2764
+ obj.satisfied = message.satisfied;
2765
+ }
2766
+ if (message.sensorUnavailable !== false) {
2767
+ obj.sensorUnavailable = message.sensorUnavailable;
2768
+ }
2769
+ return obj;
2770
+ },
2771
+ create(base) {
2772
+ return TriggerStatus.fromPartial(base ?? {});
2773
+ },
2774
+ fromPartial(object) {
2775
+ const message = createBaseTriggerStatus();
2776
+ message.kind = object.kind ?? 0;
2777
+ message.satisfied = object.satisfied ?? false;
2778
+ message.sensorUnavailable = object.sensorUnavailable ?? false;
2779
+ return message;
2780
+ },
2781
+ };
2782
+ function createBaseInsertInstruction() {
2783
+ return { instruction: undefined, beforeId: undefined, append: undefined };
2784
+ }
2785
+ export const InsertInstruction = {
2786
+ encode(message, writer = new BinaryWriter()) {
2787
+ if (message.instruction !== undefined) {
2788
+ Instruction.encode(message.instruction, writer.uint32(10).fork()).join();
2789
+ }
2790
+ if (message.beforeId !== undefined) {
2791
+ writer.uint32(16).uint32(message.beforeId);
2792
+ }
2793
+ if (message.append !== undefined) {
2794
+ writer.uint32(24).bool(message.append);
2795
+ }
2796
+ return writer;
2797
+ },
2798
+ decode(input, length) {
2799
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2800
+ const end = length === undefined ? reader.len : reader.pos + length;
2801
+ const message = createBaseInsertInstruction();
2802
+ while (reader.pos < end) {
2803
+ const tag = reader.uint32();
2804
+ switch (tag >>> 3) {
2805
+ case 1: {
2806
+ if (tag !== 10) {
2807
+ break;
2808
+ }
2809
+ message.instruction = Instruction.decode(reader, reader.uint32());
2810
+ continue;
2811
+ }
2812
+ case 2: {
2813
+ if (tag !== 16) {
2814
+ break;
2815
+ }
2816
+ message.beforeId = reader.uint32();
2817
+ continue;
2818
+ }
2819
+ case 3: {
2820
+ if (tag !== 24) {
2821
+ break;
2822
+ }
2823
+ message.append = reader.bool();
2824
+ continue;
2825
+ }
2826
+ }
2827
+ if ((tag & 7) === 4 || tag === 0) {
2828
+ break;
2829
+ }
2830
+ reader.skip(tag & 7);
2831
+ }
2832
+ return message;
2833
+ },
2834
+ fromJSON(object) {
2835
+ return {
2836
+ instruction: isSet(object.instruction) ? Instruction.fromJSON(object.instruction) : undefined,
2837
+ beforeId: isSet(object.beforeId) ? gt.Number(object.beforeId) : undefined,
2838
+ append: isSet(object.append) ? gt.Boolean(object.append) : undefined,
2839
+ };
2840
+ },
2841
+ toJSON(message) {
2842
+ const obj = {};
2843
+ if (message.instruction !== undefined) {
2844
+ obj.instruction = Instruction.toJSON(message.instruction);
2845
+ }
2846
+ if (message.beforeId !== undefined) {
2847
+ obj.beforeId = Math.round(message.beforeId);
2848
+ }
2849
+ if (message.append !== undefined) {
2850
+ obj.append = message.append;
2851
+ }
2852
+ return obj;
2853
+ },
2854
+ create(base) {
2855
+ return InsertInstruction.fromPartial(base ?? {});
2856
+ },
2857
+ fromPartial(object) {
2858
+ const message = createBaseInsertInstruction();
2859
+ message.instruction = (object.instruction !== undefined && object.instruction !== null)
2860
+ ? Instruction.fromPartial(object.instruction)
2861
+ : undefined;
2862
+ message.beforeId = object.beforeId ?? undefined;
2863
+ message.append = object.append ?? undefined;
2864
+ return message;
2865
+ },
2866
+ };
2867
+ function createBaseWaypointCommand() {
2868
+ return { waypoint: undefined };
2869
+ }
2870
+ export const WaypointCommand = {
2871
+ encode(message, writer = new BinaryWriter()) {
2872
+ if (message.waypoint !== undefined) {
2873
+ Waypoint.encode(message.waypoint, writer.uint32(10).fork()).join();
2874
+ }
2875
+ return writer;
2876
+ },
2877
+ decode(input, length) {
2878
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2879
+ const end = length === undefined ? reader.len : reader.pos + length;
2880
+ const message = createBaseWaypointCommand();
2881
+ while (reader.pos < end) {
2882
+ const tag = reader.uint32();
2883
+ switch (tag >>> 3) {
2884
+ case 1: {
2885
+ if (tag !== 10) {
2886
+ break;
2887
+ }
2888
+ message.waypoint = Waypoint.decode(reader, reader.uint32());
2889
+ continue;
2890
+ }
2891
+ }
2892
+ if ((tag & 7) === 4 || tag === 0) {
2893
+ break;
2894
+ }
2895
+ reader.skip(tag & 7);
2896
+ }
2897
+ return message;
2898
+ },
2899
+ fromJSON(object) {
2900
+ return { waypoint: isSet(object.waypoint) ? Waypoint.fromJSON(object.waypoint) : undefined };
2901
+ },
2902
+ toJSON(message) {
2903
+ const obj = {};
2904
+ if (message.waypoint !== undefined) {
2905
+ obj.waypoint = Waypoint.toJSON(message.waypoint);
2906
+ }
2907
+ return obj;
2908
+ },
2909
+ create(base) {
2910
+ return WaypointCommand.fromPartial(base ?? {});
2911
+ },
2912
+ fromPartial(object) {
2913
+ const message = createBaseWaypointCommand();
2914
+ message.waypoint = (object.waypoint !== undefined && object.waypoint !== null)
2915
+ ? Waypoint.fromPartial(object.waypoint)
2916
+ : undefined;
2917
+ return message;
2918
+ },
2919
+ };
2920
+ function createBaseDepthSetPointCommand() {
2921
+ return { depthSetPoint: undefined };
2922
+ }
2923
+ export const DepthSetPointCommand = {
2924
+ encode(message, writer = new BinaryWriter()) {
2925
+ if (message.depthSetPoint !== undefined) {
2926
+ DepthSetPoint.encode(message.depthSetPoint, writer.uint32(10).fork()).join();
2927
+ }
2928
+ return writer;
2929
+ },
2930
+ decode(input, length) {
2931
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2932
+ const end = length === undefined ? reader.len : reader.pos + length;
2933
+ const message = createBaseDepthSetPointCommand();
2934
+ while (reader.pos < end) {
2935
+ const tag = reader.uint32();
2936
+ switch (tag >>> 3) {
2937
+ case 1: {
2938
+ if (tag !== 10) {
2939
+ break;
2940
+ }
2941
+ message.depthSetPoint = DepthSetPoint.decode(reader, reader.uint32());
2942
+ continue;
2943
+ }
2944
+ }
2945
+ if ((tag & 7) === 4 || tag === 0) {
2946
+ break;
2947
+ }
2948
+ reader.skip(tag & 7);
2949
+ }
2950
+ return message;
2951
+ },
2952
+ fromJSON(object) {
2953
+ return { depthSetPoint: isSet(object.depthSetPoint) ? DepthSetPoint.fromJSON(object.depthSetPoint) : undefined };
2954
+ },
2955
+ toJSON(message) {
2956
+ const obj = {};
2957
+ if (message.depthSetPoint !== undefined) {
2958
+ obj.depthSetPoint = DepthSetPoint.toJSON(message.depthSetPoint);
2959
+ }
2960
+ return obj;
2961
+ },
2962
+ create(base) {
2963
+ return DepthSetPointCommand.fromPartial(base ?? {});
2964
+ },
2965
+ fromPartial(object) {
2966
+ const message = createBaseDepthSetPointCommand();
2967
+ message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
2968
+ ? DepthSetPoint.fromPartial(object.depthSetPoint)
2969
+ : undefined;
2970
+ return message;
2971
+ },
2972
+ };
2973
+ function createBaseTiltMainCameraCommand() {
2974
+ return { tiltAngle: undefined };
2975
+ }
2976
+ export const TiltMainCameraCommand = {
2977
+ encode(message, writer = new BinaryWriter()) {
2978
+ if (message.tiltAngle !== undefined) {
2979
+ TiltAngle.encode(message.tiltAngle, writer.uint32(10).fork()).join();
2980
+ }
2981
+ return writer;
2982
+ },
2983
+ decode(input, length) {
2984
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2985
+ const end = length === undefined ? reader.len : reader.pos + length;
2986
+ const message = createBaseTiltMainCameraCommand();
2987
+ while (reader.pos < end) {
2988
+ const tag = reader.uint32();
2989
+ switch (tag >>> 3) {
2990
+ case 1: {
2991
+ if (tag !== 10) {
2992
+ break;
2993
+ }
2994
+ message.tiltAngle = TiltAngle.decode(reader, reader.uint32());
2995
+ continue;
2996
+ }
2997
+ }
2998
+ if ((tag & 7) === 4 || tag === 0) {
2999
+ break;
3000
+ }
3001
+ reader.skip(tag & 7);
3002
+ }
3003
+ return message;
3004
+ },
3005
+ fromJSON(object) {
3006
+ return { tiltAngle: isSet(object.tiltAngle) ? TiltAngle.fromJSON(object.tiltAngle) : undefined };
3007
+ },
3008
+ toJSON(message) {
3009
+ const obj = {};
3010
+ if (message.tiltAngle !== undefined) {
3011
+ obj.tiltAngle = TiltAngle.toJSON(message.tiltAngle);
3012
+ }
3013
+ return obj;
3014
+ },
3015
+ create(base) {
3016
+ return TiltMainCameraCommand.fromPartial(base ?? {});
3017
+ },
3018
+ fromPartial(object) {
3019
+ const message = createBaseTiltMainCameraCommand();
3020
+ message.tiltAngle = (object.tiltAngle !== undefined && object.tiltAngle !== null)
3021
+ ? TiltAngle.fromPartial(object.tiltAngle)
3022
+ : undefined;
3023
+ return message;
3024
+ },
3025
+ };
3026
+ function createBaseTiltMultibeamCommand() {
3027
+ return { multibeamServo: undefined };
3028
+ }
3029
+ export const TiltMultibeamCommand = {
3030
+ encode(message, writer = new BinaryWriter()) {
3031
+ if (message.multibeamServo !== undefined) {
3032
+ MultibeamServo.encode(message.multibeamServo, writer.uint32(10).fork()).join();
3033
+ }
3034
+ return writer;
3035
+ },
3036
+ decode(input, length) {
3037
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3038
+ const end = length === undefined ? reader.len : reader.pos + length;
3039
+ const message = createBaseTiltMultibeamCommand();
3040
+ while (reader.pos < end) {
3041
+ const tag = reader.uint32();
3042
+ switch (tag >>> 3) {
3043
+ case 1: {
3044
+ if (tag !== 10) {
3045
+ break;
3046
+ }
3047
+ message.multibeamServo = MultibeamServo.decode(reader, reader.uint32());
3048
+ continue;
3049
+ }
3050
+ }
3051
+ if ((tag & 7) === 4 || tag === 0) {
3052
+ break;
3053
+ }
3054
+ reader.skip(tag & 7);
3055
+ }
3056
+ return message;
3057
+ },
3058
+ fromJSON(object) {
3059
+ return {
3060
+ multibeamServo: isSet(object.multibeamServo) ? MultibeamServo.fromJSON(object.multibeamServo) : undefined,
3061
+ };
3062
+ },
3063
+ toJSON(message) {
3064
+ const obj = {};
3065
+ if (message.multibeamServo !== undefined) {
3066
+ obj.multibeamServo = MultibeamServo.toJSON(message.multibeamServo);
3067
+ }
3068
+ return obj;
3069
+ },
3070
+ create(base) {
3071
+ return TiltMultibeamCommand.fromPartial(base ?? {});
3072
+ },
3073
+ fromPartial(object) {
3074
+ const message = createBaseTiltMultibeamCommand();
3075
+ message.multibeamServo = (object.multibeamServo !== undefined && object.multibeamServo !== null)
3076
+ ? MultibeamServo.fromPartial(object.multibeamServo)
3077
+ : undefined;
3078
+ return message;
3079
+ },
3080
+ };
3081
+ function createBaseWaitForCommand() {
3082
+ return { waitForSeconds: 0 };
3083
+ }
3084
+ export const WaitForCommand = {
3085
+ encode(message, writer = new BinaryWriter()) {
3086
+ if (message.waitForSeconds !== 0) {
3087
+ writer.uint32(13).float(message.waitForSeconds);
3088
+ }
3089
+ return writer;
3090
+ },
3091
+ decode(input, length) {
3092
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3093
+ const end = length === undefined ? reader.len : reader.pos + length;
3094
+ const message = createBaseWaitForCommand();
3095
+ while (reader.pos < end) {
3096
+ const tag = reader.uint32();
3097
+ switch (tag >>> 3) {
3098
+ case 1: {
3099
+ if (tag !== 13) {
3100
+ break;
3101
+ }
3102
+ message.waitForSeconds = reader.float();
3103
+ continue;
3104
+ }
3105
+ }
3106
+ if ((tag & 7) === 4 || tag === 0) {
3107
+ break;
3108
+ }
3109
+ reader.skip(tag & 7);
3110
+ }
3111
+ return message;
3112
+ },
3113
+ fromJSON(object) {
3114
+ return { waitForSeconds: isSet(object.waitForSeconds) ? gt.Number(object.waitForSeconds) : 0 };
3115
+ },
3116
+ toJSON(message) {
3117
+ const obj = {};
3118
+ if (message.waitForSeconds !== 0) {
3119
+ obj.waitForSeconds = message.waitForSeconds;
3120
+ }
3121
+ return obj;
3122
+ },
3123
+ create(base) {
3124
+ return WaitForCommand.fromPartial(base ?? {});
3125
+ },
3126
+ fromPartial(object) {
3127
+ const message = createBaseWaitForCommand();
3128
+ message.waitForSeconds = object.waitForSeconds ?? 0;
3129
+ return message;
3130
+ },
3131
+ };
3132
+ function createBaseCameraCommand() {
3133
+ return { cameraAction: 0, actionParam: 0, camera: 0, storageLocation: 0 };
3134
+ }
3135
+ export const CameraCommand = {
3136
+ encode(message, writer = new BinaryWriter()) {
3137
+ if (message.cameraAction !== 0) {
3138
+ writer.uint32(8).int32(message.cameraAction);
3139
+ }
3140
+ if (message.actionParam !== 0) {
3141
+ writer.uint32(21).float(message.actionParam);
3142
+ }
3143
+ if (message.camera !== 0) {
3144
+ writer.uint32(24).int32(message.camera);
3145
+ }
3146
+ if (message.storageLocation !== 0) {
3147
+ writer.uint32(32).int32(message.storageLocation);
3148
+ }
3149
+ return writer;
3150
+ },
3151
+ decode(input, length) {
3152
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3153
+ const end = length === undefined ? reader.len : reader.pos + length;
3154
+ const message = createBaseCameraCommand();
3155
+ while (reader.pos < end) {
3156
+ const tag = reader.uint32();
3157
+ switch (tag >>> 3) {
3158
+ case 1: {
3159
+ if (tag !== 8) {
3160
+ break;
3161
+ }
3162
+ message.cameraAction = reader.int32();
3163
+ continue;
3164
+ }
3165
+ case 2: {
3166
+ if (tag !== 21) {
3167
+ break;
3168
+ }
3169
+ message.actionParam = reader.float();
3170
+ continue;
3171
+ }
3172
+ case 3: {
3173
+ if (tag !== 24) {
3174
+ break;
3175
+ }
3176
+ message.camera = reader.int32();
3177
+ continue;
3178
+ }
3179
+ case 4: {
3180
+ if (tag !== 32) {
3181
+ break;
3182
+ }
3183
+ message.storageLocation = reader.int32();
3184
+ continue;
3185
+ }
3186
+ }
3187
+ if ((tag & 7) === 4 || tag === 0) {
3188
+ break;
3189
+ }
3190
+ reader.skip(tag & 7);
3191
+ }
3192
+ return message;
3193
+ },
3194
+ fromJSON(object) {
3195
+ return {
3196
+ cameraAction: isSet(object.cameraAction) ? cameraActionFromJSON(object.cameraAction) : 0,
3197
+ actionParam: isSet(object.actionParam) ? gt.Number(object.actionParam) : 0,
3198
+ camera: isSet(object.camera) ? cameraFromJSON(object.camera) : 0,
3199
+ storageLocation: isSet(object.storageLocation) ? storageLocationFromJSON(object.storageLocation) : 0,
3200
+ };
3201
+ },
3202
+ toJSON(message) {
3203
+ const obj = {};
3204
+ if (message.cameraAction !== 0) {
3205
+ obj.cameraAction = cameraActionToJSON(message.cameraAction);
3206
+ }
3207
+ if (message.actionParam !== 0) {
3208
+ obj.actionParam = message.actionParam;
3209
+ }
3210
+ if (message.camera !== 0) {
3211
+ obj.camera = cameraToJSON(message.camera);
3212
+ }
3213
+ if (message.storageLocation !== 0) {
3214
+ obj.storageLocation = storageLocationToJSON(message.storageLocation);
3215
+ }
3216
+ return obj;
3217
+ },
3218
+ create(base) {
3219
+ return CameraCommand.fromPartial(base ?? {});
3220
+ },
3221
+ fromPartial(object) {
3222
+ const message = createBaseCameraCommand();
3223
+ message.cameraAction = object.cameraAction ?? 0;
3224
+ message.actionParam = object.actionParam ?? 0;
3225
+ message.camera = object.camera ?? 0;
3226
+ message.storageLocation = object.storageLocation ?? 0;
3227
+ return message;
3228
+ },
3229
+ };
3230
+ function createBaseGoToSurfaceCommand() {
3231
+ return { desiredSpeed: 0 };
3232
+ }
3233
+ export const GoToSurfaceCommand = {
3234
+ encode(message, writer = new BinaryWriter()) {
3235
+ if (message.desiredSpeed !== 0) {
3236
+ writer.uint32(13).float(message.desiredSpeed);
3237
+ }
3238
+ return writer;
3239
+ },
3240
+ decode(input, length) {
3241
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3242
+ const end = length === undefined ? reader.len : reader.pos + length;
3243
+ const message = createBaseGoToSurfaceCommand();
3244
+ while (reader.pos < end) {
3245
+ const tag = reader.uint32();
3246
+ switch (tag >>> 3) {
3247
+ case 1: {
3248
+ if (tag !== 13) {
3249
+ break;
3250
+ }
3251
+ message.desiredSpeed = reader.float();
3252
+ continue;
3253
+ }
3254
+ }
3255
+ if ((tag & 7) === 4 || tag === 0) {
3256
+ break;
3257
+ }
3258
+ reader.skip(tag & 7);
3259
+ }
3260
+ return message;
3261
+ },
3262
+ fromJSON(object) {
3263
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
3264
+ },
3265
+ toJSON(message) {
3266
+ const obj = {};
3267
+ if (message.desiredSpeed !== 0) {
3268
+ obj.desiredSpeed = message.desiredSpeed;
3269
+ }
3270
+ return obj;
3271
+ },
3272
+ create(base) {
3273
+ return GoToSurfaceCommand.fromPartial(base ?? {});
3274
+ },
3275
+ fromPartial(object) {
3276
+ const message = createBaseGoToSurfaceCommand();
3277
+ message.desiredSpeed = object.desiredSpeed ?? 0;
3278
+ return message;
3279
+ },
3280
+ };
3281
+ function createBaseGoToSeabedCommand() {
3282
+ return { desiredSpeed: 0 };
3283
+ }
3284
+ export const GoToSeabedCommand = {
3285
+ encode(message, writer = new BinaryWriter()) {
3286
+ if (message.desiredSpeed !== 0) {
3287
+ writer.uint32(13).float(message.desiredSpeed);
3288
+ }
3289
+ return writer;
3290
+ },
3291
+ decode(input, length) {
3292
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3293
+ const end = length === undefined ? reader.len : reader.pos + length;
3294
+ const message = createBaseGoToSeabedCommand();
3295
+ while (reader.pos < end) {
3296
+ const tag = reader.uint32();
3297
+ switch (tag >>> 3) {
3298
+ case 1: {
3299
+ if (tag !== 13) {
3300
+ break;
3301
+ }
3302
+ message.desiredSpeed = reader.float();
3303
+ continue;
3304
+ }
3305
+ }
3306
+ if ((tag & 7) === 4 || tag === 0) {
3307
+ break;
3308
+ }
3309
+ reader.skip(tag & 7);
3310
+ }
3311
+ return message;
3312
+ },
3313
+ fromJSON(object) {
3314
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
3315
+ },
3316
+ toJSON(message) {
3317
+ const obj = {};
3318
+ if (message.desiredSpeed !== 0) {
3319
+ obj.desiredSpeed = message.desiredSpeed;
3320
+ }
3321
+ return obj;
3322
+ },
3323
+ create(base) {
3324
+ return GoToSeabedCommand.fromPartial(base ?? {});
3325
+ },
3326
+ fromPartial(object) {
3327
+ const message = createBaseGoToSeabedCommand();
3328
+ message.desiredSpeed = object.desiredSpeed ?? 0;
3329
+ return message;
3330
+ },
3331
+ };
3332
+ function createBaseGoToHomeCommand() {
3333
+ return { desiredSpeed: 0 };
3334
+ }
3335
+ export const GoToHomeCommand = {
3336
+ encode(message, writer = new BinaryWriter()) {
3337
+ if (message.desiredSpeed !== 0) {
3338
+ writer.uint32(13).float(message.desiredSpeed);
3339
+ }
3340
+ return writer;
3341
+ },
3342
+ decode(input, length) {
3343
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3344
+ const end = length === undefined ? reader.len : reader.pos + length;
3345
+ const message = createBaseGoToHomeCommand();
3346
+ while (reader.pos < end) {
3347
+ const tag = reader.uint32();
3348
+ switch (tag >>> 3) {
3349
+ case 1: {
3350
+ if (tag !== 13) {
3351
+ break;
3352
+ }
3353
+ message.desiredSpeed = reader.float();
3354
+ continue;
3355
+ }
3356
+ }
3357
+ if ((tag & 7) === 4 || tag === 0) {
3358
+ break;
3359
+ }
3360
+ reader.skip(tag & 7);
3361
+ }
3362
+ return message;
3363
+ },
3364
+ fromJSON(object) {
3365
+ return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
3366
+ },
3367
+ toJSON(message) {
3368
+ const obj = {};
3369
+ if (message.desiredSpeed !== 0) {
3370
+ obj.desiredSpeed = message.desiredSpeed;
3371
+ }
3372
+ return obj;
3373
+ },
3374
+ create(base) {
3375
+ return GoToHomeCommand.fromPartial(base ?? {});
3376
+ },
3377
+ fromPartial(object) {
3378
+ const message = createBaseGoToHomeCommand();
3379
+ message.desiredSpeed = object.desiredSpeed ?? 0;
3380
+ return message;
3381
+ },
3382
+ };
3383
+ function createBaseRecordMultibeamCommand() {
3384
+ return { enable: false, storageLocation: 0 };
3385
+ }
3386
+ export const RecordMultibeamCommand = {
3387
+ encode(message, writer = new BinaryWriter()) {
3388
+ if (message.enable !== false) {
3389
+ writer.uint32(8).bool(message.enable);
3390
+ }
3391
+ if (message.storageLocation !== 0) {
3392
+ writer.uint32(16).int32(message.storageLocation);
3393
+ }
3394
+ return writer;
3395
+ },
3396
+ decode(input, length) {
3397
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3398
+ const end = length === undefined ? reader.len : reader.pos + length;
3399
+ const message = createBaseRecordMultibeamCommand();
3400
+ while (reader.pos < end) {
3401
+ const tag = reader.uint32();
3402
+ switch (tag >>> 3) {
3403
+ case 1: {
3404
+ if (tag !== 8) {
3405
+ break;
3406
+ }
3407
+ message.enable = reader.bool();
3408
+ continue;
3409
+ }
3410
+ case 2: {
3411
+ if (tag !== 16) {
3412
+ break;
3413
+ }
3414
+ message.storageLocation = reader.int32();
3415
+ continue;
3416
+ }
3417
+ }
3418
+ if ((tag & 7) === 4 || tag === 0) {
3419
+ break;
3420
+ }
3421
+ reader.skip(tag & 7);
3422
+ }
3423
+ return message;
3424
+ },
3425
+ fromJSON(object) {
3426
+ return {
3427
+ enable: isSet(object.enable) ? gt.Boolean(object.enable) : false,
3428
+ storageLocation: isSet(object.storageLocation) ? storageLocationFromJSON(object.storageLocation) : 0,
3429
+ };
3430
+ },
3431
+ toJSON(message) {
3432
+ const obj = {};
3433
+ if (message.enable !== false) {
3434
+ obj.enable = message.enable;
3435
+ }
3436
+ if (message.storageLocation !== 0) {
3437
+ obj.storageLocation = storageLocationToJSON(message.storageLocation);
3438
+ }
3439
+ return obj;
3440
+ },
3441
+ create(base) {
3442
+ return RecordMultibeamCommand.fromPartial(base ?? {});
3443
+ },
3444
+ fromPartial(object) {
3445
+ const message = createBaseRecordMultibeamCommand();
3446
+ message.enable = object.enable ?? false;
3447
+ message.storageLocation = object.storageLocation ?? 0;
3448
+ return message;
3449
+ },
3450
+ };
3451
+ function createBaseActivateMultibeamCommand() {
3452
+ return { activate: false, config: undefined, expectedDeviceId: 0 };
3453
+ }
3454
+ export const ActivateMultibeamCommand = {
3455
+ encode(message, writer = new BinaryWriter()) {
3456
+ if (message.activate !== false) {
3457
+ writer.uint32(8).bool(message.activate);
3458
+ }
3459
+ if (message.config !== undefined) {
3460
+ MultibeamConfig.encode(message.config, writer.uint32(18).fork()).join();
3461
+ }
3462
+ if (message.expectedDeviceId !== 0) {
3463
+ writer.uint32(24).int32(message.expectedDeviceId);
3464
+ }
3465
+ return writer;
3466
+ },
3467
+ decode(input, length) {
3468
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3469
+ const end = length === undefined ? reader.len : reader.pos + length;
3470
+ const message = createBaseActivateMultibeamCommand();
3471
+ while (reader.pos < end) {
3472
+ const tag = reader.uint32();
3473
+ switch (tag >>> 3) {
3474
+ case 1: {
3475
+ if (tag !== 8) {
3476
+ break;
3477
+ }
3478
+ message.activate = reader.bool();
3479
+ continue;
3480
+ }
3481
+ case 2: {
3482
+ if (tag !== 18) {
3483
+ break;
3484
+ }
3485
+ message.config = MultibeamConfig.decode(reader, reader.uint32());
3486
+ continue;
3487
+ }
3488
+ case 3: {
3489
+ if (tag !== 24) {
3490
+ break;
3491
+ }
3492
+ message.expectedDeviceId = reader.int32();
3493
+ continue;
3494
+ }
3495
+ }
3496
+ if ((tag & 7) === 4 || tag === 0) {
3497
+ break;
3498
+ }
3499
+ reader.skip(tag & 7);
3500
+ }
3501
+ return message;
3502
+ },
3503
+ fromJSON(object) {
3504
+ return {
3505
+ activate: isSet(object.activate) ? gt.Boolean(object.activate) : false,
3506
+ config: isSet(object.config) ? MultibeamConfig.fromJSON(object.config) : undefined,
3507
+ expectedDeviceId: isSet(object.expectedDeviceId) ? guestPortDeviceIDFromJSON(object.expectedDeviceId) : 0,
3508
+ };
3509
+ },
3510
+ toJSON(message) {
3511
+ const obj = {};
3512
+ if (message.activate !== false) {
3513
+ obj.activate = message.activate;
3514
+ }
3515
+ if (message.config !== undefined) {
3516
+ obj.config = MultibeamConfig.toJSON(message.config);
3517
+ }
3518
+ if (message.expectedDeviceId !== 0) {
3519
+ obj.expectedDeviceId = guestPortDeviceIDToJSON(message.expectedDeviceId);
3520
+ }
3521
+ return obj;
3522
+ },
3523
+ create(base) {
3524
+ return ActivateMultibeamCommand.fromPartial(base ?? {});
3525
+ },
3526
+ fromPartial(object) {
3527
+ const message = createBaseActivateMultibeamCommand();
3528
+ message.activate = object.activate ?? false;
3529
+ message.config = (object.config !== undefined && object.config !== null)
3530
+ ? MultibeamConfig.fromPartial(object.config)
3531
+ : undefined;
3532
+ message.expectedDeviceId = object.expectedDeviceId ?? 0;
3533
+ return message;
3534
+ },
3535
+ };
3536
+ function createBaseMultibeamConfigCommand() {
3537
+ return { config: undefined, expectedDeviceId: 0 };
3538
+ }
3539
+ export const MultibeamConfigCommand = {
3540
+ encode(message, writer = new BinaryWriter()) {
3541
+ if (message.config !== undefined) {
3542
+ MultibeamConfig.encode(message.config, writer.uint32(10).fork()).join();
3543
+ }
3544
+ if (message.expectedDeviceId !== 0) {
3545
+ writer.uint32(16).int32(message.expectedDeviceId);
3546
+ }
3547
+ return writer;
3548
+ },
3549
+ decode(input, length) {
3550
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3551
+ const end = length === undefined ? reader.len : reader.pos + length;
3552
+ const message = createBaseMultibeamConfigCommand();
3553
+ while (reader.pos < end) {
3554
+ const tag = reader.uint32();
3555
+ switch (tag >>> 3) {
3556
+ case 1: {
3557
+ if (tag !== 10) {
3558
+ break;
3559
+ }
3560
+ message.config = MultibeamConfig.decode(reader, reader.uint32());
3561
+ continue;
3562
+ }
3563
+ case 2: {
3564
+ if (tag !== 16) {
3565
+ break;
3566
+ }
3567
+ message.expectedDeviceId = reader.int32();
3568
+ continue;
3569
+ }
3570
+ }
3571
+ if ((tag & 7) === 4 || tag === 0) {
3572
+ break;
3573
+ }
3574
+ reader.skip(tag & 7);
3575
+ }
3576
+ return message;
3577
+ },
3578
+ fromJSON(object) {
3579
+ return {
3580
+ config: isSet(object.config) ? MultibeamConfig.fromJSON(object.config) : undefined,
3581
+ expectedDeviceId: isSet(object.expectedDeviceId) ? guestPortDeviceIDFromJSON(object.expectedDeviceId) : 0,
3582
+ };
3583
+ },
3584
+ toJSON(message) {
3585
+ const obj = {};
3586
+ if (message.config !== undefined) {
3587
+ obj.config = MultibeamConfig.toJSON(message.config);
3588
+ }
3589
+ if (message.expectedDeviceId !== 0) {
3590
+ obj.expectedDeviceId = guestPortDeviceIDToJSON(message.expectedDeviceId);
1238
3591
  }
1239
3592
  return obj;
1240
3593
  },
1241
3594
  create(base) {
1242
- return WaypointCommand.fromPartial(base ?? {});
3595
+ return MultibeamConfigCommand.fromPartial(base ?? {});
1243
3596
  },
1244
3597
  fromPartial(object) {
1245
- const message = createBaseWaypointCommand();
1246
- message.waypoint = (object.waypoint !== undefined && object.waypoint !== null)
1247
- ? Waypoint.fromPartial(object.waypoint)
3598
+ const message = createBaseMultibeamConfigCommand();
3599
+ message.config = (object.config !== undefined && object.config !== null)
3600
+ ? MultibeamConfig.fromPartial(object.config)
1248
3601
  : undefined;
3602
+ message.expectedDeviceId = object.expectedDeviceId ?? 0;
1249
3603
  return message;
1250
3604
  },
1251
3605
  };
1252
- function createBaseDepthSetPointCommand() {
1253
- return { depthSetPoint: undefined };
3606
+ function createBaseLightsCommand() {
3607
+ return { lights: undefined, target: 0 };
1254
3608
  }
1255
- export const DepthSetPointCommand = {
3609
+ export const LightsCommand = {
1256
3610
  encode(message, writer = new BinaryWriter()) {
1257
- if (message.depthSetPoint !== undefined) {
1258
- DepthSetPoint.encode(message.depthSetPoint, writer.uint32(10).fork()).join();
3611
+ if (message.lights !== undefined) {
3612
+ Lights.encode(message.lights, writer.uint32(10).fork()).join();
3613
+ }
3614
+ if (message.target !== 0) {
3615
+ writer.uint32(16).int32(message.target);
1259
3616
  }
1260
3617
  return writer;
1261
3618
  },
1262
3619
  decode(input, length) {
1263
3620
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1264
3621
  const end = length === undefined ? reader.len : reader.pos + length;
1265
- const message = createBaseDepthSetPointCommand();
3622
+ const message = createBaseLightsCommand();
1266
3623
  while (reader.pos < end) {
1267
3624
  const tag = reader.uint32();
1268
3625
  switch (tag >>> 3) {
@@ -1270,7 +3627,14 @@ export const DepthSetPointCommand = {
1270
3627
  if (tag !== 10) {
1271
3628
  break;
1272
3629
  }
1273
- message.depthSetPoint = DepthSetPoint.decode(reader, reader.uint32());
3630
+ message.lights = Lights.decode(reader, reader.uint32());
3631
+ continue;
3632
+ }
3633
+ case 2: {
3634
+ if (tag !== 16) {
3635
+ break;
3636
+ }
3637
+ message.target = reader.int32();
1274
3638
  continue;
1275
3639
  }
1276
3640
  }
@@ -1282,40 +3646,47 @@ export const DepthSetPointCommand = {
1282
3646
  return message;
1283
3647
  },
1284
3648
  fromJSON(object) {
1285
- return { depthSetPoint: isSet(object.depthSetPoint) ? DepthSetPoint.fromJSON(object.depthSetPoint) : undefined };
3649
+ return {
3650
+ lights: isSet(object.lights) ? Lights.fromJSON(object.lights) : undefined,
3651
+ target: isSet(object.target) ? lightTargetFromJSON(object.target) : 0,
3652
+ };
1286
3653
  },
1287
3654
  toJSON(message) {
1288
3655
  const obj = {};
1289
- if (message.depthSetPoint !== undefined) {
1290
- obj.depthSetPoint = DepthSetPoint.toJSON(message.depthSetPoint);
3656
+ if (message.lights !== undefined) {
3657
+ obj.lights = Lights.toJSON(message.lights);
3658
+ }
3659
+ if (message.target !== 0) {
3660
+ obj.target = lightTargetToJSON(message.target);
1291
3661
  }
1292
3662
  return obj;
1293
3663
  },
1294
3664
  create(base) {
1295
- return DepthSetPointCommand.fromPartial(base ?? {});
3665
+ return LightsCommand.fromPartial(base ?? {});
1296
3666
  },
1297
3667
  fromPartial(object) {
1298
- const message = createBaseDepthSetPointCommand();
1299
- message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
1300
- ? DepthSetPoint.fromPartial(object.depthSetPoint)
3668
+ const message = createBaseLightsCommand();
3669
+ message.lights = (object.lights !== undefined && object.lights !== null)
3670
+ ? Lights.fromPartial(object.lights)
1301
3671
  : undefined;
3672
+ message.target = object.target ?? 0;
1302
3673
  return message;
1303
3674
  },
1304
3675
  };
1305
- function createBaseTiltMainCameraCommand() {
1306
- return { tiltAngle: undefined };
3676
+ function createBaseLaserCommand() {
3677
+ return { laser: undefined };
1307
3678
  }
1308
- export const TiltMainCameraCommand = {
3679
+ export const LaserCommand = {
1309
3680
  encode(message, writer = new BinaryWriter()) {
1310
- if (message.tiltAngle !== undefined) {
1311
- TiltAngle.encode(message.tiltAngle, writer.uint32(10).fork()).join();
3681
+ if (message.laser !== undefined) {
3682
+ Laser.encode(message.laser, writer.uint32(10).fork()).join();
1312
3683
  }
1313
3684
  return writer;
1314
3685
  },
1315
3686
  decode(input, length) {
1316
3687
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1317
3688
  const end = length === undefined ? reader.len : reader.pos + length;
1318
- const message = createBaseTiltMainCameraCommand();
3689
+ const message = createBaseLaserCommand();
1319
3690
  while (reader.pos < end) {
1320
3691
  const tag = reader.uint32();
1321
3692
  switch (tag >>> 3) {
@@ -1323,7 +3694,7 @@ export const TiltMainCameraCommand = {
1323
3694
  if (tag !== 10) {
1324
3695
  break;
1325
3696
  }
1326
- message.tiltAngle = TiltAngle.decode(reader, reader.uint32());
3697
+ message.laser = Laser.decode(reader, reader.uint32());
1327
3698
  continue;
1328
3699
  }
1329
3700
  }
@@ -1335,40 +3706,94 @@ export const TiltMainCameraCommand = {
1335
3706
  return message;
1336
3707
  },
1337
3708
  fromJSON(object) {
1338
- return { tiltAngle: isSet(object.tiltAngle) ? TiltAngle.fromJSON(object.tiltAngle) : undefined };
3709
+ return { laser: isSet(object.laser) ? Laser.fromJSON(object.laser) : undefined };
1339
3710
  },
1340
3711
  toJSON(message) {
1341
3712
  const obj = {};
1342
- if (message.tiltAngle !== undefined) {
1343
- obj.tiltAngle = TiltAngle.toJSON(message.tiltAngle);
3713
+ if (message.laser !== undefined) {
3714
+ obj.laser = Laser.toJSON(message.laser);
1344
3715
  }
1345
3716
  return obj;
1346
3717
  },
1347
3718
  create(base) {
1348
- return TiltMainCameraCommand.fromPartial(base ?? {});
3719
+ return LaserCommand.fromPartial(base ?? {});
1349
3720
  },
1350
3721
  fromPartial(object) {
1351
- const message = createBaseTiltMainCameraCommand();
1352
- message.tiltAngle = (object.tiltAngle !== undefined && object.tiltAngle !== null)
1353
- ? TiltAngle.fromPartial(object.tiltAngle)
3722
+ const message = createBaseLaserCommand();
3723
+ message.laser = (object.laser !== undefined && object.laser !== null) ? Laser.fromPartial(object.laser) : undefined;
3724
+ return message;
3725
+ },
3726
+ };
3727
+ function createBaseTiltStabilizationCommand() {
3728
+ return { state: undefined };
3729
+ }
3730
+ export const TiltStabilizationCommand = {
3731
+ encode(message, writer = new BinaryWriter()) {
3732
+ if (message.state !== undefined) {
3733
+ TiltStabilizationState.encode(message.state, writer.uint32(10).fork()).join();
3734
+ }
3735
+ return writer;
3736
+ },
3737
+ decode(input, length) {
3738
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3739
+ const end = length === undefined ? reader.len : reader.pos + length;
3740
+ const message = createBaseTiltStabilizationCommand();
3741
+ while (reader.pos < end) {
3742
+ const tag = reader.uint32();
3743
+ switch (tag >>> 3) {
3744
+ case 1: {
3745
+ if (tag !== 10) {
3746
+ break;
3747
+ }
3748
+ message.state = TiltStabilizationState.decode(reader, reader.uint32());
3749
+ continue;
3750
+ }
3751
+ }
3752
+ if ((tag & 7) === 4 || tag === 0) {
3753
+ break;
3754
+ }
3755
+ reader.skip(tag & 7);
3756
+ }
3757
+ return message;
3758
+ },
3759
+ fromJSON(object) {
3760
+ return { state: isSet(object.state) ? TiltStabilizationState.fromJSON(object.state) : undefined };
3761
+ },
3762
+ toJSON(message) {
3763
+ const obj = {};
3764
+ if (message.state !== undefined) {
3765
+ obj.state = TiltStabilizationState.toJSON(message.state);
3766
+ }
3767
+ return obj;
3768
+ },
3769
+ create(base) {
3770
+ return TiltStabilizationCommand.fromPartial(base ?? {});
3771
+ },
3772
+ fromPartial(object) {
3773
+ const message = createBaseTiltStabilizationCommand();
3774
+ message.state = (object.state !== undefined && object.state !== null)
3775
+ ? TiltStabilizationState.fromPartial(object.state)
1354
3776
  : undefined;
1355
3777
  return message;
1356
3778
  },
1357
3779
  };
1358
- function createBaseTiltMultibeamCommand() {
1359
- return { multibeamServo: undefined };
3780
+ function createBaseCvModelStateCommand() {
3781
+ return { packageId: "", running: false };
1360
3782
  }
1361
- export const TiltMultibeamCommand = {
3783
+ export const CvModelStateCommand = {
1362
3784
  encode(message, writer = new BinaryWriter()) {
1363
- if (message.multibeamServo !== undefined) {
1364
- MultibeamServo.encode(message.multibeamServo, writer.uint32(10).fork()).join();
3785
+ if (message.packageId !== "") {
3786
+ writer.uint32(10).string(message.packageId);
3787
+ }
3788
+ if (message.running !== false) {
3789
+ writer.uint32(16).bool(message.running);
1365
3790
  }
1366
3791
  return writer;
1367
3792
  },
1368
3793
  decode(input, length) {
1369
3794
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1370
3795
  const end = length === undefined ? reader.len : reader.pos + length;
1371
- const message = createBaseTiltMultibeamCommand();
3796
+ const message = createBaseCvModelStateCommand();
1372
3797
  while (reader.pos < end) {
1373
3798
  const tag = reader.uint32();
1374
3799
  switch (tag >>> 3) {
@@ -1376,7 +3801,14 @@ export const TiltMultibeamCommand = {
1376
3801
  if (tag !== 10) {
1377
3802
  break;
1378
3803
  }
1379
- message.multibeamServo = MultibeamServo.decode(reader, reader.uint32());
3804
+ message.packageId = reader.string();
3805
+ continue;
3806
+ }
3807
+ case 2: {
3808
+ if (tag !== 16) {
3809
+ break;
3810
+ }
3811
+ message.running = reader.bool();
1380
3812
  continue;
1381
3813
  }
1382
3814
  }
@@ -1389,49 +3821,52 @@ export const TiltMultibeamCommand = {
1389
3821
  },
1390
3822
  fromJSON(object) {
1391
3823
  return {
1392
- multibeamServo: isSet(object.multibeamServo) ? MultibeamServo.fromJSON(object.multibeamServo) : undefined,
3824
+ packageId: isSet(object.packageId) ? gt.String(object.packageId) : "",
3825
+ running: isSet(object.running) ? gt.Boolean(object.running) : false,
1393
3826
  };
1394
3827
  },
1395
3828
  toJSON(message) {
1396
3829
  const obj = {};
1397
- if (message.multibeamServo !== undefined) {
1398
- obj.multibeamServo = MultibeamServo.toJSON(message.multibeamServo);
3830
+ if (message.packageId !== "") {
3831
+ obj.packageId = message.packageId;
3832
+ }
3833
+ if (message.running !== false) {
3834
+ obj.running = message.running;
1399
3835
  }
1400
3836
  return obj;
1401
3837
  },
1402
3838
  create(base) {
1403
- return TiltMultibeamCommand.fromPartial(base ?? {});
3839
+ return CvModelStateCommand.fromPartial(base ?? {});
1404
3840
  },
1405
3841
  fromPartial(object) {
1406
- const message = createBaseTiltMultibeamCommand();
1407
- message.multibeamServo = (object.multibeamServo !== undefined && object.multibeamServo !== null)
1408
- ? MultibeamServo.fromPartial(object.multibeamServo)
1409
- : undefined;
3842
+ const message = createBaseCvModelStateCommand();
3843
+ message.packageId = object.packageId ?? "";
3844
+ message.running = object.running ?? false;
1410
3845
  return message;
1411
3846
  },
1412
3847
  };
1413
- function createBaseWaitForCommand() {
1414
- return { waitForSeconds: 0 };
3848
+ function createBaseAnnotationCommand() {
3849
+ return { annotation: undefined };
1415
3850
  }
1416
- export const WaitForCommand = {
3851
+ export const AnnotationCommand = {
1417
3852
  encode(message, writer = new BinaryWriter()) {
1418
- if (message.waitForSeconds !== 0) {
1419
- writer.uint32(13).float(message.waitForSeconds);
3853
+ if (message.annotation !== undefined) {
3854
+ Annotation.encode(message.annotation, writer.uint32(10).fork()).join();
1420
3855
  }
1421
3856
  return writer;
1422
3857
  },
1423
3858
  decode(input, length) {
1424
3859
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1425
3860
  const end = length === undefined ? reader.len : reader.pos + length;
1426
- const message = createBaseWaitForCommand();
3861
+ const message = createBaseAnnotationCommand();
1427
3862
  while (reader.pos < end) {
1428
3863
  const tag = reader.uint32();
1429
3864
  switch (tag >>> 3) {
1430
3865
  case 1: {
1431
- if (tag !== 13) {
3866
+ if (tag !== 10) {
1432
3867
  break;
1433
3868
  }
1434
- message.waitForSeconds = reader.float();
3869
+ message.annotation = Annotation.decode(reader, reader.uint32());
1435
3870
  continue;
1436
3871
  }
1437
3872
  }
@@ -1443,56 +3878,58 @@ export const WaitForCommand = {
1443
3878
  return message;
1444
3879
  },
1445
3880
  fromJSON(object) {
1446
- return { waitForSeconds: isSet(object.waitForSeconds) ? gt.Number(object.waitForSeconds) : 0 };
3881
+ return { annotation: isSet(object.annotation) ? Annotation.fromJSON(object.annotation) : undefined };
1447
3882
  },
1448
3883
  toJSON(message) {
1449
3884
  const obj = {};
1450
- if (message.waitForSeconds !== 0) {
1451
- obj.waitForSeconds = message.waitForSeconds;
3885
+ if (message.annotation !== undefined) {
3886
+ obj.annotation = Annotation.toJSON(message.annotation);
1452
3887
  }
1453
3888
  return obj;
1454
3889
  },
1455
3890
  create(base) {
1456
- return WaitForCommand.fromPartial(base ?? {});
3891
+ return AnnotationCommand.fromPartial(base ?? {});
1457
3892
  },
1458
3893
  fromPartial(object) {
1459
- const message = createBaseWaitForCommand();
1460
- message.waitForSeconds = object.waitForSeconds ?? 0;
3894
+ const message = createBaseAnnotationCommand();
3895
+ message.annotation = (object.annotation !== undefined && object.annotation !== null)
3896
+ ? Annotation.fromPartial(object.annotation)
3897
+ : undefined;
1461
3898
  return message;
1462
3899
  },
1463
3900
  };
1464
- function createBaseCameraCommand() {
1465
- return { cameraAction: 0, actionParam: 0 };
3901
+ function createBaseHeadingCommand() {
3902
+ return { heading: 0, relative: false };
1466
3903
  }
1467
- export const CameraCommand = {
3904
+ export const HeadingCommand = {
1468
3905
  encode(message, writer = new BinaryWriter()) {
1469
- if (message.cameraAction !== 0) {
1470
- writer.uint32(8).int32(message.cameraAction);
3906
+ if (message.heading !== 0) {
3907
+ writer.uint32(13).float(message.heading);
1471
3908
  }
1472
- if (message.actionParam !== 0) {
1473
- writer.uint32(21).float(message.actionParam);
3909
+ if (message.relative !== false) {
3910
+ writer.uint32(16).bool(message.relative);
1474
3911
  }
1475
3912
  return writer;
1476
3913
  },
1477
3914
  decode(input, length) {
1478
3915
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1479
3916
  const end = length === undefined ? reader.len : reader.pos + length;
1480
- const message = createBaseCameraCommand();
3917
+ const message = createBaseHeadingCommand();
1481
3918
  while (reader.pos < end) {
1482
3919
  const tag = reader.uint32();
1483
3920
  switch (tag >>> 3) {
1484
3921
  case 1: {
1485
- if (tag !== 8) {
3922
+ if (tag !== 13) {
1486
3923
  break;
1487
3924
  }
1488
- message.cameraAction = reader.int32();
3925
+ message.heading = reader.float();
1489
3926
  continue;
1490
3927
  }
1491
3928
  case 2: {
1492
- if (tag !== 21) {
3929
+ if (tag !== 16) {
1493
3930
  break;
1494
3931
  }
1495
- message.actionParam = reader.float();
3932
+ message.relative = reader.bool();
1496
3933
  continue;
1497
3934
  }
1498
3935
  }
@@ -1505,44 +3942,56 @@ export const CameraCommand = {
1505
3942
  },
1506
3943
  fromJSON(object) {
1507
3944
  return {
1508
- cameraAction: isSet(object.cameraAction) ? cameraActionFromJSON(object.cameraAction) : 0,
1509
- actionParam: isSet(object.actionParam) ? gt.Number(object.actionParam) : 0,
3945
+ heading: isSet(object.heading) ? gt.Number(object.heading) : 0,
3946
+ relative: isSet(object.relative) ? gt.Boolean(object.relative) : false,
1510
3947
  };
1511
3948
  },
1512
3949
  toJSON(message) {
1513
3950
  const obj = {};
1514
- if (message.cameraAction !== 0) {
1515
- obj.cameraAction = cameraActionToJSON(message.cameraAction);
3951
+ if (message.heading !== 0) {
3952
+ obj.heading = message.heading;
1516
3953
  }
1517
- if (message.actionParam !== 0) {
1518
- obj.actionParam = message.actionParam;
3954
+ if (message.relative !== false) {
3955
+ obj.relative = message.relative;
1519
3956
  }
1520
3957
  return obj;
1521
3958
  },
1522
3959
  create(base) {
1523
- return CameraCommand.fromPartial(base ?? {});
3960
+ return HeadingCommand.fromPartial(base ?? {});
1524
3961
  },
1525
3962
  fromPartial(object) {
1526
- const message = createBaseCameraCommand();
1527
- message.cameraAction = object.cameraAction ?? 0;
1528
- message.actionParam = object.actionParam ?? 0;
3963
+ const message = createBaseHeadingCommand();
3964
+ message.heading = object.heading ?? 0;
3965
+ message.relative = object.relative ?? false;
1529
3966
  return message;
1530
3967
  },
1531
3968
  };
1532
- function createBaseGoToSurfaceCommand() {
1533
- return { desiredSpeed: 0 };
3969
+ function createBaseTransectCommand() {
3970
+ return { course: 0, distance: 0, speedToTarget: 0, depthSetPoint: undefined, circleOfAcceptance: 0 };
1534
3971
  }
1535
- export const GoToSurfaceCommand = {
3972
+ export const TransectCommand = {
1536
3973
  encode(message, writer = new BinaryWriter()) {
1537
- if (message.desiredSpeed !== 0) {
1538
- writer.uint32(13).float(message.desiredSpeed);
3974
+ if (message.course !== 0) {
3975
+ writer.uint32(13).float(message.course);
3976
+ }
3977
+ if (message.distance !== 0) {
3978
+ writer.uint32(21).float(message.distance);
3979
+ }
3980
+ if (message.speedToTarget !== 0) {
3981
+ writer.uint32(29).float(message.speedToTarget);
3982
+ }
3983
+ if (message.depthSetPoint !== undefined) {
3984
+ DepthSetPoint.encode(message.depthSetPoint, writer.uint32(34).fork()).join();
3985
+ }
3986
+ if (message.circleOfAcceptance !== 0) {
3987
+ writer.uint32(45).float(message.circleOfAcceptance);
1539
3988
  }
1540
3989
  return writer;
1541
3990
  },
1542
3991
  decode(input, length) {
1543
3992
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1544
3993
  const end = length === undefined ? reader.len : reader.pos + length;
1545
- const message = createBaseGoToSurfaceCommand();
3994
+ const message = createBaseTransectCommand();
1546
3995
  while (reader.pos < end) {
1547
3996
  const tag = reader.uint32();
1548
3997
  switch (tag >>> 3) {
@@ -1550,7 +3999,35 @@ export const GoToSurfaceCommand = {
1550
3999
  if (tag !== 13) {
1551
4000
  break;
1552
4001
  }
1553
- message.desiredSpeed = reader.float();
4002
+ message.course = reader.float();
4003
+ continue;
4004
+ }
4005
+ case 2: {
4006
+ if (tag !== 21) {
4007
+ break;
4008
+ }
4009
+ message.distance = reader.float();
4010
+ continue;
4011
+ }
4012
+ case 3: {
4013
+ if (tag !== 29) {
4014
+ break;
4015
+ }
4016
+ message.speedToTarget = reader.float();
4017
+ continue;
4018
+ }
4019
+ case 4: {
4020
+ if (tag !== 34) {
4021
+ break;
4022
+ }
4023
+ message.depthSetPoint = DepthSetPoint.decode(reader, reader.uint32());
4024
+ continue;
4025
+ }
4026
+ case 5: {
4027
+ if (tag !== 45) {
4028
+ break;
4029
+ }
4030
+ message.circleOfAcceptance = reader.float();
1554
4031
  continue;
1555
4032
  }
1556
4033
  }
@@ -1562,38 +4039,65 @@ export const GoToSurfaceCommand = {
1562
4039
  return message;
1563
4040
  },
1564
4041
  fromJSON(object) {
1565
- return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
4042
+ return {
4043
+ course: isSet(object.course) ? gt.Number(object.course) : 0,
4044
+ distance: isSet(object.distance) ? gt.Number(object.distance) : 0,
4045
+ speedToTarget: isSet(object.speedToTarget) ? gt.Number(object.speedToTarget) : 0,
4046
+ depthSetPoint: isSet(object.depthSetPoint) ? DepthSetPoint.fromJSON(object.depthSetPoint) : undefined,
4047
+ circleOfAcceptance: isSet(object.circleOfAcceptance) ? gt.Number(object.circleOfAcceptance) : 0,
4048
+ };
1566
4049
  },
1567
4050
  toJSON(message) {
1568
4051
  const obj = {};
1569
- if (message.desiredSpeed !== 0) {
1570
- obj.desiredSpeed = message.desiredSpeed;
4052
+ if (message.course !== 0) {
4053
+ obj.course = message.course;
4054
+ }
4055
+ if (message.distance !== 0) {
4056
+ obj.distance = message.distance;
4057
+ }
4058
+ if (message.speedToTarget !== 0) {
4059
+ obj.speedToTarget = message.speedToTarget;
4060
+ }
4061
+ if (message.depthSetPoint !== undefined) {
4062
+ obj.depthSetPoint = DepthSetPoint.toJSON(message.depthSetPoint);
4063
+ }
4064
+ if (message.circleOfAcceptance !== 0) {
4065
+ obj.circleOfAcceptance = message.circleOfAcceptance;
1571
4066
  }
1572
4067
  return obj;
1573
4068
  },
1574
4069
  create(base) {
1575
- return GoToSurfaceCommand.fromPartial(base ?? {});
4070
+ return TransectCommand.fromPartial(base ?? {});
1576
4071
  },
1577
4072
  fromPartial(object) {
1578
- const message = createBaseGoToSurfaceCommand();
1579
- message.desiredSpeed = object.desiredSpeed ?? 0;
4073
+ const message = createBaseTransectCommand();
4074
+ message.course = object.course ?? 0;
4075
+ message.distance = object.distance ?? 0;
4076
+ message.speedToTarget = object.speedToTarget ?? 0;
4077
+ message.depthSetPoint = (object.depthSetPoint !== undefined && object.depthSetPoint !== null)
4078
+ ? DepthSetPoint.fromPartial(object.depthSetPoint)
4079
+ : undefined;
4080
+ message.circleOfAcceptance = object.circleOfAcceptance ?? 0;
1580
4081
  return message;
1581
4082
  },
1582
4083
  };
1583
- function createBaseGoToSeabedCommand() {
1584
- return { desiredSpeed: 0 };
4084
+ function createBaseRelativeDepthCommand() {
4085
+ return { depthChange: 0, speedToDepth: 0 };
1585
4086
  }
1586
- export const GoToSeabedCommand = {
4087
+ export const RelativeDepthCommand = {
1587
4088
  encode(message, writer = new BinaryWriter()) {
1588
- if (message.desiredSpeed !== 0) {
1589
- writer.uint32(13).float(message.desiredSpeed);
4089
+ if (message.depthChange !== 0) {
4090
+ writer.uint32(13).float(message.depthChange);
4091
+ }
4092
+ if (message.speedToDepth !== 0) {
4093
+ writer.uint32(21).float(message.speedToDepth);
1590
4094
  }
1591
4095
  return writer;
1592
4096
  },
1593
4097
  decode(input, length) {
1594
4098
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1595
4099
  const end = length === undefined ? reader.len : reader.pos + length;
1596
- const message = createBaseGoToSeabedCommand();
4100
+ const message = createBaseRelativeDepthCommand();
1597
4101
  while (reader.pos < end) {
1598
4102
  const tag = reader.uint32();
1599
4103
  switch (tag >>> 3) {
@@ -1601,7 +4105,14 @@ export const GoToSeabedCommand = {
1601
4105
  if (tag !== 13) {
1602
4106
  break;
1603
4107
  }
1604
- message.desiredSpeed = reader.float();
4108
+ message.depthChange = reader.float();
4109
+ continue;
4110
+ }
4111
+ case 2: {
4112
+ if (tag !== 21) {
4113
+ break;
4114
+ }
4115
+ message.speedToDepth = reader.float();
1605
4116
  continue;
1606
4117
  }
1607
4118
  }
@@ -1613,38 +4124,45 @@ export const GoToSeabedCommand = {
1613
4124
  return message;
1614
4125
  },
1615
4126
  fromJSON(object) {
1616
- return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
4127
+ return {
4128
+ depthChange: isSet(object.depthChange) ? gt.Number(object.depthChange) : 0,
4129
+ speedToDepth: isSet(object.speedToDepth) ? gt.Number(object.speedToDepth) : 0,
4130
+ };
1617
4131
  },
1618
4132
  toJSON(message) {
1619
4133
  const obj = {};
1620
- if (message.desiredSpeed !== 0) {
1621
- obj.desiredSpeed = message.desiredSpeed;
4134
+ if (message.depthChange !== 0) {
4135
+ obj.depthChange = message.depthChange;
4136
+ }
4137
+ if (message.speedToDepth !== 0) {
4138
+ obj.speedToDepth = message.speedToDepth;
1622
4139
  }
1623
4140
  return obj;
1624
4141
  },
1625
4142
  create(base) {
1626
- return GoToSeabedCommand.fromPartial(base ?? {});
4143
+ return RelativeDepthCommand.fromPartial(base ?? {});
1627
4144
  },
1628
4145
  fromPartial(object) {
1629
- const message = createBaseGoToSeabedCommand();
1630
- message.desiredSpeed = object.desiredSpeed ?? 0;
4146
+ const message = createBaseRelativeDepthCommand();
4147
+ message.depthChange = object.depthChange ?? 0;
4148
+ message.speedToDepth = object.speedToDepth ?? 0;
1631
4149
  return message;
1632
4150
  },
1633
4151
  };
1634
- function createBaseGoToHomeCommand() {
1635
- return { desiredSpeed: 0 };
4152
+ function createBaseCruiseSpeedCommand() {
4153
+ return { cruiseSpeed: 0 };
1636
4154
  }
1637
- export const GoToHomeCommand = {
4155
+ export const CruiseSpeedCommand = {
1638
4156
  encode(message, writer = new BinaryWriter()) {
1639
- if (message.desiredSpeed !== 0) {
1640
- writer.uint32(13).float(message.desiredSpeed);
4157
+ if (message.cruiseSpeed !== 0) {
4158
+ writer.uint32(13).float(message.cruiseSpeed);
1641
4159
  }
1642
4160
  return writer;
1643
4161
  },
1644
4162
  decode(input, length) {
1645
4163
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1646
4164
  const end = length === undefined ? reader.len : reader.pos + length;
1647
- const message = createBaseGoToHomeCommand();
4165
+ const message = createBaseCruiseSpeedCommand();
1648
4166
  while (reader.pos < end) {
1649
4167
  const tag = reader.uint32();
1650
4168
  switch (tag >>> 3) {
@@ -1652,7 +4170,7 @@ export const GoToHomeCommand = {
1652
4170
  if (tag !== 13) {
1653
4171
  break;
1654
4172
  }
1655
- message.desiredSpeed = reader.float();
4173
+ message.cruiseSpeed = reader.float();
1656
4174
  continue;
1657
4175
  }
1658
4176
  }
@@ -1664,21 +4182,21 @@ export const GoToHomeCommand = {
1664
4182
  return message;
1665
4183
  },
1666
4184
  fromJSON(object) {
1667
- return { desiredSpeed: isSet(object.desiredSpeed) ? gt.Number(object.desiredSpeed) : 0 };
4185
+ return { cruiseSpeed: isSet(object.cruiseSpeed) ? gt.Number(object.cruiseSpeed) : 0 };
1668
4186
  },
1669
4187
  toJSON(message) {
1670
4188
  const obj = {};
1671
- if (message.desiredSpeed !== 0) {
1672
- obj.desiredSpeed = message.desiredSpeed;
4189
+ if (message.cruiseSpeed !== 0) {
4190
+ obj.cruiseSpeed = message.cruiseSpeed;
1673
4191
  }
1674
4192
  return obj;
1675
4193
  },
1676
4194
  create(base) {
1677
- return GoToHomeCommand.fromPartial(base ?? {});
4195
+ return CruiseSpeedCommand.fromPartial(base ?? {});
1678
4196
  },
1679
4197
  fromPartial(object) {
1680
- const message = createBaseGoToHomeCommand();
1681
- message.desiredSpeed = object.desiredSpeed ?? 0;
4198
+ const message = createBaseCruiseSpeedCommand();
4199
+ message.cruiseSpeed = object.cruiseSpeed ?? 0;
1682
4200
  return message;
1683
4201
  },
1684
4202
  };
@@ -2326,6 +4844,12 @@ function createBaseMissionStatus() {
2326
4844
  completedPathSegmentIds: [],
2327
4845
  totalNumberOfPathSegments: 0,
2328
4846
  id: 0,
4847
+ activeInstructionId: undefined,
4848
+ revision: 0,
4849
+ failureReason: "",
4850
+ uuid: "",
4851
+ lastOutcome: undefined,
4852
+ loadId: 0,
2329
4853
  };
2330
4854
  }
2331
4855
  export const MissionStatus = {
@@ -2361,6 +4885,24 @@ export const MissionStatus = {
2361
4885
  if (message.id !== 0) {
2362
4886
  writer.uint32(72).uint32(message.id);
2363
4887
  }
4888
+ if (message.activeInstructionId !== undefined) {
4889
+ writer.uint32(80).uint32(message.activeInstructionId);
4890
+ }
4891
+ if (message.revision !== 0) {
4892
+ writer.uint32(88).uint32(message.revision);
4893
+ }
4894
+ if (message.failureReason !== "") {
4895
+ writer.uint32(98).string(message.failureReason);
4896
+ }
4897
+ if (message.uuid !== "") {
4898
+ writer.uint32(106).string(message.uuid);
4899
+ }
4900
+ if (message.lastOutcome !== undefined) {
4901
+ MissionOutcome.encode(message.lastOutcome, writer.uint32(114).fork()).join();
4902
+ }
4903
+ if (message.loadId !== 0) {
4904
+ writer.uint32(120).uint64(message.loadId);
4905
+ }
2364
4906
  return writer;
2365
4907
  },
2366
4908
  decode(input, length) {
@@ -2447,6 +4989,48 @@ export const MissionStatus = {
2447
4989
  message.id = reader.uint32();
2448
4990
  continue;
2449
4991
  }
4992
+ case 10: {
4993
+ if (tag !== 80) {
4994
+ break;
4995
+ }
4996
+ message.activeInstructionId = reader.uint32();
4997
+ continue;
4998
+ }
4999
+ case 11: {
5000
+ if (tag !== 88) {
5001
+ break;
5002
+ }
5003
+ message.revision = reader.uint32();
5004
+ continue;
5005
+ }
5006
+ case 12: {
5007
+ if (tag !== 98) {
5008
+ break;
5009
+ }
5010
+ message.failureReason = reader.string();
5011
+ continue;
5012
+ }
5013
+ case 13: {
5014
+ if (tag !== 106) {
5015
+ break;
5016
+ }
5017
+ message.uuid = reader.string();
5018
+ continue;
5019
+ }
5020
+ case 14: {
5021
+ if (tag !== 114) {
5022
+ break;
5023
+ }
5024
+ message.lastOutcome = MissionOutcome.decode(reader, reader.uint32());
5025
+ continue;
5026
+ }
5027
+ case 15: {
5028
+ if (tag !== 120) {
5029
+ break;
5030
+ }
5031
+ message.loadId = longToNumber(reader.uint64());
5032
+ continue;
5033
+ }
2450
5034
  }
2451
5035
  if ((tag & 7) === 4 || tag === 0) {
2452
5036
  break;
@@ -2474,6 +5058,12 @@ export const MissionStatus = {
2474
5058
  ? gt.Number(object.totalNumberOfPathSegments)
2475
5059
  : 0,
2476
5060
  id: isSet(object.id) ? gt.Number(object.id) : 0,
5061
+ activeInstructionId: isSet(object.activeInstructionId) ? gt.Number(object.activeInstructionId) : undefined,
5062
+ revision: isSet(object.revision) ? gt.Number(object.revision) : 0,
5063
+ failureReason: isSet(object.failureReason) ? gt.String(object.failureReason) : "",
5064
+ uuid: isSet(object.uuid) ? gt.String(object.uuid) : "",
5065
+ lastOutcome: isSet(object.lastOutcome) ? MissionOutcome.fromJSON(object.lastOutcome) : undefined,
5066
+ loadId: isSet(object.loadId) ? gt.Number(object.loadId) : 0,
2477
5067
  };
2478
5068
  },
2479
5069
  toJSON(message) {
@@ -2505,6 +5095,24 @@ export const MissionStatus = {
2505
5095
  if (message.id !== 0) {
2506
5096
  obj.id = Math.round(message.id);
2507
5097
  }
5098
+ if (message.activeInstructionId !== undefined) {
5099
+ obj.activeInstructionId = Math.round(message.activeInstructionId);
5100
+ }
5101
+ if (message.revision !== 0) {
5102
+ obj.revision = Math.round(message.revision);
5103
+ }
5104
+ if (message.failureReason !== "") {
5105
+ obj.failureReason = message.failureReason;
5106
+ }
5107
+ if (message.uuid !== "") {
5108
+ obj.uuid = message.uuid;
5109
+ }
5110
+ if (message.lastOutcome !== undefined) {
5111
+ obj.lastOutcome = MissionOutcome.toJSON(message.lastOutcome);
5112
+ }
5113
+ if (message.loadId !== 0) {
5114
+ obj.loadId = Math.round(message.loadId);
5115
+ }
2508
5116
  return obj;
2509
5117
  },
2510
5118
  create(base) {
@@ -2521,6 +5129,322 @@ export const MissionStatus = {
2521
5129
  message.completedPathSegmentIds = object.completedPathSegmentIds?.map((e) => e) || [];
2522
5130
  message.totalNumberOfPathSegments = object.totalNumberOfPathSegments ?? 0;
2523
5131
  message.id = object.id ?? 0;
5132
+ message.activeInstructionId = object.activeInstructionId ?? undefined;
5133
+ message.revision = object.revision ?? 0;
5134
+ message.failureReason = object.failureReason ?? "";
5135
+ message.uuid = object.uuid ?? "";
5136
+ message.lastOutcome = (object.lastOutcome !== undefined && object.lastOutcome !== null)
5137
+ ? MissionOutcome.fromPartial(object.lastOutcome)
5138
+ : undefined;
5139
+ message.loadId = object.loadId ?? 0;
5140
+ return message;
5141
+ },
5142
+ };
5143
+ function createBaseMissionOutcome() {
5144
+ return {
5145
+ result: 0,
5146
+ missionId: 0,
5147
+ missionUuid: "",
5148
+ revision: 0,
5149
+ instructionId: undefined,
5150
+ abortReason: 0,
5151
+ reason: "",
5152
+ endTime: undefined,
5153
+ skippedInstructionIds: [],
5154
+ loadId: 0,
5155
+ };
5156
+ }
5157
+ export const MissionOutcome = {
5158
+ encode(message, writer = new BinaryWriter()) {
5159
+ if (message.result !== 0) {
5160
+ writer.uint32(8).int32(message.result);
5161
+ }
5162
+ if (message.missionId !== 0) {
5163
+ writer.uint32(16).uint32(message.missionId);
5164
+ }
5165
+ if (message.missionUuid !== "") {
5166
+ writer.uint32(26).string(message.missionUuid);
5167
+ }
5168
+ if (message.revision !== 0) {
5169
+ writer.uint32(32).uint32(message.revision);
5170
+ }
5171
+ if (message.instructionId !== undefined) {
5172
+ writer.uint32(40).uint32(message.instructionId);
5173
+ }
5174
+ if (message.abortReason !== 0) {
5175
+ writer.uint32(48).int32(message.abortReason);
5176
+ }
5177
+ if (message.reason !== "") {
5178
+ writer.uint32(58).string(message.reason);
5179
+ }
5180
+ if (message.endTime !== undefined) {
5181
+ Timestamp.encode(toTimestamp(message.endTime), writer.uint32(66).fork()).join();
5182
+ }
5183
+ writer.uint32(74).fork();
5184
+ for (const v of message.skippedInstructionIds) {
5185
+ writer.uint32(v);
5186
+ }
5187
+ writer.join();
5188
+ if (message.loadId !== 0) {
5189
+ writer.uint32(80).uint64(message.loadId);
5190
+ }
5191
+ return writer;
5192
+ },
5193
+ decode(input, length) {
5194
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5195
+ const end = length === undefined ? reader.len : reader.pos + length;
5196
+ const message = createBaseMissionOutcome();
5197
+ while (reader.pos < end) {
5198
+ const tag = reader.uint32();
5199
+ switch (tag >>> 3) {
5200
+ case 1: {
5201
+ if (tag !== 8) {
5202
+ break;
5203
+ }
5204
+ message.result = reader.int32();
5205
+ continue;
5206
+ }
5207
+ case 2: {
5208
+ if (tag !== 16) {
5209
+ break;
5210
+ }
5211
+ message.missionId = reader.uint32();
5212
+ continue;
5213
+ }
5214
+ case 3: {
5215
+ if (tag !== 26) {
5216
+ break;
5217
+ }
5218
+ message.missionUuid = reader.string();
5219
+ continue;
5220
+ }
5221
+ case 4: {
5222
+ if (tag !== 32) {
5223
+ break;
5224
+ }
5225
+ message.revision = reader.uint32();
5226
+ continue;
5227
+ }
5228
+ case 5: {
5229
+ if (tag !== 40) {
5230
+ break;
5231
+ }
5232
+ message.instructionId = reader.uint32();
5233
+ continue;
5234
+ }
5235
+ case 6: {
5236
+ if (tag !== 48) {
5237
+ break;
5238
+ }
5239
+ message.abortReason = reader.int32();
5240
+ continue;
5241
+ }
5242
+ case 7: {
5243
+ if (tag !== 58) {
5244
+ break;
5245
+ }
5246
+ message.reason = reader.string();
5247
+ continue;
5248
+ }
5249
+ case 8: {
5250
+ if (tag !== 66) {
5251
+ break;
5252
+ }
5253
+ message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
5254
+ continue;
5255
+ }
5256
+ case 9: {
5257
+ if (tag === 72) {
5258
+ message.skippedInstructionIds.push(reader.uint32());
5259
+ continue;
5260
+ }
5261
+ if (tag === 74) {
5262
+ const end2 = reader.uint32() + reader.pos;
5263
+ while (reader.pos < end2) {
5264
+ message.skippedInstructionIds.push(reader.uint32());
5265
+ }
5266
+ continue;
5267
+ }
5268
+ break;
5269
+ }
5270
+ case 10: {
5271
+ if (tag !== 80) {
5272
+ break;
5273
+ }
5274
+ message.loadId = longToNumber(reader.uint64());
5275
+ continue;
5276
+ }
5277
+ }
5278
+ if ((tag & 7) === 4 || tag === 0) {
5279
+ break;
5280
+ }
5281
+ reader.skip(tag & 7);
5282
+ }
5283
+ return message;
5284
+ },
5285
+ fromJSON(object) {
5286
+ return {
5287
+ result: isSet(object.result) ? missionResultFromJSON(object.result) : 0,
5288
+ missionId: isSet(object.missionId) ? gt.Number(object.missionId) : 0,
5289
+ missionUuid: isSet(object.missionUuid) ? gt.String(object.missionUuid) : "",
5290
+ revision: isSet(object.revision) ? gt.Number(object.revision) : 0,
5291
+ instructionId: isSet(object.instructionId) ? gt.Number(object.instructionId) : undefined,
5292
+ abortReason: isSet(object.abortReason) ? missionAbortReasonFromJSON(object.abortReason) : 0,
5293
+ reason: isSet(object.reason) ? gt.String(object.reason) : "",
5294
+ endTime: isSet(object.endTime) ? fromJsonTimestamp(object.endTime) : undefined,
5295
+ skippedInstructionIds: gt.Array.isArray(object?.skippedInstructionIds)
5296
+ ? object.skippedInstructionIds.map((e) => gt.Number(e))
5297
+ : [],
5298
+ loadId: isSet(object.loadId) ? gt.Number(object.loadId) : 0,
5299
+ };
5300
+ },
5301
+ toJSON(message) {
5302
+ const obj = {};
5303
+ if (message.result !== 0) {
5304
+ obj.result = missionResultToJSON(message.result);
5305
+ }
5306
+ if (message.missionId !== 0) {
5307
+ obj.missionId = Math.round(message.missionId);
5308
+ }
5309
+ if (message.missionUuid !== "") {
5310
+ obj.missionUuid = message.missionUuid;
5311
+ }
5312
+ if (message.revision !== 0) {
5313
+ obj.revision = Math.round(message.revision);
5314
+ }
5315
+ if (message.instructionId !== undefined) {
5316
+ obj.instructionId = Math.round(message.instructionId);
5317
+ }
5318
+ if (message.abortReason !== 0) {
5319
+ obj.abortReason = missionAbortReasonToJSON(message.abortReason);
5320
+ }
5321
+ if (message.reason !== "") {
5322
+ obj.reason = message.reason;
5323
+ }
5324
+ if (message.endTime !== undefined) {
5325
+ obj.endTime = message.endTime.toISOString();
5326
+ }
5327
+ if (message.skippedInstructionIds?.length) {
5328
+ obj.skippedInstructionIds = message.skippedInstructionIds.map((e) => Math.round(e));
5329
+ }
5330
+ if (message.loadId !== 0) {
5331
+ obj.loadId = Math.round(message.loadId);
5332
+ }
5333
+ return obj;
5334
+ },
5335
+ create(base) {
5336
+ return MissionOutcome.fromPartial(base ?? {});
5337
+ },
5338
+ fromPartial(object) {
5339
+ const message = createBaseMissionOutcome();
5340
+ message.result = object.result ?? 0;
5341
+ message.missionId = object.missionId ?? 0;
5342
+ message.missionUuid = object.missionUuid ?? "";
5343
+ message.revision = object.revision ?? 0;
5344
+ message.instructionId = object.instructionId ?? undefined;
5345
+ message.abortReason = object.abortReason ?? 0;
5346
+ message.reason = object.reason ?? "";
5347
+ message.endTime = object.endTime ?? undefined;
5348
+ message.skippedInstructionIds = object.skippedInstructionIds?.map((e) => e) || [];
5349
+ message.loadId = object.loadId ?? 0;
5350
+ return message;
5351
+ },
5352
+ };
5353
+ function createBaseInstructionResult() {
5354
+ return { requestId: 0, instructionId: 0, state: 0, reason: "" };
5355
+ }
5356
+ export const InstructionResult = {
5357
+ encode(message, writer = new BinaryWriter()) {
5358
+ if (message.requestId !== 0) {
5359
+ writer.uint32(8).uint32(message.requestId);
5360
+ }
5361
+ if (message.instructionId !== 0) {
5362
+ writer.uint32(16).uint32(message.instructionId);
5363
+ }
5364
+ if (message.state !== 0) {
5365
+ writer.uint32(24).int32(message.state);
5366
+ }
5367
+ if (message.reason !== "") {
5368
+ writer.uint32(34).string(message.reason);
5369
+ }
5370
+ return writer;
5371
+ },
5372
+ decode(input, length) {
5373
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5374
+ const end = length === undefined ? reader.len : reader.pos + length;
5375
+ const message = createBaseInstructionResult();
5376
+ while (reader.pos < end) {
5377
+ const tag = reader.uint32();
5378
+ switch (tag >>> 3) {
5379
+ case 1: {
5380
+ if (tag !== 8) {
5381
+ break;
5382
+ }
5383
+ message.requestId = reader.uint32();
5384
+ continue;
5385
+ }
5386
+ case 2: {
5387
+ if (tag !== 16) {
5388
+ break;
5389
+ }
5390
+ message.instructionId = reader.uint32();
5391
+ continue;
5392
+ }
5393
+ case 3: {
5394
+ if (tag !== 24) {
5395
+ break;
5396
+ }
5397
+ message.state = reader.int32();
5398
+ continue;
5399
+ }
5400
+ case 4: {
5401
+ if (tag !== 34) {
5402
+ break;
5403
+ }
5404
+ message.reason = reader.string();
5405
+ continue;
5406
+ }
5407
+ }
5408
+ if ((tag & 7) === 4 || tag === 0) {
5409
+ break;
5410
+ }
5411
+ reader.skip(tag & 7);
5412
+ }
5413
+ return message;
5414
+ },
5415
+ fromJSON(object) {
5416
+ return {
5417
+ requestId: isSet(object.requestId) ? gt.Number(object.requestId) : 0,
5418
+ instructionId: isSet(object.instructionId) ? gt.Number(object.instructionId) : 0,
5419
+ state: isSet(object.state) ? instructionResultStateFromJSON(object.state) : 0,
5420
+ reason: isSet(object.reason) ? gt.String(object.reason) : "",
5421
+ };
5422
+ },
5423
+ toJSON(message) {
5424
+ const obj = {};
5425
+ if (message.requestId !== 0) {
5426
+ obj.requestId = Math.round(message.requestId);
5427
+ }
5428
+ if (message.instructionId !== 0) {
5429
+ obj.instructionId = Math.round(message.instructionId);
5430
+ }
5431
+ if (message.state !== 0) {
5432
+ obj.state = instructionResultStateToJSON(message.state);
5433
+ }
5434
+ if (message.reason !== "") {
5435
+ obj.reason = message.reason;
5436
+ }
5437
+ return obj;
5438
+ },
5439
+ create(base) {
5440
+ return InstructionResult.fromPartial(base ?? {});
5441
+ },
5442
+ fromPartial(object) {
5443
+ const message = createBaseInstructionResult();
5444
+ message.requestId = object.requestId ?? 0;
5445
+ message.instructionId = object.instructionId ?? 0;
5446
+ message.state = object.state ?? 0;
5447
+ message.reason = object.reason ?? "";
2524
5448
  return message;
2525
5449
  },
2526
5450
  };
@@ -2539,6 +5463,37 @@ const gt = (() => {
2539
5463
  }
2540
5464
  throw "Unable to locate global object";
2541
5465
  })();
5466
+ function toTimestamp(date) {
5467
+ const seconds = Math.trunc(date.getTime() / 1_000);
5468
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
5469
+ return { seconds, nanos };
5470
+ }
5471
+ function fromTimestamp(t) {
5472
+ let millis = (t.seconds || 0) * 1_000;
5473
+ millis += (t.nanos || 0) / 1_000_000;
5474
+ return new gt.Date(millis);
5475
+ }
5476
+ function fromJsonTimestamp(o) {
5477
+ if (o instanceof gt.Date) {
5478
+ return o;
5479
+ }
5480
+ else if (typeof o === "string") {
5481
+ return new gt.Date(o);
5482
+ }
5483
+ else {
5484
+ return fromTimestamp(Timestamp.fromJSON(o));
5485
+ }
5486
+ }
5487
+ function longToNumber(int64) {
5488
+ const num = gt.Number(int64.toString());
5489
+ if (num > gt.Number.MAX_SAFE_INTEGER) {
5490
+ throw new gt.Error("Value is larger than Number.MAX_SAFE_INTEGER");
5491
+ }
5492
+ if (num < gt.Number.MIN_SAFE_INTEGER) {
5493
+ throw new gt.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
5494
+ }
5495
+ return num;
5496
+ }
2542
5497
  function isSet(value) {
2543
5498
  return value !== null && value !== undefined;
2544
5499
  }