@rise-maritime/keelson-js 0.6.0-experimental.6 → 0.6.0-experimental.7
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
|
@@ -257,6 +257,14 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
|
|
|
257
257
|
readonly responseStream: false;
|
|
258
258
|
readonly options: {};
|
|
259
259
|
};
|
|
260
|
+
readonly set_range: {
|
|
261
|
+
readonly name: "set_range";
|
|
262
|
+
readonly requestType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").SetRangeRequest>;
|
|
263
|
+
readonly requestStream: false;
|
|
264
|
+
readonly responseType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").ReplaySuccessResponse>;
|
|
265
|
+
readonly responseStream: false;
|
|
266
|
+
readonly options: {};
|
|
267
|
+
};
|
|
260
268
|
};
|
|
261
269
|
} | {
|
|
262
270
|
readonly name: "RoutePlanner";
|
|
@@ -72,6 +72,26 @@ export interface SetSpeedRequest {
|
|
|
72
72
|
export interface SetLoopRequest {
|
|
73
73
|
loop: boolean;
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Bound playback to a span of the loaded file.
|
|
77
|
+
*
|
|
78
|
+
* The operation a reviewer wants constantly: an incident occupies twenty seconds of a two-hour
|
|
79
|
+
* recording, and you want those twenty seconds -- repeatedly, if `set_loop` is on. Composing it from
|
|
80
|
+
* `seek` does not work well, because a client can only notice the end has passed AFTER it has
|
|
81
|
+
* published past it; see RISE-Maritime/keelson#198.
|
|
82
|
+
*
|
|
83
|
+
* BOTH FIELDS UNSET CLEARS THE RANGE and returns playback to the whole file. Clearing has to be
|
|
84
|
+
* expressible, and it is: these are MESSAGE fields, so proto3 gives them explicit presence and a
|
|
85
|
+
* server distinguishes unset from a zero Timestamp with `HasField`. That distinction is load-bearing
|
|
86
|
+
* rather than pedantic -- epoch 0 is a legitimate log time, and a recording from a device with no
|
|
87
|
+
* clock really does start there, so a zero value could not have doubled as "none".
|
|
88
|
+
*/
|
|
89
|
+
export interface SetRangeRequest {
|
|
90
|
+
/** First message replayed. Unset means the file's start. */
|
|
91
|
+
start: Date | undefined;
|
|
92
|
+
/** Playback stops or loops on reaching this. Unset means the file's end. */
|
|
93
|
+
end: Date | undefined;
|
|
94
|
+
}
|
|
75
95
|
/** Generic acknowledgement for control commands. */
|
|
76
96
|
export interface ReplaySuccessResponse {
|
|
77
97
|
}
|
|
@@ -85,6 +105,7 @@ export declare const LoadFileRequest: MessageFns<LoadFileRequest>;
|
|
|
85
105
|
export declare const SeekRequest: MessageFns<SeekRequest>;
|
|
86
106
|
export declare const SetSpeedRequest: MessageFns<SetSpeedRequest>;
|
|
87
107
|
export declare const SetLoopRequest: MessageFns<SetLoopRequest>;
|
|
108
|
+
export declare const SetRangeRequest: MessageFns<SetRangeRequest>;
|
|
88
109
|
export declare const ReplaySuccessResponse: MessageFns<ReplaySuccessResponse>;
|
|
89
110
|
export type ReplayControlDefinition = typeof ReplayControlDefinition;
|
|
90
111
|
export declare const ReplayControlDefinition: {
|
|
@@ -164,6 +185,14 @@ export declare const ReplayControlDefinition: {
|
|
|
164
185
|
readonly responseStream: false;
|
|
165
186
|
readonly options: {};
|
|
166
187
|
};
|
|
188
|
+
readonly set_range: {
|
|
189
|
+
readonly name: "set_range";
|
|
190
|
+
readonly requestType: MessageFns<SetRangeRequest>;
|
|
191
|
+
readonly requestStream: false;
|
|
192
|
+
readonly responseType: MessageFns<ReplaySuccessResponse>;
|
|
193
|
+
readonly responseStream: false;
|
|
194
|
+
readonly options: {};
|
|
195
|
+
};
|
|
167
196
|
};
|
|
168
197
|
};
|
|
169
198
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: ReplayControl.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetRangeRequest = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const empty_1 = require("./google/protobuf/empty");
|
|
@@ -751,6 +751,74 @@ exports.SetLoopRequest = {
|
|
|
751
751
|
return message;
|
|
752
752
|
},
|
|
753
753
|
};
|
|
754
|
+
function createBaseSetRangeRequest() {
|
|
755
|
+
return { start: undefined, end: undefined };
|
|
756
|
+
}
|
|
757
|
+
exports.SetRangeRequest = {
|
|
758
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
759
|
+
if (message.start !== undefined) {
|
|
760
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.start), writer.uint32(10).fork()).join();
|
|
761
|
+
}
|
|
762
|
+
if (message.end !== undefined) {
|
|
763
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.end), writer.uint32(18).fork()).join();
|
|
764
|
+
}
|
|
765
|
+
return writer;
|
|
766
|
+
},
|
|
767
|
+
decode(input, length) {
|
|
768
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
769
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
770
|
+
const message = createBaseSetRangeRequest();
|
|
771
|
+
while (reader.pos < end) {
|
|
772
|
+
const tag = reader.uint32();
|
|
773
|
+
switch (tag >>> 3) {
|
|
774
|
+
case 1: {
|
|
775
|
+
if (tag !== 10) {
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
message.start = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
case 2: {
|
|
782
|
+
if (tag !== 18) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
message.end = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
reader.skip(tag & 7);
|
|
793
|
+
}
|
|
794
|
+
return message;
|
|
795
|
+
},
|
|
796
|
+
fromJSON(object) {
|
|
797
|
+
return {
|
|
798
|
+
start: isSet(object.start) ? fromJsonTimestamp(object.start) : undefined,
|
|
799
|
+
end: isSet(object.end) ? fromJsonTimestamp(object.end) : undefined,
|
|
800
|
+
};
|
|
801
|
+
},
|
|
802
|
+
toJSON(message) {
|
|
803
|
+
const obj = {};
|
|
804
|
+
if (message.start !== undefined) {
|
|
805
|
+
obj.start = message.start.toISOString();
|
|
806
|
+
}
|
|
807
|
+
if (message.end !== undefined) {
|
|
808
|
+
obj.end = message.end.toISOString();
|
|
809
|
+
}
|
|
810
|
+
return obj;
|
|
811
|
+
},
|
|
812
|
+
create(base) {
|
|
813
|
+
return exports.SetRangeRequest.fromPartial(base ?? {});
|
|
814
|
+
},
|
|
815
|
+
fromPartial(object) {
|
|
816
|
+
const message = createBaseSetRangeRequest();
|
|
817
|
+
message.start = object.start ?? undefined;
|
|
818
|
+
message.end = object.end ?? undefined;
|
|
819
|
+
return message;
|
|
820
|
+
},
|
|
821
|
+
};
|
|
754
822
|
function createBaseReplaySuccessResponse() {
|
|
755
823
|
return {};
|
|
756
824
|
}
|
|
@@ -865,6 +933,14 @@ exports.ReplayControlDefinition = {
|
|
|
865
933
|
responseStream: false,
|
|
866
934
|
options: {},
|
|
867
935
|
},
|
|
936
|
+
set_range: {
|
|
937
|
+
name: "set_range",
|
|
938
|
+
requestType: exports.SetRangeRequest,
|
|
939
|
+
requestStream: false,
|
|
940
|
+
responseType: exports.ReplaySuccessResponse,
|
|
941
|
+
responseStream: false,
|
|
942
|
+
options: {},
|
|
943
|
+
},
|
|
868
944
|
},
|
|
869
945
|
};
|
|
870
946
|
function toTimestamp(date) {
|
|
@@ -239,6 +239,14 @@ export declare const serviceDefinitions: {
|
|
|
239
239
|
readonly responseStream: false;
|
|
240
240
|
readonly options: {};
|
|
241
241
|
};
|
|
242
|
+
readonly set_range: {
|
|
243
|
+
readonly name: "set_range";
|
|
244
|
+
readonly requestType: import("./ReplayControl").MessageFns<import("./ReplayControl").SetRangeRequest>;
|
|
245
|
+
readonly requestStream: false;
|
|
246
|
+
readonly responseType: import("./ReplayControl").MessageFns<import("./ReplayControl").ReplaySuccessResponse>;
|
|
247
|
+
readonly responseStream: false;
|
|
248
|
+
readonly options: {};
|
|
249
|
+
};
|
|
242
250
|
};
|
|
243
251
|
};
|
|
244
252
|
readonly "route_planner/v1": {
|
|
@@ -32,6 +32,13 @@ export interface ReplayStatus {
|
|
|
32
32
|
progressPct: number;
|
|
33
33
|
/** Whether the replayer is configured to loop on end-of-file. */
|
|
34
34
|
loop: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The active play range, when one is set. Reported so a client that did not set it -- a second
|
|
37
|
+
* station watching the same replay -- can still show what is being played, and so a client can
|
|
38
|
+
* tell "no range" from "a range it has forgotten". Unset when playback covers the whole file.
|
|
39
|
+
*/
|
|
40
|
+
rangeStart: Date | undefined;
|
|
41
|
+
rangeEnd: Date | undefined;
|
|
35
42
|
/** Identification of the daemon producing this sample. See DaemonInfo above. */
|
|
36
43
|
daemon: DaemonInfo | undefined;
|
|
37
44
|
/** Progress of an in-flight load_file, 0..100. Zero outside of LOADING. */
|
|
@@ -169,6 +169,8 @@ function createBaseReplayStatus() {
|
|
|
169
169
|
totalMessageCount: 0,
|
|
170
170
|
progressPct: 0,
|
|
171
171
|
loop: false,
|
|
172
|
+
rangeStart: undefined,
|
|
173
|
+
rangeEnd: undefined,
|
|
172
174
|
daemon: undefined,
|
|
173
175
|
loadProgressPct: 0,
|
|
174
176
|
lastLoadError: "",
|
|
@@ -207,6 +209,12 @@ exports.ReplayStatus = {
|
|
|
207
209
|
if (message.loop !== false) {
|
|
208
210
|
writer.uint32(80).bool(message.loop);
|
|
209
211
|
}
|
|
212
|
+
if (message.rangeStart !== undefined) {
|
|
213
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.rangeStart), writer.uint32(90).fork()).join();
|
|
214
|
+
}
|
|
215
|
+
if (message.rangeEnd !== undefined) {
|
|
216
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.rangeEnd), writer.uint32(98).fork()).join();
|
|
217
|
+
}
|
|
210
218
|
if (message.daemon !== undefined) {
|
|
211
219
|
exports.DaemonInfo.encode(message.daemon, writer.uint32(162).fork()).join();
|
|
212
220
|
}
|
|
@@ -295,6 +303,20 @@ exports.ReplayStatus = {
|
|
|
295
303
|
message.loop = reader.bool();
|
|
296
304
|
continue;
|
|
297
305
|
}
|
|
306
|
+
case 11: {
|
|
307
|
+
if (tag !== 90) {
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
message.rangeStart = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
case 12: {
|
|
314
|
+
if (tag !== 98) {
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
message.rangeEnd = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
298
320
|
case 20: {
|
|
299
321
|
if (tag !== 162) {
|
|
300
322
|
break;
|
|
@@ -337,6 +359,8 @@ exports.ReplayStatus = {
|
|
|
337
359
|
totalMessageCount: isSet(object.totalMessageCount) ? globalThis.Number(object.totalMessageCount) : 0,
|
|
338
360
|
progressPct: isSet(object.progressPct) ? globalThis.Number(object.progressPct) : 0,
|
|
339
361
|
loop: isSet(object.loop) ? globalThis.Boolean(object.loop) : false,
|
|
362
|
+
rangeStart: isSet(object.rangeStart) ? fromJsonTimestamp(object.rangeStart) : undefined,
|
|
363
|
+
rangeEnd: isSet(object.rangeEnd) ? fromJsonTimestamp(object.rangeEnd) : undefined,
|
|
340
364
|
daemon: isSet(object.daemon) ? exports.DaemonInfo.fromJSON(object.daemon) : undefined,
|
|
341
365
|
loadProgressPct: isSet(object.loadProgressPct) ? globalThis.Number(object.loadProgressPct) : 0,
|
|
342
366
|
lastLoadError: isSet(object.lastLoadError) ? globalThis.String(object.lastLoadError) : "",
|
|
@@ -374,6 +398,12 @@ exports.ReplayStatus = {
|
|
|
374
398
|
if (message.loop !== false) {
|
|
375
399
|
obj.loop = message.loop;
|
|
376
400
|
}
|
|
401
|
+
if (message.rangeStart !== undefined) {
|
|
402
|
+
obj.rangeStart = message.rangeStart.toISOString();
|
|
403
|
+
}
|
|
404
|
+
if (message.rangeEnd !== undefined) {
|
|
405
|
+
obj.rangeEnd = message.rangeEnd.toISOString();
|
|
406
|
+
}
|
|
377
407
|
if (message.daemon !== undefined) {
|
|
378
408
|
obj.daemon = exports.DaemonInfo.toJSON(message.daemon);
|
|
379
409
|
}
|
|
@@ -400,6 +430,8 @@ exports.ReplayStatus = {
|
|
|
400
430
|
message.totalMessageCount = object.totalMessageCount ?? 0;
|
|
401
431
|
message.progressPct = object.progressPct ?? 0;
|
|
402
432
|
message.loop = object.loop ?? false;
|
|
433
|
+
message.rangeStart = object.rangeStart ?? undefined;
|
|
434
|
+
message.rangeEnd = object.rangeEnd ?? undefined;
|
|
403
435
|
message.daemon = (object.daemon !== undefined && object.daemon !== null)
|
|
404
436
|
? exports.DaemonInfo.fromPartial(object.daemon)
|
|
405
437
|
: undefined;
|
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-experimental.
|
|
4
|
+
"version": "0.6.0-experimental.7",
|
|
5
5
|
"description": "Keelson JavaScript SDK with Node-RED nodes",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|