@insync-stageplayer/measurements 0.5.37 → 0.6.0
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/lib/AsyncSubject.d.ts +23 -23
- package/lib/AsyncSubject.js +64 -64
- package/lib/client/MeasurementDataClient.d.ts +135 -130
- package/lib/client/MeasurementDataClient.d.ts.map +1 -1
- package/lib/client/MeasurementDataClient.js +99 -99
- package/lib/client/MeasurementDataClient.js.map +1 -1
- package/lib/client/OnlineMeasurementDataClient.d.ts +44 -44
- package/lib/client/OnlineMeasurementDataClient.d.ts.map +1 -1
- package/lib/client/OnlineMeasurementDataClient.js +211 -211
- package/lib/client/OnlineMeasurementDataClient.js.map +1 -1
- package/lib/client/debug.d.ts +1 -1
- package/lib/client/debug.js +4 -4
- package/lib/client/index.d.ts +3 -3
- package/lib/client/index.js +3 -3
- package/lib/client/offline/OfflineMeasurementDataClient.d.ts +16 -16
- package/lib/client/offline/OfflineMeasurementDataClient.js +47 -47
- package/lib/client/offline/offline.d.ts +16 -16
- package/lib/client/offline/offline.js +82 -82
- package/lib/client/sbf.d.ts +35 -35
- package/lib/client/sbf.js +88 -88
- package/lib/client/signalviewer/SignalViewerDataClient.d.ts +37 -37
- package/lib/client/signalviewer/SignalViewerDataClient.d.ts.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.js +163 -164
- package/lib/client/signalviewer/SignalViewerDataClient.js.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.worker.d.ts +79 -73
- package/lib/client/signalviewer/SignalViewerDataClient.worker.d.ts.map +1 -1
- package/lib/client/signalviewer/SignalViewerDataClient.worker.js +342 -211
- package/lib/client/signalviewer/SignalViewerDataClient.worker.js.map +1 -1
- package/lib/components/Icon/CloseIcon.d.ts +6 -6
- package/lib/components/Icon/CloseIcon.js +24 -24
- package/lib/components/Icon/Icon.test.d.ts +1 -1
- package/lib/components/Icon/Icon.test.js +11 -11
- package/lib/components/MeasurementsChooser.d.ts +38 -38
- package/lib/components/MeasurementsChooser.d.ts.map +1 -1
- package/lib/components/MeasurementsChooser.js +178 -181
- package/lib/components/MeasurementsChooser.js.map +1 -1
- package/lib/components/MeasurementsModuleProvider.d.ts +34 -34
- package/lib/components/MeasurementsModuleProvider.d.ts.map +1 -1
- package/lib/components/MeasurementsModuleProvider.js +100 -79
- package/lib/components/MeasurementsModuleProvider.js.map +1 -1
- package/lib/components/MeasurementsTable/CheckboxCell.d.ts +35 -35
- package/lib/components/MeasurementsTable/CheckboxCell.js +28 -28
- package/lib/components/MeasurementsTable/ColorCell.d.ts +29 -29
- package/lib/components/MeasurementsTable/ColorCell.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/ColorCell.js +58 -58
- package/lib/components/MeasurementsTable/ColorPicker.d.ts +6 -3
- package/lib/components/MeasurementsTable/ColorPicker.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/ColorPicker.js +10 -10
- package/lib/components/MeasurementsTable/ColumnResizer.d.ts +4 -4
- package/lib/components/MeasurementsTable/ColumnResizer.js +5 -5
- package/lib/components/MeasurementsTable/ColumnSorting.d.ts +13 -13
- package/lib/components/MeasurementsTable/ColumnSorting.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/ColumnSorting.js +10 -10
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts +72 -72
- package/lib/components/MeasurementsTable/MeasurementsTable.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.js +229 -217
- package/lib/components/MeasurementsTable/MeasurementsTable.js.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.test.d.ts +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTable.test.js +102 -102
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.d.ts +72 -72
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/MeasurementsTableNoldus.js +193 -193
- package/lib/components/MeasurementsTable/SelectedContext.d.ts +10 -10
- package/lib/components/MeasurementsTable/SelectedContext.js +10 -10
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts +8 -8
- package/lib/components/MeasurementsTable/TextColumnFilter.d.ts.map +1 -1
- package/lib/components/MeasurementsTable/TextColumnFilter.js +15 -15
- package/lib/components/MeasurementsTable/filters.d.ts +3 -3
- package/lib/components/MeasurementsTable/filters.js +9 -9
- package/lib/components/MeasurementsTable/index.d.ts +2 -2
- package/lib/components/MeasurementsTable/index.js +2 -2
- package/lib/components/ModalMeasurementChooser.d.ts +19 -19
- package/lib/components/ModalMeasurementChooser.js +35 -35
- package/lib/conversion/UnitConversion.d.ts +13 -0
- package/lib/conversion/UnitConversion.d.ts.map +1 -0
- package/lib/conversion/UnitConversion.js +266 -0
- package/lib/conversion/UnitConversion.js.map +1 -0
- package/lib/hooks/useMarkerData.d.ts +6 -4
- package/lib/hooks/useMarkerData.d.ts.map +1 -1
- package/lib/hooks/useMarkerData.js +93 -63
- package/lib/hooks/useMarkerData.js.map +1 -1
- package/lib/hooks/useMeasurement.d.ts +41 -17
- package/lib/hooks/useMeasurement.d.ts.map +1 -1
- package/lib/hooks/useMeasurement.js +41 -41
- package/lib/hooks/useMeasurements.d.ts +11 -11
- package/lib/hooks/useMeasurements.js +22 -22
- package/lib/hooks/useMeasurementsModule.d.ts +20 -20
- package/lib/hooks/useMeasurementsModule.js +12 -12
- package/lib/hooks/useOverlayMeasurementData.d.ts +1 -1
- package/lib/hooks/useOverlayMeasurementData.js +23 -23
- package/lib/hooks/useTimedMeasurementData.d.ts +26 -26
- package/lib/hooks/useTimedMeasurementData.d.ts.map +1 -1
- package/lib/hooks/useTimedMeasurementData.js +125 -125
- package/lib/hooks/useTimedMeasurementData.js.map +1 -1
- package/lib/hooks/useWindowedMeasurementData.d.ts +25 -25
- package/lib/hooks/useWindowedMeasurementData.d.ts.map +1 -1
- package/lib/hooks/useWindowedMeasurementData.js +120 -120
- package/lib/hooks/useWindowedMeasurementData.js.map +1 -1
- package/lib/index.d.ts +15 -14
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -14
- package/lib/index.js.map +1 -1
- package/lib/redux/measurements.slice.d.ts +75 -122
- package/lib/redux/measurements.slice.d.ts.map +1 -1
- package/lib/redux/measurements.slice.js +90 -89
- package/lib/redux/measurements.slice.js.map +1 -1
- package/lib/redux/reducer.d.ts +3 -10
- package/lib/redux/reducer.d.ts.map +1 -1
- package/lib/redux/reducer.js +2 -2
- package/lib/redux/reducer.js.map +1 -1
- package/lib/types.d.ts +93 -93
- package/lib/types.js +51 -51
- package/package.json +7 -10
|
@@ -1,165 +1,164 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
}
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { AbstractMeasurementDataClient, } from "../MeasurementDataClient";
|
|
11
|
+
import SignalViewerDataClientWorker from "./SignalViewerDataClient.worker";
|
|
12
|
+
let signalViewerDataClientWorker;
|
|
13
|
+
/**
|
|
14
|
+
* Implementation of MeasurementDataClient for the online environment.
|
|
15
|
+
*
|
|
16
|
+
* This either uses websockets for HDF5 files, or sends HTTP requests to the SBF server depending on which files we're
|
|
17
|
+
* retrieving for.
|
|
18
|
+
*
|
|
19
|
+
* SBF files are considered legacy, and there is no support for retrieving measurement data using websockets.
|
|
20
|
+
*/
|
|
21
|
+
export class SignalViewerDataClient extends AbstractMeasurementDataClient {
|
|
22
|
+
constructor({ hdfEndpoint, sbfEndpoint }) {
|
|
23
|
+
super();
|
|
24
|
+
this.cId = 0;
|
|
25
|
+
this.promises = [];
|
|
26
|
+
this.fetchMetadata = (file) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const id = this.nextId();
|
|
28
|
+
let res = () => { };
|
|
29
|
+
let rej = () => { };
|
|
30
|
+
// Create promise around worker call
|
|
31
|
+
const p = new Promise((resolve, reject) => {
|
|
32
|
+
signalViewerDataClientWorker.postMessage({
|
|
33
|
+
func: "fetchMetadata",
|
|
34
|
+
id: id,
|
|
35
|
+
args: [file],
|
|
36
|
+
});
|
|
37
|
+
res = resolve;
|
|
38
|
+
rej = reject;
|
|
39
|
+
});
|
|
40
|
+
this.promises[id] = { promise: p, resolve: res, reject: rej };
|
|
41
|
+
// wait till worker returns with the response
|
|
42
|
+
return yield this.promises[id].promise;
|
|
43
|
+
});
|
|
44
|
+
this.fetchMeasurementData = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const id = this.nextId();
|
|
46
|
+
let res = () => { };
|
|
47
|
+
let rej = () => { };
|
|
48
|
+
const convertedArgs = Object.assign(Object.assign({}, args), { measurements: args.measurements.map((m) => {
|
|
49
|
+
// when requesting a single result we can pass an epsilon of 0
|
|
50
|
+
if (args.rows !== undefined && args.rows === 1) {
|
|
51
|
+
return {
|
|
52
|
+
name: m.index.join("/"),
|
|
53
|
+
n_out: null,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const secondMicroSecond = 1000000;
|
|
57
|
+
// If the amount of points visible for the selected amount of time is smaller than 250, we want them all
|
|
58
|
+
if (args.limit !== undefined &&
|
|
59
|
+
m.frequency * (args.limit / 4 / secondMicroSecond) < 250) {
|
|
60
|
+
return {
|
|
61
|
+
name: m.index.join("/"),
|
|
62
|
+
n_out: null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
name: m.index.join("/"),
|
|
67
|
+
n_out: args.rows,
|
|
68
|
+
};
|
|
69
|
+
}), output_format: "PLOTLY", algorithm: "TSD" });
|
|
70
|
+
// Create promise around worker call
|
|
71
|
+
const p = new Promise((resolve, reject) => {
|
|
72
|
+
signalViewerDataClientWorker.postMessage({
|
|
73
|
+
func: "fetchMeasurementData",
|
|
74
|
+
id: id,
|
|
75
|
+
args: [convertedArgs],
|
|
76
|
+
});
|
|
77
|
+
res = resolve;
|
|
78
|
+
rej = reject;
|
|
79
|
+
});
|
|
80
|
+
this.promises[id] = { promise: p, resolve: res, reject: rej };
|
|
81
|
+
// wait till worker returns with the response
|
|
82
|
+
return yield this.promises[id].promise;
|
|
83
|
+
});
|
|
84
|
+
this.fetchOverlayData = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
const id = this.nextId();
|
|
86
|
+
let res = () => { };
|
|
87
|
+
let rej = () => { };
|
|
88
|
+
// Create promise around worker call
|
|
89
|
+
const p = new Promise((resolve, reject) => {
|
|
90
|
+
signalViewerDataClientWorker.postMessage({
|
|
91
|
+
func: "fetchOverlayData",
|
|
92
|
+
id: id,
|
|
93
|
+
args: [args],
|
|
94
|
+
});
|
|
95
|
+
res = resolve;
|
|
96
|
+
rej = reject;
|
|
97
|
+
});
|
|
98
|
+
this.promises[id] = { promise: p, resolve: res, reject: rej };
|
|
99
|
+
// wait till worker returns with the response
|
|
100
|
+
return yield this.promises[id].promise;
|
|
101
|
+
});
|
|
102
|
+
this.fetchReqData = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const id = this.nextId();
|
|
104
|
+
let res = () => { };
|
|
105
|
+
let rej = () => { };
|
|
106
|
+
// Create promise around worker call
|
|
107
|
+
const p = new Promise((resolve, reject) => {
|
|
108
|
+
signalViewerDataClientWorker.postMessage({
|
|
109
|
+
func: "fetchReqData",
|
|
110
|
+
id: id,
|
|
111
|
+
args: [args],
|
|
112
|
+
});
|
|
113
|
+
res = resolve;
|
|
114
|
+
rej = reject;
|
|
115
|
+
});
|
|
116
|
+
this.promises[id] = { promise: p, resolve: res, reject: rej };
|
|
117
|
+
// wait till worker returns with the response
|
|
118
|
+
return yield this.promises[id].promise;
|
|
119
|
+
});
|
|
120
|
+
this.hdfEndpoint = hdfEndpoint;
|
|
121
|
+
this.sbfEndpoint = sbfEndpoint;
|
|
122
|
+
// initialize worker class
|
|
123
|
+
signalViewerDataClientWorker = new SignalViewerDataClientWorker({
|
|
124
|
+
hdfEndpoint,
|
|
125
|
+
sbfEndpoint,
|
|
126
|
+
});
|
|
127
|
+
signalViewerDataClientWorker.onmessage = (event) => {
|
|
128
|
+
// For now only return the response code on the fetchMetadata request of a file
|
|
129
|
+
// an incorrect h5m will fail here
|
|
130
|
+
if (event.data.func === "fetchMetadata") {
|
|
131
|
+
this.promises[event.data.id].resolve({
|
|
132
|
+
response: event.data.response,
|
|
133
|
+
code: event.data.code,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.promises[event.data.id].resolve(event.data.response);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
// first "constructor" message to worker
|
|
141
|
+
signalViewerDataClientWorker.postMessage({
|
|
142
|
+
func: "constructor",
|
|
143
|
+
id: this.cId,
|
|
144
|
+
args: [this.hdfEndpoint, this.sbfEndpoint],
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns a number and increments the cId. Used for "tagging" requests to the endpoint so we can recognise matching response.
|
|
149
|
+
* @returns number
|
|
150
|
+
*/
|
|
151
|
+
nextId() {
|
|
152
|
+
let nextId = this.cId + 1;
|
|
153
|
+
this.cId = nextId;
|
|
154
|
+
return nextId;
|
|
155
|
+
}
|
|
156
|
+
destroy() {
|
|
157
|
+
signalViewerDataClientWorker.postMessage({
|
|
158
|
+
func: "destroy",
|
|
159
|
+
id: 0,
|
|
160
|
+
args: [],
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
165
164
|
//# sourceMappingURL=SignalViewerDataClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignalViewerDataClient.js","sourceRoot":"","sources":["../../../src/client/signalviewer/SignalViewerDataClient.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SignalViewerDataClient.js","sourceRoot":"","sources":["../../../src/client/signalviewer/SignalViewer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,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3D;QACH,CAAC,CAAC;QACF,wCAAwC;QACxC,4BAA4B,CAAC,WAAW,CAAC;YACvC,IAAI,EAAE,aAAa;YACnB,EAAE,EAAE,IAAI,CAAC,GAAG;YACZ,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;SAC3C,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,MAAM;QACZ,IAAI,MAAM,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;QAClB,OAAO,MAAM,CAAC;IAChB,CAAC;IA8HM,OAAO;QACZ,4BAA4B,CAAC,WAAW,CAAC;YACvC,IAAI,EAAE,SAAS;YACf,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,74 +1,80 @@
|
|
|
1
|
-
import { MeasurementsTypes } from "../..";
|
|
2
|
-
import { FetchMeasurementDataArgs, MeasurementMetadata } from "../MeasurementDataClient";
|
|
3
|
-
declare type SignalViewerDataClientOptions = {
|
|
4
|
-
/**
|
|
5
|
-
* Endpoint (URL) to send requests for HDF files.
|
|
6
|
-
*/
|
|
7
|
-
hdfEndpoint: string;
|
|
8
|
-
/**
|
|
9
|
-
* Endpoint (URL) to send requests for SBF files.
|
|
10
|
-
*/
|
|
11
|
-
sbfEndpoint: string;
|
|
12
|
-
};
|
|
13
|
-
export default class SignalViewerDataClientWorker {
|
|
14
|
-
private hdfEndpoint;
|
|
15
|
-
private sbfEndpoint;
|
|
16
|
-
private _connection$;
|
|
17
|
-
private subscription;
|
|
18
|
-
private keepAlive;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
response: {
|
|
47
|
-
[key: string]: [number, number][];
|
|
48
|
-
};
|
|
49
|
-
id: any;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
import { MeasurementsTypes } from "../..";
|
|
2
|
+
import { FetchMeasurementDataArgs, MeasurementMetadata } from "../MeasurementDataClient";
|
|
3
|
+
declare type SignalViewerDataClientOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Endpoint (URL) to send requests for HDF files.
|
|
6
|
+
*/
|
|
7
|
+
hdfEndpoint: string;
|
|
8
|
+
/**
|
|
9
|
+
* Endpoint (URL) to send requests for SBF files.
|
|
10
|
+
*/
|
|
11
|
+
sbfEndpoint: string;
|
|
12
|
+
};
|
|
13
|
+
export default class SignalViewerDataClientWorker {
|
|
14
|
+
private hdfEndpoint;
|
|
15
|
+
private sbfEndpoint;
|
|
16
|
+
private _connection$;
|
|
17
|
+
private subscription;
|
|
18
|
+
private keepAlive;
|
|
19
|
+
private connected;
|
|
20
|
+
constructor({ hdfEndpoint, sbfEndpoint }: SignalViewerDataClientOptions);
|
|
21
|
+
/**
|
|
22
|
+
* A cached connection observable.
|
|
23
|
+
*/
|
|
24
|
+
private get connection$();
|
|
25
|
+
postMessage: (message: TRequest) => void;
|
|
26
|
+
onmessage: (message: MessageEvent<TResponse>) => void;
|
|
27
|
+
fetchMetadata: (file: string, id: number) => Promise<{
|
|
28
|
+
name: string;
|
|
29
|
+
index: string[];
|
|
30
|
+
unit: string;
|
|
31
|
+
min: number;
|
|
32
|
+
max: number;
|
|
33
|
+
yaxisLeftPos: string;
|
|
34
|
+
frequency: number;
|
|
35
|
+
dataScale: number;
|
|
36
|
+
file: string;
|
|
37
|
+
id: string;
|
|
38
|
+
}[] | {
|
|
39
|
+
func: string;
|
|
40
|
+
response: MeasurementMetadata[];
|
|
41
|
+
id: any;
|
|
42
|
+
code: any;
|
|
43
|
+
}>;
|
|
44
|
+
fetchMeasurementData: (args: FetchMeasurementDataArgs, id: number) => Promise<MeasurementsTypes.DataMap | {
|
|
45
|
+
func: string;
|
|
46
|
+
response: {
|
|
47
|
+
[key: string]: [number, number][];
|
|
48
|
+
};
|
|
49
|
+
id: any;
|
|
50
|
+
code: number;
|
|
51
|
+
}>;
|
|
52
|
+
fetchOverlayData: (args: any, id: number) => Promise<{
|
|
53
|
+
func: string;
|
|
54
|
+
response: MeasurementsTypes.DataResponse;
|
|
55
|
+
id: any;
|
|
56
|
+
code: number;
|
|
57
|
+
}>;
|
|
58
|
+
fetchReqData: (args: any, id: number) => Promise<{
|
|
59
|
+
func: string;
|
|
60
|
+
response: MeasurementsTypes.DataResponse;
|
|
61
|
+
id: any;
|
|
62
|
+
code: number;
|
|
63
|
+
}>;
|
|
64
|
+
doRequest: (payload: any) => void;
|
|
65
|
+
destroy(): void;
|
|
66
|
+
}
|
|
67
|
+
declare type TRequest = {
|
|
68
|
+
func: string;
|
|
69
|
+
id: number;
|
|
70
|
+
args: any[];
|
|
71
|
+
};
|
|
72
|
+
declare type TResponse = {
|
|
73
|
+
myresponse: number;
|
|
74
|
+
};
|
|
75
|
+
export interface IRequestWorker {
|
|
76
|
+
postMessage: (message: TResponse) => void;
|
|
77
|
+
onmessage: (message: MessageEvent<TRequest>) => void;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
74
80
|
//# sourceMappingURL=SignalViewerDataClient.worker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignalViewerDataClient.worker.d.ts","sourceRoot":"","sources":["../../../src/client/signalviewer/SignalViewerDataClient.worker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"SignalViewerDataClient.worker.d.ts","sourceRoot":"","sources":["../../../src/client/signalviewer/SignalViewerDataClient.worker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAkBlC,aAAK,6BAA6B,GAAG;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,4BAA4B;IAC/C,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,YAAY,CAAuC;IAC3D,OAAO,CAAC,SAAS,CAAuC;IACxD,OAAO,CAAC,SAAS,CAAU;gBAEf,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,6BAA6B;IAwBvE;;OAEG;IACH,OAAO,KAAK,WAAW,GA4BtB;IAED,WAAW,YAAa,QAAQ,UAE9B;IAEF,SAAS,YAAa,aAAa,SAAS,CAAC,UAE3C;IAEF,aAAa,SAAgB,MAAM,MAAM,MAAM;;;;;;;;;;;;;;;;OAgF7C;IAEF,oBAAoB,SAAgB,wBAAwB,MAAM,MAAM;;;;;;;OA2DtE;IAEF,gBAAgB,SAA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