@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.
Files changed (37) hide show
  1. package/dist/index.d.ts +8 -8
  2. package/dist/interfaces/Route.d.ts +24 -0
  3. package/dist/interfaces/Route.js +57 -2
  4. package/dist/interfaces/ScenarioControl.d.ts +3 -96
  5. package/dist/interfaces/ScenarioControl.js +37 -394
  6. package/dist/interfaces/VehicleSimulatorControl.d.ts +83 -0
  7. package/dist/interfaces/VehicleSimulatorControl.js +293 -1
  8. package/dist/interfaces/serviceRegistry.d.ts +8 -8
  9. package/dist/payloads/ChecklistEvent.d.ts +178 -0
  10. package/dist/payloads/ChecklistEvent.js +539 -0
  11. package/dist/payloads/ChecklistEvidence.d.ts +79 -0
  12. package/dist/payloads/ChecklistEvidence.js +287 -0
  13. package/dist/payloads/ChecklistPresence.d.ts +68 -0
  14. package/dist/payloads/ChecklistPresence.js +286 -0
  15. package/dist/payloads/ChecklistProcedure.d.ts +81 -0
  16. package/dist/payloads/ChecklistProcedure.js +364 -0
  17. package/dist/payloads/ChecklistState.d.ts +283 -0
  18. package/dist/payloads/ChecklistState.js +1100 -0
  19. package/dist/payloads/EnvelopeExceedance.d.ts +216 -0
  20. package/dist/payloads/EnvelopeExceedance.js +461 -0
  21. package/dist/payloads/Route.d.ts +24 -0
  22. package/dist/payloads/Route.js +57 -2
  23. package/dist/payloads/RouteExecution.d.ts +81 -1
  24. package/dist/payloads/RouteExecution.js +215 -1
  25. package/dist/payloads/ScenarioEvent.d.ts +90 -0
  26. package/dist/payloads/ScenarioEvent.js +294 -0
  27. package/dist/payloads/ScenarioTickAck.d.ts +95 -0
  28. package/dist/payloads/ScenarioTickAck.js +239 -0
  29. package/dist/payloads/index.foxglove.d.ts +1 -1
  30. package/dist/payloads/index.foxglove.js +1 -1
  31. package/dist/payloads/index.google.protobuf.d.ts +1 -1
  32. package/dist/payloads/index.google.protobuf.js +1 -1
  33. package/dist/payloads/index.keelson.d.ts +9 -1
  34. package/dist/payloads/index.keelson.js +9 -1
  35. package/dist/qos.json +13 -1
  36. package/dist/subjects.json +9 -1
  37. package/package.json +1 -1
@@ -0,0 +1,294 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.6.1
5
+ // protoc v6.30.2
6
+ // source: ScenarioEvent.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ScenarioEvent_ParametersEntry = exports.ScenarioEvent = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const timestamp_1 = require("./google/protobuf/timestamp");
12
+ const typeRegistry_1 = require("./typeRegistry");
13
+ function createBaseScenarioEvent() {
14
+ return {
15
+ $type: "keelson.ScenarioEvent",
16
+ timestamp: undefined,
17
+ runId: "",
18
+ tick: 0,
19
+ action: "",
20
+ entityId: "",
21
+ parameters: {},
22
+ note: "",
23
+ };
24
+ }
25
+ exports.ScenarioEvent = {
26
+ $type: "keelson.ScenarioEvent",
27
+ encode(message, writer = new wire_1.BinaryWriter()) {
28
+ if (message.timestamp !== undefined) {
29
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).join();
30
+ }
31
+ if (message.runId !== "") {
32
+ writer.uint32(18).string(message.runId);
33
+ }
34
+ if (message.tick !== 0) {
35
+ writer.uint32(24).uint64(message.tick);
36
+ }
37
+ if (message.action !== "") {
38
+ writer.uint32(34).string(message.action);
39
+ }
40
+ if (message.entityId !== "") {
41
+ writer.uint32(42).string(message.entityId);
42
+ }
43
+ Object.entries(message.parameters).forEach(([key, value]) => {
44
+ exports.ScenarioEvent_ParametersEntry.encode({ $type: "keelson.ScenarioEvent.ParametersEntry", key: key, value }, writer.uint32(50).fork()).join();
45
+ });
46
+ if (message.note !== "") {
47
+ writer.uint32(58).string(message.note);
48
+ }
49
+ return writer;
50
+ },
51
+ decode(input, length) {
52
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
53
+ let end = length === undefined ? reader.len : reader.pos + length;
54
+ const message = createBaseScenarioEvent();
55
+ while (reader.pos < end) {
56
+ const tag = reader.uint32();
57
+ switch (tag >>> 3) {
58
+ case 1: {
59
+ if (tag !== 10) {
60
+ break;
61
+ }
62
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
63
+ continue;
64
+ }
65
+ case 2: {
66
+ if (tag !== 18) {
67
+ break;
68
+ }
69
+ message.runId = reader.string();
70
+ continue;
71
+ }
72
+ case 3: {
73
+ if (tag !== 24) {
74
+ break;
75
+ }
76
+ message.tick = longToNumber(reader.uint64());
77
+ continue;
78
+ }
79
+ case 4: {
80
+ if (tag !== 34) {
81
+ break;
82
+ }
83
+ message.action = reader.string();
84
+ continue;
85
+ }
86
+ case 5: {
87
+ if (tag !== 42) {
88
+ break;
89
+ }
90
+ message.entityId = reader.string();
91
+ continue;
92
+ }
93
+ case 6: {
94
+ if (tag !== 50) {
95
+ break;
96
+ }
97
+ const entry6 = exports.ScenarioEvent_ParametersEntry.decode(reader, reader.uint32());
98
+ if (entry6.value !== undefined) {
99
+ message.parameters[entry6.key] = entry6.value;
100
+ }
101
+ continue;
102
+ }
103
+ case 7: {
104
+ if (tag !== 58) {
105
+ break;
106
+ }
107
+ message.note = reader.string();
108
+ continue;
109
+ }
110
+ }
111
+ if ((tag & 7) === 4 || tag === 0) {
112
+ break;
113
+ }
114
+ reader.skip(tag & 7);
115
+ }
116
+ return message;
117
+ },
118
+ fromJSON(object) {
119
+ return {
120
+ $type: exports.ScenarioEvent.$type,
121
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
122
+ runId: isSet(object.runId) ? globalThis.String(object.runId) : "",
123
+ tick: isSet(object.tick) ? globalThis.Number(object.tick) : 0,
124
+ action: isSet(object.action) ? globalThis.String(object.action) : "",
125
+ entityId: isSet(object.entityId) ? globalThis.String(object.entityId) : "",
126
+ parameters: isObject(object.parameters)
127
+ ? Object.entries(object.parameters).reduce((acc, [key, value]) => {
128
+ acc[key] = String(value);
129
+ return acc;
130
+ }, {})
131
+ : {},
132
+ note: isSet(object.note) ? globalThis.String(object.note) : "",
133
+ };
134
+ },
135
+ toJSON(message) {
136
+ const obj = {};
137
+ if (message.timestamp !== undefined) {
138
+ obj.timestamp = message.timestamp.toISOString();
139
+ }
140
+ if (message.runId !== "") {
141
+ obj.runId = message.runId;
142
+ }
143
+ if (message.tick !== 0) {
144
+ obj.tick = Math.round(message.tick);
145
+ }
146
+ if (message.action !== "") {
147
+ obj.action = message.action;
148
+ }
149
+ if (message.entityId !== "") {
150
+ obj.entityId = message.entityId;
151
+ }
152
+ if (message.parameters) {
153
+ const entries = Object.entries(message.parameters);
154
+ if (entries.length > 0) {
155
+ obj.parameters = {};
156
+ entries.forEach(([k, v]) => {
157
+ obj.parameters[k] = v;
158
+ });
159
+ }
160
+ }
161
+ if (message.note !== "") {
162
+ obj.note = message.note;
163
+ }
164
+ return obj;
165
+ },
166
+ create(base) {
167
+ return exports.ScenarioEvent.fromPartial(base ?? {});
168
+ },
169
+ fromPartial(object) {
170
+ const message = createBaseScenarioEvent();
171
+ message.timestamp = object.timestamp ?? undefined;
172
+ message.runId = object.runId ?? "";
173
+ message.tick = object.tick ?? 0;
174
+ message.action = object.action ?? "";
175
+ message.entityId = object.entityId ?? "";
176
+ message.parameters = Object.entries(object.parameters ?? {}).reduce((acc, [key, value]) => {
177
+ if (value !== undefined) {
178
+ acc[key] = globalThis.String(value);
179
+ }
180
+ return acc;
181
+ }, {});
182
+ message.note = object.note ?? "";
183
+ return message;
184
+ },
185
+ };
186
+ typeRegistry_1.messageTypeRegistry.set(exports.ScenarioEvent.$type, exports.ScenarioEvent);
187
+ function createBaseScenarioEvent_ParametersEntry() {
188
+ return { $type: "keelson.ScenarioEvent.ParametersEntry", key: "", value: "" };
189
+ }
190
+ exports.ScenarioEvent_ParametersEntry = {
191
+ $type: "keelson.ScenarioEvent.ParametersEntry",
192
+ encode(message, writer = new wire_1.BinaryWriter()) {
193
+ if (message.key !== "") {
194
+ writer.uint32(10).string(message.key);
195
+ }
196
+ if (message.value !== "") {
197
+ writer.uint32(18).string(message.value);
198
+ }
199
+ return writer;
200
+ },
201
+ decode(input, length) {
202
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
203
+ let end = length === undefined ? reader.len : reader.pos + length;
204
+ const message = createBaseScenarioEvent_ParametersEntry();
205
+ while (reader.pos < end) {
206
+ const tag = reader.uint32();
207
+ switch (tag >>> 3) {
208
+ case 1: {
209
+ if (tag !== 10) {
210
+ break;
211
+ }
212
+ message.key = reader.string();
213
+ continue;
214
+ }
215
+ case 2: {
216
+ if (tag !== 18) {
217
+ break;
218
+ }
219
+ message.value = reader.string();
220
+ continue;
221
+ }
222
+ }
223
+ if ((tag & 7) === 4 || tag === 0) {
224
+ break;
225
+ }
226
+ reader.skip(tag & 7);
227
+ }
228
+ return message;
229
+ },
230
+ fromJSON(object) {
231
+ return {
232
+ $type: exports.ScenarioEvent_ParametersEntry.$type,
233
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
234
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
235
+ };
236
+ },
237
+ toJSON(message) {
238
+ const obj = {};
239
+ if (message.key !== "") {
240
+ obj.key = message.key;
241
+ }
242
+ if (message.value !== "") {
243
+ obj.value = message.value;
244
+ }
245
+ return obj;
246
+ },
247
+ create(base) {
248
+ return exports.ScenarioEvent_ParametersEntry.fromPartial(base ?? {});
249
+ },
250
+ fromPartial(object) {
251
+ const message = createBaseScenarioEvent_ParametersEntry();
252
+ message.key = object.key ?? "";
253
+ message.value = object.value ?? "";
254
+ return message;
255
+ },
256
+ };
257
+ typeRegistry_1.messageTypeRegistry.set(exports.ScenarioEvent_ParametersEntry.$type, exports.ScenarioEvent_ParametersEntry);
258
+ function toTimestamp(date) {
259
+ const seconds = Math.trunc(date.getTime() / 1000);
260
+ const nanos = (date.getTime() % 1000) * 1000000;
261
+ return { $type: "google.protobuf.Timestamp", seconds, nanos };
262
+ }
263
+ function fromTimestamp(t) {
264
+ let millis = (t.seconds || 0) * 1000;
265
+ millis += (t.nanos || 0) / 1000000;
266
+ return new globalThis.Date(millis);
267
+ }
268
+ function fromJsonTimestamp(o) {
269
+ if (o instanceof globalThis.Date) {
270
+ return o;
271
+ }
272
+ else if (typeof o === "string") {
273
+ return new globalThis.Date(o);
274
+ }
275
+ else {
276
+ return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
277
+ }
278
+ }
279
+ function longToNumber(int64) {
280
+ const num = globalThis.Number(int64.toString());
281
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
282
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
283
+ }
284
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
285
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
286
+ }
287
+ return num;
288
+ }
289
+ function isObject(value) {
290
+ return typeof value === "object" && value !== null;
291
+ }
292
+ function isSet(value) {
293
+ return value !== null && value !== undefined;
294
+ }
@@ -0,0 +1,95 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ /**
3
+ * A participant telling the clock authority it has finished a tick.
4
+ *
5
+ * The other half of the barrier ScenarioStatus already describes. A
6
+ * ScenarioParticipant declares a Role and reports an acknowledged_tick, but
7
+ * that message is published *by the authority*, about the participant — there
8
+ * has been no way for the participant itself to say the thing the authority is
9
+ * reporting. Implementations have used a raw JSON subject for it.
10
+ *
11
+ * Publish one per tick, on the participant's own key. The entity and source
12
+ * are already in the key expression, so they are not repeated here: two places
13
+ * to say who acknowledged is two places for them to disagree.
14
+ */
15
+ export interface ScenarioTickAck {
16
+ $type: "keelson.ScenarioTickAck";
17
+ /** Source timestamp: when the acknowledgement was produced. */
18
+ timestamp: Date | undefined;
19
+ /**
20
+ * The run and tick being acknowledged. run_id is not redundant: after a
21
+ * restore, a participant that is still running carries the old run's ticks
22
+ * in flight, and an ack matched on tick alone would satisfy the new run's
23
+ * barrier with the previous run's work.
24
+ */
25
+ runId: string;
26
+ tick: number;
27
+ disposition: ScenarioTickAck_Disposition;
28
+ /**
29
+ * Why, when disposition is SKIPPED or FAILED. Free text for an operator or
30
+ * a post-run report; empty otherwise.
31
+ */
32
+ detail: string;
33
+ }
34
+ /**
35
+ * What the participant did with this tick. A BLOCKING participant is
36
+ * expected to COMPLETE every one; a DECIMATING participant is explicitly
37
+ * permitted to skip work to keep up, and this is where it says so — a skip
38
+ * that looks identical to a completion on the wire makes the distinction
39
+ * ScenarioParticipant.Role draws unobservable.
40
+ */
41
+ export declare enum ScenarioTickAck_Disposition {
42
+ /**
43
+ * DISPOSITION_UNKNOWN - Nothing said about what was done. Treated as COMPLETED: it is the ACK'S
44
+ * EXISTENCE that releases the barrier, and SKIPPED/FAILED refine what
45
+ * happened rather than change whether the tick was answered.
46
+ *
47
+ * Stated because it is the default, and every producer ported from the
48
+ * raw-JSON ack emits it until it is updated. Left unsaid, one
49
+ * implementation holds the barrier waiting for a disposition it will never
50
+ * get and another releases it, and both readings are defensible.
51
+ *
52
+ * The distinction that carries weight is an ack against SILENCE — silence
53
+ * is indistinguishable from a dead process, which is what FAILED exists to
54
+ * separate it from.
55
+ */
56
+ DISPOSITION_UNKNOWN = 0,
57
+ /** COMPLETED - The work for this tick is done. */
58
+ COMPLETED = 1,
59
+ /**
60
+ * SKIPPED - Deliberately did less than a full tick's work, and stayed causal.
61
+ * Not an error: the participant is keeping up as designed.
62
+ */
63
+ SKIPPED = 2,
64
+ /**
65
+ * FAILED - Could not do the work. The authority decides what that means for the
66
+ * run — a failed tick from a BLOCKING participant is a failed run, from a
67
+ * DECIMATING one it is a degraded one — but it must be able to tell this
68
+ * apart from silence, which is indistinguishable from a dead process.
69
+ */
70
+ FAILED = 3,
71
+ UNRECOGNIZED = -1
72
+ }
73
+ export declare function scenarioTickAck_DispositionFromJSON(object: any): ScenarioTickAck_Disposition;
74
+ export declare function scenarioTickAck_DispositionToJSON(object: ScenarioTickAck_Disposition): string;
75
+ export declare const ScenarioTickAck: MessageFns<ScenarioTickAck, "keelson.ScenarioTickAck">;
76
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
77
+ 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 {} ? {
78
+ [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
79
+ } : Partial<T>;
80
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
81
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
82
+ [K in keyof P]: Exact<P[K], I[K]>;
83
+ } & {
84
+ [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
85
+ };
86
+ interface MessageFns<T, V extends string> {
87
+ readonly $type: V;
88
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
89
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
90
+ fromJSON(object: any): T;
91
+ toJSON(message: T): unknown;
92
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
93
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
94
+ }
95
+ export {};
@@ -0,0 +1,239 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.6.1
5
+ // protoc v6.30.2
6
+ // source: ScenarioTickAck.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ScenarioTickAck = exports.scenarioTickAck_DispositionToJSON = exports.scenarioTickAck_DispositionFromJSON = exports.ScenarioTickAck_Disposition = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const timestamp_1 = require("./google/protobuf/timestamp");
12
+ const typeRegistry_1 = require("./typeRegistry");
13
+ /**
14
+ * What the participant did with this tick. A BLOCKING participant is
15
+ * expected to COMPLETE every one; a DECIMATING participant is explicitly
16
+ * permitted to skip work to keep up, and this is where it says so — a skip
17
+ * that looks identical to a completion on the wire makes the distinction
18
+ * ScenarioParticipant.Role draws unobservable.
19
+ */
20
+ var ScenarioTickAck_Disposition;
21
+ (function (ScenarioTickAck_Disposition) {
22
+ /**
23
+ * DISPOSITION_UNKNOWN - Nothing said about what was done. Treated as COMPLETED: it is the ACK'S
24
+ * EXISTENCE that releases the barrier, and SKIPPED/FAILED refine what
25
+ * happened rather than change whether the tick was answered.
26
+ *
27
+ * Stated because it is the default, and every producer ported from the
28
+ * raw-JSON ack emits it until it is updated. Left unsaid, one
29
+ * implementation holds the barrier waiting for a disposition it will never
30
+ * get and another releases it, and both readings are defensible.
31
+ *
32
+ * The distinction that carries weight is an ack against SILENCE — silence
33
+ * is indistinguishable from a dead process, which is what FAILED exists to
34
+ * separate it from.
35
+ */
36
+ ScenarioTickAck_Disposition[ScenarioTickAck_Disposition["DISPOSITION_UNKNOWN"] = 0] = "DISPOSITION_UNKNOWN";
37
+ /** COMPLETED - The work for this tick is done. */
38
+ ScenarioTickAck_Disposition[ScenarioTickAck_Disposition["COMPLETED"] = 1] = "COMPLETED";
39
+ /**
40
+ * SKIPPED - Deliberately did less than a full tick's work, and stayed causal.
41
+ * Not an error: the participant is keeping up as designed.
42
+ */
43
+ ScenarioTickAck_Disposition[ScenarioTickAck_Disposition["SKIPPED"] = 2] = "SKIPPED";
44
+ /**
45
+ * FAILED - Could not do the work. The authority decides what that means for the
46
+ * run — a failed tick from a BLOCKING participant is a failed run, from a
47
+ * DECIMATING one it is a degraded one — but it must be able to tell this
48
+ * apart from silence, which is indistinguishable from a dead process.
49
+ */
50
+ ScenarioTickAck_Disposition[ScenarioTickAck_Disposition["FAILED"] = 3] = "FAILED";
51
+ ScenarioTickAck_Disposition[ScenarioTickAck_Disposition["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
52
+ })(ScenarioTickAck_Disposition || (exports.ScenarioTickAck_Disposition = ScenarioTickAck_Disposition = {}));
53
+ function scenarioTickAck_DispositionFromJSON(object) {
54
+ switch (object) {
55
+ case 0:
56
+ case "DISPOSITION_UNKNOWN":
57
+ return ScenarioTickAck_Disposition.DISPOSITION_UNKNOWN;
58
+ case 1:
59
+ case "COMPLETED":
60
+ return ScenarioTickAck_Disposition.COMPLETED;
61
+ case 2:
62
+ case "SKIPPED":
63
+ return ScenarioTickAck_Disposition.SKIPPED;
64
+ case 3:
65
+ case "FAILED":
66
+ return ScenarioTickAck_Disposition.FAILED;
67
+ case -1:
68
+ case "UNRECOGNIZED":
69
+ default:
70
+ return ScenarioTickAck_Disposition.UNRECOGNIZED;
71
+ }
72
+ }
73
+ exports.scenarioTickAck_DispositionFromJSON = scenarioTickAck_DispositionFromJSON;
74
+ function scenarioTickAck_DispositionToJSON(object) {
75
+ switch (object) {
76
+ case ScenarioTickAck_Disposition.DISPOSITION_UNKNOWN:
77
+ return "DISPOSITION_UNKNOWN";
78
+ case ScenarioTickAck_Disposition.COMPLETED:
79
+ return "COMPLETED";
80
+ case ScenarioTickAck_Disposition.SKIPPED:
81
+ return "SKIPPED";
82
+ case ScenarioTickAck_Disposition.FAILED:
83
+ return "FAILED";
84
+ case ScenarioTickAck_Disposition.UNRECOGNIZED:
85
+ default:
86
+ return "UNRECOGNIZED";
87
+ }
88
+ }
89
+ exports.scenarioTickAck_DispositionToJSON = scenarioTickAck_DispositionToJSON;
90
+ function createBaseScenarioTickAck() {
91
+ return { $type: "keelson.ScenarioTickAck", timestamp: undefined, runId: "", tick: 0, disposition: 0, detail: "" };
92
+ }
93
+ exports.ScenarioTickAck = {
94
+ $type: "keelson.ScenarioTickAck",
95
+ encode(message, writer = new wire_1.BinaryWriter()) {
96
+ if (message.timestamp !== undefined) {
97
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).join();
98
+ }
99
+ if (message.runId !== "") {
100
+ writer.uint32(18).string(message.runId);
101
+ }
102
+ if (message.tick !== 0) {
103
+ writer.uint32(24).uint64(message.tick);
104
+ }
105
+ if (message.disposition !== 0) {
106
+ writer.uint32(32).int32(message.disposition);
107
+ }
108
+ if (message.detail !== "") {
109
+ writer.uint32(42).string(message.detail);
110
+ }
111
+ return writer;
112
+ },
113
+ decode(input, length) {
114
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
115
+ let end = length === undefined ? reader.len : reader.pos + length;
116
+ const message = createBaseScenarioTickAck();
117
+ while (reader.pos < end) {
118
+ const tag = reader.uint32();
119
+ switch (tag >>> 3) {
120
+ case 1: {
121
+ if (tag !== 10) {
122
+ break;
123
+ }
124
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
125
+ continue;
126
+ }
127
+ case 2: {
128
+ if (tag !== 18) {
129
+ break;
130
+ }
131
+ message.runId = reader.string();
132
+ continue;
133
+ }
134
+ case 3: {
135
+ if (tag !== 24) {
136
+ break;
137
+ }
138
+ message.tick = longToNumber(reader.uint64());
139
+ continue;
140
+ }
141
+ case 4: {
142
+ if (tag !== 32) {
143
+ break;
144
+ }
145
+ message.disposition = reader.int32();
146
+ continue;
147
+ }
148
+ case 5: {
149
+ if (tag !== 42) {
150
+ break;
151
+ }
152
+ message.detail = reader.string();
153
+ continue;
154
+ }
155
+ }
156
+ if ((tag & 7) === 4 || tag === 0) {
157
+ break;
158
+ }
159
+ reader.skip(tag & 7);
160
+ }
161
+ return message;
162
+ },
163
+ fromJSON(object) {
164
+ return {
165
+ $type: exports.ScenarioTickAck.$type,
166
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
167
+ runId: isSet(object.runId) ? globalThis.String(object.runId) : "",
168
+ tick: isSet(object.tick) ? globalThis.Number(object.tick) : 0,
169
+ disposition: isSet(object.disposition) ? scenarioTickAck_DispositionFromJSON(object.disposition) : 0,
170
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
171
+ };
172
+ },
173
+ toJSON(message) {
174
+ const obj = {};
175
+ if (message.timestamp !== undefined) {
176
+ obj.timestamp = message.timestamp.toISOString();
177
+ }
178
+ if (message.runId !== "") {
179
+ obj.runId = message.runId;
180
+ }
181
+ if (message.tick !== 0) {
182
+ obj.tick = Math.round(message.tick);
183
+ }
184
+ if (message.disposition !== 0) {
185
+ obj.disposition = scenarioTickAck_DispositionToJSON(message.disposition);
186
+ }
187
+ if (message.detail !== "") {
188
+ obj.detail = message.detail;
189
+ }
190
+ return obj;
191
+ },
192
+ create(base) {
193
+ return exports.ScenarioTickAck.fromPartial(base ?? {});
194
+ },
195
+ fromPartial(object) {
196
+ const message = createBaseScenarioTickAck();
197
+ message.timestamp = object.timestamp ?? undefined;
198
+ message.runId = object.runId ?? "";
199
+ message.tick = object.tick ?? 0;
200
+ message.disposition = object.disposition ?? 0;
201
+ message.detail = object.detail ?? "";
202
+ return message;
203
+ },
204
+ };
205
+ typeRegistry_1.messageTypeRegistry.set(exports.ScenarioTickAck.$type, exports.ScenarioTickAck);
206
+ function toTimestamp(date) {
207
+ const seconds = Math.trunc(date.getTime() / 1000);
208
+ const nanos = (date.getTime() % 1000) * 1000000;
209
+ return { $type: "google.protobuf.Timestamp", seconds, nanos };
210
+ }
211
+ function fromTimestamp(t) {
212
+ let millis = (t.seconds || 0) * 1000;
213
+ millis += (t.nanos || 0) / 1000000;
214
+ return new globalThis.Date(millis);
215
+ }
216
+ function fromJsonTimestamp(o) {
217
+ if (o instanceof globalThis.Date) {
218
+ return o;
219
+ }
220
+ else if (typeof o === "string") {
221
+ return new globalThis.Date(o);
222
+ }
223
+ else {
224
+ return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
225
+ }
226
+ }
227
+ function longToNumber(int64) {
228
+ const num = globalThis.Number(int64.toString());
229
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
230
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
231
+ }
232
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
233
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
234
+ }
235
+ return num;
236
+ }
237
+ function isSet(value) {
238
+ return value !== null && value !== undefined;
239
+ }
@@ -2,11 +2,11 @@ export * from "./foxglove/RawImage";
2
2
  export * from "./foxglove/CompressedImage";
3
3
  export * from "./foxglove/CompressedVideo";
4
4
  export * from "./foxglove/Vector3";
5
+ export * from "./foxglove/LocationFix";
5
6
  export * from "./foxglove/GeoJSON";
6
7
  export * from "./foxglove/Quaternion";
7
8
  export * from "./foxglove/Pose";
8
9
  export * from "./foxglove/PackedElementField";
9
- export * from "./foxglove/LocationFix";
10
10
  export * from "./foxglove/Color";
11
11
  export * from "./foxglove/ArrowPrimitive";
12
12
  export * from "./foxglove/CameraCalibration";
@@ -23,11 +23,11 @@ __exportStar(require("./foxglove/RawImage"), exports);
23
23
  __exportStar(require("./foxglove/CompressedImage"), exports);
24
24
  __exportStar(require("./foxglove/CompressedVideo"), exports);
25
25
  __exportStar(require("./foxglove/Vector3"), exports);
26
+ __exportStar(require("./foxglove/LocationFix"), exports);
26
27
  __exportStar(require("./foxglove/GeoJSON"), exports);
27
28
  __exportStar(require("./foxglove/Quaternion"), exports);
28
29
  __exportStar(require("./foxglove/Pose"), exports);
29
30
  __exportStar(require("./foxglove/PackedElementField"), exports);
30
- __exportStar(require("./foxglove/LocationFix"), exports);
31
31
  __exportStar(require("./foxglove/Color"), exports);
32
32
  __exportStar(require("./foxglove/ArrowPrimitive"), exports);
33
33
  __exportStar(require("./foxglove/CameraCalibration"), exports);
@@ -1,4 +1,4 @@
1
1
  export * from "./google/protobuf/timestamp";
2
- export * from "./google/protobuf/empty";
3
2
  export * from "./google/protobuf/duration";
4
3
  export * from "./google/protobuf/any";
4
+ export * from "./google/protobuf/empty";
@@ -20,6 +20,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  /* eslint-disable */
22
22
  __exportStar(require("./google/protobuf/timestamp"), exports);
23
- __exportStar(require("./google/protobuf/empty"), exports);
24
23
  __exportStar(require("./google/protobuf/duration"), exports);
25
24
  __exportStar(require("./google/protobuf/any"), exports);
25
+ __exportStar(require("./google/protobuf/empty"), exports);