@rise-maritime/keelson-js 0.6.0-alpha.245.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 CHANGED
@@ -509,6 +509,14 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
509
509
  readonly responseStream: false;
510
510
  readonly options: {};
511
511
  };
512
+ readonly set_standing_order: {
513
+ readonly name: "set_standing_order";
514
+ readonly requestType: import("./interfaces/VehicleSimulatorControl").MessageFns<import("./interfaces/VehicleSimulatorControl").StandingOrder>;
515
+ readonly requestStream: false;
516
+ readonly responseType: import("./interfaces/VehicleSimulatorControl").MessageFns<import("./interfaces/VehicleSimulatorControl").SetStandingOrderResponse>;
517
+ readonly responseStream: false;
518
+ readonly options: {};
519
+ };
512
520
  };
513
521
  } | {
514
522
  readonly name: "WHEPProxy";
@@ -15,8 +15,76 @@ export interface InitialPose {
15
15
  */
16
16
  export interface SetInitialPoseResponse {
17
17
  }
18
+ /**
19
+ * How a vehicle is told to steer. The frame is the field rather than a
20
+ * separate discriminator, so an order cannot name one frame and carry a
21
+ * value meant for another.
22
+ *
23
+ * The two are different instructions, not two spellings of one. A course
24
+ * over ground is made good against the water that is moving the hull; a
25
+ * heading is where she points, and in any current the two differ by the
26
+ * drift angle. A simulator that treats them alike is wrong by that angle
27
+ * and says nothing about it.
28
+ */
29
+ export interface SteeringOrder {
30
+ /** Make good this course, degrees true, [0, 360). */
31
+ courseOverGroundDeg?: number | undefined;
32
+ /**
33
+ * Point this way, degrees true, [0, 360). What she makes good is then
34
+ * whatever the water leaves her.
35
+ */
36
+ headingDeg?: number | undefined;
37
+ }
38
+ /**
39
+ * How a vehicle is told to drive. Four frames, in decreasing order of what
40
+ * the vehicle is asked to guarantee: a speed over the ground is a promise
41
+ * about the track, a speed through the water is a promise about the hull,
42
+ * and the last two are machinery settings that promise nothing about
43
+ * either — what they produce is the vehicle's business.
44
+ */
45
+ export interface PropulsionOrder {
46
+ /**
47
+ * Make good this speed over the ground, m/s. Not always reachable: in
48
+ * a stream that beats her, the vehicle makes its best and the
49
+ * shortfall is what the recording shows.
50
+ */
51
+ sogMps?: number | undefined;
52
+ /** This speed through the water, m/s. */
53
+ stwMps?: number | undefined;
54
+ /**
55
+ * A throttle setting, percent. Negative is astern where the vehicle
56
+ * has it; a vehicle that cannot go astern replies OUT_OF_RANGE rather
57
+ * than clamping silently.
58
+ */
59
+ enginePct?: number | undefined;
60
+ /** Shaft revolutions per minute. Signed, as engine_pct is. */
61
+ shaftRpm?: number | undefined;
62
+ }
63
+ /**
64
+ * A standing order: what the vehicle should be doing until told otherwise.
65
+ *
66
+ * Both halves are optional and omitting one leaves it as it is, so a course
67
+ * can be changed without disturbing a speed. Sending neither is an error
68
+ * rather than a no-op: it is almost always a caller that failed to set the
69
+ * field it meant to.
70
+ */
71
+ export interface StandingOrder {
72
+ steering: SteeringOrder | undefined;
73
+ propulsion: PropulsionOrder | undefined;
74
+ }
75
+ /**
76
+ * Dedicated response for the same reason SetInitialPoseResponse is one: an
77
+ * order that was accepted but modified — clamped to a limit the vehicle
78
+ * declares — is a plausible thing to want to return later.
79
+ */
80
+ export interface SetStandingOrderResponse {
81
+ }
18
82
  export declare const InitialPose: MessageFns<InitialPose>;
19
83
  export declare const SetInitialPoseResponse: MessageFns<SetInitialPoseResponse>;
84
+ export declare const SteeringOrder: MessageFns<SteeringOrder>;
85
+ export declare const PropulsionOrder: MessageFns<PropulsionOrder>;
86
+ export declare const StandingOrder: MessageFns<StandingOrder>;
87
+ export declare const SetStandingOrderResponse: MessageFns<SetStandingOrderResponse>;
20
88
  export type VehicleSimulatorControlDefinition = typeof VehicleSimulatorControlDefinition;
21
89
  export declare const VehicleSimulatorControlDefinition: {
22
90
  readonly name: "VehicleSimulatorControl";
@@ -34,6 +102,21 @@ export declare const VehicleSimulatorControlDefinition: {
34
102
  readonly responseStream: false;
35
103
  readonly options: {};
36
104
  };
105
+ /**
106
+ * Give a RUNNING entity a new standing order, without moving it. On a
107
+ * STOPPED or ASSIGNED entity, replies ErrorResponse{code =
108
+ * INVALID_STATE} — the mirror of set_initial_pose's own rule, and for
109
+ * the same reason: an order to a vehicle that is not going anywhere is
110
+ * a caller confusing setup with command.
111
+ */
112
+ readonly set_standing_order: {
113
+ readonly name: "set_standing_order";
114
+ readonly requestType: MessageFns<StandingOrder>;
115
+ readonly requestStream: false;
116
+ readonly responseType: MessageFns<SetStandingOrderResponse>;
117
+ readonly responseStream: false;
118
+ readonly options: {};
119
+ };
37
120
  };
38
121
  };
39
122
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: VehicleSimulatorControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.VehicleSimulatorControlDefinition = exports.SetInitialPoseResponse = exports.InitialPose = exports.protobufPackage = void 0;
8
+ exports.VehicleSimulatorControlDefinition = exports.SetStandingOrderResponse = exports.StandingOrder = exports.PropulsionOrder = exports.SteeringOrder = exports.SetInitialPoseResponse = exports.InitialPose = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const Coordinate_1 = require("./Coordinate");
@@ -132,6 +132,283 @@ exports.SetInitialPoseResponse = {
132
132
  return message;
133
133
  },
134
134
  };
135
+ function createBaseSteeringOrder() {
136
+ return { courseOverGroundDeg: undefined, headingDeg: undefined };
137
+ }
138
+ exports.SteeringOrder = {
139
+ encode(message, writer = new wire_1.BinaryWriter()) {
140
+ if (message.courseOverGroundDeg !== undefined) {
141
+ writer.uint32(9).double(message.courseOverGroundDeg);
142
+ }
143
+ if (message.headingDeg !== undefined) {
144
+ writer.uint32(17).double(message.headingDeg);
145
+ }
146
+ return writer;
147
+ },
148
+ decode(input, length) {
149
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
150
+ let end = length === undefined ? reader.len : reader.pos + length;
151
+ const message = createBaseSteeringOrder();
152
+ while (reader.pos < end) {
153
+ const tag = reader.uint32();
154
+ switch (tag >>> 3) {
155
+ case 1: {
156
+ if (tag !== 9) {
157
+ break;
158
+ }
159
+ message.courseOverGroundDeg = reader.double();
160
+ continue;
161
+ }
162
+ case 2: {
163
+ if (tag !== 17) {
164
+ break;
165
+ }
166
+ message.headingDeg = reader.double();
167
+ continue;
168
+ }
169
+ }
170
+ if ((tag & 7) === 4 || tag === 0) {
171
+ break;
172
+ }
173
+ reader.skip(tag & 7);
174
+ }
175
+ return message;
176
+ },
177
+ fromJSON(object) {
178
+ return {
179
+ courseOverGroundDeg: isSet(object.courseOverGroundDeg)
180
+ ? globalThis.Number(object.courseOverGroundDeg)
181
+ : undefined,
182
+ headingDeg: isSet(object.headingDeg) ? globalThis.Number(object.headingDeg) : undefined,
183
+ };
184
+ },
185
+ toJSON(message) {
186
+ const obj = {};
187
+ if (message.courseOverGroundDeg !== undefined) {
188
+ obj.courseOverGroundDeg = message.courseOverGroundDeg;
189
+ }
190
+ if (message.headingDeg !== undefined) {
191
+ obj.headingDeg = message.headingDeg;
192
+ }
193
+ return obj;
194
+ },
195
+ create(base) {
196
+ return exports.SteeringOrder.fromPartial(base ?? {});
197
+ },
198
+ fromPartial(object) {
199
+ const message = createBaseSteeringOrder();
200
+ message.courseOverGroundDeg = object.courseOverGroundDeg ?? undefined;
201
+ message.headingDeg = object.headingDeg ?? undefined;
202
+ return message;
203
+ },
204
+ };
205
+ function createBasePropulsionOrder() {
206
+ return { sogMps: undefined, stwMps: undefined, enginePct: undefined, shaftRpm: undefined };
207
+ }
208
+ exports.PropulsionOrder = {
209
+ encode(message, writer = new wire_1.BinaryWriter()) {
210
+ if (message.sogMps !== undefined) {
211
+ writer.uint32(9).double(message.sogMps);
212
+ }
213
+ if (message.stwMps !== undefined) {
214
+ writer.uint32(17).double(message.stwMps);
215
+ }
216
+ if (message.enginePct !== undefined) {
217
+ writer.uint32(25).double(message.enginePct);
218
+ }
219
+ if (message.shaftRpm !== undefined) {
220
+ writer.uint32(33).double(message.shaftRpm);
221
+ }
222
+ return writer;
223
+ },
224
+ decode(input, length) {
225
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
226
+ let end = length === undefined ? reader.len : reader.pos + length;
227
+ const message = createBasePropulsionOrder();
228
+ while (reader.pos < end) {
229
+ const tag = reader.uint32();
230
+ switch (tag >>> 3) {
231
+ case 1: {
232
+ if (tag !== 9) {
233
+ break;
234
+ }
235
+ message.sogMps = reader.double();
236
+ continue;
237
+ }
238
+ case 2: {
239
+ if (tag !== 17) {
240
+ break;
241
+ }
242
+ message.stwMps = reader.double();
243
+ continue;
244
+ }
245
+ case 3: {
246
+ if (tag !== 25) {
247
+ break;
248
+ }
249
+ message.enginePct = reader.double();
250
+ continue;
251
+ }
252
+ case 4: {
253
+ if (tag !== 33) {
254
+ break;
255
+ }
256
+ message.shaftRpm = reader.double();
257
+ continue;
258
+ }
259
+ }
260
+ if ((tag & 7) === 4 || tag === 0) {
261
+ break;
262
+ }
263
+ reader.skip(tag & 7);
264
+ }
265
+ return message;
266
+ },
267
+ fromJSON(object) {
268
+ return {
269
+ sogMps: isSet(object.sogMps) ? globalThis.Number(object.sogMps) : undefined,
270
+ stwMps: isSet(object.stwMps) ? globalThis.Number(object.stwMps) : undefined,
271
+ enginePct: isSet(object.enginePct) ? globalThis.Number(object.enginePct) : undefined,
272
+ shaftRpm: isSet(object.shaftRpm) ? globalThis.Number(object.shaftRpm) : undefined,
273
+ };
274
+ },
275
+ toJSON(message) {
276
+ const obj = {};
277
+ if (message.sogMps !== undefined) {
278
+ obj.sogMps = message.sogMps;
279
+ }
280
+ if (message.stwMps !== undefined) {
281
+ obj.stwMps = message.stwMps;
282
+ }
283
+ if (message.enginePct !== undefined) {
284
+ obj.enginePct = message.enginePct;
285
+ }
286
+ if (message.shaftRpm !== undefined) {
287
+ obj.shaftRpm = message.shaftRpm;
288
+ }
289
+ return obj;
290
+ },
291
+ create(base) {
292
+ return exports.PropulsionOrder.fromPartial(base ?? {});
293
+ },
294
+ fromPartial(object) {
295
+ const message = createBasePropulsionOrder();
296
+ message.sogMps = object.sogMps ?? undefined;
297
+ message.stwMps = object.stwMps ?? undefined;
298
+ message.enginePct = object.enginePct ?? undefined;
299
+ message.shaftRpm = object.shaftRpm ?? undefined;
300
+ return message;
301
+ },
302
+ };
303
+ function createBaseStandingOrder() {
304
+ return { steering: undefined, propulsion: undefined };
305
+ }
306
+ exports.StandingOrder = {
307
+ encode(message, writer = new wire_1.BinaryWriter()) {
308
+ if (message.steering !== undefined) {
309
+ exports.SteeringOrder.encode(message.steering, writer.uint32(10).fork()).join();
310
+ }
311
+ if (message.propulsion !== undefined) {
312
+ exports.PropulsionOrder.encode(message.propulsion, writer.uint32(18).fork()).join();
313
+ }
314
+ return writer;
315
+ },
316
+ decode(input, length) {
317
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
318
+ let end = length === undefined ? reader.len : reader.pos + length;
319
+ const message = createBaseStandingOrder();
320
+ while (reader.pos < end) {
321
+ const tag = reader.uint32();
322
+ switch (tag >>> 3) {
323
+ case 1: {
324
+ if (tag !== 10) {
325
+ break;
326
+ }
327
+ message.steering = exports.SteeringOrder.decode(reader, reader.uint32());
328
+ continue;
329
+ }
330
+ case 2: {
331
+ if (tag !== 18) {
332
+ break;
333
+ }
334
+ message.propulsion = exports.PropulsionOrder.decode(reader, reader.uint32());
335
+ continue;
336
+ }
337
+ }
338
+ if ((tag & 7) === 4 || tag === 0) {
339
+ break;
340
+ }
341
+ reader.skip(tag & 7);
342
+ }
343
+ return message;
344
+ },
345
+ fromJSON(object) {
346
+ return {
347
+ steering: isSet(object.steering) ? exports.SteeringOrder.fromJSON(object.steering) : undefined,
348
+ propulsion: isSet(object.propulsion) ? exports.PropulsionOrder.fromJSON(object.propulsion) : undefined,
349
+ };
350
+ },
351
+ toJSON(message) {
352
+ const obj = {};
353
+ if (message.steering !== undefined) {
354
+ obj.steering = exports.SteeringOrder.toJSON(message.steering);
355
+ }
356
+ if (message.propulsion !== undefined) {
357
+ obj.propulsion = exports.PropulsionOrder.toJSON(message.propulsion);
358
+ }
359
+ return obj;
360
+ },
361
+ create(base) {
362
+ return exports.StandingOrder.fromPartial(base ?? {});
363
+ },
364
+ fromPartial(object) {
365
+ const message = createBaseStandingOrder();
366
+ message.steering = (object.steering !== undefined && object.steering !== null)
367
+ ? exports.SteeringOrder.fromPartial(object.steering)
368
+ : undefined;
369
+ message.propulsion = (object.propulsion !== undefined && object.propulsion !== null)
370
+ ? exports.PropulsionOrder.fromPartial(object.propulsion)
371
+ : undefined;
372
+ return message;
373
+ },
374
+ };
375
+ function createBaseSetStandingOrderResponse() {
376
+ return {};
377
+ }
378
+ exports.SetStandingOrderResponse = {
379
+ encode(_, writer = new wire_1.BinaryWriter()) {
380
+ return writer;
381
+ },
382
+ decode(input, length) {
383
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
384
+ let end = length === undefined ? reader.len : reader.pos + length;
385
+ const message = createBaseSetStandingOrderResponse();
386
+ while (reader.pos < end) {
387
+ const tag = reader.uint32();
388
+ switch (tag >>> 3) {
389
+ }
390
+ if ((tag & 7) === 4 || tag === 0) {
391
+ break;
392
+ }
393
+ reader.skip(tag & 7);
394
+ }
395
+ return message;
396
+ },
397
+ fromJSON(_) {
398
+ return {};
399
+ },
400
+ toJSON(_) {
401
+ const obj = {};
402
+ return obj;
403
+ },
404
+ create(base) {
405
+ return exports.SetStandingOrderResponse.fromPartial(base ?? {});
406
+ },
407
+ fromPartial(_) {
408
+ const message = createBaseSetStandingOrderResponse();
409
+ return message;
410
+ },
411
+ };
135
412
  exports.VehicleSimulatorControlDefinition = {
136
413
  name: "VehicleSimulatorControl",
137
414
  fullName: "keelson.interfaces.vehicle_simulator_control.VehicleSimulatorControl",
@@ -148,6 +425,21 @@ exports.VehicleSimulatorControlDefinition = {
148
425
  responseStream: false,
149
426
  options: {},
150
427
  },
428
+ /**
429
+ * Give a RUNNING entity a new standing order, without moving it. On a
430
+ * STOPPED or ASSIGNED entity, replies ErrorResponse{code =
431
+ * INVALID_STATE} — the mirror of set_initial_pose's own rule, and for
432
+ * the same reason: an order to a vehicle that is not going anywhere is
433
+ * a caller confusing setup with command.
434
+ */
435
+ set_standing_order: {
436
+ name: "set_standing_order",
437
+ requestType: exports.StandingOrder,
438
+ requestStream: false,
439
+ responseType: exports.SetStandingOrderResponse,
440
+ responseStream: false,
441
+ options: {},
442
+ },
151
443
  },
152
444
  };
153
445
  function isSet(value) {
@@ -501,6 +501,14 @@ export declare const serviceDefinitions: {
501
501
  readonly responseStream: false;
502
502
  readonly options: {};
503
503
  };
504
+ readonly set_standing_order: {
505
+ readonly name: "set_standing_order";
506
+ readonly requestType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").StandingOrder>;
507
+ readonly requestStream: false;
508
+ readonly responseType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").SetStandingOrderResponse>;
509
+ readonly responseStream: false;
510
+ readonly options: {};
511
+ };
504
512
  };
505
513
  };
506
514
  readonly "whep_proxy/v1": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rise-maritime/keelson-js",
3
3
  "//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
4
- "version": "0.6.0-alpha.245.dev.1",
4
+ "version": "0.6.0-alpha.255.dev.1",
5
5
  "description": "Keelson JavaScript SDK with Node-RED nodes",
6
6
  "main": "dist/index.js",
7
7
  "files": [