@smartspectra/node-sdk 3.4.0-rc.6 → 3.4.0-rc.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/README.md +5 -3
- package/js/constants.js +12 -3
- package/js/index.d.ts +25 -10
- package/js/index.js +2 -0
- package/js/messages/generated.d.ts +166 -8
- package/js/messages/generated.js +565 -37
- package/js/renderer/index.d.ts +2 -0
- package/js/smartspectra.js +2 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -161,9 +161,11 @@ if (cameras.length > 0) {
|
|
|
161
161
|
|
|
162
162
|
`CameraSelection.default`, `.front`, `.back`, and `.byId(id)` share the camera
|
|
163
163
|
selection contract across SDKs. Explicit requests never fall back. Stop/start/reset
|
|
164
|
-
retain the chosen input.
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
retain the chosen input. Native Node.js supports camera discovery and typed
|
|
165
|
+
selection on macOS, Linux, and Windows. Linux and Windows cameras may report
|
|
166
|
+
unknown facing or lens type, so select those cameras by discovered ID. On
|
|
167
|
+
Windows, `.front` and `.back` fail with `kInputUnavailable` because facing is
|
|
168
|
+
not reported. See the
|
|
167
169
|
[migration guide](docs/migration-guide.md) and [API reference](docs/api-reference.md#cameraoptions).
|
|
168
170
|
|
|
169
171
|
Electron renderer capture uses browser-owned streams and `useMediaStream()`;
|
package/js/constants.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
// SPDX-License-Identifier: LicenseRef-Proprietary
|
|
5
5
|
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// Public enums and metric bundles. No Node-only dependencies, so this module
|
|
7
|
+
// can be bundled into a browser renderer without dragging in koffi, fs, or
|
|
8
|
+
// path. MetricType is sourced from the generated protobuf module below.
|
|
9
9
|
//
|
|
10
10
|
// Integer values must match the SmartSpectra C++ headers and
|
|
11
11
|
// metric_types.proto wire values; stable across SDK versions.
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
'use strict';
|
|
16
16
|
|
|
17
|
+
const generatedMetricType = require('./messages/generated').presage.smartspectra.MetricType;
|
|
18
|
+
|
|
17
19
|
const ProcessingStatus = Object.freeze({
|
|
18
20
|
kUninitialized: 0,
|
|
19
21
|
kIdle: 1,
|
|
@@ -91,6 +93,12 @@ const FrameTransform = Object.freeze({
|
|
|
91
93
|
kMirrorVertical: 5,
|
|
92
94
|
});
|
|
93
95
|
|
|
96
|
+
// protobufjs enums include reverse numeric keys. Keep the existing public
|
|
97
|
+
// name-to-number-only shape while deriving every value from metric_types.proto.
|
|
98
|
+
const MetricType = Object.freeze(Object.fromEntries(
|
|
99
|
+
Object.entries(generatedMetricType).filter(([name]) => Number.isNaN(Number(name))),
|
|
100
|
+
));
|
|
101
|
+
|
|
94
102
|
// MetricType integer codes grouped by measurement type. Spread into
|
|
95
103
|
// `requestedMetrics`; omitting `requestedMetrics` is equivalent to passing
|
|
96
104
|
// `breathingMetrics`.
|
|
@@ -138,6 +146,7 @@ module.exports = {
|
|
|
138
146
|
ValidationCode,
|
|
139
147
|
SmartSpectraErrorCode,
|
|
140
148
|
FrameTransform,
|
|
149
|
+
MetricType,
|
|
141
150
|
breathingMetrics,
|
|
142
151
|
cardioMetrics,
|
|
143
152
|
faceMetrics,
|
package/js/index.d.ts
CHANGED
|
@@ -90,6 +90,31 @@ export declare const FrameTransform: {
|
|
|
90
90
|
};
|
|
91
91
|
export type FrameTransformValue = typeof FrameTransform[keyof typeof FrameTransform];
|
|
92
92
|
|
|
93
|
+
/** MetricType integer codes accepted by `requestedMetrics`. Runtime values are generated from protobuf. */
|
|
94
|
+
export declare const MetricType: {
|
|
95
|
+
readonly CHEST_BREATHING: 0;
|
|
96
|
+
readonly ABDOMEN_BREATHING: 1;
|
|
97
|
+
readonly BREATHING_RATE: 2;
|
|
98
|
+
readonly BREATHING_AMPLITUDE: 3;
|
|
99
|
+
readonly APNEA: 4;
|
|
100
|
+
readonly RESPIRATORY_LINE_LENGTH: 5;
|
|
101
|
+
readonly BASELINE: 6;
|
|
102
|
+
readonly INHALE_EXHALE_RATIO: 7;
|
|
103
|
+
readonly GLUTES_MICROMOTION: 8;
|
|
104
|
+
readonly KNEES_MICROMOTION: 9;
|
|
105
|
+
readonly EDA_TRACE: 10;
|
|
106
|
+
readonly FACE_LANDMARKS: 11;
|
|
107
|
+
readonly BLINKING: 12;
|
|
108
|
+
readonly TALKING: 13;
|
|
109
|
+
readonly EXPRESSIONS: 14;
|
|
110
|
+
readonly PULSE_RATE: 15;
|
|
111
|
+
readonly ARTERIAL_PRESSURE_TRACE: 16;
|
|
112
|
+
readonly HRV: 17;
|
|
113
|
+
readonly PULSE_RATE_STRICT: 18;
|
|
114
|
+
readonly BREATHING_RATE_STRICT: 19;
|
|
115
|
+
};
|
|
116
|
+
export type MetricTypeValue = typeof MetricType[keyof typeof MetricType];
|
|
117
|
+
|
|
93
118
|
/** Options passed to the SmartSpectra constructor. */
|
|
94
119
|
export interface SmartSpectraOptions {
|
|
95
120
|
/** API key for server-validated auth. */
|
|
@@ -320,16 +345,6 @@ export declare class SmartSpectraSDK {
|
|
|
320
345
|
* MetricType integer codes grouped by measurement type. Spread into
|
|
321
346
|
* `requestedMetrics`; omitting it is equivalent to passing
|
|
322
347
|
* `breathingMetrics`.
|
|
323
|
-
*
|
|
324
|
-
* @example
|
|
325
|
-
* ```ts
|
|
326
|
-
* import { SmartSpectra, breathingMetrics, cardioMetrics } from '@smartspectra/node-sdk';
|
|
327
|
-
*
|
|
328
|
-
* const ss = new SmartSpectra({
|
|
329
|
-
* apiKey: 'YOUR_KEY',
|
|
330
|
-
* requestedMetrics: [...breathingMetrics, ...cardioMetrics],
|
|
331
|
-
* });
|
|
332
|
-
* ```
|
|
333
348
|
*/
|
|
334
349
|
export declare const breathingMetrics: readonly number[];
|
|
335
350
|
export declare const cardioMetrics: readonly number[];
|
package/js/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const {
|
|
|
14
14
|
ValidationCode,
|
|
15
15
|
SmartSpectraErrorCode,
|
|
16
16
|
FrameTransform,
|
|
17
|
+
MetricType,
|
|
17
18
|
breathingMetrics,
|
|
18
19
|
cardioMetrics,
|
|
19
20
|
faceMetrics,
|
|
@@ -53,6 +54,7 @@ module.exports = {
|
|
|
53
54
|
ValidationCode,
|
|
54
55
|
SmartSpectraErrorCode,
|
|
55
56
|
FrameTransform,
|
|
57
|
+
MetricType,
|
|
56
58
|
breathingMetrics,
|
|
57
59
|
cardioMetrics,
|
|
58
60
|
faceMetrics,
|
|
@@ -588,7 +588,11 @@ export namespace presage {
|
|
|
588
588
|
/** Standard Deviation of normal-to-normal (NN) Intervals */
|
|
589
589
|
sdnn?: (number|null);
|
|
590
590
|
|
|
591
|
-
/**
|
|
591
|
+
/**
|
|
592
|
+
* Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
593
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
594
|
+
* without a unit, matching the HRV model card.
|
|
595
|
+
*/
|
|
592
596
|
baevsky?: (number|null);
|
|
593
597
|
|
|
594
598
|
/** Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch */
|
|
@@ -619,7 +623,11 @@ export namespace presage {
|
|
|
619
623
|
/** Standard Deviation of normal-to-normal (NN) Intervals */
|
|
620
624
|
public sdnn: number;
|
|
621
625
|
|
|
622
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
628
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
629
|
+
* without a unit, matching the HRV model card.
|
|
630
|
+
*/
|
|
623
631
|
public baevsky: number;
|
|
624
632
|
|
|
625
633
|
/** Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch */
|
|
@@ -714,6 +722,9 @@ export namespace presage {
|
|
|
714
722
|
|
|
715
723
|
/** The strict value requiring high precision */
|
|
716
724
|
value?: (number|null);
|
|
725
|
+
|
|
726
|
+
/** End of the completed measurement window, in microseconds on the session input timeline */
|
|
727
|
+
timestamp?: (number|Long|null);
|
|
717
728
|
}
|
|
718
729
|
|
|
719
730
|
/**
|
|
@@ -731,6 +742,9 @@ export namespace presage {
|
|
|
731
742
|
/** The strict value requiring high precision */
|
|
732
743
|
public value: number;
|
|
733
744
|
|
|
745
|
+
/** End of the completed measurement window, in microseconds on the session input timeline */
|
|
746
|
+
public timestamp: (number|Long);
|
|
747
|
+
|
|
734
748
|
/**
|
|
735
749
|
* Creates a new Strict instance using the specified properties.
|
|
736
750
|
* @param [properties] Properties to set
|
|
@@ -825,7 +839,7 @@ export namespace presage {
|
|
|
825
839
|
* Strict/high-precision pulse measurements over a fixed time interval.
|
|
826
840
|
* Populated when strict mode analysis is enabled.
|
|
827
841
|
*/
|
|
828
|
-
|
|
842
|
+
pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
829
843
|
}
|
|
830
844
|
|
|
831
845
|
/**
|
|
@@ -853,7 +867,7 @@ export namespace presage {
|
|
|
853
867
|
* Strict/high-precision pulse measurements over a fixed time interval.
|
|
854
868
|
* Populated when strict mode analysis is enabled.
|
|
855
869
|
*/
|
|
856
|
-
public
|
|
870
|
+
public pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
857
871
|
|
|
858
872
|
/**
|
|
859
873
|
* Creates a new Pulse instance using the specified properties.
|
|
@@ -976,9 +990,10 @@ export namespace presage {
|
|
|
976
990
|
|
|
977
991
|
/**
|
|
978
992
|
* Strict/high-precision breathing measurements over a fixed time interval.
|
|
979
|
-
* Populated when
|
|
993
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
994
|
+
* available.
|
|
980
995
|
*/
|
|
981
|
-
|
|
996
|
+
breathingRateStrict?: (presage.smartspectra.IStrict|null);
|
|
982
997
|
}
|
|
983
998
|
|
|
984
999
|
/**
|
|
@@ -1033,9 +1048,10 @@ export namespace presage {
|
|
|
1033
1048
|
|
|
1034
1049
|
/**
|
|
1035
1050
|
* Strict/high-precision breathing measurements over a fixed time interval.
|
|
1036
|
-
* Populated when
|
|
1051
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
1052
|
+
* available.
|
|
1037
1053
|
*/
|
|
1038
|
-
public
|
|
1054
|
+
public breathingRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1039
1055
|
|
|
1040
1056
|
/**
|
|
1041
1057
|
* Creates a new Breathing instance using the specified properties.
|
|
@@ -1586,6 +1602,12 @@ export namespace presage {
|
|
|
1586
1602
|
* for the confidence-to-error mapping.
|
|
1587
1603
|
*/
|
|
1588
1604
|
hrv?: (presage.smartspectra.IHrv[]|null);
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
1608
|
+
* requested and a value is available.
|
|
1609
|
+
*/
|
|
1610
|
+
pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1589
1611
|
}
|
|
1590
1612
|
|
|
1591
1613
|
/** Represents a Cardio. */
|
|
@@ -1624,6 +1646,12 @@ export namespace presage {
|
|
|
1624
1646
|
*/
|
|
1625
1647
|
public hrv: presage.smartspectra.IHrv[];
|
|
1626
1648
|
|
|
1649
|
+
/**
|
|
1650
|
+
* Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
1651
|
+
* requested and a value is available.
|
|
1652
|
+
*/
|
|
1653
|
+
public pulseRateStrict?: (presage.smartspectra.IStrict|null);
|
|
1654
|
+
|
|
1627
1655
|
/**
|
|
1628
1656
|
* Creates a new Cardio instance using the specified properties.
|
|
1629
1657
|
* @param [properties] Properties to set
|
|
@@ -2149,5 +2177,135 @@ export namespace presage {
|
|
|
2149
2177
|
*/
|
|
2150
2178
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
2151
2179
|
}
|
|
2180
|
+
|
|
2181
|
+
/** FeatureType enum. */
|
|
2182
|
+
enum FeatureType {
|
|
2183
|
+
BREATHING = 0,
|
|
2184
|
+
MICROMOTION = 1,
|
|
2185
|
+
EDA = 2,
|
|
2186
|
+
FACE = 3,
|
|
2187
|
+
CARDIO = 4
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
/** MetricType enum. */
|
|
2191
|
+
enum MetricType {
|
|
2192
|
+
CHEST_BREATHING = 0,
|
|
2193
|
+
ABDOMEN_BREATHING = 1,
|
|
2194
|
+
BREATHING_RATE = 2,
|
|
2195
|
+
BREATHING_AMPLITUDE = 3,
|
|
2196
|
+
APNEA = 4,
|
|
2197
|
+
RESPIRATORY_LINE_LENGTH = 5,
|
|
2198
|
+
BASELINE = 6,
|
|
2199
|
+
INHALE_EXHALE_RATIO = 7,
|
|
2200
|
+
GLUTES_MICROMOTION = 8,
|
|
2201
|
+
KNEES_MICROMOTION = 9,
|
|
2202
|
+
EDA_TRACE = 10,
|
|
2203
|
+
FACE_LANDMARKS = 11,
|
|
2204
|
+
BLINKING = 12,
|
|
2205
|
+
TALKING = 13,
|
|
2206
|
+
EXPRESSIONS = 14,
|
|
2207
|
+
PULSE_RATE = 15,
|
|
2208
|
+
ARTERIAL_PRESSURE_TRACE = 16,
|
|
2209
|
+
HRV = 17,
|
|
2210
|
+
PULSE_RATE_STRICT = 18,
|
|
2211
|
+
BREATHING_RATE_STRICT = 19
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
/** Properties of a RequestedMetrics. */
|
|
2215
|
+
interface IRequestedMetrics {
|
|
2216
|
+
|
|
2217
|
+
/** RequestedMetrics metrics */
|
|
2218
|
+
metrics?: (presage.smartspectra.MetricType[]|null);
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/** Represents a RequestedMetrics. */
|
|
2222
|
+
class RequestedMetrics implements IRequestedMetrics {
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* Constructs a new RequestedMetrics.
|
|
2226
|
+
* @param [properties] Properties to set
|
|
2227
|
+
*/
|
|
2228
|
+
constructor(properties?: presage.smartspectra.IRequestedMetrics);
|
|
2229
|
+
|
|
2230
|
+
/** RequestedMetrics metrics. */
|
|
2231
|
+
public metrics: presage.smartspectra.MetricType[];
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Creates a new RequestedMetrics instance using the specified properties.
|
|
2235
|
+
* @param [properties] Properties to set
|
|
2236
|
+
* @returns RequestedMetrics instance
|
|
2237
|
+
*/
|
|
2238
|
+
public static create(properties?: presage.smartspectra.IRequestedMetrics): presage.smartspectra.RequestedMetrics;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Encodes the specified RequestedMetrics message. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
2242
|
+
* @param message RequestedMetrics message or plain object to encode
|
|
2243
|
+
* @param [writer] Writer to encode to
|
|
2244
|
+
* @returns Writer
|
|
2245
|
+
*/
|
|
2246
|
+
public static encode(message: presage.smartspectra.IRequestedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* Encodes the specified RequestedMetrics message, length delimited. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
2250
|
+
* @param message RequestedMetrics message or plain object to encode
|
|
2251
|
+
* @param [writer] Writer to encode to
|
|
2252
|
+
* @returns Writer
|
|
2253
|
+
*/
|
|
2254
|
+
public static encodeDelimited(message: presage.smartspectra.IRequestedMetrics, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2255
|
+
|
|
2256
|
+
/**
|
|
2257
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer.
|
|
2258
|
+
* @param reader Reader or buffer to decode from
|
|
2259
|
+
* @param [length] Message length if known beforehand
|
|
2260
|
+
* @returns RequestedMetrics
|
|
2261
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2262
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2263
|
+
*/
|
|
2264
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): presage.smartspectra.RequestedMetrics;
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer, length delimited.
|
|
2268
|
+
* @param reader Reader or buffer to decode from
|
|
2269
|
+
* @returns RequestedMetrics
|
|
2270
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2271
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2272
|
+
*/
|
|
2273
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): presage.smartspectra.RequestedMetrics;
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Verifies a RequestedMetrics message.
|
|
2277
|
+
* @param message Plain object to verify
|
|
2278
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
2279
|
+
*/
|
|
2280
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Creates a RequestedMetrics message from a plain object. Also converts values to their respective internal types.
|
|
2284
|
+
* @param object Plain object
|
|
2285
|
+
* @returns RequestedMetrics
|
|
2286
|
+
*/
|
|
2287
|
+
public static fromObject(object: { [k: string]: any }): presage.smartspectra.RequestedMetrics;
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* Creates a plain object from a RequestedMetrics message. Also converts values to other types if specified.
|
|
2291
|
+
* @param message RequestedMetrics
|
|
2292
|
+
* @param [options] Conversion options
|
|
2293
|
+
* @returns Plain object
|
|
2294
|
+
*/
|
|
2295
|
+
public static toObject(message: presage.smartspectra.RequestedMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Converts this RequestedMetrics to JSON.
|
|
2299
|
+
* @returns JSON object
|
|
2300
|
+
*/
|
|
2301
|
+
public toJSON(): { [k: string]: any };
|
|
2302
|
+
|
|
2303
|
+
/**
|
|
2304
|
+
* Gets the default type url for RequestedMetrics
|
|
2305
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
2306
|
+
* @returns The default type url
|
|
2307
|
+
*/
|
|
2308
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
2309
|
+
}
|
|
2152
2310
|
}
|
|
2153
2311
|
}
|
package/js/messages/generated.js
CHANGED
|
@@ -1653,7 +1653,9 @@ $root.presage = (function() {
|
|
|
1653
1653
|
* @property {number|null} [rmssd] root mean square of successive differences between normal heartbeats
|
|
1654
1654
|
* @property {number|null} [meanNn] mean normal-to-normal (NN) interval length
|
|
1655
1655
|
* @property {number|null} [sdnn] Standard Deviation of normal-to-normal (NN) Intervals
|
|
1656
|
-
* @property {number|null} [baevsky] Baevsky's Stress Index
|
|
1656
|
+
* @property {number|null} [baevsky] Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
1657
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
1658
|
+
* without a unit, matching the HRV model card.
|
|
1657
1659
|
* @property {number|Long|null} [timestamp] Absolute timestamp at which the HRV measurement was taken, in microseconds, since Linux epoch
|
|
1658
1660
|
* @property {number|null} [confidence] Confidence score for the HRV measurement, expressed as a percentage in the range [0.0, 100.0]
|
|
1659
1661
|
* @property {boolean|null} [stable] Whether the HRV measurement is considered stable/reliable
|
|
@@ -1699,7 +1701,9 @@ $root.presage = (function() {
|
|
|
1699
1701
|
Hrv.prototype.sdnn = 0;
|
|
1700
1702
|
|
|
1701
1703
|
/**
|
|
1702
|
-
* Baevsky's Stress Index
|
|
1704
|
+
* Baevsky's Stress Index: a measure of autonomic balance derived from the
|
|
1705
|
+
* NN interval distribution, computed as `AMo / (2 * Mo * MxDMn)`. Reported
|
|
1706
|
+
* without a unit, matching the HRV model card.
|
|
1703
1707
|
* @member {number} baevsky
|
|
1704
1708
|
* @memberof presage.smartspectra.Hrv
|
|
1705
1709
|
* @instance
|
|
@@ -2048,6 +2052,7 @@ $root.presage = (function() {
|
|
|
2048
2052
|
* @memberof presage.smartspectra
|
|
2049
2053
|
* @interface IStrict
|
|
2050
2054
|
* @property {number|null} [value] The strict value requiring high precision
|
|
2055
|
+
* @property {number|Long|null} [timestamp] End of the completed measurement window, in microseconds on the session input timeline
|
|
2051
2056
|
*/
|
|
2052
2057
|
|
|
2053
2058
|
/**
|
|
@@ -2074,6 +2079,14 @@ $root.presage = (function() {
|
|
|
2074
2079
|
*/
|
|
2075
2080
|
Strict.prototype.value = 0;
|
|
2076
2081
|
|
|
2082
|
+
/**
|
|
2083
|
+
* End of the completed measurement window, in microseconds on the session input timeline
|
|
2084
|
+
* @member {number|Long} timestamp
|
|
2085
|
+
* @memberof presage.smartspectra.Strict
|
|
2086
|
+
* @instance
|
|
2087
|
+
*/
|
|
2088
|
+
Strict.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
2089
|
+
|
|
2077
2090
|
/**
|
|
2078
2091
|
* Creates a new Strict instance using the specified properties.
|
|
2079
2092
|
* @function create
|
|
@@ -2104,6 +2117,8 @@ $root.presage = (function() {
|
|
|
2104
2117
|
throw Error("max depth exceeded");
|
|
2105
2118
|
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
2106
2119
|
writer.uint32(/* id 1, wireType 5 =*/13).float(message.value);
|
|
2120
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
2121
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestamp);
|
|
2107
2122
|
return writer;
|
|
2108
2123
|
};
|
|
2109
2124
|
|
|
@@ -2158,6 +2173,10 @@ $root.presage = (function() {
|
|
|
2158
2173
|
message.value = reader.float();
|
|
2159
2174
|
break;
|
|
2160
2175
|
}
|
|
2176
|
+
case 2: {
|
|
2177
|
+
message.timestamp = reader.int64();
|
|
2178
|
+
break;
|
|
2179
|
+
}
|
|
2161
2180
|
default:
|
|
2162
2181
|
reader.skipType(tag & 7, long);
|
|
2163
2182
|
break;
|
|
@@ -2205,6 +2224,9 @@ $root.presage = (function() {
|
|
|
2205
2224
|
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
2206
2225
|
if (typeof message.value !== "number")
|
|
2207
2226
|
return "value: number expected";
|
|
2227
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
2228
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
2229
|
+
return "timestamp: integer|Long expected";
|
|
2208
2230
|
return null;
|
|
2209
2231
|
};
|
|
2210
2232
|
|
|
@@ -2228,6 +2250,15 @@ $root.presage = (function() {
|
|
|
2228
2250
|
var message = new $root.presage.smartspectra.Strict();
|
|
2229
2251
|
if (object.value != null)
|
|
2230
2252
|
message.value = Number(object.value);
|
|
2253
|
+
if (object.timestamp != null)
|
|
2254
|
+
if ($util.Long)
|
|
2255
|
+
message.timestamp = $util.Long.fromValue(object.timestamp, false);
|
|
2256
|
+
else if (typeof object.timestamp === "string")
|
|
2257
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
2258
|
+
else if (typeof object.timestamp === "number")
|
|
2259
|
+
message.timestamp = object.timestamp;
|
|
2260
|
+
else if (typeof object.timestamp === "object")
|
|
2261
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
|
|
2231
2262
|
return message;
|
|
2232
2263
|
};
|
|
2233
2264
|
|
|
@@ -2248,10 +2279,23 @@ $root.presage = (function() {
|
|
|
2248
2279
|
if (q > $util.recursionLimit)
|
|
2249
2280
|
throw Error("max depth exceeded");
|
|
2250
2281
|
var object = {};
|
|
2251
|
-
if (options.defaults)
|
|
2282
|
+
if (options.defaults) {
|
|
2252
2283
|
object.value = 0;
|
|
2284
|
+
if ($util.Long) {
|
|
2285
|
+
var long = new $util.Long(0, 0, false);
|
|
2286
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
2287
|
+
} else
|
|
2288
|
+
object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
2289
|
+
}
|
|
2253
2290
|
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
2254
2291
|
object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
|
|
2292
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
2293
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
2294
|
+
object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, false).toBigInt();
|
|
2295
|
+
else if (typeof message.timestamp === "number")
|
|
2296
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
2297
|
+
else
|
|
2298
|
+
object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
|
|
2255
2299
|
return object;
|
|
2256
2300
|
};
|
|
2257
2301
|
|
|
@@ -2293,7 +2337,7 @@ $root.presage = (function() {
|
|
|
2293
2337
|
* @property {Array.<presage.smartspectra.IMeasurementWithConfidence>|null} [rate] Heart rate measurements with confidence scores
|
|
2294
2338
|
* @property {Array.<presage.smartspectra.IMeasurement>|null} [trace] Raw pulse trace measurements
|
|
2295
2339
|
* @property {Array.<presage.smartspectra.IMeasurement>|null} [pulseRespirationQuotient] Pulse-respiration quotient measurements indicating cardio-respiratory coupling
|
|
2296
|
-
* @property {presage.smartspectra.IStrict|null} [
|
|
2340
|
+
* @property {presage.smartspectra.IStrict|null} [pulseRateStrict] Strict/high-precision pulse measurements over a fixed time interval.
|
|
2297
2341
|
* Populated when strict mode analysis is enabled.
|
|
2298
2342
|
*/
|
|
2299
2343
|
|
|
@@ -2343,11 +2387,11 @@ $root.presage = (function() {
|
|
|
2343
2387
|
/**
|
|
2344
2388
|
* Strict/high-precision pulse measurements over a fixed time interval.
|
|
2345
2389
|
* Populated when strict mode analysis is enabled.
|
|
2346
|
-
* @member {presage.smartspectra.IStrict|null|undefined}
|
|
2390
|
+
* @member {presage.smartspectra.IStrict|null|undefined} pulseRateStrict
|
|
2347
2391
|
* @memberof presage.smartspectra.Pulse
|
|
2348
2392
|
* @instance
|
|
2349
2393
|
*/
|
|
2350
|
-
Pulse.prototype.
|
|
2394
|
+
Pulse.prototype.pulseRateStrict = null;
|
|
2351
2395
|
|
|
2352
2396
|
/**
|
|
2353
2397
|
* Creates a new Pulse instance using the specified properties.
|
|
@@ -2386,8 +2430,8 @@ $root.presage = (function() {
|
|
|
2386
2430
|
if (message.pulseRespirationQuotient != null && message.pulseRespirationQuotient.length)
|
|
2387
2431
|
for (var i = 0; i < message.pulseRespirationQuotient.length; ++i)
|
|
2388
2432
|
$root.presage.smartspectra.Measurement.encode(message.pulseRespirationQuotient[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
|
|
2389
|
-
if (message.
|
|
2390
|
-
$root.presage.smartspectra.Strict.encode(message.
|
|
2433
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
|
|
2434
|
+
$root.presage.smartspectra.Strict.encode(message.pulseRateStrict, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
|
|
2391
2435
|
return writer;
|
|
2392
2436
|
};
|
|
2393
2437
|
|
|
@@ -2457,7 +2501,7 @@ $root.presage = (function() {
|
|
|
2457
2501
|
break;
|
|
2458
2502
|
}
|
|
2459
2503
|
case 4: {
|
|
2460
|
-
message.
|
|
2504
|
+
message.pulseRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
|
|
2461
2505
|
break;
|
|
2462
2506
|
}
|
|
2463
2507
|
default:
|
|
@@ -2531,10 +2575,10 @@ $root.presage = (function() {
|
|
|
2531
2575
|
return "pulseRespirationQuotient." + error;
|
|
2532
2576
|
}
|
|
2533
2577
|
}
|
|
2534
|
-
if (message.
|
|
2535
|
-
var error = $root.presage.smartspectra.Strict.verify(message.
|
|
2578
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict")) {
|
|
2579
|
+
var error = $root.presage.smartspectra.Strict.verify(message.pulseRateStrict, long + 1);
|
|
2536
2580
|
if (error)
|
|
2537
|
-
return "
|
|
2581
|
+
return "pulseRateStrict." + error;
|
|
2538
2582
|
}
|
|
2539
2583
|
return null;
|
|
2540
2584
|
};
|
|
@@ -2587,10 +2631,10 @@ $root.presage = (function() {
|
|
|
2587
2631
|
message.pulseRespirationQuotient[i] = $root.presage.smartspectra.Measurement.fromObject(object.pulseRespirationQuotient[i], long + 1);
|
|
2588
2632
|
}
|
|
2589
2633
|
}
|
|
2590
|
-
if (object.
|
|
2591
|
-
if (!$util.isObject(object.
|
|
2592
|
-
throw TypeError(".presage.smartspectra.Pulse.
|
|
2593
|
-
message.
|
|
2634
|
+
if (object.pulseRateStrict != null) {
|
|
2635
|
+
if (!$util.isObject(object.pulseRateStrict))
|
|
2636
|
+
throw TypeError(".presage.smartspectra.Pulse.pulseRateStrict: object expected");
|
|
2637
|
+
message.pulseRateStrict = $root.presage.smartspectra.Strict.fromObject(object.pulseRateStrict, long + 1);
|
|
2594
2638
|
}
|
|
2595
2639
|
return message;
|
|
2596
2640
|
};
|
|
@@ -2618,7 +2662,7 @@ $root.presage = (function() {
|
|
|
2618
2662
|
object.pulseRespirationQuotient = [];
|
|
2619
2663
|
}
|
|
2620
2664
|
if (options.defaults)
|
|
2621
|
-
object.
|
|
2665
|
+
object.pulseRateStrict = null;
|
|
2622
2666
|
if (message.rate && message.rate.length) {
|
|
2623
2667
|
object.rate = [];
|
|
2624
2668
|
for (var j = 0; j < message.rate.length; ++j)
|
|
@@ -2634,8 +2678,8 @@ $root.presage = (function() {
|
|
|
2634
2678
|
for (var j = 0; j < message.pulseRespirationQuotient.length; ++j)
|
|
2635
2679
|
object.pulseRespirationQuotient[j] = $root.presage.smartspectra.Measurement.toObject(message.pulseRespirationQuotient[j], options, q + 1);
|
|
2636
2680
|
}
|
|
2637
|
-
if (message.
|
|
2638
|
-
object.
|
|
2681
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
|
|
2682
|
+
object.pulseRateStrict = $root.presage.smartspectra.Strict.toObject(message.pulseRateStrict, options, q + 1);
|
|
2639
2683
|
return object;
|
|
2640
2684
|
};
|
|
2641
2685
|
|
|
@@ -2690,8 +2734,9 @@ $root.presage = (function() {
|
|
|
2690
2734
|
* @property {Array.<presage.smartspectra.IMeasurement>|null} [respiratoryLineLength] Respiratory line length measurements for breathing pattern analysis
|
|
2691
2735
|
* @property {Array.<presage.smartspectra.IMeasurement>|null} [baseline] Baseline breathing measurements
|
|
2692
2736
|
* @property {Array.<presage.smartspectra.IMeasurement>|null} [inhaleExhaleRatio] Inhale to exhale duration ratio measurements
|
|
2693
|
-
* @property {presage.smartspectra.IStrict|null} [
|
|
2694
|
-
* Populated when
|
|
2737
|
+
* @property {presage.smartspectra.IStrict|null} [breathingRateStrict] Strict/high-precision breathing measurements over a fixed time interval.
|
|
2738
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
2739
|
+
* available.
|
|
2695
2740
|
*/
|
|
2696
2741
|
|
|
2697
2742
|
/**
|
|
@@ -2792,12 +2837,13 @@ $root.presage = (function() {
|
|
|
2792
2837
|
|
|
2793
2838
|
/**
|
|
2794
2839
|
* Strict/high-precision breathing measurements over a fixed time interval.
|
|
2795
|
-
* Populated when
|
|
2796
|
-
*
|
|
2840
|
+
* Populated only when BREATHING_RATE_STRICT is requested and a value is
|
|
2841
|
+
* available.
|
|
2842
|
+
* @member {presage.smartspectra.IStrict|null|undefined} breathingRateStrict
|
|
2797
2843
|
* @memberof presage.smartspectra.Breathing
|
|
2798
2844
|
* @instance
|
|
2799
2845
|
*/
|
|
2800
|
-
Breathing.prototype.
|
|
2846
|
+
Breathing.prototype.breathingRateStrict = null;
|
|
2801
2847
|
|
|
2802
2848
|
/**
|
|
2803
2849
|
* Creates a new Breathing instance using the specified properties.
|
|
@@ -2851,8 +2897,8 @@ $root.presage = (function() {
|
|
|
2851
2897
|
if (message.inhaleExhaleRatio != null && message.inhaleExhaleRatio.length)
|
|
2852
2898
|
for (var i = 0; i < message.inhaleExhaleRatio.length; ++i)
|
|
2853
2899
|
$root.presage.smartspectra.Measurement.encode(message.inhaleExhaleRatio[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim();
|
|
2854
|
-
if (message.
|
|
2855
|
-
$root.presage.smartspectra.Strict.encode(message.
|
|
2900
|
+
if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict"))
|
|
2901
|
+
$root.presage.smartspectra.Strict.encode(message.breathingRateStrict, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim();
|
|
2856
2902
|
return writer;
|
|
2857
2903
|
};
|
|
2858
2904
|
|
|
@@ -2952,7 +2998,7 @@ $root.presage = (function() {
|
|
|
2952
2998
|
break;
|
|
2953
2999
|
}
|
|
2954
3000
|
case 9: {
|
|
2955
|
-
message.
|
|
3001
|
+
message.breathingRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
|
|
2956
3002
|
break;
|
|
2957
3003
|
}
|
|
2958
3004
|
default:
|
|
@@ -3071,10 +3117,10 @@ $root.presage = (function() {
|
|
|
3071
3117
|
return "inhaleExhaleRatio." + error;
|
|
3072
3118
|
}
|
|
3073
3119
|
}
|
|
3074
|
-
if (message.
|
|
3075
|
-
var error = $root.presage.smartspectra.Strict.verify(message.
|
|
3120
|
+
if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict")) {
|
|
3121
|
+
var error = $root.presage.smartspectra.Strict.verify(message.breathingRateStrict, long + 1);
|
|
3076
3122
|
if (error)
|
|
3077
|
-
return "
|
|
3123
|
+
return "breathingRateStrict." + error;
|
|
3078
3124
|
}
|
|
3079
3125
|
return null;
|
|
3080
3126
|
};
|
|
@@ -3177,10 +3223,10 @@ $root.presage = (function() {
|
|
|
3177
3223
|
message.inhaleExhaleRatio[i] = $root.presage.smartspectra.Measurement.fromObject(object.inhaleExhaleRatio[i], long + 1);
|
|
3178
3224
|
}
|
|
3179
3225
|
}
|
|
3180
|
-
if (object.
|
|
3181
|
-
if (!$util.isObject(object.
|
|
3182
|
-
throw TypeError(".presage.smartspectra.Breathing.
|
|
3183
|
-
message.
|
|
3226
|
+
if (object.breathingRateStrict != null) {
|
|
3227
|
+
if (!$util.isObject(object.breathingRateStrict))
|
|
3228
|
+
throw TypeError(".presage.smartspectra.Breathing.breathingRateStrict: object expected");
|
|
3229
|
+
message.breathingRateStrict = $root.presage.smartspectra.Strict.fromObject(object.breathingRateStrict, long + 1);
|
|
3184
3230
|
}
|
|
3185
3231
|
return message;
|
|
3186
3232
|
};
|
|
@@ -3213,7 +3259,7 @@ $root.presage = (function() {
|
|
|
3213
3259
|
object.inhaleExhaleRatio = [];
|
|
3214
3260
|
}
|
|
3215
3261
|
if (options.defaults)
|
|
3216
|
-
object.
|
|
3262
|
+
object.breathingRateStrict = null;
|
|
3217
3263
|
if (message.rate && message.rate.length) {
|
|
3218
3264
|
object.rate = [];
|
|
3219
3265
|
for (var j = 0; j < message.rate.length; ++j)
|
|
@@ -3254,8 +3300,8 @@ $root.presage = (function() {
|
|
|
3254
3300
|
for (var j = 0; j < message.inhaleExhaleRatio.length; ++j)
|
|
3255
3301
|
object.inhaleExhaleRatio[j] = $root.presage.smartspectra.Measurement.toObject(message.inhaleExhaleRatio[j], options, q + 1);
|
|
3256
3302
|
}
|
|
3257
|
-
if (message.
|
|
3258
|
-
object.
|
|
3303
|
+
if (message.breathingRateStrict != null && Object.hasOwnProperty.call(message, "breathingRateStrict"))
|
|
3304
|
+
object.breathingRateStrict = $root.presage.smartspectra.Strict.toObject(message.breathingRateStrict, options, q + 1);
|
|
3259
3305
|
return object;
|
|
3260
3306
|
};
|
|
3261
3307
|
|
|
@@ -4630,6 +4676,8 @@ $root.presage = (function() {
|
|
|
4630
4676
|
* (+/-5 ms), which corresponds to confidence >= 50; see the
|
|
4631
4677
|
* [HRV model card](https://vandv.presagetech.com/hrv_model_card.html)
|
|
4632
4678
|
* for the confidence-to-error mapping.
|
|
4679
|
+
* @property {presage.smartspectra.IStrict|null} [pulseRateStrict] Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
4680
|
+
* requested and a value is available.
|
|
4633
4681
|
*/
|
|
4634
4682
|
|
|
4635
4683
|
/**
|
|
@@ -4686,6 +4734,15 @@ $root.presage = (function() {
|
|
|
4686
4734
|
*/
|
|
4687
4735
|
Cardio.prototype.hrv = $util.emptyArray;
|
|
4688
4736
|
|
|
4737
|
+
/**
|
|
4738
|
+
* Strict pulse-rate measurement. Populated only when PULSE_RATE_STRICT is
|
|
4739
|
+
* requested and a value is available.
|
|
4740
|
+
* @member {presage.smartspectra.IStrict|null|undefined} pulseRateStrict
|
|
4741
|
+
* @memberof presage.smartspectra.Cardio
|
|
4742
|
+
* @instance
|
|
4743
|
+
*/
|
|
4744
|
+
Cardio.prototype.pulseRateStrict = null;
|
|
4745
|
+
|
|
4689
4746
|
/**
|
|
4690
4747
|
* Creates a new Cardio instance using the specified properties.
|
|
4691
4748
|
* @function create
|
|
@@ -4723,6 +4780,8 @@ $root.presage = (function() {
|
|
|
4723
4780
|
if (message.hrv != null && message.hrv.length)
|
|
4724
4781
|
for (var i = 0; i < message.hrv.length; ++i)
|
|
4725
4782
|
$root.presage.smartspectra.Hrv.encode(message.hrv[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim();
|
|
4783
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
|
|
4784
|
+
$root.presage.smartspectra.Strict.encode(message.pulseRateStrict, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim();
|
|
4726
4785
|
return writer;
|
|
4727
4786
|
};
|
|
4728
4787
|
|
|
@@ -4791,6 +4850,10 @@ $root.presage = (function() {
|
|
|
4791
4850
|
message.hrv.push($root.presage.smartspectra.Hrv.decode(reader, reader.uint32(), undefined, long + 1));
|
|
4792
4851
|
break;
|
|
4793
4852
|
}
|
|
4853
|
+
case 4: {
|
|
4854
|
+
message.pulseRateStrict = $root.presage.smartspectra.Strict.decode(reader, reader.uint32(), undefined, long + 1);
|
|
4855
|
+
break;
|
|
4856
|
+
}
|
|
4794
4857
|
default:
|
|
4795
4858
|
reader.skipType(tag & 7, long);
|
|
4796
4859
|
break;
|
|
@@ -4862,6 +4925,11 @@ $root.presage = (function() {
|
|
|
4862
4925
|
return "hrv." + error;
|
|
4863
4926
|
}
|
|
4864
4927
|
}
|
|
4928
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict")) {
|
|
4929
|
+
var error = $root.presage.smartspectra.Strict.verify(message.pulseRateStrict, long + 1);
|
|
4930
|
+
if (error)
|
|
4931
|
+
return "pulseRateStrict." + error;
|
|
4932
|
+
}
|
|
4865
4933
|
return null;
|
|
4866
4934
|
};
|
|
4867
4935
|
|
|
@@ -4913,6 +4981,11 @@ $root.presage = (function() {
|
|
|
4913
4981
|
message.hrv[i] = $root.presage.smartspectra.Hrv.fromObject(object.hrv[i], long + 1);
|
|
4914
4982
|
}
|
|
4915
4983
|
}
|
|
4984
|
+
if (object.pulseRateStrict != null) {
|
|
4985
|
+
if (!$util.isObject(object.pulseRateStrict))
|
|
4986
|
+
throw TypeError(".presage.smartspectra.Cardio.pulseRateStrict: object expected");
|
|
4987
|
+
message.pulseRateStrict = $root.presage.smartspectra.Strict.fromObject(object.pulseRateStrict, long + 1);
|
|
4988
|
+
}
|
|
4916
4989
|
return message;
|
|
4917
4990
|
};
|
|
4918
4991
|
|
|
@@ -4938,6 +5011,8 @@ $root.presage = (function() {
|
|
|
4938
5011
|
object.arterialPressureTrace = [];
|
|
4939
5012
|
object.hrv = [];
|
|
4940
5013
|
}
|
|
5014
|
+
if (options.defaults)
|
|
5015
|
+
object.pulseRateStrict = null;
|
|
4941
5016
|
if (message.pulseRate && message.pulseRate.length) {
|
|
4942
5017
|
object.pulseRate = [];
|
|
4943
5018
|
for (var j = 0; j < message.pulseRate.length; ++j)
|
|
@@ -4953,6 +5028,8 @@ $root.presage = (function() {
|
|
|
4953
5028
|
for (var j = 0; j < message.hrv.length; ++j)
|
|
4954
5029
|
object.hrv[j] = $root.presage.smartspectra.Hrv.toObject(message.hrv[j], options, q + 1);
|
|
4955
5030
|
}
|
|
5031
|
+
if (message.pulseRateStrict != null && Object.hasOwnProperty.call(message, "pulseRateStrict"))
|
|
5032
|
+
object.pulseRateStrict = $root.presage.smartspectra.Strict.toObject(message.pulseRateStrict, options, q + 1);
|
|
4956
5033
|
return object;
|
|
4957
5034
|
};
|
|
4958
5035
|
|
|
@@ -6170,6 +6247,457 @@ $root.presage = (function() {
|
|
|
6170
6247
|
return Point3dFloat;
|
|
6171
6248
|
})();
|
|
6172
6249
|
|
|
6250
|
+
/**
|
|
6251
|
+
* FeatureType enum.
|
|
6252
|
+
* @name presage.smartspectra.FeatureType
|
|
6253
|
+
* @enum {number}
|
|
6254
|
+
* @property {number} BREATHING=0 BREATHING value
|
|
6255
|
+
* @property {number} MICROMOTION=1 MICROMOTION value
|
|
6256
|
+
* @property {number} EDA=2 EDA value
|
|
6257
|
+
* @property {number} FACE=3 FACE value
|
|
6258
|
+
* @property {number} CARDIO=4 CARDIO value
|
|
6259
|
+
*/
|
|
6260
|
+
smartspectra.FeatureType = (function() {
|
|
6261
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
6262
|
+
values[valuesById[0] = "BREATHING"] = 0;
|
|
6263
|
+
values[valuesById[1] = "MICROMOTION"] = 1;
|
|
6264
|
+
values[valuesById[2] = "EDA"] = 2;
|
|
6265
|
+
values[valuesById[3] = "FACE"] = 3;
|
|
6266
|
+
values[valuesById[4] = "CARDIO"] = 4;
|
|
6267
|
+
return values;
|
|
6268
|
+
})();
|
|
6269
|
+
|
|
6270
|
+
/**
|
|
6271
|
+
* MetricType enum.
|
|
6272
|
+
* @name presage.smartspectra.MetricType
|
|
6273
|
+
* @enum {number}
|
|
6274
|
+
* @property {number} CHEST_BREATHING=0 CHEST_BREATHING value
|
|
6275
|
+
* @property {number} ABDOMEN_BREATHING=1 ABDOMEN_BREATHING value
|
|
6276
|
+
* @property {number} BREATHING_RATE=2 BREATHING_RATE value
|
|
6277
|
+
* @property {number} BREATHING_AMPLITUDE=3 BREATHING_AMPLITUDE value
|
|
6278
|
+
* @property {number} APNEA=4 APNEA value
|
|
6279
|
+
* @property {number} RESPIRATORY_LINE_LENGTH=5 RESPIRATORY_LINE_LENGTH value
|
|
6280
|
+
* @property {number} BASELINE=6 BASELINE value
|
|
6281
|
+
* @property {number} INHALE_EXHALE_RATIO=7 INHALE_EXHALE_RATIO value
|
|
6282
|
+
* @property {number} GLUTES_MICROMOTION=8 GLUTES_MICROMOTION value
|
|
6283
|
+
* @property {number} KNEES_MICROMOTION=9 KNEES_MICROMOTION value
|
|
6284
|
+
* @property {number} EDA_TRACE=10 EDA_TRACE value
|
|
6285
|
+
* @property {number} FACE_LANDMARKS=11 FACE_LANDMARKS value
|
|
6286
|
+
* @property {number} BLINKING=12 BLINKING value
|
|
6287
|
+
* @property {number} TALKING=13 TALKING value
|
|
6288
|
+
* @property {number} EXPRESSIONS=14 EXPRESSIONS value
|
|
6289
|
+
* @property {number} PULSE_RATE=15 PULSE_RATE value
|
|
6290
|
+
* @property {number} ARTERIAL_PRESSURE_TRACE=16 ARTERIAL_PRESSURE_TRACE value
|
|
6291
|
+
* @property {number} HRV=17 HRV value
|
|
6292
|
+
* @property {number} PULSE_RATE_STRICT=18 PULSE_RATE_STRICT value
|
|
6293
|
+
* @property {number} BREATHING_RATE_STRICT=19 BREATHING_RATE_STRICT value
|
|
6294
|
+
*/
|
|
6295
|
+
smartspectra.MetricType = (function() {
|
|
6296
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
6297
|
+
values[valuesById[0] = "CHEST_BREATHING"] = 0;
|
|
6298
|
+
values[valuesById[1] = "ABDOMEN_BREATHING"] = 1;
|
|
6299
|
+
values[valuesById[2] = "BREATHING_RATE"] = 2;
|
|
6300
|
+
values[valuesById[3] = "BREATHING_AMPLITUDE"] = 3;
|
|
6301
|
+
values[valuesById[4] = "APNEA"] = 4;
|
|
6302
|
+
values[valuesById[5] = "RESPIRATORY_LINE_LENGTH"] = 5;
|
|
6303
|
+
values[valuesById[6] = "BASELINE"] = 6;
|
|
6304
|
+
values[valuesById[7] = "INHALE_EXHALE_RATIO"] = 7;
|
|
6305
|
+
values[valuesById[8] = "GLUTES_MICROMOTION"] = 8;
|
|
6306
|
+
values[valuesById[9] = "KNEES_MICROMOTION"] = 9;
|
|
6307
|
+
values[valuesById[10] = "EDA_TRACE"] = 10;
|
|
6308
|
+
values[valuesById[11] = "FACE_LANDMARKS"] = 11;
|
|
6309
|
+
values[valuesById[12] = "BLINKING"] = 12;
|
|
6310
|
+
values[valuesById[13] = "TALKING"] = 13;
|
|
6311
|
+
values[valuesById[14] = "EXPRESSIONS"] = 14;
|
|
6312
|
+
values[valuesById[15] = "PULSE_RATE"] = 15;
|
|
6313
|
+
values[valuesById[16] = "ARTERIAL_PRESSURE_TRACE"] = 16;
|
|
6314
|
+
values[valuesById[17] = "HRV"] = 17;
|
|
6315
|
+
values[valuesById[18] = "PULSE_RATE_STRICT"] = 18;
|
|
6316
|
+
values[valuesById[19] = "BREATHING_RATE_STRICT"] = 19;
|
|
6317
|
+
return values;
|
|
6318
|
+
})();
|
|
6319
|
+
|
|
6320
|
+
smartspectra.RequestedMetrics = (function() {
|
|
6321
|
+
|
|
6322
|
+
/**
|
|
6323
|
+
* Properties of a RequestedMetrics.
|
|
6324
|
+
* @memberof presage.smartspectra
|
|
6325
|
+
* @interface IRequestedMetrics
|
|
6326
|
+
* @property {Array.<presage.smartspectra.MetricType>|null} [metrics] RequestedMetrics metrics
|
|
6327
|
+
*/
|
|
6328
|
+
|
|
6329
|
+
/**
|
|
6330
|
+
* Constructs a new RequestedMetrics.
|
|
6331
|
+
* @memberof presage.smartspectra
|
|
6332
|
+
* @classdesc Represents a RequestedMetrics.
|
|
6333
|
+
* @implements IRequestedMetrics
|
|
6334
|
+
* @constructor
|
|
6335
|
+
* @param {presage.smartspectra.IRequestedMetrics=} [properties] Properties to set
|
|
6336
|
+
*/
|
|
6337
|
+
function RequestedMetrics(properties) {
|
|
6338
|
+
this.metrics = [];
|
|
6339
|
+
if (properties)
|
|
6340
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6341
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
6342
|
+
this[keys[i]] = properties[keys[i]];
|
|
6343
|
+
}
|
|
6344
|
+
|
|
6345
|
+
/**
|
|
6346
|
+
* RequestedMetrics metrics.
|
|
6347
|
+
* @member {Array.<presage.smartspectra.MetricType>} metrics
|
|
6348
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6349
|
+
* @instance
|
|
6350
|
+
*/
|
|
6351
|
+
RequestedMetrics.prototype.metrics = $util.emptyArray;
|
|
6352
|
+
|
|
6353
|
+
/**
|
|
6354
|
+
* Creates a new RequestedMetrics instance using the specified properties.
|
|
6355
|
+
* @function create
|
|
6356
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6357
|
+
* @static
|
|
6358
|
+
* @param {presage.smartspectra.IRequestedMetrics=} [properties] Properties to set
|
|
6359
|
+
* @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics instance
|
|
6360
|
+
*/
|
|
6361
|
+
RequestedMetrics.create = function create(properties) {
|
|
6362
|
+
return new RequestedMetrics(properties);
|
|
6363
|
+
};
|
|
6364
|
+
|
|
6365
|
+
/**
|
|
6366
|
+
* Encodes the specified RequestedMetrics message. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
6367
|
+
* @function encode
|
|
6368
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6369
|
+
* @static
|
|
6370
|
+
* @param {presage.smartspectra.IRequestedMetrics} message RequestedMetrics message or plain object to encode
|
|
6371
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6372
|
+
* @returns {$protobuf.Writer} Writer
|
|
6373
|
+
*/
|
|
6374
|
+
RequestedMetrics.encode = function encode(message, writer, q) {
|
|
6375
|
+
if (!writer)
|
|
6376
|
+
writer = $Writer.create();
|
|
6377
|
+
if (q === undefined)
|
|
6378
|
+
q = 0;
|
|
6379
|
+
if (q > $util.recursionLimit)
|
|
6380
|
+
throw Error("max depth exceeded");
|
|
6381
|
+
if (message.metrics != null && message.metrics.length) {
|
|
6382
|
+
writer.uint32(/* id 1, wireType 2 =*/10).fork();
|
|
6383
|
+
for (var i = 0; i < message.metrics.length; ++i)
|
|
6384
|
+
writer.int32(message.metrics[i]);
|
|
6385
|
+
writer.ldelim();
|
|
6386
|
+
}
|
|
6387
|
+
return writer;
|
|
6388
|
+
};
|
|
6389
|
+
|
|
6390
|
+
/**
|
|
6391
|
+
* Encodes the specified RequestedMetrics message, length delimited. Does not implicitly {@link presage.smartspectra.RequestedMetrics.verify|verify} messages.
|
|
6392
|
+
* @function encodeDelimited
|
|
6393
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6394
|
+
* @static
|
|
6395
|
+
* @param {presage.smartspectra.IRequestedMetrics} message RequestedMetrics message or plain object to encode
|
|
6396
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6397
|
+
* @returns {$protobuf.Writer} Writer
|
|
6398
|
+
*/
|
|
6399
|
+
RequestedMetrics.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6400
|
+
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
6401
|
+
};
|
|
6402
|
+
|
|
6403
|
+
/**
|
|
6404
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer.
|
|
6405
|
+
* @function decode
|
|
6406
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6407
|
+
* @static
|
|
6408
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6409
|
+
* @param {number} [length] Message length if known beforehand
|
|
6410
|
+
* @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
|
|
6411
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6412
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6413
|
+
*/
|
|
6414
|
+
RequestedMetrics.decode = function decode(reader, length, error, long) {
|
|
6415
|
+
if (!(reader instanceof $Reader))
|
|
6416
|
+
reader = $Reader.create(reader);
|
|
6417
|
+
if (long === undefined)
|
|
6418
|
+
long = 0;
|
|
6419
|
+
if (long > $Reader.recursionLimit)
|
|
6420
|
+
throw Error("maximum nesting depth exceeded");
|
|
6421
|
+
var end, message;
|
|
6422
|
+
if (length === undefined)
|
|
6423
|
+
end = reader.len;
|
|
6424
|
+
else {
|
|
6425
|
+
end = reader.pos + length;
|
|
6426
|
+
if (end > reader.len)
|
|
6427
|
+
throw RangeError("index out of range");
|
|
6428
|
+
length = reader.len;
|
|
6429
|
+
reader.len = end;
|
|
6430
|
+
}
|
|
6431
|
+
message = new $root.presage.smartspectra.RequestedMetrics();
|
|
6432
|
+
while (reader.pos < end) {
|
|
6433
|
+
var tag = reader.uint32();
|
|
6434
|
+
if (tag === error)
|
|
6435
|
+
break;
|
|
6436
|
+
switch (tag >>> 3) {
|
|
6437
|
+
case 1: {
|
|
6438
|
+
if (!(message.metrics && message.metrics.length))
|
|
6439
|
+
message.metrics = [];
|
|
6440
|
+
if ((tag & 7) === 2) {
|
|
6441
|
+
var end2 = reader.uint32() + reader.pos;
|
|
6442
|
+
if (end2 > reader.len)
|
|
6443
|
+
throw RangeError("index out of range");
|
|
6444
|
+
reader.len = end2;
|
|
6445
|
+
while (reader.pos < end2)
|
|
6446
|
+
message.metrics.push(reader.int32());
|
|
6447
|
+
if (reader.pos !== end2)
|
|
6448
|
+
throw RangeError("index out of range");
|
|
6449
|
+
reader.len = end;
|
|
6450
|
+
} else
|
|
6451
|
+
message.metrics.push(reader.int32());
|
|
6452
|
+
break;
|
|
6453
|
+
}
|
|
6454
|
+
default:
|
|
6455
|
+
reader.skipType(tag & 7, long);
|
|
6456
|
+
break;
|
|
6457
|
+
}
|
|
6458
|
+
}
|
|
6459
|
+
if (length !== undefined) {
|
|
6460
|
+
if (reader.pos !== end)
|
|
6461
|
+
throw RangeError("index out of range");
|
|
6462
|
+
reader.len = length;
|
|
6463
|
+
}
|
|
6464
|
+
return message;
|
|
6465
|
+
};
|
|
6466
|
+
|
|
6467
|
+
/**
|
|
6468
|
+
* Decodes a RequestedMetrics message from the specified reader or buffer, length delimited.
|
|
6469
|
+
* @function decodeDelimited
|
|
6470
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6471
|
+
* @static
|
|
6472
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6473
|
+
* @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
|
|
6474
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6475
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6476
|
+
*/
|
|
6477
|
+
RequestedMetrics.decodeDelimited = function decodeDelimited(reader) {
|
|
6478
|
+
if (!(reader instanceof $Reader))
|
|
6479
|
+
reader = new $Reader(reader);
|
|
6480
|
+
return this.decode(reader, reader.uint32());
|
|
6481
|
+
};
|
|
6482
|
+
|
|
6483
|
+
/**
|
|
6484
|
+
* Verifies a RequestedMetrics message.
|
|
6485
|
+
* @function verify
|
|
6486
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6487
|
+
* @static
|
|
6488
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
6489
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
6490
|
+
*/
|
|
6491
|
+
RequestedMetrics.verify = function verify(message, long) {
|
|
6492
|
+
if (typeof message !== "object" || message === null)
|
|
6493
|
+
return "object expected";
|
|
6494
|
+
if (long === undefined)
|
|
6495
|
+
long = 0;
|
|
6496
|
+
if (long > $util.recursionLimit)
|
|
6497
|
+
return "maximum nesting depth exceeded";
|
|
6498
|
+
if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) {
|
|
6499
|
+
if (!Array.isArray(message.metrics))
|
|
6500
|
+
return "metrics: array expected";
|
|
6501
|
+
for (var i = 0; i < message.metrics.length; ++i)
|
|
6502
|
+
switch (message.metrics[i]) {
|
|
6503
|
+
default:
|
|
6504
|
+
return "metrics: enum value[] expected";
|
|
6505
|
+
case 0:
|
|
6506
|
+
case 1:
|
|
6507
|
+
case 2:
|
|
6508
|
+
case 3:
|
|
6509
|
+
case 4:
|
|
6510
|
+
case 5:
|
|
6511
|
+
case 6:
|
|
6512
|
+
case 7:
|
|
6513
|
+
case 8:
|
|
6514
|
+
case 9:
|
|
6515
|
+
case 10:
|
|
6516
|
+
case 11:
|
|
6517
|
+
case 12:
|
|
6518
|
+
case 13:
|
|
6519
|
+
case 14:
|
|
6520
|
+
case 15:
|
|
6521
|
+
case 16:
|
|
6522
|
+
case 17:
|
|
6523
|
+
case 18:
|
|
6524
|
+
case 19:
|
|
6525
|
+
break;
|
|
6526
|
+
}
|
|
6527
|
+
}
|
|
6528
|
+
return null;
|
|
6529
|
+
};
|
|
6530
|
+
|
|
6531
|
+
/**
|
|
6532
|
+
* Creates a RequestedMetrics message from a plain object. Also converts values to their respective internal types.
|
|
6533
|
+
* @function fromObject
|
|
6534
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6535
|
+
* @static
|
|
6536
|
+
* @param {Object.<string,*>} object Plain object
|
|
6537
|
+
* @returns {presage.smartspectra.RequestedMetrics} RequestedMetrics
|
|
6538
|
+
*/
|
|
6539
|
+
RequestedMetrics.fromObject = function fromObject(object, long) {
|
|
6540
|
+
if (object instanceof $root.presage.smartspectra.RequestedMetrics)
|
|
6541
|
+
return object;
|
|
6542
|
+
if (!$util.isObject(object))
|
|
6543
|
+
throw TypeError(".presage.smartspectra.RequestedMetrics: object expected");
|
|
6544
|
+
if (long === undefined)
|
|
6545
|
+
long = 0;
|
|
6546
|
+
if (long > $util.recursionLimit)
|
|
6547
|
+
throw Error("maximum nesting depth exceeded");
|
|
6548
|
+
var message = new $root.presage.smartspectra.RequestedMetrics();
|
|
6549
|
+
if (object.metrics) {
|
|
6550
|
+
if (!Array.isArray(object.metrics))
|
|
6551
|
+
throw TypeError(".presage.smartspectra.RequestedMetrics.metrics: array expected");
|
|
6552
|
+
message.metrics = [];
|
|
6553
|
+
for (var i = 0; i < object.metrics.length; ++i)
|
|
6554
|
+
switch (object.metrics[i]) {
|
|
6555
|
+
default:
|
|
6556
|
+
if (typeof object.metrics[i] === "number") {
|
|
6557
|
+
message.metrics[i] = object.metrics[i];
|
|
6558
|
+
break;
|
|
6559
|
+
}
|
|
6560
|
+
case "CHEST_BREATHING":
|
|
6561
|
+
case 0:
|
|
6562
|
+
message.metrics[i] = 0;
|
|
6563
|
+
break;
|
|
6564
|
+
case "ABDOMEN_BREATHING":
|
|
6565
|
+
case 1:
|
|
6566
|
+
message.metrics[i] = 1;
|
|
6567
|
+
break;
|
|
6568
|
+
case "BREATHING_RATE":
|
|
6569
|
+
case 2:
|
|
6570
|
+
message.metrics[i] = 2;
|
|
6571
|
+
break;
|
|
6572
|
+
case "BREATHING_AMPLITUDE":
|
|
6573
|
+
case 3:
|
|
6574
|
+
message.metrics[i] = 3;
|
|
6575
|
+
break;
|
|
6576
|
+
case "APNEA":
|
|
6577
|
+
case 4:
|
|
6578
|
+
message.metrics[i] = 4;
|
|
6579
|
+
break;
|
|
6580
|
+
case "RESPIRATORY_LINE_LENGTH":
|
|
6581
|
+
case 5:
|
|
6582
|
+
message.metrics[i] = 5;
|
|
6583
|
+
break;
|
|
6584
|
+
case "BASELINE":
|
|
6585
|
+
case 6:
|
|
6586
|
+
message.metrics[i] = 6;
|
|
6587
|
+
break;
|
|
6588
|
+
case "INHALE_EXHALE_RATIO":
|
|
6589
|
+
case 7:
|
|
6590
|
+
message.metrics[i] = 7;
|
|
6591
|
+
break;
|
|
6592
|
+
case "GLUTES_MICROMOTION":
|
|
6593
|
+
case 8:
|
|
6594
|
+
message.metrics[i] = 8;
|
|
6595
|
+
break;
|
|
6596
|
+
case "KNEES_MICROMOTION":
|
|
6597
|
+
case 9:
|
|
6598
|
+
message.metrics[i] = 9;
|
|
6599
|
+
break;
|
|
6600
|
+
case "EDA_TRACE":
|
|
6601
|
+
case 10:
|
|
6602
|
+
message.metrics[i] = 10;
|
|
6603
|
+
break;
|
|
6604
|
+
case "FACE_LANDMARKS":
|
|
6605
|
+
case 11:
|
|
6606
|
+
message.metrics[i] = 11;
|
|
6607
|
+
break;
|
|
6608
|
+
case "BLINKING":
|
|
6609
|
+
case 12:
|
|
6610
|
+
message.metrics[i] = 12;
|
|
6611
|
+
break;
|
|
6612
|
+
case "TALKING":
|
|
6613
|
+
case 13:
|
|
6614
|
+
message.metrics[i] = 13;
|
|
6615
|
+
break;
|
|
6616
|
+
case "EXPRESSIONS":
|
|
6617
|
+
case 14:
|
|
6618
|
+
message.metrics[i] = 14;
|
|
6619
|
+
break;
|
|
6620
|
+
case "PULSE_RATE":
|
|
6621
|
+
case 15:
|
|
6622
|
+
message.metrics[i] = 15;
|
|
6623
|
+
break;
|
|
6624
|
+
case "ARTERIAL_PRESSURE_TRACE":
|
|
6625
|
+
case 16:
|
|
6626
|
+
message.metrics[i] = 16;
|
|
6627
|
+
break;
|
|
6628
|
+
case "HRV":
|
|
6629
|
+
case 17:
|
|
6630
|
+
message.metrics[i] = 17;
|
|
6631
|
+
break;
|
|
6632
|
+
case "PULSE_RATE_STRICT":
|
|
6633
|
+
case 18:
|
|
6634
|
+
message.metrics[i] = 18;
|
|
6635
|
+
break;
|
|
6636
|
+
case "BREATHING_RATE_STRICT":
|
|
6637
|
+
case 19:
|
|
6638
|
+
message.metrics[i] = 19;
|
|
6639
|
+
break;
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
return message;
|
|
6643
|
+
};
|
|
6644
|
+
|
|
6645
|
+
/**
|
|
6646
|
+
* Creates a plain object from a RequestedMetrics message. Also converts values to other types if specified.
|
|
6647
|
+
* @function toObject
|
|
6648
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6649
|
+
* @static
|
|
6650
|
+
* @param {presage.smartspectra.RequestedMetrics} message RequestedMetrics
|
|
6651
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
6652
|
+
* @returns {Object.<string,*>} Plain object
|
|
6653
|
+
*/
|
|
6654
|
+
RequestedMetrics.toObject = function toObject(message, options, q) {
|
|
6655
|
+
if (!options)
|
|
6656
|
+
options = {};
|
|
6657
|
+
if (q === undefined)
|
|
6658
|
+
q = 0;
|
|
6659
|
+
if (q > $util.recursionLimit)
|
|
6660
|
+
throw Error("max depth exceeded");
|
|
6661
|
+
var object = {};
|
|
6662
|
+
if (options.arrays || options.defaults)
|
|
6663
|
+
object.metrics = [];
|
|
6664
|
+
if (message.metrics && message.metrics.length) {
|
|
6665
|
+
object.metrics = [];
|
|
6666
|
+
for (var j = 0; j < message.metrics.length; ++j)
|
|
6667
|
+
object.metrics[j] = options.enums === String ? $root.presage.smartspectra.MetricType[message.metrics[j]] === undefined ? message.metrics[j] : $root.presage.smartspectra.MetricType[message.metrics[j]] : message.metrics[j];
|
|
6668
|
+
}
|
|
6669
|
+
return object;
|
|
6670
|
+
};
|
|
6671
|
+
|
|
6672
|
+
/**
|
|
6673
|
+
* Converts this RequestedMetrics to JSON.
|
|
6674
|
+
* @function toJSON
|
|
6675
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6676
|
+
* @instance
|
|
6677
|
+
* @returns {Object.<string,*>} JSON object
|
|
6678
|
+
*/
|
|
6679
|
+
RequestedMetrics.prototype.toJSON = function toJSON() {
|
|
6680
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6681
|
+
};
|
|
6682
|
+
|
|
6683
|
+
/**
|
|
6684
|
+
* Gets the default type url for RequestedMetrics
|
|
6685
|
+
* @function getTypeUrl
|
|
6686
|
+
* @memberof presage.smartspectra.RequestedMetrics
|
|
6687
|
+
* @static
|
|
6688
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6689
|
+
* @returns {string} The default type url
|
|
6690
|
+
*/
|
|
6691
|
+
RequestedMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6692
|
+
if (typeUrlPrefix === undefined) {
|
|
6693
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6694
|
+
}
|
|
6695
|
+
return typeUrlPrefix + "/presage.smartspectra.RequestedMetrics";
|
|
6696
|
+
};
|
|
6697
|
+
|
|
6698
|
+
return RequestedMetrics;
|
|
6699
|
+
})();
|
|
6700
|
+
|
|
6173
6701
|
return smartspectra;
|
|
6174
6702
|
})();
|
|
6175
6703
|
|
package/js/renderer/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export {
|
|
|
18
18
|
ValidationCode,
|
|
19
19
|
SmartSpectraErrorCode,
|
|
20
20
|
FrameTransform,
|
|
21
|
+
MetricType,
|
|
21
22
|
breathingMetrics,
|
|
22
23
|
cardioMetrics,
|
|
23
24
|
faceMetrics,
|
|
@@ -31,6 +32,7 @@ export type {
|
|
|
31
32
|
ValidationCodeValue,
|
|
32
33
|
SmartSpectraErrorCodeValue,
|
|
33
34
|
FrameTransformValue,
|
|
35
|
+
MetricTypeValue,
|
|
34
36
|
SmartSpectraOptions,
|
|
35
37
|
} from '../../js/index';
|
|
36
38
|
|
package/js/smartspectra.js
CHANGED
|
@@ -14,6 +14,7 @@ const {
|
|
|
14
14
|
ValidationCode,
|
|
15
15
|
SmartSpectraErrorCode,
|
|
16
16
|
FrameTransform,
|
|
17
|
+
MetricType,
|
|
17
18
|
breathingMetrics,
|
|
18
19
|
cardioMetrics,
|
|
19
20
|
faceMetrics,
|
|
@@ -331,6 +332,7 @@ module.exports = {
|
|
|
331
332
|
ValidationCode,
|
|
332
333
|
SmartSpectraErrorCode,
|
|
333
334
|
FrameTransform,
|
|
335
|
+
MetricType,
|
|
334
336
|
breathingMetrics,
|
|
335
337
|
cardioMetrics,
|
|
336
338
|
faceMetrics,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartspectra/node-sdk",
|
|
3
|
-
"version": "3.4.0-rc.
|
|
3
|
+
"version": "3.4.0-rc.7",
|
|
4
4
|
"description": "Node.js (Electron) FFI binding for SmartSpectra vitals measurement",
|
|
5
5
|
"author": "Presage Technologies, Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"koffi": "^2.10.0",
|
|
73
73
|
"protobufjs": "^7.6.5",
|
|
74
|
-
"@smartspectra/node-sdk-linux-x64": "3.4.0-rc.
|
|
75
|
-
"@smartspectra/node-sdk-linux-arm64": "3.4.0-rc.
|
|
76
|
-
"@smartspectra/node-sdk-darwin-arm64": "3.4.0-rc.
|
|
77
|
-
"@smartspectra/node-sdk-win32-x64": "3.4.0-rc.
|
|
74
|
+
"@smartspectra/node-sdk-linux-x64": "3.4.0-rc.7",
|
|
75
|
+
"@smartspectra/node-sdk-linux-arm64": "3.4.0-rc.7",
|
|
76
|
+
"@smartspectra/node-sdk-darwin-arm64": "3.4.0-rc.7",
|
|
77
|
+
"@smartspectra/node-sdk-win32-x64": "3.4.0-rc.7"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/node": "^24.0.0",
|