@blueyerobotics/protocol-definitions 3.2.0-fcf0b829 → 3.3.0-1fa96b97

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.
package/dist/control.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { SetAquaTrollConnectionStatus, SetAquaTrollParameterUnit } from "./aquatroll";
3
- import { AutoAltitudeState, AutoDepthState, AutoHeadingState, AutoPilotHeaveState, AutoPilotSurgeYawState, CameraPanTiltZoom, ConnectionDuration, FilterMessage, GenericServo, GripperVelocities, GuestPortRestartInfo, Laser, LatLongPosition, Lights, MotionInput, MultibeamConfig, MultibeamServo, OperatorInfo, PingerConfiguration, RecordOn, ResetPositionSettings, StationKeepingState, StorageLocation, SystemTime, TiltStabilizationState, TiltVelocity, WaterDensity, WeatherVaningState } from "./message_formats";
3
+ import { Annotation, AutoAltitudeState, AutoDepthState, AutoHeadingState, AutoPilotHeaveState, AutoPilotSurgeYawState, BoundingBox, CameraPanTiltZoom, ConnectionDuration, FilterMessage, GenericServo, GripperVelocities, GuestPortRestartInfo, Laser, LatLongPosition, Lights, MotionInput, MultibeamConfig, MultibeamServo, OperatorInfo, PingerConfiguration, RecordOn, ResetPositionSettings, StationKeepingState, StorageLocation, SystemTime, TiltStabilizationState, TiltVelocity, VisionTrackingState, WaterDensity, WeatherVaningState } from "./message_formats";
4
4
  /**
5
5
  * Control
6
6
  *
@@ -104,6 +104,19 @@ export interface AutoPilotHeaveCtrl {
104
104
  /** State of the auto pilot heave controller- */
105
105
  state: AutoPilotHeaveState | undefined;
106
106
  }
107
+ /**
108
+ * Issue a command to set the vision-based tracking mode.
109
+ *
110
+ * Setting a mode requires an actively tracked single-object-tracking (SOT)
111
+ * target; the drone refuses to enable a mode otherwise. Setting a different
112
+ * mode while one is active switches atomically. Sending a state with no
113
+ * mode set disables vision tracking. An OrbitState with a zero rate is
114
+ * rejected.
115
+ */
116
+ export interface VisionTrackingCtrl {
117
+ /** The desired vision tracking mode, or none to disable. */
118
+ state: VisionTrackingState | undefined;
119
+ }
107
120
  /** Issue a command to start and pause the loaded mission. */
108
121
  export interface RunMissionCtrl {
109
122
  }
@@ -221,11 +234,26 @@ export interface EndDiveCtrl {
221
234
  */
222
235
  export interface FormatRemovableStorageDeviceCtrl {
223
236
  }
224
- /** Message sent when the user wants to set turbidity filter settings. */
237
+ /**
238
+ * Message sent when the user wants to set turbidity filter settings.
239
+ * Uses CLAHE to enhance the contrast of the video, which can make it easier to see details in turbid water.
240
+ * Only supported on X3 Ultra.
241
+ */
225
242
  export interface SetTurbidityFilterCtrl {
226
243
  /** Message with the turbidity filter settings to set. */
227
244
  turbidityFilter: FilterMessage | undefined;
228
245
  }
246
+ /**
247
+ * Message sent when the user wants to set color correction settings.
248
+ * Applies depth- and scene-driven underwater color correction, restoring the
249
+ * red/blue balance lost with depth. The intensity field scales the correction
250
+ * (0.0 = off/identity, 1.0 = full).
251
+ * Only supported on X3 Ultra.
252
+ */
253
+ export interface SetColorCorrectionCtrl {
254
+ /** Message with the color correction settings to set. */
255
+ colorCorrectionFilter: FilterMessage | undefined;
256
+ }
229
257
  /**
230
258
  * Issue a command to set the digital pan, tilt, and zoom of the main camera.
231
259
  *
@@ -241,6 +269,43 @@ export interface StartLogStreamingCtrl {
241
269
  /** Message sent to stop streaming log entries to the client. */
242
270
  export interface StopLogStreamingCtrl {
243
271
  }
272
+ /**
273
+ * Issue a command to set the single-object tracking (SOT) target.
274
+ *
275
+ * Send a bounding box to start tracking a new target. The CV pipeline will
276
+ * initialize the SOT tracker on the specified region of the video frame.
277
+ */
278
+ export interface SetSotTargetCtrl {
279
+ /** Target bounding box. */
280
+ boundingBox: BoundingBox | undefined;
281
+ /** Width of the frame the bounding box was drawn on. */
282
+ imageWidth: number;
283
+ /** Height of the frame the bounding box was drawn on. */
284
+ imageHeight: number;
285
+ }
286
+ /** Issue a command to clear the single-object tracking (SOT) target (stop tracking). */
287
+ export interface ClearSotTargetCtrl {
288
+ }
289
+ /**
290
+ * Issue a command to rescan the computer vision model packages installed on the drone.
291
+ *
292
+ * The drone rediscovers model packages on disk and publishes an updated model
293
+ * list. Use after installing or removing a model package without rebooting.
294
+ */
295
+ export interface RescanCvModelsCtrl {
296
+ }
297
+ /**
298
+ * Request to add an annotation to the current dive.
299
+ *
300
+ * Sent by the app when a diver picks a type from the in-dive command palette.
301
+ * The drone stamps the authoritative time, publishes the result as an
302
+ * AnnotationTel to every connected client, and writes it to the dive logfile, so
303
+ * all clients converge on the same set. Fire-and-forget, like LightsCtrl.
304
+ */
305
+ export interface AnnotationCtrl {
306
+ /** The annotation to record. The drone owns the timestamp, not this message. */
307
+ annotation: Annotation | undefined;
308
+ }
244
309
  export declare const MotionInputCtrl: MessageFns<MotionInputCtrl>;
245
310
  export declare const TiltVelocityCtrl: MessageFns<TiltVelocityCtrl>;
246
311
  export declare const LightsCtrl: MessageFns<LightsCtrl>;
@@ -260,6 +325,7 @@ export declare const StationKeepingCtrl: MessageFns<StationKeepingCtrl>;
260
325
  export declare const WeatherVaningCtrl: MessageFns<WeatherVaningCtrl>;
261
326
  export declare const AutoPilotSurgeYawCtrl: MessageFns<AutoPilotSurgeYawCtrl>;
262
327
  export declare const AutoPilotHeaveCtrl: MessageFns<AutoPilotHeaveCtrl>;
328
+ export declare const VisionTrackingCtrl: MessageFns<VisionTrackingCtrl>;
263
329
  export declare const RunMissionCtrl: MessageFns<RunMissionCtrl>;
264
330
  export declare const PauseMissionCtrl: MessageFns<PauseMissionCtrl>;
265
331
  export declare const ClearMissionCtrl: MessageFns<ClearMissionCtrl>;
@@ -285,9 +351,14 @@ export declare const StartDiveCtrl: MessageFns<StartDiveCtrl>;
285
351
  export declare const EndDiveCtrl: MessageFns<EndDiveCtrl>;
286
352
  export declare const FormatRemovableStorageDeviceCtrl: MessageFns<FormatRemovableStorageDeviceCtrl>;
287
353
  export declare const SetTurbidityFilterCtrl: MessageFns<SetTurbidityFilterCtrl>;
354
+ export declare const SetColorCorrectionCtrl: MessageFns<SetColorCorrectionCtrl>;
288
355
  export declare const CameraPanTiltZoomCtrl: MessageFns<CameraPanTiltZoomCtrl>;
289
356
  export declare const StartLogStreamingCtrl: MessageFns<StartLogStreamingCtrl>;
290
357
  export declare const StopLogStreamingCtrl: MessageFns<StopLogStreamingCtrl>;
358
+ export declare const SetSotTargetCtrl: MessageFns<SetSotTargetCtrl>;
359
+ export declare const ClearSotTargetCtrl: MessageFns<ClearSotTargetCtrl>;
360
+ export declare const RescanCvModelsCtrl: MessageFns<RescanCvModelsCtrl>;
361
+ export declare const AnnotationCtrl: MessageFns<AnnotationCtrl>;
291
362
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
292
363
  type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
293
364
  [K in keyof T]?: DeepPartial<T[K]>;
package/dist/control.js CHANGED
@@ -5,7 +5,8 @@
5
5
  // protoc v3.21.12
6
6
  // source: control.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.StopLogStreamingCtrl = exports.StartLogStreamingCtrl = exports.CameraPanTiltZoomCtrl = exports.SetTurbidityFilterCtrl = exports.FormatRemovableStorageDeviceCtrl = exports.EndDiveCtrl = exports.StartDiveCtrl = exports.DeactivateMultibeamCtrl = exports.ActivateMultibeamCtrl = exports.SetMultibeamConfigCtrl = exports.SetAquaTrollConnectionStatusCtrl = exports.SetAquaTrollParameterUnitCtrl = exports.RestartGuestPortsCtrl = exports.ActivateGuestPortsCtrl = exports.DeactivateGuestPortsCtrl = exports.MultibeamServoCtrl = exports.GenericServoCtrl = exports.GripperCtrl = exports.SystemTimeCtrl = exports.PingerConfigurationCtrl = exports.WaterDensityCtrl = exports.TiltStabilizationCtrl = exports.CalibrateDvlGyroCtrl = exports.ResetOdometerCtrl = exports.ResetPositionCtrl = exports.ClearMissionCtrl = exports.PauseMissionCtrl = exports.RunMissionCtrl = exports.AutoPilotHeaveCtrl = exports.AutoPilotSurgeYawCtrl = exports.WeatherVaningCtrl = exports.StationKeepingCtrl = exports.AutoAltitudeCtrl = exports.AutoDepthCtrl = exports.AutoHeadingCtrl = exports.FinishCalibrationCtrl = exports.CancelCalibrationCtrl = exports.StartCalibrationCtrl = exports.TakePictureCtrl = exports.RecordCtrl = exports.WatchdogCtrl = exports.PilotGPSPositionCtrl = exports.LaserCtrl = exports.GuestportLightsCtrl = exports.LightsCtrl = exports.TiltVelocityCtrl = exports.MotionInputCtrl = void 0;
8
+ exports.SetSotTargetCtrl = exports.StopLogStreamingCtrl = exports.StartLogStreamingCtrl = exports.CameraPanTiltZoomCtrl = exports.SetColorCorrectionCtrl = exports.SetTurbidityFilterCtrl = exports.FormatRemovableStorageDeviceCtrl = exports.EndDiveCtrl = exports.StartDiveCtrl = exports.DeactivateMultibeamCtrl = exports.ActivateMultibeamCtrl = exports.SetMultibeamConfigCtrl = exports.SetAquaTrollConnectionStatusCtrl = exports.SetAquaTrollParameterUnitCtrl = exports.RestartGuestPortsCtrl = exports.ActivateGuestPortsCtrl = exports.DeactivateGuestPortsCtrl = exports.MultibeamServoCtrl = exports.GenericServoCtrl = exports.GripperCtrl = exports.SystemTimeCtrl = exports.PingerConfigurationCtrl = exports.WaterDensityCtrl = exports.TiltStabilizationCtrl = exports.CalibrateDvlGyroCtrl = exports.ResetOdometerCtrl = exports.ResetPositionCtrl = exports.ClearMissionCtrl = exports.PauseMissionCtrl = exports.RunMissionCtrl = exports.VisionTrackingCtrl = exports.AutoPilotHeaveCtrl = exports.AutoPilotSurgeYawCtrl = exports.WeatherVaningCtrl = exports.StationKeepingCtrl = exports.AutoAltitudeCtrl = exports.AutoDepthCtrl = exports.AutoHeadingCtrl = exports.FinishCalibrationCtrl = exports.CancelCalibrationCtrl = exports.StartCalibrationCtrl = exports.TakePictureCtrl = exports.RecordCtrl = exports.WatchdogCtrl = exports.PilotGPSPositionCtrl = exports.LaserCtrl = exports.GuestportLightsCtrl = exports.LightsCtrl = exports.TiltVelocityCtrl = exports.MotionInputCtrl = void 0;
9
+ exports.AnnotationCtrl = exports.RescanCvModelsCtrl = exports.ClearSotTargetCtrl = void 0;
9
10
  /* eslint-disable */
10
11
  const wire_1 = require("@bufbuild/protobuf/wire");
11
12
  const aquatroll_1 = require("./aquatroll");
@@ -1001,6 +1002,59 @@ exports.AutoPilotHeaveCtrl = {
1001
1002
  return message;
1002
1003
  },
1003
1004
  };
1005
+ function createBaseVisionTrackingCtrl() {
1006
+ return { state: undefined };
1007
+ }
1008
+ exports.VisionTrackingCtrl = {
1009
+ encode(message, writer = new wire_1.BinaryWriter()) {
1010
+ if (message.state !== undefined) {
1011
+ message_formats_1.VisionTrackingState.encode(message.state, writer.uint32(10).fork()).join();
1012
+ }
1013
+ return writer;
1014
+ },
1015
+ decode(input, length) {
1016
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1017
+ const end = length === undefined ? reader.len : reader.pos + length;
1018
+ const message = createBaseVisionTrackingCtrl();
1019
+ while (reader.pos < end) {
1020
+ const tag = reader.uint32();
1021
+ switch (tag >>> 3) {
1022
+ case 1: {
1023
+ if (tag !== 10) {
1024
+ break;
1025
+ }
1026
+ message.state = message_formats_1.VisionTrackingState.decode(reader, reader.uint32());
1027
+ continue;
1028
+ }
1029
+ }
1030
+ if ((tag & 7) === 4 || tag === 0) {
1031
+ break;
1032
+ }
1033
+ reader.skip(tag & 7);
1034
+ }
1035
+ return message;
1036
+ },
1037
+ fromJSON(object) {
1038
+ return { state: isSet(object.state) ? message_formats_1.VisionTrackingState.fromJSON(object.state) : undefined };
1039
+ },
1040
+ toJSON(message) {
1041
+ const obj = {};
1042
+ if (message.state !== undefined) {
1043
+ obj.state = message_formats_1.VisionTrackingState.toJSON(message.state);
1044
+ }
1045
+ return obj;
1046
+ },
1047
+ create(base) {
1048
+ return exports.VisionTrackingCtrl.fromPartial(base ?? {});
1049
+ },
1050
+ fromPartial(object) {
1051
+ const message = createBaseVisionTrackingCtrl();
1052
+ message.state = (object.state !== undefined && object.state !== null)
1053
+ ? message_formats_1.VisionTrackingState.fromPartial(object.state)
1054
+ : undefined;
1055
+ return message;
1056
+ },
1057
+ };
1004
1058
  function createBaseRunMissionCtrl() {
1005
1059
  return {};
1006
1060
  }
@@ -2180,6 +2234,64 @@ exports.SetTurbidityFilterCtrl = {
2180
2234
  return message;
2181
2235
  },
2182
2236
  };
2237
+ function createBaseSetColorCorrectionCtrl() {
2238
+ return { colorCorrectionFilter: undefined };
2239
+ }
2240
+ exports.SetColorCorrectionCtrl = {
2241
+ encode(message, writer = new wire_1.BinaryWriter()) {
2242
+ if (message.colorCorrectionFilter !== undefined) {
2243
+ message_formats_1.FilterMessage.encode(message.colorCorrectionFilter, writer.uint32(10).fork()).join();
2244
+ }
2245
+ return writer;
2246
+ },
2247
+ decode(input, length) {
2248
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2249
+ const end = length === undefined ? reader.len : reader.pos + length;
2250
+ const message = createBaseSetColorCorrectionCtrl();
2251
+ while (reader.pos < end) {
2252
+ const tag = reader.uint32();
2253
+ switch (tag >>> 3) {
2254
+ case 1: {
2255
+ if (tag !== 10) {
2256
+ break;
2257
+ }
2258
+ message.colorCorrectionFilter = message_formats_1.FilterMessage.decode(reader, reader.uint32());
2259
+ continue;
2260
+ }
2261
+ }
2262
+ if ((tag & 7) === 4 || tag === 0) {
2263
+ break;
2264
+ }
2265
+ reader.skip(tag & 7);
2266
+ }
2267
+ return message;
2268
+ },
2269
+ fromJSON(object) {
2270
+ return {
2271
+ colorCorrectionFilter: isSet(object.colorCorrectionFilter)
2272
+ ? message_formats_1.FilterMessage.fromJSON(object.colorCorrectionFilter)
2273
+ : undefined,
2274
+ };
2275
+ },
2276
+ toJSON(message) {
2277
+ const obj = {};
2278
+ if (message.colorCorrectionFilter !== undefined) {
2279
+ obj.colorCorrectionFilter = message_formats_1.FilterMessage.toJSON(message.colorCorrectionFilter);
2280
+ }
2281
+ return obj;
2282
+ },
2283
+ create(base) {
2284
+ return exports.SetColorCorrectionCtrl.fromPartial(base ?? {});
2285
+ },
2286
+ fromPartial(object) {
2287
+ const message = createBaseSetColorCorrectionCtrl();
2288
+ message.colorCorrectionFilter =
2289
+ (object.colorCorrectionFilter !== undefined && object.colorCorrectionFilter !== null)
2290
+ ? message_formats_1.FilterMessage.fromPartial(object.colorCorrectionFilter)
2291
+ : undefined;
2292
+ return message;
2293
+ },
2294
+ };
2183
2295
  function createBaseCameraPanTiltZoomCtrl() {
2184
2296
  return { cameraPanTiltZoom: undefined };
2185
2297
  }
@@ -2311,6 +2423,218 @@ exports.StopLogStreamingCtrl = {
2311
2423
  return message;
2312
2424
  },
2313
2425
  };
2426
+ function createBaseSetSotTargetCtrl() {
2427
+ return { boundingBox: undefined, imageWidth: 0, imageHeight: 0 };
2428
+ }
2429
+ exports.SetSotTargetCtrl = {
2430
+ encode(message, writer = new wire_1.BinaryWriter()) {
2431
+ if (message.boundingBox !== undefined) {
2432
+ message_formats_1.BoundingBox.encode(message.boundingBox, writer.uint32(10).fork()).join();
2433
+ }
2434
+ if (message.imageWidth !== 0) {
2435
+ writer.uint32(16).uint32(message.imageWidth);
2436
+ }
2437
+ if (message.imageHeight !== 0) {
2438
+ writer.uint32(24).uint32(message.imageHeight);
2439
+ }
2440
+ return writer;
2441
+ },
2442
+ decode(input, length) {
2443
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2444
+ const end = length === undefined ? reader.len : reader.pos + length;
2445
+ const message = createBaseSetSotTargetCtrl();
2446
+ while (reader.pos < end) {
2447
+ const tag = reader.uint32();
2448
+ switch (tag >>> 3) {
2449
+ case 1: {
2450
+ if (tag !== 10) {
2451
+ break;
2452
+ }
2453
+ message.boundingBox = message_formats_1.BoundingBox.decode(reader, reader.uint32());
2454
+ continue;
2455
+ }
2456
+ case 2: {
2457
+ if (tag !== 16) {
2458
+ break;
2459
+ }
2460
+ message.imageWidth = reader.uint32();
2461
+ continue;
2462
+ }
2463
+ case 3: {
2464
+ if (tag !== 24) {
2465
+ break;
2466
+ }
2467
+ message.imageHeight = reader.uint32();
2468
+ continue;
2469
+ }
2470
+ }
2471
+ if ((tag & 7) === 4 || tag === 0) {
2472
+ break;
2473
+ }
2474
+ reader.skip(tag & 7);
2475
+ }
2476
+ return message;
2477
+ },
2478
+ fromJSON(object) {
2479
+ return {
2480
+ boundingBox: isSet(object.boundingBox) ? message_formats_1.BoundingBox.fromJSON(object.boundingBox) : undefined,
2481
+ imageWidth: isSet(object.imageWidth) ? gt.Number(object.imageWidth) : 0,
2482
+ imageHeight: isSet(object.imageHeight) ? gt.Number(object.imageHeight) : 0,
2483
+ };
2484
+ },
2485
+ toJSON(message) {
2486
+ const obj = {};
2487
+ if (message.boundingBox !== undefined) {
2488
+ obj.boundingBox = message_formats_1.BoundingBox.toJSON(message.boundingBox);
2489
+ }
2490
+ if (message.imageWidth !== 0) {
2491
+ obj.imageWidth = Math.round(message.imageWidth);
2492
+ }
2493
+ if (message.imageHeight !== 0) {
2494
+ obj.imageHeight = Math.round(message.imageHeight);
2495
+ }
2496
+ return obj;
2497
+ },
2498
+ create(base) {
2499
+ return exports.SetSotTargetCtrl.fromPartial(base ?? {});
2500
+ },
2501
+ fromPartial(object) {
2502
+ const message = createBaseSetSotTargetCtrl();
2503
+ message.boundingBox = (object.boundingBox !== undefined && object.boundingBox !== null)
2504
+ ? message_formats_1.BoundingBox.fromPartial(object.boundingBox)
2505
+ : undefined;
2506
+ message.imageWidth = object.imageWidth ?? 0;
2507
+ message.imageHeight = object.imageHeight ?? 0;
2508
+ return message;
2509
+ },
2510
+ };
2511
+ function createBaseClearSotTargetCtrl() {
2512
+ return {};
2513
+ }
2514
+ exports.ClearSotTargetCtrl = {
2515
+ encode(_, writer = new wire_1.BinaryWriter()) {
2516
+ return writer;
2517
+ },
2518
+ decode(input, length) {
2519
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2520
+ const end = length === undefined ? reader.len : reader.pos + length;
2521
+ const message = createBaseClearSotTargetCtrl();
2522
+ while (reader.pos < end) {
2523
+ const tag = reader.uint32();
2524
+ switch (tag >>> 3) {
2525
+ }
2526
+ if ((tag & 7) === 4 || tag === 0) {
2527
+ break;
2528
+ }
2529
+ reader.skip(tag & 7);
2530
+ }
2531
+ return message;
2532
+ },
2533
+ fromJSON(_) {
2534
+ return {};
2535
+ },
2536
+ toJSON(_) {
2537
+ const obj = {};
2538
+ return obj;
2539
+ },
2540
+ create(base) {
2541
+ return exports.ClearSotTargetCtrl.fromPartial(base ?? {});
2542
+ },
2543
+ fromPartial(_) {
2544
+ const message = createBaseClearSotTargetCtrl();
2545
+ return message;
2546
+ },
2547
+ };
2548
+ function createBaseRescanCvModelsCtrl() {
2549
+ return {};
2550
+ }
2551
+ exports.RescanCvModelsCtrl = {
2552
+ encode(_, writer = new wire_1.BinaryWriter()) {
2553
+ return writer;
2554
+ },
2555
+ decode(input, length) {
2556
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2557
+ const end = length === undefined ? reader.len : reader.pos + length;
2558
+ const message = createBaseRescanCvModelsCtrl();
2559
+ while (reader.pos < end) {
2560
+ const tag = reader.uint32();
2561
+ switch (tag >>> 3) {
2562
+ }
2563
+ if ((tag & 7) === 4 || tag === 0) {
2564
+ break;
2565
+ }
2566
+ reader.skip(tag & 7);
2567
+ }
2568
+ return message;
2569
+ },
2570
+ fromJSON(_) {
2571
+ return {};
2572
+ },
2573
+ toJSON(_) {
2574
+ const obj = {};
2575
+ return obj;
2576
+ },
2577
+ create(base) {
2578
+ return exports.RescanCvModelsCtrl.fromPartial(base ?? {});
2579
+ },
2580
+ fromPartial(_) {
2581
+ const message = createBaseRescanCvModelsCtrl();
2582
+ return message;
2583
+ },
2584
+ };
2585
+ function createBaseAnnotationCtrl() {
2586
+ return { annotation: undefined };
2587
+ }
2588
+ exports.AnnotationCtrl = {
2589
+ encode(message, writer = new wire_1.BinaryWriter()) {
2590
+ if (message.annotation !== undefined) {
2591
+ message_formats_1.Annotation.encode(message.annotation, writer.uint32(10).fork()).join();
2592
+ }
2593
+ return writer;
2594
+ },
2595
+ decode(input, length) {
2596
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2597
+ const end = length === undefined ? reader.len : reader.pos + length;
2598
+ const message = createBaseAnnotationCtrl();
2599
+ while (reader.pos < end) {
2600
+ const tag = reader.uint32();
2601
+ switch (tag >>> 3) {
2602
+ case 1: {
2603
+ if (tag !== 10) {
2604
+ break;
2605
+ }
2606
+ message.annotation = message_formats_1.Annotation.decode(reader, reader.uint32());
2607
+ continue;
2608
+ }
2609
+ }
2610
+ if ((tag & 7) === 4 || tag === 0) {
2611
+ break;
2612
+ }
2613
+ reader.skip(tag & 7);
2614
+ }
2615
+ return message;
2616
+ },
2617
+ fromJSON(object) {
2618
+ return { annotation: isSet(object.annotation) ? message_formats_1.Annotation.fromJSON(object.annotation) : undefined };
2619
+ },
2620
+ toJSON(message) {
2621
+ const obj = {};
2622
+ if (message.annotation !== undefined) {
2623
+ obj.annotation = message_formats_1.Annotation.toJSON(message.annotation);
2624
+ }
2625
+ return obj;
2626
+ },
2627
+ create(base) {
2628
+ return exports.AnnotationCtrl.fromPartial(base ?? {});
2629
+ },
2630
+ fromPartial(object) {
2631
+ const message = createBaseAnnotationCtrl();
2632
+ message.annotation = (object.annotation !== undefined && object.annotation !== null)
2633
+ ? message_formats_1.Annotation.fromPartial(object.annotation)
2634
+ : undefined;
2635
+ return message;
2636
+ },
2637
+ };
2314
2638
  const gt = (() => {
2315
2639
  if (typeof globalThis !== "undefined") {
2316
2640
  return globalThis;