@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.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.
Files changed (48) hide show
  1. package/dist/index.d.ts +83 -8
  2. package/dist/index.js +23 -1
  3. package/dist/index.test.js +31 -0
  4. package/dist/interfaces/AlarmAck.d.ts +2 -2
  5. package/dist/interfaces/AlarmAck.js +2 -2
  6. package/dist/interfaces/ContainerControl.d.ts +239 -0
  7. package/dist/interfaces/ContainerControl.js +1053 -0
  8. package/dist/interfaces/ContainerHost.d.ts +403 -0
  9. package/dist/interfaces/ContainerHost.js +1230 -0
  10. package/dist/interfaces/ErrorResponse.d.ts +7 -2
  11. package/dist/interfaces/ErrorResponse.js +12 -2
  12. package/dist/interfaces/Route.d.ts +141 -6
  13. package/dist/interfaces/Route.js +309 -4
  14. package/dist/interfaces/RoutePlanner.d.ts +19 -1
  15. package/dist/interfaces/RoutePlanner.js +23 -1
  16. package/dist/interfaces/ScenarioControl.d.ts +132 -3
  17. package/dist/interfaces/ScenarioControl.js +439 -37
  18. package/dist/interfaces/VehicleNavigation.d.ts +55 -0
  19. package/dist/interfaces/VehicleNavigation.js +233 -1
  20. package/dist/interfaces/VehicleSimulatorControl.d.ts +0 -83
  21. package/dist/interfaces/VehicleSimulatorControl.js +1 -293
  22. package/dist/interfaces/serviceRegistry.d.ts +84 -8
  23. package/dist/interfaces/serviceRegistry.js +4 -0
  24. package/dist/interfaces.json +2 -0
  25. package/dist/payloads/AdviceDisposition.d.ts +55 -0
  26. package/dist/payloads/AdviceDisposition.js +242 -0
  27. package/dist/payloads/ChecklistHandover.d.ts +522 -0
  28. package/dist/payloads/ChecklistHandover.js +1735 -0
  29. package/dist/payloads/ContainerHost.d.ts +407 -0
  30. package/dist/payloads/ContainerHost.js +1245 -0
  31. package/dist/payloads/Encounter.d.ts +104 -0
  32. package/dist/payloads/Encounter.js +573 -0
  33. package/dist/payloads/NavigationAdvice.d.ts +94 -0
  34. package/dist/payloads/NavigationAdvice.js +596 -0
  35. package/dist/payloads/NavigationState.d.ts +90 -0
  36. package/dist/payloads/NavigationState.js +377 -0
  37. package/dist/payloads/Route.d.ts +142 -6
  38. package/dist/payloads/Route.js +318 -4
  39. package/dist/payloads/RouteExecution.d.ts +7 -0
  40. package/dist/payloads/ScenarioEvent.d.ts +14 -0
  41. package/dist/payloads/ScenarioEvent.js +16 -0
  42. package/dist/payloads/index.d.ts +1 -1
  43. package/dist/payloads/index.js +2 -2
  44. package/dist/payloads/index.keelson.d.ts +10 -4
  45. package/dist/payloads/index.keelson.js +10 -4
  46. package/dist/qos.json +6 -0
  47. package/dist/subjects.json +20 -1
  48. package/package.json +1 -1
@@ -5,12 +5,375 @@
5
5
  // protoc v6.30.2
6
6
  // source: ScenarioControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ScenarioControlDefinition = exports.StepResponse = exports.SetRateResponse = exports.ResetResponse = exports.StopResponse = exports.PauseResponse = exports.StartResponse = exports.LoadResponse = exports.SetRateRequest = exports.StepRequest = exports.LoadRequest = exports.protobufPackage = void 0;
8
+ exports.ScenarioControlDefinition = exports.StepResponse = exports.LoadResponse = exports.SetRateResponse = exports.ResetResponse = exports.StopResponse = exports.PauseResponse = exports.StartResponse = exports.SetRateRequest = exports.StepRequest = exports.LoadRequest = exports.ListScenariosResponse = exports.ListScenariosRequest = exports.ScenarioInfo = exports.scenarioInfo_LoadabilityToJSON = exports.scenarioInfo_LoadabilityFromJSON = exports.ScenarioInfo_Loadability = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const duration_1 = require("./google/protobuf/duration");
11
12
  const empty_1 = require("./google/protobuf/empty");
12
13
  const timestamp_1 = require("./google/protobuf/timestamp");
13
14
  exports.protobufPackage = "keelson.interfaces.scenario_control";
15
+ /**
16
+ * Whether the responder would load this scenario if asked.
17
+ *
18
+ * An enum with a countable unknown rather than a bool, because the zero
19
+ * value is what a partially-populated row reports and the affirmative has
20
+ * to be the safe one: LOADABILITY_UNKNOWN means the responder expressed no
21
+ * opinion, and a picker must offer such a row and let `load` answer. A
22
+ * bool would make every row a simpler responder builds read as "would
23
+ * refuse", greying out a whole library nobody has anything against.
24
+ *
25
+ * NOT_LOADABLE rows stay on the wire rather than being filtered out,
26
+ * because both alternatives are worse. Omitting them hides files the
27
+ * operator can see in the library and leaves them asking why one is
28
+ * missing; listing them as loadable is a lie the picker only discovers by
29
+ * trying. A simulator whose scenario language is still growing has these
30
+ * constantly: the document parses, and names a construct this build
31
+ * cannot elaborate.
32
+ */
33
+ var ScenarioInfo_Loadability;
34
+ (function (ScenarioInfo_Loadability) {
35
+ ScenarioInfo_Loadability[ScenarioInfo_Loadability["LOADABILITY_UNKNOWN"] = 0] = "LOADABILITY_UNKNOWN";
36
+ ScenarioInfo_Loadability[ScenarioInfo_Loadability["LOADABLE"] = 1] = "LOADABLE";
37
+ ScenarioInfo_Loadability[ScenarioInfo_Loadability["NOT_LOADABLE"] = 2] = "NOT_LOADABLE";
38
+ ScenarioInfo_Loadability[ScenarioInfo_Loadability["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
39
+ })(ScenarioInfo_Loadability || (exports.ScenarioInfo_Loadability = ScenarioInfo_Loadability = {}));
40
+ function scenarioInfo_LoadabilityFromJSON(object) {
41
+ switch (object) {
42
+ case 0:
43
+ case "LOADABILITY_UNKNOWN":
44
+ return ScenarioInfo_Loadability.LOADABILITY_UNKNOWN;
45
+ case 1:
46
+ case "LOADABLE":
47
+ return ScenarioInfo_Loadability.LOADABLE;
48
+ case 2:
49
+ case "NOT_LOADABLE":
50
+ return ScenarioInfo_Loadability.NOT_LOADABLE;
51
+ case -1:
52
+ case "UNRECOGNIZED":
53
+ default:
54
+ return ScenarioInfo_Loadability.UNRECOGNIZED;
55
+ }
56
+ }
57
+ exports.scenarioInfo_LoadabilityFromJSON = scenarioInfo_LoadabilityFromJSON;
58
+ function scenarioInfo_LoadabilityToJSON(object) {
59
+ switch (object) {
60
+ case ScenarioInfo_Loadability.LOADABILITY_UNKNOWN:
61
+ return "LOADABILITY_UNKNOWN";
62
+ case ScenarioInfo_Loadability.LOADABLE:
63
+ return "LOADABLE";
64
+ case ScenarioInfo_Loadability.NOT_LOADABLE:
65
+ return "NOT_LOADABLE";
66
+ case ScenarioInfo_Loadability.UNRECOGNIZED:
67
+ default:
68
+ return "UNRECOGNIZED";
69
+ }
70
+ }
71
+ exports.scenarioInfo_LoadabilityToJSON = scenarioInfo_LoadabilityToJSON;
72
+ function createBaseScenarioInfo() {
73
+ return {
74
+ scenarioId: "",
75
+ description: "",
76
+ scenarioHash: "",
77
+ vesselCount: undefined,
78
+ durationTicks: undefined,
79
+ stepSize: undefined,
80
+ loadability: 0,
81
+ reason: "",
82
+ };
83
+ }
84
+ exports.ScenarioInfo = {
85
+ encode(message, writer = new wire_1.BinaryWriter()) {
86
+ if (message.scenarioId !== "") {
87
+ writer.uint32(10).string(message.scenarioId);
88
+ }
89
+ if (message.description !== "") {
90
+ writer.uint32(18).string(message.description);
91
+ }
92
+ if (message.scenarioHash !== "") {
93
+ writer.uint32(26).string(message.scenarioHash);
94
+ }
95
+ if (message.vesselCount !== undefined) {
96
+ writer.uint32(32).uint32(message.vesselCount);
97
+ }
98
+ if (message.durationTicks !== undefined) {
99
+ writer.uint32(40).uint64(message.durationTicks);
100
+ }
101
+ if (message.stepSize !== undefined) {
102
+ duration_1.Duration.encode(message.stepSize, writer.uint32(50).fork()).join();
103
+ }
104
+ if (message.loadability !== 0) {
105
+ writer.uint32(56).int32(message.loadability);
106
+ }
107
+ if (message.reason !== "") {
108
+ writer.uint32(66).string(message.reason);
109
+ }
110
+ return writer;
111
+ },
112
+ decode(input, length) {
113
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
114
+ let end = length === undefined ? reader.len : reader.pos + length;
115
+ const message = createBaseScenarioInfo();
116
+ while (reader.pos < end) {
117
+ const tag = reader.uint32();
118
+ switch (tag >>> 3) {
119
+ case 1: {
120
+ if (tag !== 10) {
121
+ break;
122
+ }
123
+ message.scenarioId = reader.string();
124
+ continue;
125
+ }
126
+ case 2: {
127
+ if (tag !== 18) {
128
+ break;
129
+ }
130
+ message.description = reader.string();
131
+ continue;
132
+ }
133
+ case 3: {
134
+ if (tag !== 26) {
135
+ break;
136
+ }
137
+ message.scenarioHash = reader.string();
138
+ continue;
139
+ }
140
+ case 4: {
141
+ if (tag !== 32) {
142
+ break;
143
+ }
144
+ message.vesselCount = reader.uint32();
145
+ continue;
146
+ }
147
+ case 5: {
148
+ if (tag !== 40) {
149
+ break;
150
+ }
151
+ message.durationTicks = longToNumber(reader.uint64());
152
+ continue;
153
+ }
154
+ case 6: {
155
+ if (tag !== 50) {
156
+ break;
157
+ }
158
+ message.stepSize = duration_1.Duration.decode(reader, reader.uint32());
159
+ continue;
160
+ }
161
+ case 7: {
162
+ if (tag !== 56) {
163
+ break;
164
+ }
165
+ message.loadability = reader.int32();
166
+ continue;
167
+ }
168
+ case 8: {
169
+ if (tag !== 66) {
170
+ break;
171
+ }
172
+ message.reason = reader.string();
173
+ continue;
174
+ }
175
+ }
176
+ if ((tag & 7) === 4 || tag === 0) {
177
+ break;
178
+ }
179
+ reader.skip(tag & 7);
180
+ }
181
+ return message;
182
+ },
183
+ fromJSON(object) {
184
+ return {
185
+ scenarioId: isSet(object.scenarioId) ? globalThis.String(object.scenarioId) : "",
186
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
187
+ scenarioHash: isSet(object.scenarioHash) ? globalThis.String(object.scenarioHash) : "",
188
+ vesselCount: isSet(object.vesselCount) ? globalThis.Number(object.vesselCount) : undefined,
189
+ durationTicks: isSet(object.durationTicks) ? globalThis.Number(object.durationTicks) : undefined,
190
+ stepSize: isSet(object.stepSize) ? duration_1.Duration.fromJSON(object.stepSize) : undefined,
191
+ loadability: isSet(object.loadability) ? scenarioInfo_LoadabilityFromJSON(object.loadability) : 0,
192
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
193
+ };
194
+ },
195
+ toJSON(message) {
196
+ const obj = {};
197
+ if (message.scenarioId !== "") {
198
+ obj.scenarioId = message.scenarioId;
199
+ }
200
+ if (message.description !== "") {
201
+ obj.description = message.description;
202
+ }
203
+ if (message.scenarioHash !== "") {
204
+ obj.scenarioHash = message.scenarioHash;
205
+ }
206
+ if (message.vesselCount !== undefined) {
207
+ obj.vesselCount = Math.round(message.vesselCount);
208
+ }
209
+ if (message.durationTicks !== undefined) {
210
+ obj.durationTicks = Math.round(message.durationTicks);
211
+ }
212
+ if (message.stepSize !== undefined) {
213
+ obj.stepSize = duration_1.Duration.toJSON(message.stepSize);
214
+ }
215
+ if (message.loadability !== 0) {
216
+ obj.loadability = scenarioInfo_LoadabilityToJSON(message.loadability);
217
+ }
218
+ if (message.reason !== "") {
219
+ obj.reason = message.reason;
220
+ }
221
+ return obj;
222
+ },
223
+ create(base) {
224
+ return exports.ScenarioInfo.fromPartial(base ?? {});
225
+ },
226
+ fromPartial(object) {
227
+ const message = createBaseScenarioInfo();
228
+ message.scenarioId = object.scenarioId ?? "";
229
+ message.description = object.description ?? "";
230
+ message.scenarioHash = object.scenarioHash ?? "";
231
+ message.vesselCount = object.vesselCount ?? undefined;
232
+ message.durationTicks = object.durationTicks ?? undefined;
233
+ message.stepSize = (object.stepSize !== undefined && object.stepSize !== null)
234
+ ? duration_1.Duration.fromPartial(object.stepSize)
235
+ : undefined;
236
+ message.loadability = object.loadability ?? 0;
237
+ message.reason = object.reason ?? "";
238
+ return message;
239
+ },
240
+ };
241
+ function createBaseListScenariosRequest() {
242
+ return { pattern: "" };
243
+ }
244
+ exports.ListScenariosRequest = {
245
+ encode(message, writer = new wire_1.BinaryWriter()) {
246
+ if (message.pattern !== "") {
247
+ writer.uint32(10).string(message.pattern);
248
+ }
249
+ return writer;
250
+ },
251
+ decode(input, length) {
252
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
253
+ let end = length === undefined ? reader.len : reader.pos + length;
254
+ const message = createBaseListScenariosRequest();
255
+ while (reader.pos < end) {
256
+ const tag = reader.uint32();
257
+ switch (tag >>> 3) {
258
+ case 1: {
259
+ if (tag !== 10) {
260
+ break;
261
+ }
262
+ message.pattern = reader.string();
263
+ continue;
264
+ }
265
+ }
266
+ if ((tag & 7) === 4 || tag === 0) {
267
+ break;
268
+ }
269
+ reader.skip(tag & 7);
270
+ }
271
+ return message;
272
+ },
273
+ fromJSON(object) {
274
+ return { pattern: isSet(object.pattern) ? globalThis.String(object.pattern) : "" };
275
+ },
276
+ toJSON(message) {
277
+ const obj = {};
278
+ if (message.pattern !== "") {
279
+ obj.pattern = message.pattern;
280
+ }
281
+ return obj;
282
+ },
283
+ create(base) {
284
+ return exports.ListScenariosRequest.fromPartial(base ?? {});
285
+ },
286
+ fromPartial(object) {
287
+ const message = createBaseListScenariosRequest();
288
+ message.pattern = object.pattern ?? "";
289
+ return message;
290
+ },
291
+ };
292
+ function createBaseListScenariosResponse() {
293
+ return { baseDirectory: "", scenarios: [], truncated: false };
294
+ }
295
+ exports.ListScenariosResponse = {
296
+ encode(message, writer = new wire_1.BinaryWriter()) {
297
+ if (message.baseDirectory !== "") {
298
+ writer.uint32(10).string(message.baseDirectory);
299
+ }
300
+ for (const v of message.scenarios) {
301
+ exports.ScenarioInfo.encode(v, writer.uint32(18).fork()).join();
302
+ }
303
+ if (message.truncated !== false) {
304
+ writer.uint32(24).bool(message.truncated);
305
+ }
306
+ return writer;
307
+ },
308
+ decode(input, length) {
309
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
310
+ let end = length === undefined ? reader.len : reader.pos + length;
311
+ const message = createBaseListScenariosResponse();
312
+ while (reader.pos < end) {
313
+ const tag = reader.uint32();
314
+ switch (tag >>> 3) {
315
+ case 1: {
316
+ if (tag !== 10) {
317
+ break;
318
+ }
319
+ message.baseDirectory = reader.string();
320
+ continue;
321
+ }
322
+ case 2: {
323
+ if (tag !== 18) {
324
+ break;
325
+ }
326
+ message.scenarios.push(exports.ScenarioInfo.decode(reader, reader.uint32()));
327
+ continue;
328
+ }
329
+ case 3: {
330
+ if (tag !== 24) {
331
+ break;
332
+ }
333
+ message.truncated = reader.bool();
334
+ continue;
335
+ }
336
+ }
337
+ if ((tag & 7) === 4 || tag === 0) {
338
+ break;
339
+ }
340
+ reader.skip(tag & 7);
341
+ }
342
+ return message;
343
+ },
344
+ fromJSON(object) {
345
+ return {
346
+ baseDirectory: isSet(object.baseDirectory) ? globalThis.String(object.baseDirectory) : "",
347
+ scenarios: globalThis.Array.isArray(object?.scenarios)
348
+ ? object.scenarios.map((e) => exports.ScenarioInfo.fromJSON(e))
349
+ : [],
350
+ truncated: isSet(object.truncated) ? globalThis.Boolean(object.truncated) : false,
351
+ };
352
+ },
353
+ toJSON(message) {
354
+ const obj = {};
355
+ if (message.baseDirectory !== "") {
356
+ obj.baseDirectory = message.baseDirectory;
357
+ }
358
+ if (message.scenarios?.length) {
359
+ obj.scenarios = message.scenarios.map((e) => exports.ScenarioInfo.toJSON(e));
360
+ }
361
+ if (message.truncated !== false) {
362
+ obj.truncated = message.truncated;
363
+ }
364
+ return obj;
365
+ },
366
+ create(base) {
367
+ return exports.ListScenariosResponse.fromPartial(base ?? {});
368
+ },
369
+ fromPartial(object) {
370
+ const message = createBaseListScenariosResponse();
371
+ message.baseDirectory = object.baseDirectory ?? "";
372
+ message.scenarios = object.scenarios?.map((e) => exports.ScenarioInfo.fromPartial(e)) || [];
373
+ message.truncated = object.truncated ?? false;
374
+ return message;
375
+ },
376
+ };
14
377
  function createBaseLoadRequest() {
15
378
  return { scenario: "" };
16
379
  }
@@ -164,17 +527,17 @@ exports.SetRateRequest = {
164
527
  return message;
165
528
  },
166
529
  };
167
- function createBaseLoadResponse() {
530
+ function createBaseStartResponse() {
168
531
  return {};
169
532
  }
170
- exports.LoadResponse = {
533
+ exports.StartResponse = {
171
534
  encode(_, writer = new wire_1.BinaryWriter()) {
172
535
  return writer;
173
536
  },
174
537
  decode(input, length) {
175
538
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
176
539
  let end = length === undefined ? reader.len : reader.pos + length;
177
- const message = createBaseLoadResponse();
540
+ const message = createBaseStartResponse();
178
541
  while (reader.pos < end) {
179
542
  const tag = reader.uint32();
180
543
  switch (tag >>> 3) {
@@ -194,24 +557,24 @@ exports.LoadResponse = {
194
557
  return obj;
195
558
  },
196
559
  create(base) {
197
- return exports.LoadResponse.fromPartial(base ?? {});
560
+ return exports.StartResponse.fromPartial(base ?? {});
198
561
  },
199
562
  fromPartial(_) {
200
- const message = createBaseLoadResponse();
563
+ const message = createBaseStartResponse();
201
564
  return message;
202
565
  },
203
566
  };
204
- function createBaseStartResponse() {
567
+ function createBasePauseResponse() {
205
568
  return {};
206
569
  }
207
- exports.StartResponse = {
570
+ exports.PauseResponse = {
208
571
  encode(_, writer = new wire_1.BinaryWriter()) {
209
572
  return writer;
210
573
  },
211
574
  decode(input, length) {
212
575
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
213
576
  let end = length === undefined ? reader.len : reader.pos + length;
214
- const message = createBaseStartResponse();
577
+ const message = createBasePauseResponse();
215
578
  while (reader.pos < end) {
216
579
  const tag = reader.uint32();
217
580
  switch (tag >>> 3) {
@@ -231,24 +594,24 @@ exports.StartResponse = {
231
594
  return obj;
232
595
  },
233
596
  create(base) {
234
- return exports.StartResponse.fromPartial(base ?? {});
597
+ return exports.PauseResponse.fromPartial(base ?? {});
235
598
  },
236
599
  fromPartial(_) {
237
- const message = createBaseStartResponse();
600
+ const message = createBasePauseResponse();
238
601
  return message;
239
602
  },
240
603
  };
241
- function createBasePauseResponse() {
604
+ function createBaseStopResponse() {
242
605
  return {};
243
606
  }
244
- exports.PauseResponse = {
607
+ exports.StopResponse = {
245
608
  encode(_, writer = new wire_1.BinaryWriter()) {
246
609
  return writer;
247
610
  },
248
611
  decode(input, length) {
249
612
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
250
613
  let end = length === undefined ? reader.len : reader.pos + length;
251
- const message = createBasePauseResponse();
614
+ const message = createBaseStopResponse();
252
615
  while (reader.pos < end) {
253
616
  const tag = reader.uint32();
254
617
  switch (tag >>> 3) {
@@ -268,24 +631,24 @@ exports.PauseResponse = {
268
631
  return obj;
269
632
  },
270
633
  create(base) {
271
- return exports.PauseResponse.fromPartial(base ?? {});
634
+ return exports.StopResponse.fromPartial(base ?? {});
272
635
  },
273
636
  fromPartial(_) {
274
- const message = createBasePauseResponse();
637
+ const message = createBaseStopResponse();
275
638
  return message;
276
639
  },
277
640
  };
278
- function createBaseStopResponse() {
641
+ function createBaseResetResponse() {
279
642
  return {};
280
643
  }
281
- exports.StopResponse = {
644
+ exports.ResetResponse = {
282
645
  encode(_, writer = new wire_1.BinaryWriter()) {
283
646
  return writer;
284
647
  },
285
648
  decode(input, length) {
286
649
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
287
650
  let end = length === undefined ? reader.len : reader.pos + length;
288
- const message = createBaseStopResponse();
651
+ const message = createBaseResetResponse();
289
652
  while (reader.pos < end) {
290
653
  const tag = reader.uint32();
291
654
  switch (tag >>> 3) {
@@ -305,24 +668,24 @@ exports.StopResponse = {
305
668
  return obj;
306
669
  },
307
670
  create(base) {
308
- return exports.StopResponse.fromPartial(base ?? {});
671
+ return exports.ResetResponse.fromPartial(base ?? {});
309
672
  },
310
673
  fromPartial(_) {
311
- const message = createBaseStopResponse();
674
+ const message = createBaseResetResponse();
312
675
  return message;
313
676
  },
314
677
  };
315
- function createBaseResetResponse() {
678
+ function createBaseSetRateResponse() {
316
679
  return {};
317
680
  }
318
- exports.ResetResponse = {
681
+ exports.SetRateResponse = {
319
682
  encode(_, writer = new wire_1.BinaryWriter()) {
320
683
  return writer;
321
684
  },
322
685
  decode(input, length) {
323
686
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
324
687
  let end = length === undefined ? reader.len : reader.pos + length;
325
- const message = createBaseResetResponse();
688
+ const message = createBaseSetRateResponse();
326
689
  while (reader.pos < end) {
327
690
  const tag = reader.uint32();
328
691
  switch (tag >>> 3) {
@@ -342,27 +705,47 @@ exports.ResetResponse = {
342
705
  return obj;
343
706
  },
344
707
  create(base) {
345
- return exports.ResetResponse.fromPartial(base ?? {});
708
+ return exports.SetRateResponse.fromPartial(base ?? {});
346
709
  },
347
710
  fromPartial(_) {
348
- const message = createBaseResetResponse();
711
+ const message = createBaseSetRateResponse();
349
712
  return message;
350
713
  },
351
714
  };
352
- function createBaseSetRateResponse() {
353
- return {};
715
+ function createBaseLoadResponse() {
716
+ return { scenarioId: "", scenarioHash: "" };
354
717
  }
355
- exports.SetRateResponse = {
356
- encode(_, writer = new wire_1.BinaryWriter()) {
718
+ exports.LoadResponse = {
719
+ encode(message, writer = new wire_1.BinaryWriter()) {
720
+ if (message.scenarioId !== "") {
721
+ writer.uint32(10).string(message.scenarioId);
722
+ }
723
+ if (message.scenarioHash !== "") {
724
+ writer.uint32(18).string(message.scenarioHash);
725
+ }
357
726
  return writer;
358
727
  },
359
728
  decode(input, length) {
360
729
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
361
730
  let end = length === undefined ? reader.len : reader.pos + length;
362
- const message = createBaseSetRateResponse();
731
+ const message = createBaseLoadResponse();
363
732
  while (reader.pos < end) {
364
733
  const tag = reader.uint32();
365
734
  switch (tag >>> 3) {
735
+ case 1: {
736
+ if (tag !== 10) {
737
+ break;
738
+ }
739
+ message.scenarioId = reader.string();
740
+ continue;
741
+ }
742
+ case 2: {
743
+ if (tag !== 18) {
744
+ break;
745
+ }
746
+ message.scenarioHash = reader.string();
747
+ continue;
748
+ }
366
749
  }
367
750
  if ((tag & 7) === 4 || tag === 0) {
368
751
  break;
@@ -371,18 +754,29 @@ exports.SetRateResponse = {
371
754
  }
372
755
  return message;
373
756
  },
374
- fromJSON(_) {
375
- return {};
757
+ fromJSON(object) {
758
+ return {
759
+ scenarioId: isSet(object.scenarioId) ? globalThis.String(object.scenarioId) : "",
760
+ scenarioHash: isSet(object.scenarioHash) ? globalThis.String(object.scenarioHash) : "",
761
+ };
376
762
  },
377
- toJSON(_) {
763
+ toJSON(message) {
378
764
  const obj = {};
765
+ if (message.scenarioId !== "") {
766
+ obj.scenarioId = message.scenarioId;
767
+ }
768
+ if (message.scenarioHash !== "") {
769
+ obj.scenarioHash = message.scenarioHash;
770
+ }
379
771
  return obj;
380
772
  },
381
773
  create(base) {
382
- return exports.SetRateResponse.fromPartial(base ?? {});
774
+ return exports.LoadResponse.fromPartial(base ?? {});
383
775
  },
384
- fromPartial(_) {
385
- const message = createBaseSetRateResponse();
776
+ fromPartial(object) {
777
+ const message = createBaseLoadResponse();
778
+ message.scenarioId = object.scenarioId ?? "";
779
+ message.scenarioHash = object.scenarioHash ?? "";
386
780
  return message;
387
781
  },
388
782
  };
@@ -458,6 +852,14 @@ exports.ScenarioControlDefinition = {
458
852
  name: "ScenarioControl",
459
853
  fullName: "keelson.interfaces.scenario_control.ScenarioControl",
460
854
  methods: {
855
+ list_scenarios: {
856
+ name: "list_scenarios",
857
+ requestType: exports.ListScenariosRequest,
858
+ requestStream: false,
859
+ responseType: exports.ListScenariosResponse,
860
+ responseStream: false,
861
+ options: {},
862
+ },
461
863
  load: {
462
864
  name: "load",
463
865
  requestType: exports.LoadRequest,
@@ -59,10 +59,56 @@ export interface SetCruiseSpeedResponse {
59
59
  rawAutopilotResult: number;
60
60
  detail: string;
61
61
  }
62
+ /**
63
+ * How a vehicle is told to steer. The frame is the field rather than a
64
+ * separate discriminator, so an order cannot name one frame and carry a
65
+ * value meant for another.
66
+ *
67
+ * The two are different instructions, not two spellings of one. A course
68
+ * over ground is made good against the water that is moving the hull; a
69
+ * heading is where she points, and in any current the two differ by the
70
+ * drift angle. A vehicle that treats them alike is wrong by that angle
71
+ * and says nothing about it.
72
+ */
73
+ export interface SteeringOrder {
74
+ /** Make good this course, degrees true, [0, 360). */
75
+ courseOverGroundDeg?: number | undefined;
76
+ /**
77
+ * Point this way, degrees true, [0, 360). What she makes good is then
78
+ * whatever the water leaves her.
79
+ */
80
+ headingDeg?: number | undefined;
81
+ }
82
+ /**
83
+ * A standing steering order: hold this course or heading until told
84
+ * otherwise — what a helmsman, or an autopilot in heading-hold, does.
85
+ *
86
+ * Not NavigationTarget.yaw_deg, which is the heading on arrival at a
87
+ * position target: a one-shot goal tied to a waypoint. This one has no
88
+ * destination and stays in force until replaced.
89
+ *
90
+ * Steering only. Speed is set_cruise_speed's, so a course can be changed
91
+ * without disturbing a speed. An order with no frame set is an error
92
+ * rather than a no-op — it is almost always a caller that failed to set
93
+ * the field it meant to. A vehicle that cannot hold the requested frame
94
+ * replies COMMAND_RESULT_UNSUPPORTED rather than substituting the other.
95
+ */
96
+ export interface SetSteeringOrderRequest {
97
+ timestamp: Date | undefined;
98
+ order: SteeringOrder | undefined;
99
+ }
100
+ export interface SetSteeringOrderResponse {
101
+ result: CommandResult;
102
+ rawAutopilotResult: number;
103
+ detail: string;
104
+ }
62
105
  export declare const NavigationTarget: MessageFns<NavigationTarget>;
63
106
  export declare const NavigationTargetResponse: MessageFns<NavigationTargetResponse>;
64
107
  export declare const SetCruiseSpeedRequest: MessageFns<SetCruiseSpeedRequest>;
65
108
  export declare const SetCruiseSpeedResponse: MessageFns<SetCruiseSpeedResponse>;
109
+ export declare const SteeringOrder: MessageFns<SteeringOrder>;
110
+ export declare const SetSteeringOrderRequest: MessageFns<SetSteeringOrderRequest>;
111
+ export declare const SetSteeringOrderResponse: MessageFns<SetSteeringOrderResponse>;
66
112
  export type VehicleNavigationDefinition = typeof VehicleNavigationDefinition;
67
113
  export declare const VehicleNavigationDefinition: {
68
114
  readonly name: "VehicleNavigation";
@@ -90,6 +136,15 @@ export declare const VehicleNavigationDefinition: {
90
136
  readonly responseStream: false;
91
137
  readonly options: {};
92
138
  };
139
+ /** Hold a course over ground or a heading until told otherwise. */
140
+ readonly set_steering_order: {
141
+ readonly name: "set_steering_order";
142
+ readonly requestType: MessageFns<SetSteeringOrderRequest>;
143
+ readonly requestStream: false;
144
+ readonly responseType: MessageFns<SetSteeringOrderResponse>;
145
+ readonly responseStream: false;
146
+ readonly options: {};
147
+ };
93
148
  };
94
149
  };
95
150
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;