exceeddata-sdk-vdata 2.10.5-1 → 2.10.5-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.
- package/dist/blf-2.10.0.mini.js +17 -17
- package/dist/index.js +3 -3
- package/dist/vdata-2.10.0.mini.js +20 -20
- package/package.json +1 -1
- package/test/converter_test.js +66 -66
- package/test/sdk_test.js +82 -82
- package/types/blf-2.10.0.d.ts +8 -8
- package/types/index.d.ts +2 -2
- package/types/vdata-2.10.0.d.ts +575 -546
package/types/vdata-2.10.0.d.ts
CHANGED
|
@@ -1,546 +1,575 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A seekable reader class for wrapping around byte array when data file has already been
|
|
3
|
-
read into byte array.
|
|
4
|
-
*/
|
|
5
|
-
export class VDataByteReader {
|
|
6
|
-
/**
|
|
7
|
-
* The constructor for seekable byte array reader.
|
|
8
|
-
*
|
|
9
|
-
* @param {Uint8Array} _uint8array byte array
|
|
10
|
-
*/
|
|
11
|
-
constructor(_uint8array: Uint8Array);
|
|
12
|
-
_data: Uint8Array<
|
|
13
|
-
_length: number;
|
|
14
|
-
_pos: number;
|
|
15
|
-
/**
|
|
16
|
-
* Read bytes by the specified length.
|
|
17
|
-
*
|
|
18
|
-
* @param {number} length
|
|
19
|
-
* @returns {Uint8Array}
|
|
20
|
-
*/
|
|
21
|
-
read(length: number): Uint8Array;
|
|
22
|
-
/**
|
|
23
|
-
* Seek to the target position. If the target position is less than or equals to zero,
|
|
24
|
-
* seek to the zero position. If the target position is more than the length of the
|
|
25
|
-
* underlying byte array, seek to the end of the byte array.
|
|
26
|
-
*
|
|
27
|
-
* @param {number} pos the target position
|
|
28
|
-
*/
|
|
29
|
-
seek(pos: number): void;
|
|
30
|
-
/**
|
|
31
|
-
* Skip the specified length. If the ending position is more than the length of the
|
|
32
|
-
* underlying byte array, skip to the end of the byte array.
|
|
33
|
-
*
|
|
34
|
-
* @param {number} length the length to skip
|
|
35
|
-
*/
|
|
36
|
-
skip(length: number): void;
|
|
37
|
-
/**
|
|
38
|
-
* Close the reader.
|
|
39
|
-
*/
|
|
40
|
-
close(): void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* A class to read to read and decode data according to format specification.
|
|
44
|
-
*
|
|
45
|
-
* Examples:
|
|
46
|
-
* let reader = factory.open();
|
|
47
|
-
* let frame = reader.df();
|
|
48
|
-
*/
|
|
49
|
-
export class VDataReader {
|
|
50
|
-
static readInt8(_bytes: any): number;
|
|
51
|
-
static readUint16(_bytes: any): number;
|
|
52
|
-
static readInt32(_bytes: any): number;
|
|
53
|
-
static
|
|
54
|
-
static
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* @param {
|
|
67
|
-
* @param {
|
|
68
|
-
* @param {boolean} [
|
|
69
|
-
* @param {
|
|
70
|
-
* @param {number} [
|
|
71
|
-
* @param {
|
|
72
|
-
* @param {
|
|
73
|
-
* @param {string} [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* let
|
|
97
|
-
* factory
|
|
98
|
-
* factory.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* @returns {
|
|
249
|
-
*/
|
|
250
|
-
getColumnExpandMode():
|
|
251
|
-
/**
|
|
252
|
-
* Set the column expand mode for expanding complex type.
|
|
253
|
-
*
|
|
254
|
-
* @param {number} mode the expand mode
|
|
255
|
-
*/
|
|
256
|
-
setColumnExpandMode(mode: number): void;
|
|
257
|
-
/**
|
|
258
|
-
*
|
|
259
|
-
* values at the same time.
|
|
260
|
-
*
|
|
261
|
-
* @
|
|
262
|
-
*/
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
* the
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* @
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
*
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* The first item of each row is time, followed by values.
|
|
347
|
-
*
|
|
348
|
-
* @
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
*
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
* data
|
|
439
|
-
*
|
|
440
|
-
* @returns {
|
|
441
|
-
*/
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Get the
|
|
445
|
-
*
|
|
446
|
-
* @returns {number}
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* Get the
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A seekable reader class for wrapping around byte array when data file has already been
|
|
3
|
+
read into byte array.
|
|
4
|
+
*/
|
|
5
|
+
export class VDataByteReader {
|
|
6
|
+
/**
|
|
7
|
+
* The constructor for seekable byte array reader.
|
|
8
|
+
*
|
|
9
|
+
* @param {Uint8Array} _uint8array byte array
|
|
10
|
+
*/
|
|
11
|
+
constructor(_uint8array: Uint8Array);
|
|
12
|
+
_data: Uint8Array<ArrayBufferLike>;
|
|
13
|
+
_length: number;
|
|
14
|
+
_pos: number;
|
|
15
|
+
/**
|
|
16
|
+
* Read bytes by the specified length.
|
|
17
|
+
*
|
|
18
|
+
* @param {number} length
|
|
19
|
+
* @returns {Uint8Array}
|
|
20
|
+
*/
|
|
21
|
+
read(length: number): Uint8Array;
|
|
22
|
+
/**
|
|
23
|
+
* Seek to the target position. If the target position is less than or equals to zero,
|
|
24
|
+
* seek to the zero position. If the target position is more than the length of the
|
|
25
|
+
* underlying byte array, seek to the end of the byte array.
|
|
26
|
+
*
|
|
27
|
+
* @param {number} pos the target position
|
|
28
|
+
*/
|
|
29
|
+
seek(pos: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* Skip the specified length. If the ending position is more than the length of the
|
|
32
|
+
* underlying byte array, skip to the end of the byte array.
|
|
33
|
+
*
|
|
34
|
+
* @param {number} length the length to skip
|
|
35
|
+
*/
|
|
36
|
+
skip(length: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Close the reader.
|
|
39
|
+
*/
|
|
40
|
+
close(): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A class to read to read and decode data according to format specification.
|
|
44
|
+
*
|
|
45
|
+
* Examples:
|
|
46
|
+
* let reader = factory.open();
|
|
47
|
+
* let frame = reader.df();
|
|
48
|
+
*/
|
|
49
|
+
export class VDataReader {
|
|
50
|
+
static readInt8(_bytes: any): number;
|
|
51
|
+
static readUint16(_bytes: any): number;
|
|
52
|
+
static readInt32(_bytes: any): number;
|
|
53
|
+
static readUInt32(_bytes: any): number;
|
|
54
|
+
static readLong(_bytes: any): number;
|
|
55
|
+
static readInt64(_bytes: any): bigint;
|
|
56
|
+
/**
|
|
57
|
+
* Static method to read the metadata info from a seekable reader.
|
|
58
|
+
*
|
|
59
|
+
* @param {VDataByteReader} _reader the byte reader
|
|
60
|
+
* @returns {VDataMeta}
|
|
61
|
+
*/
|
|
62
|
+
static getMeta(_reader: VDataByteReader): VDataMeta;
|
|
63
|
+
/**
|
|
64
|
+
* The constructor for data reader. Deprecated since 2.7.1. Use VDataReaderFactory instead.
|
|
65
|
+
*
|
|
66
|
+
* @param {VDataByteReader[]} readers seekable byte readers
|
|
67
|
+
* @param {string|string[]|Set<string>} [signals=null] provide a selected list of signals instead of all signals
|
|
68
|
+
* @param {boolean} [insensitiveCase=false] whether to ignore case sensitivity\
|
|
69
|
+
* @param {boolean} [queryFilter=true] whether to apply query range filter
|
|
70
|
+
* @param {number} [queryStartTime=0] the start time of the query filter (inclusive)
|
|
71
|
+
* @param {number} [queryEndTime=0] the end time of the query filter (inclusive)
|
|
72
|
+
* @param {boolean} [readLivingData=true] whether to read living (non-finalized) bucket
|
|
73
|
+
* @param {string|number} [columnExpandMode=null] the column expand mode
|
|
74
|
+
* @param {string} [signalQueueMode=null] the signal queue mode
|
|
75
|
+
*/
|
|
76
|
+
constructor(readers: VDataByteReader[], signals?: string | string[] | Set<string>, insensitiveCase?: boolean, queryFilter?: boolean, queryStartTime?: number, queryEndTime?: number, readLivingData?: boolean, columnExpandMode?: string | number, signalQueueMode?: string, signalDecoders?: any);
|
|
77
|
+
_readers: VDataByteReader[];
|
|
78
|
+
_columnExpandMode: number;
|
|
79
|
+
_signalQueueMode: string;
|
|
80
|
+
_frame: VDataFrame;
|
|
81
|
+
_decoders: any[];
|
|
82
|
+
_livingDataBuffer: number;
|
|
83
|
+
_signalDecoders: any;
|
|
84
|
+
filterSignals(signals: any): VDataSignalFilter;
|
|
85
|
+
/**
|
|
86
|
+
* Get the data frame.
|
|
87
|
+
*
|
|
88
|
+
* @returns {VDataFrame}
|
|
89
|
+
*/
|
|
90
|
+
df(): VDataFrame;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A factory class for building VDataReader.
|
|
94
|
+
*
|
|
95
|
+
* Examples:
|
|
96
|
+
* let uint8arry = new VDataByteReader(new Uint8Array(e.target.result)); //file upload
|
|
97
|
+
* let factory = new VDataReaderFactory();
|
|
98
|
+
* factory.setDataReaders(uint8arry);
|
|
99
|
+
* factory.setSignals(signals);
|
|
100
|
+
*
|
|
101
|
+
* let reader = factory.open();
|
|
102
|
+
*/
|
|
103
|
+
export class VDataReaderFactory {
|
|
104
|
+
_readers: VDataByteReader[];
|
|
105
|
+
_signals: string;
|
|
106
|
+
_insensitiveCase: boolean;
|
|
107
|
+
_readLivingData: boolean;
|
|
108
|
+
_queryFilter: boolean;
|
|
109
|
+
_queryStartTime: number;
|
|
110
|
+
_queryEndTime: number;
|
|
111
|
+
_columnExpandMode: any;
|
|
112
|
+
_signalQueueMode: string;
|
|
113
|
+
_signalDecoders: {
|
|
114
|
+
[x: string]: VDataSignalDecoder;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Set a list of binary readers to vdata file contents.
|
|
118
|
+
*
|
|
119
|
+
* @param {VDataByteReader[]} readers array of byte readers
|
|
120
|
+
*/
|
|
121
|
+
setDataReaders(readers: VDataByteReader[]): void;
|
|
122
|
+
/**
|
|
123
|
+
* Set the list of signals to select from data contents.
|
|
124
|
+
*
|
|
125
|
+
* @param {string} signals comma-separated string of signal names or prefixes
|
|
126
|
+
*/
|
|
127
|
+
setSignals(signals: string): void;
|
|
128
|
+
/**
|
|
129
|
+
* Set whether to read signal names as case insensitive. If true, it will read the names as lower-case;
|
|
130
|
+
* if false, it will read signal names as recorded in vdata. Default is false.
|
|
131
|
+
*
|
|
132
|
+
* @param {boolean} insensitiveCase true or false
|
|
133
|
+
*/
|
|
134
|
+
setInsensitiveCase(insensitiveCase: boolean): void;
|
|
135
|
+
/**
|
|
136
|
+
* Set whether to read vdata's living (not finalized) buckets. Default is true.
|
|
137
|
+
*
|
|
138
|
+
* @param {boolean} readLiving true or false
|
|
139
|
+
*/
|
|
140
|
+
setReadLivingData(readLiving: boolean): void;
|
|
141
|
+
/**
|
|
142
|
+
* Set whether to apply query start-end time filter to data contents (including custom start-end
|
|
143
|
+
* time and query start-time settings inside data files). Default is true.
|
|
144
|
+
*
|
|
145
|
+
* @param {boolean} filter true or false
|
|
146
|
+
*/
|
|
147
|
+
setQueryFilter(filter: boolean): void;
|
|
148
|
+
/**
|
|
149
|
+
* Set whether to apply a custom query start time (inclusive) to data contents. This setting is on
|
|
150
|
+
* only if queryFilter is true and this value is non-zero. If on, only signal values with time equal
|
|
151
|
+
* to or later than this start time will be output. Default is 0.
|
|
152
|
+
*
|
|
153
|
+
* @param {number} time millisecond since EPOCH
|
|
154
|
+
*/
|
|
155
|
+
setQueryStartTime(time: number): void;
|
|
156
|
+
/**
|
|
157
|
+
* Set whether to apply a custom query end time (inclusive) to data contents. This setting is on
|
|
158
|
+
* only if queryFilter is true and this value is non-zero. If on, only signal values with time equal
|
|
159
|
+
* to or earlier than this end time will be output. Default is 0.
|
|
160
|
+
*
|
|
161
|
+
* @param {number} time millisecond since EPOCH
|
|
162
|
+
*/
|
|
163
|
+
setQueryEndTime(time: number): void;
|
|
164
|
+
/**
|
|
165
|
+
* Set the column expand mode for expanding sub-items of complex type signals (array/struct) to individual
|
|
166
|
+
* signals. Supported values are 'none', 'flat', 'full'.
|
|
167
|
+
*
|
|
168
|
+
* 'none' means the complex type signal will be output as array and will not expand to individual sub-items,
|
|
169
|
+
* 'flat' means the complex type signal will be expanded to individual sub-items and each sub-item's defined
|
|
170
|
+
* name will be used, 'full' means the complex type signal will be expanded to individual sub-items but the
|
|
171
|
+
* sub-items will use a qualified naming 'signal_name.sub_name'.
|
|
172
|
+
*
|
|
173
|
+
* @param {*} mode the column expand mode
|
|
174
|
+
*/
|
|
175
|
+
setColumnExpandMode(mode: any): void;
|
|
176
|
+
/**
|
|
177
|
+
* Set the queue mode for value triage when there are mutiple values at same time. Supported values are
|
|
178
|
+
* 'last', 'first', 'all'.
|
|
179
|
+
*
|
|
180
|
+
* 'last' means the last-read value is used, 'first' means the first-read value is used, and 'all' means for
|
|
181
|
+
* each value read a new row will be generated thereby maintaining all read values in the output.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} mode the signal queue mode
|
|
184
|
+
*/
|
|
185
|
+
setSignalQueueMode(mode: string): void;
|
|
186
|
+
/**
|
|
187
|
+
* Set the customer Decoder for blob signals map.
|
|
188
|
+
* @param {Object<string, VDataSignalDecoder>} signalDecoders name to SignalDecoderImplementaion instance for blob
|
|
189
|
+
*/
|
|
190
|
+
setSignalDeocders(signalDecoders: {
|
|
191
|
+
[x: string]: VDataSignalDecoder;
|
|
192
|
+
}): void;
|
|
193
|
+
/**
|
|
194
|
+
* Create the data reader.
|
|
195
|
+
*
|
|
196
|
+
* @returns {VDataReader}
|
|
197
|
+
*/
|
|
198
|
+
open(): VDataReader;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* A class for two-dimensional tabular data frame that holds signal time-values.
|
|
202
|
+
* Column names can be accessed via method cols(), and signal time-values can be
|
|
203
|
+
* accessed through methods values(), objects(), sampling(), object1s depending
|
|
204
|
+
* on the usage scenario.
|
|
205
|
+
*
|
|
206
|
+
* Examples:
|
|
207
|
+
* let reader = factory.open();
|
|
208
|
+
* let frame = reader.df();
|
|
209
|
+
* let cols = frame.cols(true);
|
|
210
|
+
* let values = frame.objects();
|
|
211
|
+
*/
|
|
212
|
+
export class VDataFrame {
|
|
213
|
+
/**
|
|
214
|
+
* The constructor for the data frame. It is called via VDataReader.
|
|
215
|
+
*
|
|
216
|
+
* @param {VDataBucket[]} buckets the list of buckets
|
|
217
|
+
* @param {Object<string, VDataSeries>} series the map of signal series
|
|
218
|
+
* @param {VDataSignalFilter} [signalFilter=null] the signal filter
|
|
219
|
+
* @param {string|number} [columnExpandMode=null] the column expand mode
|
|
220
|
+
* @param {string} [signalQueueMode=null] the signal queue mode
|
|
221
|
+
*/
|
|
222
|
+
constructor(buckets: VDataBucket[], series: {
|
|
223
|
+
[x: string]: VDataSeries;
|
|
224
|
+
}, signalFilter?: VDataSignalFilter, columnExpandMode?: string | number, signalQueueMode?: string);
|
|
225
|
+
_signalFilter: VDataSignalFilter;
|
|
226
|
+
_columnExpandMode: number;
|
|
227
|
+
_qualifiedExpandName: boolean;
|
|
228
|
+
_signalQueueMode: string;
|
|
229
|
+
_startTime: number;
|
|
230
|
+
_endTime: number;
|
|
231
|
+
_buckets: VDataBucket[];
|
|
232
|
+
_series: {};
|
|
233
|
+
/**
|
|
234
|
+
* Get the signal filter.
|
|
235
|
+
*
|
|
236
|
+
* @returns {VDataSignalFilter}
|
|
237
|
+
*/
|
|
238
|
+
getSignalFilter(): VDataSignalFilter;
|
|
239
|
+
/**
|
|
240
|
+
* Set the signal filter.
|
|
241
|
+
*
|
|
242
|
+
* @param {VDataSignalFilter} signalFilter the filter
|
|
243
|
+
*/
|
|
244
|
+
setSignalFilter(signalFilter: VDataSignalFilter): void;
|
|
245
|
+
/**
|
|
246
|
+
* Get the column expand mode for expanding complex type.
|
|
247
|
+
*
|
|
248
|
+
* @returns {number}
|
|
249
|
+
*/
|
|
250
|
+
getColumnExpandMode(): number;
|
|
251
|
+
/**
|
|
252
|
+
* Set the column expand mode for expanding complex type.
|
|
253
|
+
*
|
|
254
|
+
* @param {number} mode the expand mode
|
|
255
|
+
*/
|
|
256
|
+
setColumnExpandMode(mode: number): void;
|
|
257
|
+
/**
|
|
258
|
+
* Get the signal queue mode for value triage when there are multiple
|
|
259
|
+
* values at the same time.
|
|
260
|
+
*
|
|
261
|
+
* @returns {string}
|
|
262
|
+
*/
|
|
263
|
+
getSignalQueueMode(): string;
|
|
264
|
+
/**
|
|
265
|
+
* Set the signal queue mode for value triage when there are multiple
|
|
266
|
+
* values at the same time.
|
|
267
|
+
*
|
|
268
|
+
* @param {string} mode the queue mode
|
|
269
|
+
*/
|
|
270
|
+
setSignalQueueMode(mode: string): void;
|
|
271
|
+
/**
|
|
272
|
+
* Get the earliest time of signals in the frame. Note that this time may be
|
|
273
|
+
* the evenly-split start time of the first bucket and slightly different
|
|
274
|
+
* from the actual first signal time.
|
|
275
|
+
*
|
|
276
|
+
* @returns {number} millisecond since EPOCH
|
|
277
|
+
*/
|
|
278
|
+
getStartTime(): number;
|
|
279
|
+
/**
|
|
280
|
+
* Set the start time of the frame.
|
|
281
|
+
*
|
|
282
|
+
* @param {number} time millisecond since EPOCH
|
|
283
|
+
*/
|
|
284
|
+
setStartTime(time: number): void;
|
|
285
|
+
/**
|
|
286
|
+
* Get the last time of signals in the frame. Note that this time may be
|
|
287
|
+
* the evenly-split end time of the last bucket and slightly different
|
|
288
|
+
* from the actual last signal time.
|
|
289
|
+
*
|
|
290
|
+
* @returns {number} millisecond since EPOCH
|
|
291
|
+
*/
|
|
292
|
+
getEndTime(): number;
|
|
293
|
+
/**
|
|
294
|
+
* Set the end time of the frame.
|
|
295
|
+
*
|
|
296
|
+
* @param {number} time millisecond since EPOCH
|
|
297
|
+
*/
|
|
298
|
+
setEndTime(time: number): void;
|
|
299
|
+
/**
|
|
300
|
+
* Get a list of column names. The order of the column names is same as order
|
|
301
|
+
* of signal values in each row. To include the time column at first index set
|
|
302
|
+
* the includeTime parameter to true.
|
|
303
|
+
*
|
|
304
|
+
* @param {boolean} [includeTime=false] whether to include time column at first index
|
|
305
|
+
* @returns {string[]} array of column names
|
|
306
|
+
*/
|
|
307
|
+
cols(includeTime?: boolean): string[];
|
|
308
|
+
/**
|
|
309
|
+
* Get a map of all selected signal series.
|
|
310
|
+
*
|
|
311
|
+
* @returns {Object<string, VDataSeries>} map of series by their names
|
|
312
|
+
*/
|
|
313
|
+
series(): {
|
|
314
|
+
[x: string]: VDataSeries;
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* Get a sorted 2-d array (row-columns) of time and all data values. The values are
|
|
318
|
+
* read via a iterator-like processing which is more memory-efficient but consumes
|
|
319
|
+
* more CPU. Therefore, this method is suitable for reading data files larger than 10MB.
|
|
320
|
+
*
|
|
321
|
+
* The first item of each row is time, followed by values.
|
|
322
|
+
*
|
|
323
|
+
* @param {*} [densifyRowsAhead=0] number of rows to look ahead to fill sparse data
|
|
324
|
+
* @param {*} [densifyOutputItv=0] millis interval to down-sample data
|
|
325
|
+
* @param {*} [signalQueueRows=0] number of rows to hold in queue for sorting
|
|
326
|
+
* @returns {Object[]}
|
|
327
|
+
*/
|
|
328
|
+
values(densifyRowsAhead?: any, densifyOutputItv?: any, signalQueueRows?: any): any[];
|
|
329
|
+
put(values: any, poll: any): void;
|
|
330
|
+
tut(templateable: any, values: any, poll: any): void;
|
|
331
|
+
/**
|
|
332
|
+
* Get a sorted 2-d array (row-columns) of time and all data values. The values are
|
|
333
|
+
* read all into memory and avoid sorting. It is CPU-efficient but consumes more memory.
|
|
334
|
+
* Therefore, this method is suitable for reading data files smaller than 10MB.
|
|
335
|
+
*
|
|
336
|
+
* The first item of each row is time, followed by values.
|
|
337
|
+
*
|
|
338
|
+
* @param {*} [densifyRowsAhead=0] number of rows to look ahead to fill sparse data
|
|
339
|
+
* @param {*} [densifyOutputItv=0] millis interval to down-sample data
|
|
340
|
+
* @returns {Object[]}
|
|
341
|
+
*/
|
|
342
|
+
objects(densifyRowsAhead?: any, densifyOutputItv?: any): any[];
|
|
343
|
+
/**
|
|
344
|
+
* Return a sorted 2-d array (row-columns) of all data objects at the sampled 1-Hz interval.
|
|
345
|
+
*
|
|
346
|
+
* The first item of each row is time, followed by values.
|
|
347
|
+
*
|
|
348
|
+
* @returns {Object[]}
|
|
349
|
+
*/
|
|
350
|
+
object1s(): any[];
|
|
351
|
+
/**
|
|
352
|
+
* Return a sorted 2-d array (row-columns) of all data objects sampled down to the specified
|
|
353
|
+
* frequency in milliseconds. For example, 1-Hz equals a frequency of 1000 (ms).
|
|
354
|
+
*
|
|
355
|
+
* The first item of each row is time, followed by values.
|
|
356
|
+
*
|
|
357
|
+
* @param {number} frequency the sampled frequency with value greater than 1
|
|
358
|
+
* @returns {Object[]}
|
|
359
|
+
*/
|
|
360
|
+
sampling(frequency: number): any[];
|
|
361
|
+
cutoffInterval(time: any, interval: any): any;
|
|
362
|
+
get [Symbol.toStringTag](): string[];
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* A class for the metadata info of data files.
|
|
366
|
+
*/
|
|
367
|
+
export class VDataMeta {
|
|
368
|
+
/**
|
|
369
|
+
* The constructor for the meta info. For valid values see VData format specification.
|
|
370
|
+
*
|
|
371
|
+
* @param {number} formatVersion format version
|
|
372
|
+
* @param {number} compressMethod compress method
|
|
373
|
+
* @param {number} encryptMethod compress method
|
|
374
|
+
* @param {number} blocksCount count of bucket blocks in the data
|
|
375
|
+
* @param {number} storageStartTime earliest time in the data
|
|
376
|
+
* @param {number} storageEndTime last time in the data
|
|
377
|
+
* @param {number} queryStartTime start time filter (inclusive) if the data is generated from an algorithm trigger
|
|
378
|
+
* @param {number} queryEndTime end time filter (inclusive) if the data is generated from an algorithm trigger
|
|
379
|
+
* @param {Uint8Array} extendedInfo extended info whereby implementation may add project-customized information
|
|
380
|
+
* @param {number} pageSizeCode code for page size
|
|
381
|
+
* @param {number} keyTypeCode the code for key type
|
|
382
|
+
* @param {number} flag the flag code
|
|
383
|
+
*/
|
|
384
|
+
constructor(formatVersion?: number, compressMethod?: number, encryptMethod?: number, blocksCount?: number, storageStartTime?: number, storageEndTime?: number, queryStartTime?: number, queryEndTime?: number, extendedInfo?: Uint8Array, pageSizeCode?: number, keyTypeCode?: number, flag?: number);
|
|
385
|
+
_formatVersion: number;
|
|
386
|
+
_compressMethod: number;
|
|
387
|
+
_encryptMethod: number;
|
|
388
|
+
_blocksCount: number;
|
|
389
|
+
_storageStartTime: number;
|
|
390
|
+
_storageEndTime: number;
|
|
391
|
+
_queryStartTime: number;
|
|
392
|
+
_queryEndTime: number;
|
|
393
|
+
_extendedInfo: Uint8Array<ArrayBufferLike>;
|
|
394
|
+
_pageSizeCode: number;
|
|
395
|
+
_keyTypeCode: number;
|
|
396
|
+
_flag: number;
|
|
397
|
+
/**
|
|
398
|
+
* Get the data's format version.
|
|
399
|
+
*
|
|
400
|
+
* @returns {number}
|
|
401
|
+
*/
|
|
402
|
+
formatVersion(): number;
|
|
403
|
+
/**
|
|
404
|
+
* Get the data's compress method.
|
|
405
|
+
*
|
|
406
|
+
* @returns {number}
|
|
407
|
+
*/
|
|
408
|
+
compressMethod(): number;
|
|
409
|
+
/**
|
|
410
|
+
* Get the data's encryption method.
|
|
411
|
+
*
|
|
412
|
+
* @returns {number}
|
|
413
|
+
*/
|
|
414
|
+
encryptMethod(): number;
|
|
415
|
+
/**
|
|
416
|
+
* Get the count of bucket blocks in data.
|
|
417
|
+
*
|
|
418
|
+
* @returns {number}
|
|
419
|
+
*/
|
|
420
|
+
blocksCount(): number;
|
|
421
|
+
/**
|
|
422
|
+
* Get the data's earliest signal time (millisecond) in data. Note that this time
|
|
423
|
+
* may be the evenly-split starting time of the first bucket and slightly
|
|
424
|
+
* different from the actual first signal time.
|
|
425
|
+
*
|
|
426
|
+
* @returns {number} millisecond since EPOCH
|
|
427
|
+
*/
|
|
428
|
+
storageStartTime(): number;
|
|
429
|
+
/**
|
|
430
|
+
* Get the data's last signal time (millisecond) in data. Note that this time
|
|
431
|
+
* may be the evenly-split ending time of the last bucket. Also in living bucket
|
|
432
|
+
* this time may be slightly different from the actual last signal time.
|
|
433
|
+
*
|
|
434
|
+
* @returns {number} millisecond since EPOCH
|
|
435
|
+
*/
|
|
436
|
+
storageEndTime(): number;
|
|
437
|
+
/**
|
|
438
|
+
* Get the query start time if the data is generated through an algorithm trigger.
|
|
439
|
+
*
|
|
440
|
+
* @returns {number} millisecond since EPOCH
|
|
441
|
+
*/
|
|
442
|
+
queryStartTime(): number;
|
|
443
|
+
/**
|
|
444
|
+
* Get the query end time if the data is generated through an algorithm trigger.
|
|
445
|
+
*
|
|
446
|
+
* @returns {number} millisecond since EPOCH
|
|
447
|
+
*/
|
|
448
|
+
queryEndTime(): number;
|
|
449
|
+
/**
|
|
450
|
+
* Get the extended info. Custom-implementation may add contents into this part of
|
|
451
|
+
* data buffer.
|
|
452
|
+
*
|
|
453
|
+
* @returns {Uint8Array}
|
|
454
|
+
*/
|
|
455
|
+
extendedInfo(): Uint8Array;
|
|
456
|
+
/**
|
|
457
|
+
* Get the page size .
|
|
458
|
+
*
|
|
459
|
+
* @returns {number} page size in bytes
|
|
460
|
+
*/
|
|
461
|
+
pageSize(): number;
|
|
462
|
+
/**
|
|
463
|
+
* Get the storage id length .
|
|
464
|
+
*
|
|
465
|
+
* @returns {number} storage id size in bytes
|
|
466
|
+
*/
|
|
467
|
+
storageIdLength(): number;
|
|
468
|
+
/**
|
|
469
|
+
* Get the first timestamp length in bits.
|
|
470
|
+
*
|
|
471
|
+
* @returns {number} first timestamp length in bits
|
|
472
|
+
*/
|
|
473
|
+
seriesTimestampLength(): number;
|
|
474
|
+
}
|
|
475
|
+
export namespace DExpand {
|
|
476
|
+
let NONE: number;
|
|
477
|
+
let FLAT: number;
|
|
478
|
+
let FULL: number;
|
|
479
|
+
}
|
|
480
|
+
export class VDataSignalDecoder {
|
|
481
|
+
decode(data: any): any;
|
|
482
|
+
getSubNames(): string;
|
|
483
|
+
getSubValues(object: any): any;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* A class for filter conditions on the signal names.
|
|
487
|
+
*/
|
|
488
|
+
declare class VDataSignalFilter {
|
|
489
|
+
_signals: Set<any>;
|
|
490
|
+
_prefixes: Set<any>;
|
|
491
|
+
_signal_names: any[];
|
|
492
|
+
/**
|
|
493
|
+
* Get the set of signal names to filter on.
|
|
494
|
+
*
|
|
495
|
+
* @returns {Set.<string>}
|
|
496
|
+
*/
|
|
497
|
+
getSignals(): Set<string>;
|
|
498
|
+
/**
|
|
499
|
+
* Set the list of signal names to filter on.
|
|
500
|
+
*
|
|
501
|
+
* @param {string[]} signals signal names
|
|
502
|
+
*/
|
|
503
|
+
setSignals(signals: string[]): void;
|
|
504
|
+
/**
|
|
505
|
+
* Get the set of signal prefixes to match on.
|
|
506
|
+
*
|
|
507
|
+
* @returns Set.<string>
|
|
508
|
+
*/
|
|
509
|
+
getPrefixes(): Set<any>;
|
|
510
|
+
/**
|
|
511
|
+
* Set the list of signal prefixes to match on.
|
|
512
|
+
*
|
|
513
|
+
* @param {string[]} prefixes signal prefixes
|
|
514
|
+
*/
|
|
515
|
+
setPrefixes(prefixes: string[]): void;
|
|
516
|
+
/**
|
|
517
|
+
* Get an ordered list of signal names that is same as the order of the signal name filter.
|
|
518
|
+
*
|
|
519
|
+
* @returns list of names
|
|
520
|
+
*/
|
|
521
|
+
getSignalNames(): any[];
|
|
522
|
+
/**
|
|
523
|
+
* True if no filter at all, otherwise False.
|
|
524
|
+
*
|
|
525
|
+
* @returns {boolean}
|
|
526
|
+
*/
|
|
527
|
+
isEmpty(): boolean;
|
|
528
|
+
/**
|
|
529
|
+
* True if the filter only applies on exact signal name and no prefix matching, False otherwise.
|
|
530
|
+
*
|
|
531
|
+
* @returns {boolean}
|
|
532
|
+
*/
|
|
533
|
+
hasNameFilterOnly(): boolean;
|
|
534
|
+
}
|
|
535
|
+
declare class VDataBucket {
|
|
536
|
+
startTime: number;
|
|
537
|
+
endTime: number;
|
|
538
|
+
living: number;
|
|
539
|
+
notime: number;
|
|
540
|
+
cycle: number;
|
|
541
|
+
crc: number;
|
|
542
|
+
seriesBuckets: any[];
|
|
543
|
+
getStartTime(): number;
|
|
544
|
+
setStartTime(time: any): void;
|
|
545
|
+
getEndTime(): number;
|
|
546
|
+
setEndTime(time: any): void;
|
|
547
|
+
getCycle(): number;
|
|
548
|
+
setCycle(cycle: any): void;
|
|
549
|
+
isLiving(): number;
|
|
550
|
+
setLiving(living: any): void;
|
|
551
|
+
getCrc(): number;
|
|
552
|
+
setCrc(crc: any): void;
|
|
553
|
+
setNotime(notime: any): void;
|
|
554
|
+
getSeriesBuckets(): any[];
|
|
555
|
+
addSeriesBucket(seriesBucket: any): void;
|
|
556
|
+
intersects(b: any): boolean;
|
|
557
|
+
merge(b: any): this;
|
|
558
|
+
get [Symbol.toStringTag](): string;
|
|
559
|
+
}
|
|
560
|
+
declare class VDataSeries {
|
|
561
|
+
constructor(name: any, buckets?: any, itemCounts?: any);
|
|
562
|
+
_name: any;
|
|
563
|
+
_buckets: any;
|
|
564
|
+
_itemCounts: any;
|
|
565
|
+
name(): any;
|
|
566
|
+
buckets(): any;
|
|
567
|
+
itemCounts(): any;
|
|
568
|
+
numBuckets(): any;
|
|
569
|
+
getMaxBucketItemCount(): number;
|
|
570
|
+
updateBucketItemCounts(bucketNum: any, itemCount: any): void;
|
|
571
|
+
addBucket(bucket: any): void;
|
|
572
|
+
formula(): any;
|
|
573
|
+
get [Symbol.toStringTag](): string;
|
|
574
|
+
}
|
|
575
|
+
export {};
|