@rise-maritime/keelson-js 0.6.0-alpha.232.dev.1 → 0.6.0-alpha.255.dev.1
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/index.d.ts +8 -8
- package/dist/interfaces/Route.d.ts +24 -0
- package/dist/interfaces/Route.js +57 -2
- package/dist/interfaces/ScenarioControl.d.ts +3 -96
- package/dist/interfaces/ScenarioControl.js +37 -394
- package/dist/interfaces/VehicleSimulatorControl.d.ts +83 -0
- package/dist/interfaces/VehicleSimulatorControl.js +293 -1
- package/dist/interfaces/serviceRegistry.d.ts +8 -8
- package/dist/payloads/ChecklistEvent.d.ts +178 -0
- package/dist/payloads/ChecklistEvent.js +539 -0
- package/dist/payloads/ChecklistEvidence.d.ts +79 -0
- package/dist/payloads/ChecklistEvidence.js +287 -0
- package/dist/payloads/ChecklistPresence.d.ts +68 -0
- package/dist/payloads/ChecklistPresence.js +286 -0
- package/dist/payloads/ChecklistProcedure.d.ts +81 -0
- package/dist/payloads/ChecklistProcedure.js +364 -0
- package/dist/payloads/ChecklistState.d.ts +283 -0
- package/dist/payloads/ChecklistState.js +1100 -0
- package/dist/payloads/EnvelopeExceedance.d.ts +216 -0
- package/dist/payloads/EnvelopeExceedance.js +461 -0
- package/dist/payloads/Route.d.ts +24 -0
- package/dist/payloads/Route.js +57 -2
- package/dist/payloads/RouteExecution.d.ts +81 -1
- package/dist/payloads/RouteExecution.js +215 -1
- package/dist/payloads/ScenarioEvent.d.ts +90 -0
- package/dist/payloads/ScenarioEvent.js +294 -0
- package/dist/payloads/ScenarioTickAck.d.ts +95 -0
- package/dist/payloads/ScenarioTickAck.js +239 -0
- package/dist/payloads/index.foxglove.d.ts +1 -1
- package/dist/payloads/index.foxglove.js +1 -1
- package/dist/payloads/index.google.protobuf.d.ts +1 -1
- package/dist/payloads/index.google.protobuf.js +1 -1
- package/dist/payloads/index.keelson.d.ts +9 -1
- package/dist/payloads/index.keelson.js +9 -1
- package/dist/qos.json +13 -1
- package/dist/subjects.json +9 -1
- package/package.json +1 -1
package/dist/payloads/Route.d.ts
CHANGED
|
@@ -107,6 +107,30 @@ export declare enum RouteStatus {
|
|
|
107
107
|
}
|
|
108
108
|
export declare function routeStatusFromJSON(object: any): RouteStatus;
|
|
109
109
|
export declare function routeStatusToJSON(object: RouteStatus): string;
|
|
110
|
+
/**
|
|
111
|
+
* Which side of an operational limit counts as a breach.
|
|
112
|
+
*
|
|
113
|
+
* RouteInfo's own limit block carries both directions — max_wind_gust_mps is
|
|
114
|
+
* breached above, min_visibility_m below — so nothing about a limit's identity
|
|
115
|
+
* says which way it fails. Consumers of an exceedance record need it: "the most
|
|
116
|
+
* extreme value reached" is undefined without it, and deriving the direction
|
|
117
|
+
* from a `max_` / `min_` name prefix is a string match that fails silently the
|
|
118
|
+
* first time a limit is named anything else.
|
|
119
|
+
*
|
|
120
|
+
* Lives here rather than beside either consumer because it is a property of the
|
|
121
|
+
* limit as authored, not of the monitoring. Read by keelson.EnvelopeExceedance
|
|
122
|
+
* and keelson.EnvelopeLimitState.
|
|
123
|
+
*/
|
|
124
|
+
export declare enum EnvelopeBound {
|
|
125
|
+
ENVELOPE_BOUND_UNSPECIFIED = 0,
|
|
126
|
+
/** ENVELOPE_BOUND_UPPER - Breached by going ABOVE the limit value (max_wind_gust_mps, max_roll_deg). */
|
|
127
|
+
ENVELOPE_BOUND_UPPER = 1,
|
|
128
|
+
/** ENVELOPE_BOUND_LOWER - Breached by going BELOW it (min_visibility_m, min_speed_knots). */
|
|
129
|
+
ENVELOPE_BOUND_LOWER = 2,
|
|
130
|
+
UNRECOGNIZED = -1
|
|
131
|
+
}
|
|
132
|
+
export declare function envelopeBoundFromJSON(object: any): EnvelopeBound;
|
|
133
|
+
export declare function envelopeBoundToJSON(object: EnvelopeBound): string;
|
|
110
134
|
/** Required action for an ActionPoint. */
|
|
111
135
|
export declare enum ActionPointRequiredAction {
|
|
112
136
|
ACTION_POINT_REQUIRED_ACTION_UNSPECIFIED = 0,
|
package/dist/payloads/Route.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: Route.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.RouteStatusUpdate = exports.RouteSignature = void 0;
|
|
8
|
+
exports.HazardZone = exports.ActionPoint = exports.ActionPoints = exports.ScheduleElement = exports.Schedule = exports.Schedules = exports.Leg = exports.Waypoint = exports.DefaultWaypoint = exports.Waypoints = exports.RouteInfo = exports.Route = exports.Extensions_Entry_AttributesEntry = exports.Extensions_Entry = exports.Extensions = exports.CircleGeometry = exports.RouteRef = exports.schedule_OriginToJSON = exports.schedule_OriginFromJSON = exports.Schedule_Origin = exports.actionPointRequiredActionToJSON = exports.actionPointRequiredActionFromJSON = exports.ActionPointRequiredAction = exports.envelopeBoundToJSON = exports.envelopeBoundFromJSON = exports.EnvelopeBound = exports.routeStatusToJSON = exports.routeStatusFromJSON = exports.RouteStatus = exports.geometryTypeToJSON = exports.geometryTypeFromJSON = exports.GeometryType = exports.colregTrafficIntensityToJSON = exports.colregTrafficIntensityFromJSON = exports.ColregTrafficIntensity = exports.colregSituationToJSON = exports.colregSituationFromJSON = exports.ColregSituation = exports.hazardZoneTypeToJSON = exports.hazardZoneTypeFromJSON = exports.HazardZoneType = exports.routeChallengeTypeToJSON = exports.routeChallengeTypeFromJSON = exports.RouteChallengeType = exports.operationalContextToJSON = exports.operationalContextFromJSON = exports.OperationalContext = exports.autonomyLevelToJSON = exports.autonomyLevelFromJSON = exports.AutonomyLevel = void 0;
|
|
9
|
+
exports.RouteStatusUpdate = exports.RouteSignature = exports.RouteSignatures = exports.RouteIssue = exports.RouteChallenge = void 0;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
12
|
const Coordinate_1 = require("./Coordinate");
|
|
@@ -492,6 +492,61 @@ function routeStatusToJSON(object) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
exports.routeStatusToJSON = routeStatusToJSON;
|
|
495
|
+
/**
|
|
496
|
+
* Which side of an operational limit counts as a breach.
|
|
497
|
+
*
|
|
498
|
+
* RouteInfo's own limit block carries both directions — max_wind_gust_mps is
|
|
499
|
+
* breached above, min_visibility_m below — so nothing about a limit's identity
|
|
500
|
+
* says which way it fails. Consumers of an exceedance record need it: "the most
|
|
501
|
+
* extreme value reached" is undefined without it, and deriving the direction
|
|
502
|
+
* from a `max_` / `min_` name prefix is a string match that fails silently the
|
|
503
|
+
* first time a limit is named anything else.
|
|
504
|
+
*
|
|
505
|
+
* Lives here rather than beside either consumer because it is a property of the
|
|
506
|
+
* limit as authored, not of the monitoring. Read by keelson.EnvelopeExceedance
|
|
507
|
+
* and keelson.EnvelopeLimitState.
|
|
508
|
+
*/
|
|
509
|
+
var EnvelopeBound;
|
|
510
|
+
(function (EnvelopeBound) {
|
|
511
|
+
EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_UNSPECIFIED"] = 0] = "ENVELOPE_BOUND_UNSPECIFIED";
|
|
512
|
+
/** ENVELOPE_BOUND_UPPER - Breached by going ABOVE the limit value (max_wind_gust_mps, max_roll_deg). */
|
|
513
|
+
EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_UPPER"] = 1] = "ENVELOPE_BOUND_UPPER";
|
|
514
|
+
/** ENVELOPE_BOUND_LOWER - Breached by going BELOW it (min_visibility_m, min_speed_knots). */
|
|
515
|
+
EnvelopeBound[EnvelopeBound["ENVELOPE_BOUND_LOWER"] = 2] = "ENVELOPE_BOUND_LOWER";
|
|
516
|
+
EnvelopeBound[EnvelopeBound["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
517
|
+
})(EnvelopeBound || (exports.EnvelopeBound = EnvelopeBound = {}));
|
|
518
|
+
function envelopeBoundFromJSON(object) {
|
|
519
|
+
switch (object) {
|
|
520
|
+
case 0:
|
|
521
|
+
case "ENVELOPE_BOUND_UNSPECIFIED":
|
|
522
|
+
return EnvelopeBound.ENVELOPE_BOUND_UNSPECIFIED;
|
|
523
|
+
case 1:
|
|
524
|
+
case "ENVELOPE_BOUND_UPPER":
|
|
525
|
+
return EnvelopeBound.ENVELOPE_BOUND_UPPER;
|
|
526
|
+
case 2:
|
|
527
|
+
case "ENVELOPE_BOUND_LOWER":
|
|
528
|
+
return EnvelopeBound.ENVELOPE_BOUND_LOWER;
|
|
529
|
+
case -1:
|
|
530
|
+
case "UNRECOGNIZED":
|
|
531
|
+
default:
|
|
532
|
+
return EnvelopeBound.UNRECOGNIZED;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
exports.envelopeBoundFromJSON = envelopeBoundFromJSON;
|
|
536
|
+
function envelopeBoundToJSON(object) {
|
|
537
|
+
switch (object) {
|
|
538
|
+
case EnvelopeBound.ENVELOPE_BOUND_UNSPECIFIED:
|
|
539
|
+
return "ENVELOPE_BOUND_UNSPECIFIED";
|
|
540
|
+
case EnvelopeBound.ENVELOPE_BOUND_UPPER:
|
|
541
|
+
return "ENVELOPE_BOUND_UPPER";
|
|
542
|
+
case EnvelopeBound.ENVELOPE_BOUND_LOWER:
|
|
543
|
+
return "ENVELOPE_BOUND_LOWER";
|
|
544
|
+
case EnvelopeBound.UNRECOGNIZED:
|
|
545
|
+
default:
|
|
546
|
+
return "UNRECOGNIZED";
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
exports.envelopeBoundToJSON = envelopeBoundToJSON;
|
|
495
550
|
/** Required action for an ActionPoint. */
|
|
496
551
|
var ActionPointRequiredAction;
|
|
497
552
|
(function (ActionPointRequiredAction) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import { RouteRef } from "./Route";
|
|
2
|
+
import { EnvelopeBound, RouteRef } from "./Route";
|
|
3
3
|
export interface RouteExecution {
|
|
4
4
|
$type: "keelson.RouteExecution";
|
|
5
5
|
/** Sample timestamp. */
|
|
@@ -33,6 +33,20 @@ export interface RouteExecution {
|
|
|
33
33
|
* current Leg's xtd_port_m / xtd_stbd_m or a configured fallback.
|
|
34
34
|
*/
|
|
35
35
|
deviationThresholdM: number;
|
|
36
|
+
/**
|
|
37
|
+
* -- Operational envelope state ---------------------------------------------
|
|
38
|
+
* Live standing of every RouteInfo operational limit being monitored, one
|
|
39
|
+
* entry per limit. Generalises the XTD deviation above, which stays as it is:
|
|
40
|
+
* cross-track is per-leg geometry rather than a RouteInfo envelope limit, and
|
|
41
|
+
* it is already published.
|
|
42
|
+
*
|
|
43
|
+
* This is the *live* half. It says whether the vessel is outside its envelope
|
|
44
|
+
* right now; it deliberately does not say when the breach was noticed or what
|
|
45
|
+
* was done about it. RouteExecution is an ephemeral snapshot and is not
|
|
46
|
+
* persisted, so it cannot be the evidence record — that is the
|
|
47
|
+
* `envelope_exceedance` subject.
|
|
48
|
+
*/
|
|
49
|
+
envelopeLimits: EnvelopeLimitState[];
|
|
36
50
|
/**
|
|
37
51
|
* -- Kinematics (echo of own-ship state for convenience) --------------------
|
|
38
52
|
* Knots to match the bus convention (subjects.yaml: speed_over_ground_knots)
|
|
@@ -41,7 +55,73 @@ export interface RouteExecution {
|
|
|
41
55
|
speedOverGroundKnots: number;
|
|
42
56
|
courseOverGroundDeg: number;
|
|
43
57
|
}
|
|
58
|
+
/** The standing of one operational limit at the sample instant. */
|
|
59
|
+
export interface EnvelopeLimitState {
|
|
60
|
+
$type: "keelson.EnvelopeLimitState";
|
|
61
|
+
/**
|
|
62
|
+
* The RouteInfo field the limit came from, e.g. "max_wind_gust_mps". Named
|
|
63
|
+
* rather than positional so a consumer can attribute a breach without
|
|
64
|
+
* holding the route, and so the id survives a route edition bump.
|
|
65
|
+
*
|
|
66
|
+
* A string on purpose — see keelson.EnvelopeExceedance.limit_id for why, and
|
|
67
|
+
* for when to revisit it.
|
|
68
|
+
*/
|
|
69
|
+
limitId: string;
|
|
70
|
+
/** The authored limit this sample was tested against. */
|
|
71
|
+
limitValue: number;
|
|
72
|
+
/**
|
|
73
|
+
* The measurement it was tested against. `optional` because a limit can be
|
|
74
|
+
* authored with nothing measuring it, and that is not the same as measuring
|
|
75
|
+
* zero.
|
|
76
|
+
*/
|
|
77
|
+
measuredValue?: number | undefined;
|
|
78
|
+
state: EnvelopeLimitState_State;
|
|
79
|
+
/**
|
|
80
|
+
* When `measured_value` was taken. `optional`, and absent under
|
|
81
|
+
* STATE_UNMEASURED by definition.
|
|
82
|
+
*
|
|
83
|
+
* Without it a ten-minute-old measurement reads as STATE_WITHIN exactly like
|
|
84
|
+
* a fresh one — the same failure STATE_UNMEASURED exists to prevent, one
|
|
85
|
+
* level down: a stale reading that renders as compliance. A consumer decides
|
|
86
|
+
* for itself what "too old" means for a given limit, which it cannot do
|
|
87
|
+
* without this.
|
|
88
|
+
*
|
|
89
|
+
* A receiver must NOT stamp this from the enclosing snapshot's own timestamp
|
|
90
|
+
* when a publisher leaves it unset. That asserts a measurement time that is
|
|
91
|
+
* simply wrong, and looks authoritative doing it; unset means "not known".
|
|
92
|
+
*/
|
|
93
|
+
measuredAt?: Date | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Which side of `limit_value` counts as a breach — see EnvelopeBound in
|
|
96
|
+
* Route.proto. Carried on the live standing as well as on the durable record
|
|
97
|
+
* so a consumer can render "8.0 / 12.0" the right way round without holding
|
|
98
|
+
* the route.
|
|
99
|
+
*/
|
|
100
|
+
bound: EnvelopeBound;
|
|
101
|
+
}
|
|
102
|
+
export declare enum EnvelopeLimitState_State {
|
|
103
|
+
STATE_UNSPECIFIED = 0,
|
|
104
|
+
/** STATE_WITHIN - Measured, and inside the limit. */
|
|
105
|
+
STATE_WITHIN = 1,
|
|
106
|
+
/** STATE_BREACHED - Measured, and outside it. */
|
|
107
|
+
STATE_BREACHED = 2,
|
|
108
|
+
/**
|
|
109
|
+
* STATE_UNMEASURED - The limit is authored but nothing is measuring it, so no verdict exists.
|
|
110
|
+
*
|
|
111
|
+
* This is why the field is an enum rather than a bool. A `false` for a
|
|
112
|
+
* limit nothing measures is indistinguishable from a limit being honoured,
|
|
113
|
+
* and an unmonitored constraint that reads as compliance is worse than one
|
|
114
|
+
* that is absent: it looks managed. Keelson draws the same line elsewhere —
|
|
115
|
+
* HealthLevel separates UNKNOWN from CRITICAL, AuthorityLevel separates
|
|
116
|
+
* UNKNOWN from MINIMAL_SAFE_MODE.
|
|
117
|
+
*/
|
|
118
|
+
STATE_UNMEASURED = 3,
|
|
119
|
+
UNRECOGNIZED = -1
|
|
120
|
+
}
|
|
121
|
+
export declare function envelopeLimitState_StateFromJSON(object: any): EnvelopeLimitState_State;
|
|
122
|
+
export declare function envelopeLimitState_StateToJSON(object: EnvelopeLimitState_State): string;
|
|
44
123
|
export declare const RouteExecution: MessageFns<RouteExecution, "keelson.RouteExecution">;
|
|
124
|
+
export declare const EnvelopeLimitState: MessageFns<EnvelopeLimitState, "keelson.EnvelopeLimitState">;
|
|
45
125
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
46
126
|
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 {} ? {
|
|
47
127
|
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
@@ -5,12 +5,69 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: RouteExecution.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.RouteExecution = void 0;
|
|
8
|
+
exports.EnvelopeLimitState = exports.RouteExecution = exports.envelopeLimitState_StateToJSON = exports.envelopeLimitState_StateFromJSON = exports.EnvelopeLimitState_State = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const Route_1 = require("./Route");
|
|
12
12
|
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
13
13
|
const typeRegistry_1 = require("./typeRegistry");
|
|
14
|
+
var EnvelopeLimitState_State;
|
|
15
|
+
(function (EnvelopeLimitState_State) {
|
|
16
|
+
EnvelopeLimitState_State[EnvelopeLimitState_State["STATE_UNSPECIFIED"] = 0] = "STATE_UNSPECIFIED";
|
|
17
|
+
/** STATE_WITHIN - Measured, and inside the limit. */
|
|
18
|
+
EnvelopeLimitState_State[EnvelopeLimitState_State["STATE_WITHIN"] = 1] = "STATE_WITHIN";
|
|
19
|
+
/** STATE_BREACHED - Measured, and outside it. */
|
|
20
|
+
EnvelopeLimitState_State[EnvelopeLimitState_State["STATE_BREACHED"] = 2] = "STATE_BREACHED";
|
|
21
|
+
/**
|
|
22
|
+
* STATE_UNMEASURED - The limit is authored but nothing is measuring it, so no verdict exists.
|
|
23
|
+
*
|
|
24
|
+
* This is why the field is an enum rather than a bool. A `false` for a
|
|
25
|
+
* limit nothing measures is indistinguishable from a limit being honoured,
|
|
26
|
+
* and an unmonitored constraint that reads as compliance is worse than one
|
|
27
|
+
* that is absent: it looks managed. Keelson draws the same line elsewhere —
|
|
28
|
+
* HealthLevel separates UNKNOWN from CRITICAL, AuthorityLevel separates
|
|
29
|
+
* UNKNOWN from MINIMAL_SAFE_MODE.
|
|
30
|
+
*/
|
|
31
|
+
EnvelopeLimitState_State[EnvelopeLimitState_State["STATE_UNMEASURED"] = 3] = "STATE_UNMEASURED";
|
|
32
|
+
EnvelopeLimitState_State[EnvelopeLimitState_State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
33
|
+
})(EnvelopeLimitState_State || (exports.EnvelopeLimitState_State = EnvelopeLimitState_State = {}));
|
|
34
|
+
function envelopeLimitState_StateFromJSON(object) {
|
|
35
|
+
switch (object) {
|
|
36
|
+
case 0:
|
|
37
|
+
case "STATE_UNSPECIFIED":
|
|
38
|
+
return EnvelopeLimitState_State.STATE_UNSPECIFIED;
|
|
39
|
+
case 1:
|
|
40
|
+
case "STATE_WITHIN":
|
|
41
|
+
return EnvelopeLimitState_State.STATE_WITHIN;
|
|
42
|
+
case 2:
|
|
43
|
+
case "STATE_BREACHED":
|
|
44
|
+
return EnvelopeLimitState_State.STATE_BREACHED;
|
|
45
|
+
case 3:
|
|
46
|
+
case "STATE_UNMEASURED":
|
|
47
|
+
return EnvelopeLimitState_State.STATE_UNMEASURED;
|
|
48
|
+
case -1:
|
|
49
|
+
case "UNRECOGNIZED":
|
|
50
|
+
default:
|
|
51
|
+
return EnvelopeLimitState_State.UNRECOGNIZED;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.envelopeLimitState_StateFromJSON = envelopeLimitState_StateFromJSON;
|
|
55
|
+
function envelopeLimitState_StateToJSON(object) {
|
|
56
|
+
switch (object) {
|
|
57
|
+
case EnvelopeLimitState_State.STATE_UNSPECIFIED:
|
|
58
|
+
return "STATE_UNSPECIFIED";
|
|
59
|
+
case EnvelopeLimitState_State.STATE_WITHIN:
|
|
60
|
+
return "STATE_WITHIN";
|
|
61
|
+
case EnvelopeLimitState_State.STATE_BREACHED:
|
|
62
|
+
return "STATE_BREACHED";
|
|
63
|
+
case EnvelopeLimitState_State.STATE_UNMEASURED:
|
|
64
|
+
return "STATE_UNMEASURED";
|
|
65
|
+
case EnvelopeLimitState_State.UNRECOGNIZED:
|
|
66
|
+
default:
|
|
67
|
+
return "UNRECOGNIZED";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.envelopeLimitState_StateToJSON = envelopeLimitState_StateToJSON;
|
|
14
71
|
function createBaseRouteExecution() {
|
|
15
72
|
return {
|
|
16
73
|
$type: "keelson.RouteExecution",
|
|
@@ -26,6 +83,7 @@ function createBaseRouteExecution() {
|
|
|
26
83
|
etaArrival: undefined,
|
|
27
84
|
deviationActive: false,
|
|
28
85
|
deviationThresholdM: 0,
|
|
86
|
+
envelopeLimits: [],
|
|
29
87
|
speedOverGroundKnots: 0,
|
|
30
88
|
courseOverGroundDeg: 0,
|
|
31
89
|
};
|
|
@@ -69,6 +127,9 @@ exports.RouteExecution = {
|
|
|
69
127
|
if (message.deviationThresholdM !== 0) {
|
|
70
128
|
writer.uint32(253).float(message.deviationThresholdM);
|
|
71
129
|
}
|
|
130
|
+
for (const v of message.envelopeLimits) {
|
|
131
|
+
exports.EnvelopeLimitState.encode(v, writer.uint32(258).fork()).join();
|
|
132
|
+
}
|
|
72
133
|
if (message.speedOverGroundKnots !== 0) {
|
|
73
134
|
writer.uint32(325).float(message.speedOverGroundKnots);
|
|
74
135
|
}
|
|
@@ -168,6 +229,13 @@ exports.RouteExecution = {
|
|
|
168
229
|
message.deviationThresholdM = reader.float();
|
|
169
230
|
continue;
|
|
170
231
|
}
|
|
232
|
+
case 32: {
|
|
233
|
+
if (tag !== 258) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
message.envelopeLimits.push(exports.EnvelopeLimitState.decode(reader, reader.uint32()));
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
171
239
|
case 40: {
|
|
172
240
|
if (tag !== 325) {
|
|
173
241
|
break;
|
|
@@ -209,6 +277,9 @@ exports.RouteExecution = {
|
|
|
209
277
|
etaArrival: isSet(object.etaArrival) ? fromJsonTimestamp(object.etaArrival) : undefined,
|
|
210
278
|
deviationActive: isSet(object.deviationActive) ? globalThis.Boolean(object.deviationActive) : false,
|
|
211
279
|
deviationThresholdM: isSet(object.deviationThresholdM) ? globalThis.Number(object.deviationThresholdM) : 0,
|
|
280
|
+
envelopeLimits: globalThis.Array.isArray(object?.envelopeLimits)
|
|
281
|
+
? object.envelopeLimits.map((e) => exports.EnvelopeLimitState.fromJSON(e))
|
|
282
|
+
: [],
|
|
212
283
|
speedOverGroundKnots: isSet(object.speedOverGroundKnots) ? globalThis.Number(object.speedOverGroundKnots) : 0,
|
|
213
284
|
courseOverGroundDeg: isSet(object.courseOverGroundDeg) ? globalThis.Number(object.courseOverGroundDeg) : 0,
|
|
214
285
|
};
|
|
@@ -251,6 +322,9 @@ exports.RouteExecution = {
|
|
|
251
322
|
if (message.deviationThresholdM !== 0) {
|
|
252
323
|
obj.deviationThresholdM = message.deviationThresholdM;
|
|
253
324
|
}
|
|
325
|
+
if (message.envelopeLimits?.length) {
|
|
326
|
+
obj.envelopeLimits = message.envelopeLimits.map((e) => exports.EnvelopeLimitState.toJSON(e));
|
|
327
|
+
}
|
|
254
328
|
if (message.speedOverGroundKnots !== 0) {
|
|
255
329
|
obj.speedOverGroundKnots = message.speedOverGroundKnots;
|
|
256
330
|
}
|
|
@@ -278,12 +352,152 @@ exports.RouteExecution = {
|
|
|
278
352
|
message.etaArrival = object.etaArrival ?? undefined;
|
|
279
353
|
message.deviationActive = object.deviationActive ?? false;
|
|
280
354
|
message.deviationThresholdM = object.deviationThresholdM ?? 0;
|
|
355
|
+
message.envelopeLimits = object.envelopeLimits?.map((e) => exports.EnvelopeLimitState.fromPartial(e)) || [];
|
|
281
356
|
message.speedOverGroundKnots = object.speedOverGroundKnots ?? 0;
|
|
282
357
|
message.courseOverGroundDeg = object.courseOverGroundDeg ?? 0;
|
|
283
358
|
return message;
|
|
284
359
|
},
|
|
285
360
|
};
|
|
286
361
|
typeRegistry_1.messageTypeRegistry.set(exports.RouteExecution.$type, exports.RouteExecution);
|
|
362
|
+
function createBaseEnvelopeLimitState() {
|
|
363
|
+
return {
|
|
364
|
+
$type: "keelson.EnvelopeLimitState",
|
|
365
|
+
limitId: "",
|
|
366
|
+
limitValue: 0,
|
|
367
|
+
measuredValue: undefined,
|
|
368
|
+
state: 0,
|
|
369
|
+
measuredAt: undefined,
|
|
370
|
+
bound: 0,
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
exports.EnvelopeLimitState = {
|
|
374
|
+
$type: "keelson.EnvelopeLimitState",
|
|
375
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
376
|
+
if (message.limitId !== "") {
|
|
377
|
+
writer.uint32(10).string(message.limitId);
|
|
378
|
+
}
|
|
379
|
+
if (message.limitValue !== 0) {
|
|
380
|
+
writer.uint32(21).float(message.limitValue);
|
|
381
|
+
}
|
|
382
|
+
if (message.measuredValue !== undefined) {
|
|
383
|
+
writer.uint32(29).float(message.measuredValue);
|
|
384
|
+
}
|
|
385
|
+
if (message.state !== 0) {
|
|
386
|
+
writer.uint32(32).int32(message.state);
|
|
387
|
+
}
|
|
388
|
+
if (message.measuredAt !== undefined) {
|
|
389
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.measuredAt), writer.uint32(42).fork()).join();
|
|
390
|
+
}
|
|
391
|
+
if (message.bound !== 0) {
|
|
392
|
+
writer.uint32(48).int32(message.bound);
|
|
393
|
+
}
|
|
394
|
+
return writer;
|
|
395
|
+
},
|
|
396
|
+
decode(input, length) {
|
|
397
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
398
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
399
|
+
const message = createBaseEnvelopeLimitState();
|
|
400
|
+
while (reader.pos < end) {
|
|
401
|
+
const tag = reader.uint32();
|
|
402
|
+
switch (tag >>> 3) {
|
|
403
|
+
case 1: {
|
|
404
|
+
if (tag !== 10) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
message.limitId = reader.string();
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
case 2: {
|
|
411
|
+
if (tag !== 21) {
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
message.limitValue = reader.float();
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
case 3: {
|
|
418
|
+
if (tag !== 29) {
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
message.measuredValue = reader.float();
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
case 4: {
|
|
425
|
+
if (tag !== 32) {
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
message.state = reader.int32();
|
|
429
|
+
continue;
|
|
430
|
+
}
|
|
431
|
+
case 5: {
|
|
432
|
+
if (tag !== 42) {
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
message.measuredAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
case 6: {
|
|
439
|
+
if (tag !== 48) {
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
message.bound = reader.int32();
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
reader.skip(tag & 7);
|
|
450
|
+
}
|
|
451
|
+
return message;
|
|
452
|
+
},
|
|
453
|
+
fromJSON(object) {
|
|
454
|
+
return {
|
|
455
|
+
$type: exports.EnvelopeLimitState.$type,
|
|
456
|
+
limitId: isSet(object.limitId) ? globalThis.String(object.limitId) : "",
|
|
457
|
+
limitValue: isSet(object.limitValue) ? globalThis.Number(object.limitValue) : 0,
|
|
458
|
+
measuredValue: isSet(object.measuredValue) ? globalThis.Number(object.measuredValue) : undefined,
|
|
459
|
+
state: isSet(object.state) ? envelopeLimitState_StateFromJSON(object.state) : 0,
|
|
460
|
+
measuredAt: isSet(object.measuredAt) ? fromJsonTimestamp(object.measuredAt) : undefined,
|
|
461
|
+
bound: isSet(object.bound) ? (0, Route_1.envelopeBoundFromJSON)(object.bound) : 0,
|
|
462
|
+
};
|
|
463
|
+
},
|
|
464
|
+
toJSON(message) {
|
|
465
|
+
const obj = {};
|
|
466
|
+
if (message.limitId !== "") {
|
|
467
|
+
obj.limitId = message.limitId;
|
|
468
|
+
}
|
|
469
|
+
if (message.limitValue !== 0) {
|
|
470
|
+
obj.limitValue = message.limitValue;
|
|
471
|
+
}
|
|
472
|
+
if (message.measuredValue !== undefined) {
|
|
473
|
+
obj.measuredValue = message.measuredValue;
|
|
474
|
+
}
|
|
475
|
+
if (message.state !== 0) {
|
|
476
|
+
obj.state = envelopeLimitState_StateToJSON(message.state);
|
|
477
|
+
}
|
|
478
|
+
if (message.measuredAt !== undefined) {
|
|
479
|
+
obj.measuredAt = message.measuredAt.toISOString();
|
|
480
|
+
}
|
|
481
|
+
if (message.bound !== 0) {
|
|
482
|
+
obj.bound = (0, Route_1.envelopeBoundToJSON)(message.bound);
|
|
483
|
+
}
|
|
484
|
+
return obj;
|
|
485
|
+
},
|
|
486
|
+
create(base) {
|
|
487
|
+
return exports.EnvelopeLimitState.fromPartial(base ?? {});
|
|
488
|
+
},
|
|
489
|
+
fromPartial(object) {
|
|
490
|
+
const message = createBaseEnvelopeLimitState();
|
|
491
|
+
message.limitId = object.limitId ?? "";
|
|
492
|
+
message.limitValue = object.limitValue ?? 0;
|
|
493
|
+
message.measuredValue = object.measuredValue ?? undefined;
|
|
494
|
+
message.state = object.state ?? 0;
|
|
495
|
+
message.measuredAt = object.measuredAt ?? undefined;
|
|
496
|
+
message.bound = object.bound ?? 0;
|
|
497
|
+
return message;
|
|
498
|
+
},
|
|
499
|
+
};
|
|
500
|
+
typeRegistry_1.messageTypeRegistry.set(exports.EnvelopeLimitState.$type, exports.EnvelopeLimitState);
|
|
287
501
|
function toTimestamp(date) {
|
|
288
502
|
const seconds = Math.trunc(date.getTime() / 1000);
|
|
289
503
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
/**
|
|
3
|
+
* Something the exercise script did, at the moment it did it.
|
|
4
|
+
*
|
|
5
|
+
* A recording shows a vessel slowing down; it does not show whether that was
|
|
6
|
+
* the autonomy under test deciding to slow down or the scenario commanding it.
|
|
7
|
+
* Nothing else on the bus can settle that afterwards, which is why this is
|
|
8
|
+
* evidence rather than convenience: without it, an evaluator reading a
|
|
9
|
+
* recording cannot separate the system's behaviour from the exercise's
|
|
10
|
+
* intervention.
|
|
11
|
+
*
|
|
12
|
+
* Distinct from the interfaces that *cause* these things. A simulator's RPC
|
|
13
|
+
* surface (simulation_control/v1, scenario_control/v1) is how an operator acts
|
|
14
|
+
* on a run; this subject is the record that an action occurred, published by
|
|
15
|
+
* the authority that applied it, whether the cause was an operator, a scripted
|
|
16
|
+
* event or a fault schedule.
|
|
17
|
+
*
|
|
18
|
+
* Relationship to ScenarioStatus: that answers "what is the world doing now?"
|
|
19
|
+
* on a continuous cadence. This answers "what was done to it, and when?", once
|
|
20
|
+
* per occurrence.
|
|
21
|
+
*/
|
|
22
|
+
export interface ScenarioEvent {
|
|
23
|
+
$type: "keelson.ScenarioEvent";
|
|
24
|
+
/**
|
|
25
|
+
* Source timestamp: wall-clock time at which the event was applied.
|
|
26
|
+
* simulated time lives in tick below, and in a stepped or fast-time run the
|
|
27
|
+
* two diverge by design.
|
|
28
|
+
*/
|
|
29
|
+
timestamp: Date | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Which run this happened in, and at which tick of it. A recording that
|
|
32
|
+
* spans a restore contains events from more than one run_id (see
|
|
33
|
+
* ScenarioStatus.parent_run_id), and an event attributed to the wrong run is
|
|
34
|
+
* worse than a missing one.
|
|
35
|
+
*/
|
|
36
|
+
runId: string;
|
|
37
|
+
tick: number;
|
|
38
|
+
/**
|
|
39
|
+
* What was done. A free string rather than an enum, deliberately: the
|
|
40
|
+
* vocabulary belongs to the scenario format, not to keelson, and a fixed
|
|
41
|
+
* list here would decide what a simulator is allowed to script. Consumers
|
|
42
|
+
* that care match on values they know and record the rest verbatim.
|
|
43
|
+
*/
|
|
44
|
+
action: string;
|
|
45
|
+
/**
|
|
46
|
+
* What it was done to, empty for a world-level event. Names an entity in the
|
|
47
|
+
* key space, so a consumer can join this against that entity's subjects.
|
|
48
|
+
*/
|
|
49
|
+
entityId: string;
|
|
50
|
+
/**
|
|
51
|
+
* Arguments to the action — a new speed, a fault's target, a mark's label.
|
|
52
|
+
* Untyped because the actions are: constraining these would constrain the
|
|
53
|
+
* action vocabulary above by the back door.
|
|
54
|
+
*/
|
|
55
|
+
parameters: {
|
|
56
|
+
[key: string]: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Human-readable note for a timeline. Never parsed: anything a consumer must
|
|
60
|
+
* act on belongs in action or parameters.
|
|
61
|
+
*/
|
|
62
|
+
note: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ScenarioEvent_ParametersEntry {
|
|
65
|
+
$type: "keelson.ScenarioEvent.ParametersEntry";
|
|
66
|
+
key: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}
|
|
69
|
+
export declare const ScenarioEvent: MessageFns<ScenarioEvent, "keelson.ScenarioEvent">;
|
|
70
|
+
export declare const ScenarioEvent_ParametersEntry: MessageFns<ScenarioEvent_ParametersEntry, "keelson.ScenarioEvent.ParametersEntry">;
|
|
71
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
72
|
+
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 {} ? {
|
|
73
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
74
|
+
} : Partial<T>;
|
|
75
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
76
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
77
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
78
|
+
} & {
|
|
79
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
80
|
+
};
|
|
81
|
+
interface MessageFns<T, V extends string> {
|
|
82
|
+
readonly $type: V;
|
|
83
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
84
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
85
|
+
fromJSON(object: any): T;
|
|
86
|
+
toJSON(message: T): unknown;
|
|
87
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
88
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
89
|
+
}
|
|
90
|
+
export {};
|