@rise-maritime/keelson-js 0.6.0-alpha.281.dev.1 → 0.6.0-alpha.282.dev.2

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.
@@ -22,38 +22,6 @@ export interface ListFilesResponse {
22
22
  baseDirectory: string;
23
23
  files: FileInfo[];
24
24
  }
25
- export interface DescribeFileRequest {
26
- /**
27
- * Path relative to the replayer's base directory, as in load_file. The file
28
- * need not be loaded — a client can inspect a recording before playing it.
29
- */
30
- path: string;
31
- }
32
- /** One channel (topic) in the file, and when it spoke. */
33
- export interface ChannelInfo {
34
- topic: string;
35
- /** The channel's schema name as recorded, e.g. "keelson.TimestampedFloat". */
36
- schemaName: string;
37
- /** The channel's message encoding as recorded, e.g. "protobuf". */
38
- messageEncoding: string;
39
- messageCount: number;
40
- /**
41
- * log_time of the channel's first and last message. Unset when the channel
42
- * recorded no messages. Exact, not the bounds of the chunks it appears in.
43
- */
44
- firstTime: Date | undefined;
45
- lastTime: Date | undefined;
46
- }
47
- export interface DescribeFileResponse {
48
- file: FileInfo | undefined;
49
- channels: ChannelInfo[];
50
- /**
51
- * True when the file carried no summary or no chunk indexes, so the replayer
52
- * had to read it end to end. The figures are still exact; the call was just
53
- * proportional to the file's size rather than to its number of chunks.
54
- */
55
- fromScan: boolean;
56
- }
57
25
  export interface LoadFileRequest {
58
26
  path: string;
59
27
  }
@@ -62,11 +30,7 @@ export interface SeekRequest {
62
30
  target: Date | undefined;
63
31
  }
64
32
  export interface SetSpeedRequest {
65
- /**
66
- * Playback speed multiplier; expected range [0.25, 20.0]. At high speeds a
67
- * recording heavy with images or point clouds is published as fast as the
68
- * replayer can manage and lags wall time; no message is dropped.
69
- */
33
+ /** Playback speed multiplier; expected range [0.25, 4.0]. */
70
34
  speed: number;
71
35
  }
72
36
  export interface SetLoopRequest {
@@ -78,9 +42,6 @@ export interface ReplaySuccessResponse {
78
42
  export declare const FileInfo: MessageFns<FileInfo>;
79
43
  export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
80
44
  export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
81
- export declare const DescribeFileRequest: MessageFns<DescribeFileRequest>;
82
- export declare const ChannelInfo: MessageFns<ChannelInfo>;
83
- export declare const DescribeFileResponse: MessageFns<DescribeFileResponse>;
84
45
  export declare const LoadFileRequest: MessageFns<LoadFileRequest>;
85
46
  export declare const SeekRequest: MessageFns<SeekRequest>;
86
47
  export declare const SetSpeedRequest: MessageFns<SetSpeedRequest>;
@@ -99,15 +60,6 @@ export declare const ReplayControlDefinition: {
99
60
  readonly responseStream: false;
100
61
  readonly options: {};
101
62
  };
102
- /** Per-channel message counts and first/last message times for one file. */
103
- readonly describe_file: {
104
- readonly name: "describe_file";
105
- readonly requestType: MessageFns<DescribeFileRequest>;
106
- readonly requestStream: false;
107
- readonly responseType: MessageFns<DescribeFileResponse>;
108
- readonly responseStream: false;
109
- readonly options: {};
110
- };
111
63
  readonly load_file: {
112
64
  readonly name: "load_file";
113
65
  readonly requestType: MessageFns<LoadFileRequest>;
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: ReplayControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
8
+ exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const empty_1 = require("./google/protobuf/empty");
@@ -283,270 +283,6 @@ exports.ListFilesResponse = {
283
283
  return message;
284
284
  },
285
285
  };
286
- function createBaseDescribeFileRequest() {
287
- return { path: "" };
288
- }
289
- exports.DescribeFileRequest = {
290
- encode(message, writer = new wire_1.BinaryWriter()) {
291
- if (message.path !== "") {
292
- writer.uint32(10).string(message.path);
293
- }
294
- return writer;
295
- },
296
- decode(input, length) {
297
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
298
- let end = length === undefined ? reader.len : reader.pos + length;
299
- const message = createBaseDescribeFileRequest();
300
- while (reader.pos < end) {
301
- const tag = reader.uint32();
302
- switch (tag >>> 3) {
303
- case 1: {
304
- if (tag !== 10) {
305
- break;
306
- }
307
- message.path = reader.string();
308
- continue;
309
- }
310
- }
311
- if ((tag & 7) === 4 || tag === 0) {
312
- break;
313
- }
314
- reader.skip(tag & 7);
315
- }
316
- return message;
317
- },
318
- fromJSON(object) {
319
- return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
320
- },
321
- toJSON(message) {
322
- const obj = {};
323
- if (message.path !== "") {
324
- obj.path = message.path;
325
- }
326
- return obj;
327
- },
328
- create(base) {
329
- return exports.DescribeFileRequest.fromPartial(base ?? {});
330
- },
331
- fromPartial(object) {
332
- const message = createBaseDescribeFileRequest();
333
- message.path = object.path ?? "";
334
- return message;
335
- },
336
- };
337
- function createBaseChannelInfo() {
338
- return { topic: "", schemaName: "", messageEncoding: "", messageCount: 0, firstTime: undefined, lastTime: undefined };
339
- }
340
- exports.ChannelInfo = {
341
- encode(message, writer = new wire_1.BinaryWriter()) {
342
- if (message.topic !== "") {
343
- writer.uint32(10).string(message.topic);
344
- }
345
- if (message.schemaName !== "") {
346
- writer.uint32(18).string(message.schemaName);
347
- }
348
- if (message.messageEncoding !== "") {
349
- writer.uint32(26).string(message.messageEncoding);
350
- }
351
- if (message.messageCount !== 0) {
352
- writer.uint32(32).uint64(message.messageCount);
353
- }
354
- if (message.firstTime !== undefined) {
355
- timestamp_1.Timestamp.encode(toTimestamp(message.firstTime), writer.uint32(42).fork()).join();
356
- }
357
- if (message.lastTime !== undefined) {
358
- timestamp_1.Timestamp.encode(toTimestamp(message.lastTime), writer.uint32(50).fork()).join();
359
- }
360
- return writer;
361
- },
362
- decode(input, length) {
363
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
364
- let end = length === undefined ? reader.len : reader.pos + length;
365
- const message = createBaseChannelInfo();
366
- while (reader.pos < end) {
367
- const tag = reader.uint32();
368
- switch (tag >>> 3) {
369
- case 1: {
370
- if (tag !== 10) {
371
- break;
372
- }
373
- message.topic = reader.string();
374
- continue;
375
- }
376
- case 2: {
377
- if (tag !== 18) {
378
- break;
379
- }
380
- message.schemaName = reader.string();
381
- continue;
382
- }
383
- case 3: {
384
- if (tag !== 26) {
385
- break;
386
- }
387
- message.messageEncoding = reader.string();
388
- continue;
389
- }
390
- case 4: {
391
- if (tag !== 32) {
392
- break;
393
- }
394
- message.messageCount = longToNumber(reader.uint64());
395
- continue;
396
- }
397
- case 5: {
398
- if (tag !== 42) {
399
- break;
400
- }
401
- message.firstTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
402
- continue;
403
- }
404
- case 6: {
405
- if (tag !== 50) {
406
- break;
407
- }
408
- message.lastTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
409
- continue;
410
- }
411
- }
412
- if ((tag & 7) === 4 || tag === 0) {
413
- break;
414
- }
415
- reader.skip(tag & 7);
416
- }
417
- return message;
418
- },
419
- fromJSON(object) {
420
- return {
421
- topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
422
- schemaName: isSet(object.schemaName) ? globalThis.String(object.schemaName) : "",
423
- messageEncoding: isSet(object.messageEncoding) ? globalThis.String(object.messageEncoding) : "",
424
- messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
425
- firstTime: isSet(object.firstTime) ? fromJsonTimestamp(object.firstTime) : undefined,
426
- lastTime: isSet(object.lastTime) ? fromJsonTimestamp(object.lastTime) : undefined,
427
- };
428
- },
429
- toJSON(message) {
430
- const obj = {};
431
- if (message.topic !== "") {
432
- obj.topic = message.topic;
433
- }
434
- if (message.schemaName !== "") {
435
- obj.schemaName = message.schemaName;
436
- }
437
- if (message.messageEncoding !== "") {
438
- obj.messageEncoding = message.messageEncoding;
439
- }
440
- if (message.messageCount !== 0) {
441
- obj.messageCount = Math.round(message.messageCount);
442
- }
443
- if (message.firstTime !== undefined) {
444
- obj.firstTime = message.firstTime.toISOString();
445
- }
446
- if (message.lastTime !== undefined) {
447
- obj.lastTime = message.lastTime.toISOString();
448
- }
449
- return obj;
450
- },
451
- create(base) {
452
- return exports.ChannelInfo.fromPartial(base ?? {});
453
- },
454
- fromPartial(object) {
455
- const message = createBaseChannelInfo();
456
- message.topic = object.topic ?? "";
457
- message.schemaName = object.schemaName ?? "";
458
- message.messageEncoding = object.messageEncoding ?? "";
459
- message.messageCount = object.messageCount ?? 0;
460
- message.firstTime = object.firstTime ?? undefined;
461
- message.lastTime = object.lastTime ?? undefined;
462
- return message;
463
- },
464
- };
465
- function createBaseDescribeFileResponse() {
466
- return { file: undefined, channels: [], fromScan: false };
467
- }
468
- exports.DescribeFileResponse = {
469
- encode(message, writer = new wire_1.BinaryWriter()) {
470
- if (message.file !== undefined) {
471
- exports.FileInfo.encode(message.file, writer.uint32(10).fork()).join();
472
- }
473
- for (const v of message.channels) {
474
- exports.ChannelInfo.encode(v, writer.uint32(18).fork()).join();
475
- }
476
- if (message.fromScan !== false) {
477
- writer.uint32(24).bool(message.fromScan);
478
- }
479
- return writer;
480
- },
481
- decode(input, length) {
482
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
483
- let end = length === undefined ? reader.len : reader.pos + length;
484
- const message = createBaseDescribeFileResponse();
485
- while (reader.pos < end) {
486
- const tag = reader.uint32();
487
- switch (tag >>> 3) {
488
- case 1: {
489
- if (tag !== 10) {
490
- break;
491
- }
492
- message.file = exports.FileInfo.decode(reader, reader.uint32());
493
- continue;
494
- }
495
- case 2: {
496
- if (tag !== 18) {
497
- break;
498
- }
499
- message.channels.push(exports.ChannelInfo.decode(reader, reader.uint32()));
500
- continue;
501
- }
502
- case 3: {
503
- if (tag !== 24) {
504
- break;
505
- }
506
- message.fromScan = reader.bool();
507
- continue;
508
- }
509
- }
510
- if ((tag & 7) === 4 || tag === 0) {
511
- break;
512
- }
513
- reader.skip(tag & 7);
514
- }
515
- return message;
516
- },
517
- fromJSON(object) {
518
- return {
519
- file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
520
- channels: globalThis.Array.isArray(object?.channels)
521
- ? object.channels.map((e) => exports.ChannelInfo.fromJSON(e))
522
- : [],
523
- fromScan: isSet(object.fromScan) ? globalThis.Boolean(object.fromScan) : false,
524
- };
525
- },
526
- toJSON(message) {
527
- const obj = {};
528
- if (message.file !== undefined) {
529
- obj.file = exports.FileInfo.toJSON(message.file);
530
- }
531
- if (message.channels?.length) {
532
- obj.channels = message.channels.map((e) => exports.ChannelInfo.toJSON(e));
533
- }
534
- if (message.fromScan !== false) {
535
- obj.fromScan = message.fromScan;
536
- }
537
- return obj;
538
- },
539
- create(base) {
540
- return exports.DescribeFileResponse.fromPartial(base ?? {});
541
- },
542
- fromPartial(object) {
543
- const message = createBaseDescribeFileResponse();
544
- message.file = (object.file !== undefined && object.file !== null) ? exports.FileInfo.fromPartial(object.file) : undefined;
545
- message.channels = object.channels?.map((e) => exports.ChannelInfo.fromPartial(e)) || [];
546
- message.fromScan = object.fromScan ?? false;
547
- return message;
548
- },
549
- };
550
286
  function createBaseLoadFileRequest() {
551
287
  return { path: "" };
552
288
  }
@@ -800,15 +536,6 @@ exports.ReplayControlDefinition = {
800
536
  responseStream: false,
801
537
  options: {},
802
538
  },
803
- /** Per-channel message counts and first/last message times for one file. */
804
- describe_file: {
805
- name: "describe_file",
806
- requestType: exports.DescribeFileRequest,
807
- requestStream: false,
808
- responseType: exports.DescribeFileResponse,
809
- responseStream: false,
810
- options: {},
811
- },
812
539
  load_file: {
813
540
  name: "load_file",
814
541
  requestType: exports.LoadFileRequest,
@@ -99,6 +99,34 @@ export declare enum GeometryType {
99
99
  }
100
100
  export declare function geometryTypeFromJSON(object: any): GeometryType;
101
101
  export declare function geometryTypeToJSON(object: GeometryType): string;
102
+ /**
103
+ * How a leg's XTD corridor is shaped. UNSPECIFIED MUST be read as FIXED:
104
+ * every leg published before this field existed is a fixed-width corridor, and
105
+ * reading it any other way would change routes nobody edited.
106
+ */
107
+ export declare enum XtdCorridorMode {
108
+ XTD_CORRIDOR_MODE_UNSPECIFIED = 0,
109
+ /**
110
+ * XTD_CORRIDOR_MODE_FIXED - Fixed width: parallel lines at xtd_port_m / xtd_starboard_m either side of
111
+ * track.
112
+ */
113
+ XTD_CORRIDOR_MODE_FIXED = 1,
114
+ /**
115
+ * XTD_CORRIDOR_MODE_VARIABLE - Variable width: a boundary drawn by the planner (Leg.xtd_port_boundary /
116
+ * xtd_starboard_boundary), e.g. a corridor that narrows past a shoal.
117
+ * The metre fields (xtd_port_m / xtd_starboard_m and the monitoring pair)
118
+ * MUST NOT exceed the closest approach to track of that side's drawn
119
+ * boundary: they are the INSCRIBED fixed corridor. A monitor that does not
120
+ * evaluate the boundary then alarms early on a wide stretch and never late at
121
+ * the narrow one, which is the direction an XTD limit has to fail. Such a
122
+ * monitor SHOULD report the leg as monitored at reduced fidelity, which is
123
+ * why its alarm may come early.
124
+ */
125
+ XTD_CORRIDOR_MODE_VARIABLE = 2,
126
+ UNRECOGNIZED = -1
127
+ }
128
+ export declare function xtdCorridorModeFromJSON(object: any): XtdCorridorMode;
129
+ export declare function xtdCorridorModeToJSON(object: XtdCorridorMode): string;
102
130
  /**
103
131
  * Whether a route's waypoint list closes back on itself. RTZ 1.2 has no such
104
132
  * concept, so producers either repeated the first waypoint (breaking id
@@ -460,12 +488,29 @@ export interface Leg {
460
488
  /**
461
489
  * Cross-track distance (XTD) limits and monitoring thresholds, in metres.
462
490
  * `optional` so producers can distinguish "no XTD limit" (unset) from
463
- * "zero XTD limit" (set to 0).
491
+ * "zero XTD limit" (set to 0). Under XTD_CORRIDOR_MODE_VARIABLE all four are
492
+ * the inscribed corridor (protocol-specification.md §6.2.2).
464
493
  */
465
494
  xtdPortM?: number | undefined;
466
495
  xtdStarboardM?: number | undefined;
467
496
  xtdMonitoringPortM?: number | undefined;
468
497
  xtdMonitoringStarboardM?: number | undefined;
498
+ /**
499
+ * Whether this leg's XTD corridor is fixed or variable width. See XtdCorridorMode and
500
+ * protocol-specification.md §6.2.2.
501
+ */
502
+ xtdCorridorMode: XtdCorridorMode;
503
+ /**
504
+ * VARIABLE only: the drawn corridor boundary on each side, vertices in
505
+ * along-track order, covering this leg and the turn at the waypoint it
506
+ * arrives at. A consumer MUST ignore both lists unless the mode is VARIABLE,
507
+ * so a stale shape left behind by a switch back to FIXED is never sailed.
508
+ * Where the next leg is VARIABLE too, the last vertex on a side SHOULD
509
+ * coincide with the first vertex of waypoint[i+1].leg's list on that side, so
510
+ * a monitor meets neither a gap nor an overlap at the junction.
511
+ */
512
+ xtdPortBoundary: XtdBoundaryPoint[];
513
+ xtdStarboardBoundary: XtdBoundaryPoint[];
469
514
  /**
470
515
  * Safety contour (depth in metres below chart datum) below which the route
471
516
  * is considered unsafe.
@@ -514,6 +559,36 @@ export interface Leg {
514
559
  colregTrafficIntensity: ColregTrafficIntensity;
515
560
  extensions: Extensions | undefined;
516
561
  }
562
+ /**
563
+ * One vertex of a variable-width XTD corridor boundary (Leg.xtd_port_boundary /
564
+ * Leg.xtd_starboard_boundary).
565
+ */
566
+ export interface XtdBoundaryPoint {
567
+ /**
568
+ * WGS-84 vertex. Authoritative: this is the boundary a monitor checks
569
+ * against, whatever the anchor below says.
570
+ */
571
+ position: Coordinate | undefined;
572
+ /**
573
+ * Editor anchor — where along the leg's straight the vertex was placed,
574
+ * 0 at the leg's start and 1 at its end, and how far off track. Lets an
575
+ * editor keep the vertex attached to the leg when a waypoint moves, instead
576
+ * of leaving it stranded at its old position. `optional` because a vertex
577
+ * placed freely (at a leg end or inside a turn) has no such anchor, and 0
578
+ * is a real fraction.
579
+ */
580
+ alongTrackFraction?: number | undefined;
581
+ /**
582
+ * Perpendicular distance from track for that anchor, metres, always
583
+ * positive: the side is given by which boundary list holds the vertex.
584
+ */
585
+ offsetM?: number | undefined;
586
+ /**
587
+ * True when the vertex lies on the turn at the leg's end rather than on the
588
+ * straight.
589
+ */
590
+ inTurn: boolean;
591
+ }
517
592
  export interface Schedules {
518
593
  /** Multiple schedules can coexist (e.g. "manual", "weather-optimized"). */
519
594
  schedule: Schedule[];
@@ -698,6 +773,7 @@ export declare const Waypoints: MessageFns<Waypoints>;
698
773
  export declare const DefaultWaypoint: MessageFns<DefaultWaypoint>;
699
774
  export declare const Waypoint: MessageFns<Waypoint>;
700
775
  export declare const Leg: MessageFns<Leg>;
776
+ export declare const XtdBoundaryPoint: MessageFns<XtdBoundaryPoint>;
701
777
  export declare const Schedules: MessageFns<Schedules>;
702
778
  export declare const Schedule: MessageFns<Schedule>;
703
779
  export declare const ScheduleElement: MessageFns<ScheduleElement>;