@rise-maritime/keelson-js 0.5.2 → 0.5.3
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/interfaces/ErrorResponse.d.ts +28 -0
- package/dist/interfaces/ErrorResponse.js +108 -3
- package/dist/interfaces/ReplayControl.d.ts +97 -0
- package/dist/interfaces/ReplayControl.js +616 -0
- package/dist/payloads/Primitives.d.ts +11 -0
- package/dist/payloads/Primitives.js +89 -1
- package/dist/payloads/ReplayStatus.d.ts +76 -0
- package/dist/payloads/ReplayStatus.js +445 -0
- package/dist/payloads/Severity.d.ts +14 -0
- package/dist/payloads/Severity.js +59 -0
- package/dist/payloads/VehicleState.d.ts +56 -0
- package/dist/payloads/VehicleState.js +196 -0
- package/dist/payloads/Weather.d.ts +148 -0
- package/dist/payloads/Weather.js +906 -0
- package/dist/payloads/index.foxglove.d.ts +1 -1
- package/dist/payloads/index.foxglove.js +1 -1
- package/dist/payloads/index.keelson.d.ts +4 -0
- package/dist/payloads/index.keelson.js +4 -0
- package/dist/subjects.json +24 -1
- package/package.json +2 -1
|
@@ -0,0 +1,616 @@
|
|
|
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: ReplayControl.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ReplayControlClientImpl = exports.ReplayControlServiceName = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const empty_1 = require("./google/protobuf/empty");
|
|
12
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
13
|
+
exports.protobufPackage = "";
|
|
14
|
+
function createBaseFileInfo() {
|
|
15
|
+
return {
|
|
16
|
+
path: "",
|
|
17
|
+
sizeBytes: 0,
|
|
18
|
+
messageCount: 0,
|
|
19
|
+
channelCount: 0,
|
|
20
|
+
startTime: undefined,
|
|
21
|
+
endTime: undefined,
|
|
22
|
+
channelNames: [],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.FileInfo = {
|
|
26
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
27
|
+
if (message.path !== "") {
|
|
28
|
+
writer.uint32(10).string(message.path);
|
|
29
|
+
}
|
|
30
|
+
if (message.sizeBytes !== 0) {
|
|
31
|
+
writer.uint32(16).uint64(message.sizeBytes);
|
|
32
|
+
}
|
|
33
|
+
if (message.messageCount !== 0) {
|
|
34
|
+
writer.uint32(24).uint64(message.messageCount);
|
|
35
|
+
}
|
|
36
|
+
if (message.channelCount !== 0) {
|
|
37
|
+
writer.uint32(32).uint32(message.channelCount);
|
|
38
|
+
}
|
|
39
|
+
if (message.startTime !== undefined) {
|
|
40
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startTime), writer.uint32(42).fork()).join();
|
|
41
|
+
}
|
|
42
|
+
if (message.endTime !== undefined) {
|
|
43
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.endTime), writer.uint32(50).fork()).join();
|
|
44
|
+
}
|
|
45
|
+
for (const v of message.channelNames) {
|
|
46
|
+
writer.uint32(58).string(v);
|
|
47
|
+
}
|
|
48
|
+
return writer;
|
|
49
|
+
},
|
|
50
|
+
decode(input, length) {
|
|
51
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
52
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
53
|
+
const message = createBaseFileInfo();
|
|
54
|
+
while (reader.pos < end) {
|
|
55
|
+
const tag = reader.uint32();
|
|
56
|
+
switch (tag >>> 3) {
|
|
57
|
+
case 1: {
|
|
58
|
+
if (tag !== 10) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
message.path = reader.string();
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
case 2: {
|
|
65
|
+
if (tag !== 16) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.sizeBytes = longToNumber(reader.uint64());
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
case 3: {
|
|
72
|
+
if (tag !== 24) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.messageCount = longToNumber(reader.uint64());
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
case 4: {
|
|
79
|
+
if (tag !== 32) {
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
message.channelCount = reader.uint32();
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
case 5: {
|
|
86
|
+
if (tag !== 42) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
message.startTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
case 6: {
|
|
93
|
+
if (tag !== 50) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
message.endTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
case 7: {
|
|
100
|
+
if (tag !== 58) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
message.channelNames.push(reader.string());
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
reader.skip(tag & 7);
|
|
111
|
+
}
|
|
112
|
+
return message;
|
|
113
|
+
},
|
|
114
|
+
fromJSON(object) {
|
|
115
|
+
return {
|
|
116
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
117
|
+
sizeBytes: isSet(object.sizeBytes) ? globalThis.Number(object.sizeBytes) : 0,
|
|
118
|
+
messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
|
|
119
|
+
channelCount: isSet(object.channelCount) ? globalThis.Number(object.channelCount) : 0,
|
|
120
|
+
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,
|
|
121
|
+
endTime: isSet(object.endTime) ? fromJsonTimestamp(object.endTime) : undefined,
|
|
122
|
+
channelNames: globalThis.Array.isArray(object?.channelNames)
|
|
123
|
+
? object.channelNames.map((e) => globalThis.String(e))
|
|
124
|
+
: [],
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
toJSON(message) {
|
|
128
|
+
const obj = {};
|
|
129
|
+
if (message.path !== "") {
|
|
130
|
+
obj.path = message.path;
|
|
131
|
+
}
|
|
132
|
+
if (message.sizeBytes !== 0) {
|
|
133
|
+
obj.sizeBytes = Math.round(message.sizeBytes);
|
|
134
|
+
}
|
|
135
|
+
if (message.messageCount !== 0) {
|
|
136
|
+
obj.messageCount = Math.round(message.messageCount);
|
|
137
|
+
}
|
|
138
|
+
if (message.channelCount !== 0) {
|
|
139
|
+
obj.channelCount = Math.round(message.channelCount);
|
|
140
|
+
}
|
|
141
|
+
if (message.startTime !== undefined) {
|
|
142
|
+
obj.startTime = message.startTime.toISOString();
|
|
143
|
+
}
|
|
144
|
+
if (message.endTime !== undefined) {
|
|
145
|
+
obj.endTime = message.endTime.toISOString();
|
|
146
|
+
}
|
|
147
|
+
if (message.channelNames?.length) {
|
|
148
|
+
obj.channelNames = message.channelNames;
|
|
149
|
+
}
|
|
150
|
+
return obj;
|
|
151
|
+
},
|
|
152
|
+
create(base) {
|
|
153
|
+
return exports.FileInfo.fromPartial(base ?? {});
|
|
154
|
+
},
|
|
155
|
+
fromPartial(object) {
|
|
156
|
+
const message = createBaseFileInfo();
|
|
157
|
+
message.path = object.path ?? "";
|
|
158
|
+
message.sizeBytes = object.sizeBytes ?? 0;
|
|
159
|
+
message.messageCount = object.messageCount ?? 0;
|
|
160
|
+
message.channelCount = object.channelCount ?? 0;
|
|
161
|
+
message.startTime = object.startTime ?? undefined;
|
|
162
|
+
message.endTime = object.endTime ?? undefined;
|
|
163
|
+
message.channelNames = object.channelNames?.map((e) => e) || [];
|
|
164
|
+
return message;
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
function createBaseListFilesRequest() {
|
|
168
|
+
return { pattern: "" };
|
|
169
|
+
}
|
|
170
|
+
exports.ListFilesRequest = {
|
|
171
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
172
|
+
if (message.pattern !== "") {
|
|
173
|
+
writer.uint32(10).string(message.pattern);
|
|
174
|
+
}
|
|
175
|
+
return writer;
|
|
176
|
+
},
|
|
177
|
+
decode(input, length) {
|
|
178
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
179
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
180
|
+
const message = createBaseListFilesRequest();
|
|
181
|
+
while (reader.pos < end) {
|
|
182
|
+
const tag = reader.uint32();
|
|
183
|
+
switch (tag >>> 3) {
|
|
184
|
+
case 1: {
|
|
185
|
+
if (tag !== 10) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
message.pattern = reader.string();
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
reader.skip(tag & 7);
|
|
196
|
+
}
|
|
197
|
+
return message;
|
|
198
|
+
},
|
|
199
|
+
fromJSON(object) {
|
|
200
|
+
return { pattern: isSet(object.pattern) ? globalThis.String(object.pattern) : "" };
|
|
201
|
+
},
|
|
202
|
+
toJSON(message) {
|
|
203
|
+
const obj = {};
|
|
204
|
+
if (message.pattern !== "") {
|
|
205
|
+
obj.pattern = message.pattern;
|
|
206
|
+
}
|
|
207
|
+
return obj;
|
|
208
|
+
},
|
|
209
|
+
create(base) {
|
|
210
|
+
return exports.ListFilesRequest.fromPartial(base ?? {});
|
|
211
|
+
},
|
|
212
|
+
fromPartial(object) {
|
|
213
|
+
const message = createBaseListFilesRequest();
|
|
214
|
+
message.pattern = object.pattern ?? "";
|
|
215
|
+
return message;
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
function createBaseListFilesResponse() {
|
|
219
|
+
return { baseDirectory: "", files: [] };
|
|
220
|
+
}
|
|
221
|
+
exports.ListFilesResponse = {
|
|
222
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
223
|
+
if (message.baseDirectory !== "") {
|
|
224
|
+
writer.uint32(10).string(message.baseDirectory);
|
|
225
|
+
}
|
|
226
|
+
for (const v of message.files) {
|
|
227
|
+
exports.FileInfo.encode(v, writer.uint32(18).fork()).join();
|
|
228
|
+
}
|
|
229
|
+
return writer;
|
|
230
|
+
},
|
|
231
|
+
decode(input, length) {
|
|
232
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
233
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
234
|
+
const message = createBaseListFilesResponse();
|
|
235
|
+
while (reader.pos < end) {
|
|
236
|
+
const tag = reader.uint32();
|
|
237
|
+
switch (tag >>> 3) {
|
|
238
|
+
case 1: {
|
|
239
|
+
if (tag !== 10) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
message.baseDirectory = reader.string();
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
case 2: {
|
|
246
|
+
if (tag !== 18) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
message.files.push(exports.FileInfo.decode(reader, reader.uint32()));
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
reader.skip(tag & 7);
|
|
257
|
+
}
|
|
258
|
+
return message;
|
|
259
|
+
},
|
|
260
|
+
fromJSON(object) {
|
|
261
|
+
return {
|
|
262
|
+
baseDirectory: isSet(object.baseDirectory) ? globalThis.String(object.baseDirectory) : "",
|
|
263
|
+
files: globalThis.Array.isArray(object?.files) ? object.files.map((e) => exports.FileInfo.fromJSON(e)) : [],
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
toJSON(message) {
|
|
267
|
+
const obj = {};
|
|
268
|
+
if (message.baseDirectory !== "") {
|
|
269
|
+
obj.baseDirectory = message.baseDirectory;
|
|
270
|
+
}
|
|
271
|
+
if (message.files?.length) {
|
|
272
|
+
obj.files = message.files.map((e) => exports.FileInfo.toJSON(e));
|
|
273
|
+
}
|
|
274
|
+
return obj;
|
|
275
|
+
},
|
|
276
|
+
create(base) {
|
|
277
|
+
return exports.ListFilesResponse.fromPartial(base ?? {});
|
|
278
|
+
},
|
|
279
|
+
fromPartial(object) {
|
|
280
|
+
const message = createBaseListFilesResponse();
|
|
281
|
+
message.baseDirectory = object.baseDirectory ?? "";
|
|
282
|
+
message.files = object.files?.map((e) => exports.FileInfo.fromPartial(e)) || [];
|
|
283
|
+
return message;
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
function createBaseLoadFileRequest() {
|
|
287
|
+
return { path: "" };
|
|
288
|
+
}
|
|
289
|
+
exports.LoadFileRequest = {
|
|
290
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
291
|
+
if (message.path !== "") {
|
|
292
|
+
writer.uint32(10).string(message.path);
|
|
293
|
+
}
|
|
294
|
+
return writer;
|
|
295
|
+
},
|
|
296
|
+
decode(input, length) {
|
|
297
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
298
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
299
|
+
const message = createBaseLoadFileRequest();
|
|
300
|
+
while (reader.pos < end) {
|
|
301
|
+
const tag = reader.uint32();
|
|
302
|
+
switch (tag >>> 3) {
|
|
303
|
+
case 1: {
|
|
304
|
+
if (tag !== 10) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.path = reader.string();
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
reader.skip(tag & 7);
|
|
315
|
+
}
|
|
316
|
+
return message;
|
|
317
|
+
},
|
|
318
|
+
fromJSON(object) {
|
|
319
|
+
return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
|
|
320
|
+
},
|
|
321
|
+
toJSON(message) {
|
|
322
|
+
const obj = {};
|
|
323
|
+
if (message.path !== "") {
|
|
324
|
+
obj.path = message.path;
|
|
325
|
+
}
|
|
326
|
+
return obj;
|
|
327
|
+
},
|
|
328
|
+
create(base) {
|
|
329
|
+
return exports.LoadFileRequest.fromPartial(base ?? {});
|
|
330
|
+
},
|
|
331
|
+
fromPartial(object) {
|
|
332
|
+
const message = createBaseLoadFileRequest();
|
|
333
|
+
message.path = object.path ?? "";
|
|
334
|
+
return message;
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
function createBaseSeekRequest() {
|
|
338
|
+
return { target: undefined };
|
|
339
|
+
}
|
|
340
|
+
exports.SeekRequest = {
|
|
341
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
342
|
+
if (message.target !== undefined) {
|
|
343
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.target), writer.uint32(10).fork()).join();
|
|
344
|
+
}
|
|
345
|
+
return writer;
|
|
346
|
+
},
|
|
347
|
+
decode(input, length) {
|
|
348
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
349
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
350
|
+
const message = createBaseSeekRequest();
|
|
351
|
+
while (reader.pos < end) {
|
|
352
|
+
const tag = reader.uint32();
|
|
353
|
+
switch (tag >>> 3) {
|
|
354
|
+
case 1: {
|
|
355
|
+
if (tag !== 10) {
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
message.target = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
reader.skip(tag & 7);
|
|
366
|
+
}
|
|
367
|
+
return message;
|
|
368
|
+
},
|
|
369
|
+
fromJSON(object) {
|
|
370
|
+
return { target: isSet(object.target) ? fromJsonTimestamp(object.target) : undefined };
|
|
371
|
+
},
|
|
372
|
+
toJSON(message) {
|
|
373
|
+
const obj = {};
|
|
374
|
+
if (message.target !== undefined) {
|
|
375
|
+
obj.target = message.target.toISOString();
|
|
376
|
+
}
|
|
377
|
+
return obj;
|
|
378
|
+
},
|
|
379
|
+
create(base) {
|
|
380
|
+
return exports.SeekRequest.fromPartial(base ?? {});
|
|
381
|
+
},
|
|
382
|
+
fromPartial(object) {
|
|
383
|
+
const message = createBaseSeekRequest();
|
|
384
|
+
message.target = object.target ?? undefined;
|
|
385
|
+
return message;
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
function createBaseSetSpeedRequest() {
|
|
389
|
+
return { speed: 0 };
|
|
390
|
+
}
|
|
391
|
+
exports.SetSpeedRequest = {
|
|
392
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
393
|
+
if (message.speed !== 0) {
|
|
394
|
+
writer.uint32(13).float(message.speed);
|
|
395
|
+
}
|
|
396
|
+
return writer;
|
|
397
|
+
},
|
|
398
|
+
decode(input, length) {
|
|
399
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
400
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
401
|
+
const message = createBaseSetSpeedRequest();
|
|
402
|
+
while (reader.pos < end) {
|
|
403
|
+
const tag = reader.uint32();
|
|
404
|
+
switch (tag >>> 3) {
|
|
405
|
+
case 1: {
|
|
406
|
+
if (tag !== 13) {
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
message.speed = reader.float();
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
reader.skip(tag & 7);
|
|
417
|
+
}
|
|
418
|
+
return message;
|
|
419
|
+
},
|
|
420
|
+
fromJSON(object) {
|
|
421
|
+
return { speed: isSet(object.speed) ? globalThis.Number(object.speed) : 0 };
|
|
422
|
+
},
|
|
423
|
+
toJSON(message) {
|
|
424
|
+
const obj = {};
|
|
425
|
+
if (message.speed !== 0) {
|
|
426
|
+
obj.speed = message.speed;
|
|
427
|
+
}
|
|
428
|
+
return obj;
|
|
429
|
+
},
|
|
430
|
+
create(base) {
|
|
431
|
+
return exports.SetSpeedRequest.fromPartial(base ?? {});
|
|
432
|
+
},
|
|
433
|
+
fromPartial(object) {
|
|
434
|
+
const message = createBaseSetSpeedRequest();
|
|
435
|
+
message.speed = object.speed ?? 0;
|
|
436
|
+
return message;
|
|
437
|
+
},
|
|
438
|
+
};
|
|
439
|
+
function createBaseSetLoopRequest() {
|
|
440
|
+
return { loop: false };
|
|
441
|
+
}
|
|
442
|
+
exports.SetLoopRequest = {
|
|
443
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
444
|
+
if (message.loop !== false) {
|
|
445
|
+
writer.uint32(8).bool(message.loop);
|
|
446
|
+
}
|
|
447
|
+
return writer;
|
|
448
|
+
},
|
|
449
|
+
decode(input, length) {
|
|
450
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
451
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
452
|
+
const message = createBaseSetLoopRequest();
|
|
453
|
+
while (reader.pos < end) {
|
|
454
|
+
const tag = reader.uint32();
|
|
455
|
+
switch (tag >>> 3) {
|
|
456
|
+
case 1: {
|
|
457
|
+
if (tag !== 8) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.loop = reader.bool();
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
reader.skip(tag & 7);
|
|
468
|
+
}
|
|
469
|
+
return message;
|
|
470
|
+
},
|
|
471
|
+
fromJSON(object) {
|
|
472
|
+
return { loop: isSet(object.loop) ? globalThis.Boolean(object.loop) : false };
|
|
473
|
+
},
|
|
474
|
+
toJSON(message) {
|
|
475
|
+
const obj = {};
|
|
476
|
+
if (message.loop !== false) {
|
|
477
|
+
obj.loop = message.loop;
|
|
478
|
+
}
|
|
479
|
+
return obj;
|
|
480
|
+
},
|
|
481
|
+
create(base) {
|
|
482
|
+
return exports.SetLoopRequest.fromPartial(base ?? {});
|
|
483
|
+
},
|
|
484
|
+
fromPartial(object) {
|
|
485
|
+
const message = createBaseSetLoopRequest();
|
|
486
|
+
message.loop = object.loop ?? false;
|
|
487
|
+
return message;
|
|
488
|
+
},
|
|
489
|
+
};
|
|
490
|
+
function createBaseReplaySuccessResponse() {
|
|
491
|
+
return {};
|
|
492
|
+
}
|
|
493
|
+
exports.ReplaySuccessResponse = {
|
|
494
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
495
|
+
return writer;
|
|
496
|
+
},
|
|
497
|
+
decode(input, length) {
|
|
498
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
499
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
500
|
+
const message = createBaseReplaySuccessResponse();
|
|
501
|
+
while (reader.pos < end) {
|
|
502
|
+
const tag = reader.uint32();
|
|
503
|
+
switch (tag >>> 3) {
|
|
504
|
+
}
|
|
505
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
reader.skip(tag & 7);
|
|
509
|
+
}
|
|
510
|
+
return message;
|
|
511
|
+
},
|
|
512
|
+
fromJSON(_) {
|
|
513
|
+
return {};
|
|
514
|
+
},
|
|
515
|
+
toJSON(_) {
|
|
516
|
+
const obj = {};
|
|
517
|
+
return obj;
|
|
518
|
+
},
|
|
519
|
+
create(base) {
|
|
520
|
+
return exports.ReplaySuccessResponse.fromPartial(base ?? {});
|
|
521
|
+
},
|
|
522
|
+
fromPartial(_) {
|
|
523
|
+
const message = createBaseReplaySuccessResponse();
|
|
524
|
+
return message;
|
|
525
|
+
},
|
|
526
|
+
};
|
|
527
|
+
exports.ReplayControlServiceName = "ReplayControl";
|
|
528
|
+
class ReplayControlClientImpl {
|
|
529
|
+
constructor(rpc, opts) {
|
|
530
|
+
this.service = opts?.service || exports.ReplayControlServiceName;
|
|
531
|
+
this.rpc = rpc;
|
|
532
|
+
this.list_files = this.list_files.bind(this);
|
|
533
|
+
this.load_file = this.load_file.bind(this);
|
|
534
|
+
this.play = this.play.bind(this);
|
|
535
|
+
this.pause = this.pause.bind(this);
|
|
536
|
+
this.stop = this.stop.bind(this);
|
|
537
|
+
this.seek = this.seek.bind(this);
|
|
538
|
+
this.set_speed = this.set_speed.bind(this);
|
|
539
|
+
this.set_loop = this.set_loop.bind(this);
|
|
540
|
+
}
|
|
541
|
+
list_files(request) {
|
|
542
|
+
const data = exports.ListFilesRequest.encode(request).finish();
|
|
543
|
+
const promise = this.rpc.request(this.service, "list_files", data);
|
|
544
|
+
return promise.then((data) => exports.ListFilesResponse.decode(new wire_1.BinaryReader(data)));
|
|
545
|
+
}
|
|
546
|
+
load_file(request) {
|
|
547
|
+
const data = exports.LoadFileRequest.encode(request).finish();
|
|
548
|
+
const promise = this.rpc.request(this.service, "load_file", data);
|
|
549
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
550
|
+
}
|
|
551
|
+
play(request) {
|
|
552
|
+
const data = empty_1.Empty.encode(request).finish();
|
|
553
|
+
const promise = this.rpc.request(this.service, "play", data);
|
|
554
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
555
|
+
}
|
|
556
|
+
pause(request) {
|
|
557
|
+
const data = empty_1.Empty.encode(request).finish();
|
|
558
|
+
const promise = this.rpc.request(this.service, "pause", data);
|
|
559
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
560
|
+
}
|
|
561
|
+
stop(request) {
|
|
562
|
+
const data = empty_1.Empty.encode(request).finish();
|
|
563
|
+
const promise = this.rpc.request(this.service, "stop", data);
|
|
564
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
565
|
+
}
|
|
566
|
+
seek(request) {
|
|
567
|
+
const data = exports.SeekRequest.encode(request).finish();
|
|
568
|
+
const promise = this.rpc.request(this.service, "seek", data);
|
|
569
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
570
|
+
}
|
|
571
|
+
set_speed(request) {
|
|
572
|
+
const data = exports.SetSpeedRequest.encode(request).finish();
|
|
573
|
+
const promise = this.rpc.request(this.service, "set_speed", data);
|
|
574
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
575
|
+
}
|
|
576
|
+
set_loop(request) {
|
|
577
|
+
const data = exports.SetLoopRequest.encode(request).finish();
|
|
578
|
+
const promise = this.rpc.request(this.service, "set_loop", data);
|
|
579
|
+
return promise.then((data) => exports.ReplaySuccessResponse.decode(new wire_1.BinaryReader(data)));
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
exports.ReplayControlClientImpl = ReplayControlClientImpl;
|
|
583
|
+
function toTimestamp(date) {
|
|
584
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
585
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
586
|
+
return { seconds, nanos };
|
|
587
|
+
}
|
|
588
|
+
function fromTimestamp(t) {
|
|
589
|
+
let millis = (t.seconds || 0) * 1000;
|
|
590
|
+
millis += (t.nanos || 0) / 1000000;
|
|
591
|
+
return new globalThis.Date(millis);
|
|
592
|
+
}
|
|
593
|
+
function fromJsonTimestamp(o) {
|
|
594
|
+
if (o instanceof globalThis.Date) {
|
|
595
|
+
return o;
|
|
596
|
+
}
|
|
597
|
+
else if (typeof o === "string") {
|
|
598
|
+
return new globalThis.Date(o);
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function longToNumber(int64) {
|
|
605
|
+
const num = globalThis.Number(int64.toString());
|
|
606
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
607
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
608
|
+
}
|
|
609
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
610
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
611
|
+
}
|
|
612
|
+
return num;
|
|
613
|
+
}
|
|
614
|
+
function isSet(value) {
|
|
615
|
+
return value !== null && value !== undefined;
|
|
616
|
+
}
|
|
@@ -52,6 +52,16 @@ export interface TimestampedQuaternion {
|
|
|
52
52
|
/** Quaternion is defined in foxglove/Quaternion.proto */
|
|
53
53
|
value: Quaternion | undefined;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Anchors a scalar value to an end-of-interval timestamp plus the interval duration.
|
|
57
|
+
* Use for windowed aggregates such as max wind speed over a 10-minute window.
|
|
58
|
+
*/
|
|
59
|
+
export interface TimestampedFloatPeriod {
|
|
60
|
+
$type: "keelson.TimestampedFloatPeriod";
|
|
61
|
+
timestamp: Date | undefined;
|
|
62
|
+
value: number;
|
|
63
|
+
period: Duration | undefined;
|
|
64
|
+
}
|
|
55
65
|
export declare const TimestampedBytes: MessageFns<TimestampedBytes, "keelson.TimestampedBytes">;
|
|
56
66
|
export declare const TimestampedDouble: MessageFns<TimestampedDouble, "keelson.TimestampedDouble">;
|
|
57
67
|
export declare const TimestampedFloat: MessageFns<TimestampedFloat, "keelson.TimestampedFloat">;
|
|
@@ -62,6 +72,7 @@ export declare const TimestampedBool: MessageFns<TimestampedBool, "keelson.Times
|
|
|
62
72
|
export declare const TimestampedDuration: MessageFns<TimestampedDuration, "keelson.TimestampedDuration">;
|
|
63
73
|
export declare const TimestampedTimestamp: MessageFns<TimestampedTimestamp, "keelson.TimestampedTimestamp">;
|
|
64
74
|
export declare const TimestampedQuaternion: MessageFns<TimestampedQuaternion, "keelson.TimestampedQuaternion">;
|
|
75
|
+
export declare const TimestampedFloatPeriod: MessageFns<TimestampedFloatPeriod, "keelson.TimestampedFloatPeriod">;
|
|
65
76
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
66
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 {} ? {
|
|
67
78
|
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|