@ovok/native 1.16.1-dev.2175 → 1.16.1-dev.2177
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/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +16 -6
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +20 -5
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +4 -4
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +16 -6
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +20 -5
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +4 -4
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +2 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +4 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -66,7 +66,6 @@ const viatomBpMonitor = (advertisedName, params) => {
|
|
|
66
66
|
clockSync: "supported",
|
|
67
67
|
clockSyncProtocol: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
68
68
|
fileTransfer: BP3_MODEL_NAMES.includes(advertisedName) ? "bp3" : "bp2",
|
|
69
|
-
rejectEncryptionAtBytes: [4],
|
|
70
69
|
pollCommand: RT_DATA,
|
|
71
70
|
pollIntervalMs: 200,
|
|
72
71
|
minLengthBytes: MIN_LENGTH_BYTES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["le32FromHex","defineCustomDevice","recordedAtFromLocalSeconds","lepuNameMatch","lepuDevice","createTmbBloodPressureFrameHandler","createViatomFrameHandler","BP2_CASES","BP2_ECG_CASES","BP3_CASES","BP3_ECG_CASES","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","id","toLowerCase","replace","nameMatch","clockSync","clockSyncProtocol","fileTransfer","
|
|
1
|
+
{"version":3,"names":["le32FromHex","defineCustomDevice","recordedAtFromLocalSeconds","lepuNameMatch","lepuDevice","createTmbBloodPressureFrameHandler","createViatomFrameHandler","BP2_CASES","BP2_ECG_CASES","BP3_CASES","BP3_ECG_CASES","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","RESULT_CODE_INDEX","DEVICE_TIME_INDEX","rejectFailedResult","reading","frame","resultCode","Number","parseInt","Error","toString","padStart","recordedAt","length","undefined","viatomBpMonitor","advertisedName","params","isBp3","BP3_MODEL_NAMES","includes","hasEcg","id","toLowerCase","replace","nameMatch","clockSync","clockSyncProtocol","fileTransfer","pollCommand","pollIntervalMs","minLengthBytes","caseSelectorBytes","cases","map","each","decorateReading","createFrameHandler","expectedDeviceTypes","bp2aMonitor","bp2tMonitor","bp2wMonitor","bp2vMonitor","lpBp2wMonitor","TMB_SERVICE","TMB_WRITE","TMB_ACK","TMB_NOTIFY","TMB_INDICATE","tmbBpMonitor","stuckDataTimeoutMs","preferredMtu","tmb","serviceUuid","writeUuid","ackUuid","services","uuid","monitor","selector","kind","TMB_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;AAAA;;AAMA,SAASA,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,kBAAkB,QAAQ,sCAAmC;AACtE,SAASC,0BAA0B,QAAQ,qBAAkB;AAC7D,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,UAAU,QAAQ,4BAAyB;AACpD,SAASC,kCAAkC,QAAQ,0BAAuB;AAE1E,SAASC,wBAAwB,QAAQ,4BAAyB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YAAY;MAClBhB,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtB3B,KAAK,EAAE;QAAE0B,cAAc,EAAE;MAAE,CAAC;MAC5BE,KAAK,EAAE,CAAC;QAAE0B,QAAQ,EAAE,GAAG;QAAEC,IAAI,EAAE;MAAQ,CAAC;IAC1C,CAAC;EAEL,CAAC;AAEL,CAAC,EACD;EAAEvB,kBAAkB,EAAE7C;AAAmC,CAC3D,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM2B,eAAkC,GAAG,CACzC,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,CACR;;AAED;AACA,MAAM0C,eAAkC,GAAG,CACzC,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,CACX;AAED,SACEtB,WAAW,EACXG,WAAW,EACXF,WAAW,EACXC,WAAW,EACXtB,eAAe,EACfwB,aAAa,EACbkB,eAAe,EACfZ,YAAY,EACZlC,eAAe","ignoreList":[]}
|
package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare class BP2Device extends BTManagedDevice<IntegratedDevices.BP2> {
|
|
|
29
29
|
constructor(device: Device, params: CreateDeviceParams<IntegratedDevices.BP2>);
|
|
30
30
|
protected onStreamStart: () => void;
|
|
31
31
|
protected createCommandSequencer: () => CommandSequencer;
|
|
32
|
+
private readonly lepuSession;
|
|
32
33
|
protected frameReader: BP2FrameReader;
|
|
33
34
|
protected preferredMtu: number;
|
|
34
35
|
protected handleSuccessResult(successResult: MeasurementWithCaseType<MeasurementTypeForDevices<[IntegratedDevices.BP2]>>, collectedValues: string[]): void | boolean;
|
package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bp2.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.device.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQ9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"bp2.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.device.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQ9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;;GAGG;AACH,4DA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AAO,CAAC,YAAY,CAiBF;IAElB,OAAO,CAAC,iBAAiB,CA6CvB;IAEF,OAAO,CAAC,oBAAoB,CAwB1B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,oBAAoB,CAO1B;IAEF,OAAO,CAAC,qBAAqB;CAmD9B;AAED,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LepuFrameReader } from "../lepu/lepu.frame-reader";
|
|
2
|
+
import { LepuSession } from "../lepu/lepu.session";
|
|
2
3
|
/**
|
|
3
4
|
* Reads Lepu protocol frames as used by the BP2.
|
|
4
5
|
*
|
|
@@ -6,6 +7,6 @@ import { LepuFrameReader } from "../lepu/lepu.frame-reader";
|
|
|
6
7
|
* thing that makes it a BP2 is which start byte it accepts.
|
|
7
8
|
*/
|
|
8
9
|
export declare class BP2FrameReader extends LepuFrameReader {
|
|
9
|
-
constructor();
|
|
10
|
+
constructor(session?: LepuSession);
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=bp2.frame-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bp2.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"bp2.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKnD;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,eAAe;gBAC9B,OAAO,CAAC,EAAE,WAAW;CAGzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ClockSyncOptions } from "../../../types/clock-sync";
|
|
2
|
-
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
3
2
|
import { CustomLepuSpec } from "../../../types/custom-lepu-spec";
|
|
4
3
|
import { DeviceData } from "../../../types/device-data";
|
|
5
4
|
import { LepuDeviceInfo } from "../lepu/lepu.device-info";
|
|
5
|
+
import { LepuIdentityGate } from "../lepu/lepu.identity-gate";
|
|
6
6
|
interface IdentityReport {
|
|
7
7
|
onIdentified: (info: LepuDeviceInfo) => void;
|
|
8
8
|
onRefused: (reason: string) => void;
|
|
@@ -26,7 +26,7 @@ declare const recordLepuIdentity: (deviceData: DeviceData, info: LepuDeviceInfo)
|
|
|
26
26
|
* answers on the one it is addressed with, so the list matters for reading and its head for
|
|
27
27
|
* writing.
|
|
28
28
|
*/
|
|
29
|
-
declare const createLepuSequencer: (lepu: CustomLepuSpec, report: IdentityReport, clockSync?: ClockSyncOptions, manufacturerData?: string) =>
|
|
29
|
+
declare const createLepuSequencer: (lepu: CustomLepuSpec, report: IdentityReport, clockSync?: ClockSyncOptions, manufacturerData?: string) => LepuIdentityGate;
|
|
30
30
|
declare const selectLepu: (lepu: CustomLepuSpec, manufacturerData?: string) => CustomLepuSpec;
|
|
31
31
|
export { createLepuSequencer, recordLepuIdentity, selectLepu };
|
|
32
32
|
//# sourceMappingURL=custom-lepu-sequencer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-lepu-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"custom-lepu-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAM9D,UAAU,cAAc;IACtB,YAAY,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,kBAAkB,GACtB,YAAY,UAAU,EACtB,MAAM,cAAc,KACnB,IAOF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,QAAA,MAAM,mBAAmB,GACvB,MAAM,cAAc,EACpB,QAAQ,cAAc,EACtB,YAAY,gBAAgB,EAC5B,mBAAmB,MAAM,KACxB,gBA6BF,CAAC;AAEF,QAAA,MAAM,UAAU,GACd,MAAM,cAAc,EACpB,mBAAmB,MAAM,KACxB,cAuBF,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class CustomDevice extends BTManagedDevice<CustomDeviceId> {
|
|
|
28
28
|
private readonly validators;
|
|
29
29
|
private readonly sessionPolicy;
|
|
30
30
|
private readonly sessionAggregates;
|
|
31
|
+
private readonly lepuSession;
|
|
31
32
|
private sessionStartedAt;
|
|
32
33
|
constructor(device: Device, params: CreateDeviceParams<CustomDeviceId>, definition: CustomDeviceDefinition);
|
|
33
34
|
/** Gives a declaration that computes its commands at connect time the context it needs to do so. */
|
|
@@ -42,6 +43,8 @@ export declare class CustomDevice extends BTManagedDevice<CustomDeviceId> {
|
|
|
42
43
|
* gate would poll hardware it had not identified, which is the case the gate exists for.
|
|
43
44
|
*/
|
|
44
45
|
private declareLepuProtocol;
|
|
46
|
+
/** The standard family runs the vendor's encryption handshake first when it advertises one. */
|
|
47
|
+
private withEncryption;
|
|
45
48
|
private reportViatomEcgFile;
|
|
46
49
|
private reportViatomBp2File;
|
|
47
50
|
private reportViatomBp3File;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom.device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"custom.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom.device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EACL,sBAAsB,EAEvB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAQvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAuBvD,KAAK,mBAAmB,GAAG,yBAAyB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AACvE,KAAK,YAAY,GAAG,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;AAQjE;;;;;;;;GAQG;AACH,qBAAa,YAAa,SAAQ,eAAe,CAAC,cAAc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BAA2B,GACnC,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,KACvD,OAAO,CAAS;IAEnB;;;OAGG;IACH,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,YAAY,EAC3B,eAAe,EAAE,MAAM,EAAE,GACxB,IAAI,GAAG,OAAO;IAMjB,OAAO,CAAC,WAAW;IAmBnB,+EAA+E;IAC/E,SAAS,CAAC,oBAAoB,IAAI,IAAI;IA2CtC,OAAO,CAAC,cAAc;IActB,kFAAkF;IAClF,OAAO,CAAC,oBAAoB;IA6C5B,mFAAmF;IACnF,SAAS,CAAC,eAAe,GACvB,SAAS,YAAY,EACrB,QAAQ,SAAS,MAAM,EAAE,EACzB,eAAe,MAAM,KACpB,YAAY,GAAG,IAAI,CAMpB;IAEF,OAAO,CAAC,IAAI;IAMZ;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW;IA2BnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM;IAmBd,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,oBAAoB;CAe7B"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
declare const manufacturerBytes: (manufacturerData?: string) => number[];
|
|
2
2
|
/** Returns true when the advertised byte says that only encrypted traffic is accepted. */
|
|
3
3
|
declare const advertisementRequiresEncryption: (manufacturerData: string | undefined, byteIndexes?: readonly number[]) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* True when the advertisement offers or requires the encryption handshake.
|
|
6
|
+
*
|
|
7
|
+
* Byte 4 describes the second service and wins when it names a protocol; otherwise byte 3
|
|
8
|
+
* does. A level of 1 (optional) or 2 (required) is a handshake for the vendor's own client.
|
|
9
|
+
*/
|
|
10
|
+
declare const advertisesLepuEncryption: (manufacturerData?: string) => boolean;
|
|
4
11
|
/** The vendor uses the low nibble of byte 3 or 4 to select the OxyII service. */
|
|
5
12
|
declare const viatomOxygenUsesV2: (manufacturerData?: string) => boolean;
|
|
6
|
-
export { advertisementRequiresEncryption, manufacturerBytes, viatomOxygenUsesV2, };
|
|
13
|
+
export { advertisementRequiresEncryption, advertisesLepuEncryption, manufacturerBytes, viatomOxygenUsesV2, };
|
|
7
14
|
//# sourceMappingURL=lepu.advertisement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lepu.advertisement.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lepu.advertisement.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"names":[],"mappings":"AAYA,QAAA,MAAM,iBAAiB,GAAI,mBAAmB,MAAM,KAAG,MAAM,EAU5D,CAAC;AAOF,0FAA0F;AAC1F,QAAA,MAAM,+BAA+B,GACnC,kBAAkB,MAAM,GAAG,SAAS,EACpC,cAAa,SAAS,MAAM,EAAO,KAClC,OAKA,CAAC;AAEJ;;;;;GAKG;AACH,QAAA,MAAM,wBAAwB,GAAI,mBAAmB,MAAM,KAAG,OAQ7D,CAAC;AAEF,iFAAiF;AACjF,QAAA,MAAM,kBAAkB,GAAI,mBAAmB,MAAM,KAAG,OAIrD,CAAC;AAEJ,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
2
|
+
import { DeviceCommand } from "../../../types/device-command";
|
|
3
|
+
import { LepuSession } from "./lepu.session";
|
|
4
|
+
type SyncCommandSequencer = Omit<CommandSequencer, "initialCommands"> & {
|
|
5
|
+
initialCommands(): readonly DeviceCommand[];
|
|
6
|
+
};
|
|
7
|
+
interface LepuEncryptionParams {
|
|
8
|
+
write: Omit<DeviceCommand, "frame">;
|
|
9
|
+
session: LepuSession;
|
|
10
|
+
manufacturerData?: string;
|
|
11
|
+
startByte?: string;
|
|
12
|
+
onRefused: (reason: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The sequencer for one connection: wrapped in the handshake when the advertisement asks
|
|
16
|
+
* for encryption, unchanged otherwise. Either way the session starts without a key.
|
|
17
|
+
*/
|
|
18
|
+
declare const withLepuEncryption: (inner: SyncCommandSequencer, params: LepuEncryptionParams) => CommandSequencer;
|
|
19
|
+
export { withLepuEncryption };
|
|
20
|
+
//# sourceMappingURL=lepu.encryption-handshake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.encryption-handshake.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAa9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,GAAG;IACtE,eAAe,IAAI,SAAS,aAAa,EAAE,CAAC;CAC7C,CAAC;AAEF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AA4HD;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,OAAO,oBAAoB,EAC3B,QAAQ,oBAAoB,KAC3B,gBAMF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FrameReadResult } from "../../../types/frame-read-result";
|
|
2
2
|
import { FrameReader } from "../../../types/frame-reader";
|
|
3
|
+
import { LepuSession } from "./lepu.session";
|
|
3
4
|
/**
|
|
4
5
|
* Reads the frame every Lepu device shares.
|
|
5
6
|
*
|
|
@@ -14,7 +15,8 @@ import { FrameReader } from "../../../types/frame-reader";
|
|
|
14
15
|
*/
|
|
15
16
|
export declare class LepuFrameReader implements FrameReader {
|
|
16
17
|
private readonly startBytes;
|
|
17
|
-
|
|
18
|
+
private readonly session?;
|
|
19
|
+
constructor(startBytes: readonly string[], session?: LepuSession | undefined);
|
|
18
20
|
readFrame(buffer: readonly string[]): FrameReadResult;
|
|
19
21
|
private isFrameStart;
|
|
20
22
|
private findFrameStart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lepu.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"lepu.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAY7C;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,YAAW,WAAW;IAE/C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBADR,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,CAAC,EAAE,WAAW,YAAA;IAGjC,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe;IA2B5D,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,cAAc;IAYtB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,gBAAgB;CAMzB"}
|
package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One connection's AES key, from the moment the device hands it over in the handshake.
|
|
3
|
+
*
|
|
4
|
+
* Requests leave encrypted and replies reach every parser in plain text. Without a key, and
|
|
5
|
+
* for an empty payload, frames pass through unchanged, as the vendor's own client does.
|
|
6
|
+
*/
|
|
7
|
+
declare class LepuSession {
|
|
8
|
+
private key;
|
|
9
|
+
begin: (key: readonly number[]) => void;
|
|
10
|
+
end: () => void;
|
|
11
|
+
encryptFrame: (frame: readonly string[]) => string[];
|
|
12
|
+
/** The frame in plain text, or `undefined` when its payload does not decrypt. */
|
|
13
|
+
decryptFrame: (frame: readonly string[]) => string[] | undefined;
|
|
14
|
+
private withPayload;
|
|
15
|
+
}
|
|
16
|
+
export { LepuSession };
|
|
17
|
+
//# sourceMappingURL=lepu.session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.session.ts"],"names":[],"mappings":"AAcA;;;;;GAKG;AACH,cAAM,WAAW;IACf,OAAO,CAAC,GAAG,CAAgC;IAEpC,KAAK,GAAI,KAAK,SAAS,MAAM,EAAE,KAAG,IAAI,CAE3C;IAEK,GAAG,QAAO,IAAI,CAEnB;IAEK,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE,CACE;IAE5D,iFAAiF;IAC1E,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE,GAAG,SAAS,CACxB;IAE9C,OAAO,CAAC,WAAW,CAajB;CACH;AAiBD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viatom.bp-monitors.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEvB,MAAM,yCAAyC,CAAC;AAgEjD,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,GACnB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,
|
|
1
|
+
{"version":3,"file":"viatom.bp-monitors.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEvB,MAAM,yCAAyC,CAAC;AAgEjD,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,GACnB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,sBAiCF,CAAC;AAEF,gDAAgD;AAChD,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,kFAAkF;AAClF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,kFAAkF;AAClF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,mFAAmF;AACnF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,gEAAgE;AAChE,QAAA,MAAM,aAAa,GAAI,QAAQ,cAAc,KAAG,sBACZ,CAAC;AAQrC,gGAAgG;AAChG,QAAA,MAAM,YAAY,GAChB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,sBAoCA,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAkBrC,CAAC;AAEF,2DAA2D;AAC3D,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAQrC,CAAC;AAEF,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,CAAC"}
|
|
@@ -33,7 +33,10 @@ export interface CustomLepuSpec {
|
|
|
33
33
|
requestStartByte?: string;
|
|
34
34
|
/** Selects the OxyII service and framing when the advertisement says protocol V2. */
|
|
35
35
|
manufacturerDataProtocol?: "viatom-oxygen";
|
|
36
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Manufacturer-data byte indexes whose high nibble of 2 means encryption is required, for
|
|
38
|
+
* protocols without the handshake; the standard protocol runs the handshake instead.
|
|
39
|
+
*/
|
|
37
40
|
rejectEncryptionAtBytes?: number[];
|
|
38
41
|
/** Where commands are written. The service must be one this declaration also monitors. */
|
|
39
42
|
write: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-lepu-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-lepu-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAE7B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAElC,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAElC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;IAEnD;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,eAAe,CAAC;IAE3C
|
|
1
|
+
{"version":3,"file":"custom-lepu-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-lepu-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAE7B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAElC,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAElC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;IAEnD;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,eAAe,CAAC;IAE3C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnC,0FAA0F;IAC1F,KAAK,EAAE;QAEL,4DAA4D;QAC5D,WAAW,EAAE,MAAM,CAAC;QAEpB,0DAA0D;QAC1D,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IAEF;;;;;;;OAOG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,2EAA2E;IAC3E,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare class BP2Device extends BTManagedDevice<IntegratedDevices.BP2> {
|
|
|
29
29
|
constructor(device: Device, params: CreateDeviceParams<IntegratedDevices.BP2>);
|
|
30
30
|
protected onStreamStart: () => void;
|
|
31
31
|
protected createCommandSequencer: () => CommandSequencer;
|
|
32
|
+
private readonly lepuSession;
|
|
32
33
|
protected frameReader: BP2FrameReader;
|
|
33
34
|
protected preferredMtu: number;
|
|
34
35
|
protected handleSuccessResult(successResult: MeasurementWithCaseType<MeasurementTypeForDevices<[IntegratedDevices.BP2]>>, collectedValues: string[]): void | boolean;
|
package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bp2.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.device.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQ9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"bp2.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src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;IAEF,SAAS,CAAC,sBAAsB,QAAO,gBAAgB,CAmCrD;IAEF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,SAAS,CAAC,WAAW,EAAE,cAAc,CAAwC;IAC7E,SAAS,CAAC,YAAY,EAAE,MAAM,CAAiB;IAE/C,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,uBAAuB,CACpC,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CACnD,EACD,eAAe,EAAE,MAAM,EAAE,GACxB,IAAI,GAAG,OAAO;IA0BjB,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,eAAe;IA2CvB,OAAO,CAAC,yBAAyB;IAwBjC,OAAO,CAAC,kBAAkB,CASxB;IAEF,OAAO,CAAC,+BAA+B;IAiDvC,OAAO,CAAC,kBAAkB,CAYxB;IAEF,OAAO,CAAC,YAAY,CAiBF;IAElB,OAAO,CAAC,iBAAiB,CA6CvB;IAEF,OAAO,CAAC,oBAAoB,CAwB1B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,oBAAoB,CAO1B;IAEF,OAAO,CAAC,qBAAqB;CAmD9B;AAED,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LepuFrameReader } from "../lepu/lepu.frame-reader";
|
|
2
|
+
import { LepuSession } from "../lepu/lepu.session";
|
|
2
3
|
/**
|
|
3
4
|
* Reads Lepu protocol frames as used by the BP2.
|
|
4
5
|
*
|
|
@@ -6,6 +7,6 @@ import { LepuFrameReader } from "../lepu/lepu.frame-reader";
|
|
|
6
7
|
* thing that makes it a BP2 is which start byte it accepts.
|
|
7
8
|
*/
|
|
8
9
|
export declare class BP2FrameReader extends LepuFrameReader {
|
|
9
|
-
constructor();
|
|
10
|
+
constructor(session?: LepuSession);
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=bp2.frame-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bp2.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"bp2.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bp2/bp2.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKnD;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,eAAe;gBAC9B,OAAO,CAAC,EAAE,WAAW;CAGzC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ClockSyncOptions } from "../../../types/clock-sync";
|
|
2
|
-
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
3
2
|
import { CustomLepuSpec } from "../../../types/custom-lepu-spec";
|
|
4
3
|
import { DeviceData } from "../../../types/device-data";
|
|
5
4
|
import { LepuDeviceInfo } from "../lepu/lepu.device-info";
|
|
5
|
+
import { LepuIdentityGate } from "../lepu/lepu.identity-gate";
|
|
6
6
|
interface IdentityReport {
|
|
7
7
|
onIdentified: (info: LepuDeviceInfo) => void;
|
|
8
8
|
onRefused: (reason: string) => void;
|
|
@@ -26,7 +26,7 @@ declare const recordLepuIdentity: (deviceData: DeviceData, info: LepuDeviceInfo)
|
|
|
26
26
|
* answers on the one it is addressed with, so the list matters for reading and its head for
|
|
27
27
|
* writing.
|
|
28
28
|
*/
|
|
29
|
-
declare const createLepuSequencer: (lepu: CustomLepuSpec, report: IdentityReport, clockSync?: ClockSyncOptions, manufacturerData?: string) =>
|
|
29
|
+
declare const createLepuSequencer: (lepu: CustomLepuSpec, report: IdentityReport, clockSync?: ClockSyncOptions, manufacturerData?: string) => LepuIdentityGate;
|
|
30
30
|
declare const selectLepu: (lepu: CustomLepuSpec, manufacturerData?: string) => CustomLepuSpec;
|
|
31
31
|
export { createLepuSequencer, recordLepuIdentity, selectLepu };
|
|
32
32
|
//# sourceMappingURL=custom-lepu-sequencer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-lepu-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"custom-lepu-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAM9D,UAAU,cAAc;IACtB,YAAY,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,kBAAkB,GACtB,YAAY,UAAU,EACtB,MAAM,cAAc,KACnB,IAOF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,QAAA,MAAM,mBAAmB,GACvB,MAAM,cAAc,EACpB,QAAQ,cAAc,EACtB,YAAY,gBAAgB,EAC5B,mBAAmB,MAAM,KACxB,gBA6BF,CAAC;AAEF,QAAA,MAAM,UAAU,GACd,MAAM,cAAc,EACpB,mBAAmB,MAAM,KACxB,cAuBF,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class CustomDevice extends BTManagedDevice<CustomDeviceId> {
|
|
|
28
28
|
private readonly validators;
|
|
29
29
|
private readonly sessionPolicy;
|
|
30
30
|
private readonly sessionAggregates;
|
|
31
|
+
private readonly lepuSession;
|
|
31
32
|
private sessionStartedAt;
|
|
32
33
|
constructor(device: Device, params: CreateDeviceParams<CustomDeviceId>, definition: CustomDeviceDefinition);
|
|
33
34
|
/** Gives a declaration that computes its commands at connect time the context it needs to do so. */
|
|
@@ -42,6 +43,8 @@ export declare class CustomDevice extends BTManagedDevice<CustomDeviceId> {
|
|
|
42
43
|
* gate would poll hardware it had not identified, which is the case the gate exists for.
|
|
43
44
|
*/
|
|
44
45
|
private declareLepuProtocol;
|
|
46
|
+
/** The standard family runs the vendor's encryption handshake first when it advertises one. */
|
|
47
|
+
private withEncryption;
|
|
45
48
|
private reportViatomEcgFile;
|
|
46
49
|
private reportViatomBp2File;
|
|
47
50
|
private reportViatomBp3File;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom.device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"custom.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/custom/custom.device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EACL,sBAAsB,EAEv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oB;CAe7B"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
declare const manufacturerBytes: (manufacturerData?: string) => number[];
|
|
2
2
|
/** Returns true when the advertised byte says that only encrypted traffic is accepted. */
|
|
3
3
|
declare const advertisementRequiresEncryption: (manufacturerData: string | undefined, byteIndexes?: readonly number[]) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* True when the advertisement offers or requires the encryption handshake.
|
|
6
|
+
*
|
|
7
|
+
* Byte 4 describes the second service and wins when it names a protocol; otherwise byte 3
|
|
8
|
+
* does. A level of 1 (optional) or 2 (required) is a handshake for the vendor's own client.
|
|
9
|
+
*/
|
|
10
|
+
declare const advertisesLepuEncryption: (manufacturerData?: string) => boolean;
|
|
4
11
|
/** The vendor uses the low nibble of byte 3 or 4 to select the OxyII service. */
|
|
5
12
|
declare const viatomOxygenUsesV2: (manufacturerData?: string) => boolean;
|
|
6
|
-
export { advertisementRequiresEncryption, manufacturerBytes, viatomOxygenUsesV2, };
|
|
13
|
+
export { advertisementRequiresEncryption, advertisesLepuEncryption, manufacturerBytes, viatomOxygenUsesV2, };
|
|
7
14
|
//# sourceMappingURL=lepu.advertisement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lepu.advertisement.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lepu.advertisement.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.advertisement.ts"],"names":[],"mappings":"AAYA,QAAA,MAAM,iBAAiB,GAAI,mBAAmB,MAAM,KAAG,MAAM,EAU5D,CAAC;AAOF,0FAA0F;AAC1F,QAAA,MAAM,+BAA+B,GACnC,kBAAkB,MAAM,GAAG,SAAS,EACpC,cAAa,SAAS,MAAM,EAAO,KAClC,OAKA,CAAC;AAEJ;;;;;GAKG;AACH,QAAA,MAAM,wBAAwB,GAAI,mBAAmB,MAAM,KAAG,OAQ7D,CAAC;AAEF,iFAAiF;AACjF,QAAA,MAAM,kBAAkB,GAAI,mBAAmB,MAAM,KAAG,OAIrD,CAAC;AAEJ,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
2
|
+
import { DeviceCommand } from "../../../types/device-command";
|
|
3
|
+
import { LepuSession } from "./lepu.session";
|
|
4
|
+
type SyncCommandSequencer = Omit<CommandSequencer, "initialCommands"> & {
|
|
5
|
+
initialCommands(): readonly DeviceCommand[];
|
|
6
|
+
};
|
|
7
|
+
interface LepuEncryptionParams {
|
|
8
|
+
write: Omit<DeviceCommand, "frame">;
|
|
9
|
+
session: LepuSession;
|
|
10
|
+
manufacturerData?: string;
|
|
11
|
+
startByte?: string;
|
|
12
|
+
onRefused: (reason: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The sequencer for one connection: wrapped in the handshake when the advertisement asks
|
|
16
|
+
* for encryption, unchanged otherwise. Either way the session starts without a key.
|
|
17
|
+
*/
|
|
18
|
+
declare const withLepuEncryption: (inner: SyncCommandSequencer, params: LepuEncryptionParams) => CommandSequencer;
|
|
19
|
+
export { withLepuEncryption };
|
|
20
|
+
//# sourceMappingURL=lepu.encryption-handshake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.encryption-handshake.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAa9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,GAAG;IACtE,eAAe,IAAI,SAAS,aAAa,EAAE,CAAC;CAC7C,CAAC;AAEF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AA4HD;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,OAAO,oBAAoB,EAC3B,QAAQ,oBAAoB,KAC3B,gBAMF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FrameReadResult } from "../../../types/frame-read-result";
|
|
2
2
|
import { FrameReader } from "../../../types/frame-reader";
|
|
3
|
+
import { LepuSession } from "./lepu.session";
|
|
3
4
|
/**
|
|
4
5
|
* Reads the frame every Lepu device shares.
|
|
5
6
|
*
|
|
@@ -14,7 +15,8 @@ import { FrameReader } from "../../../types/frame-reader";
|
|
|
14
15
|
*/
|
|
15
16
|
export declare class LepuFrameReader implements FrameReader {
|
|
16
17
|
private readonly startBytes;
|
|
17
|
-
|
|
18
|
+
private readonly session?;
|
|
19
|
+
constructor(startBytes: readonly string[], session?: LepuSession | undefined);
|
|
18
20
|
readFrame(buffer: readonly string[]): FrameReadResult;
|
|
19
21
|
private isFrameStart;
|
|
20
22
|
private findFrameStart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lepu.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"lepu.frame-reader.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.frame-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAM1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAY7C;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,YAAW,WAAW;IAE/C,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBADR,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,CAAC,EAAE,WAAW,YAAA;IAGjC,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe;IA2B5D,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,cAAc;IAYtB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,gBAAgB;CAMzB"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One connection's AES key, from the moment the device hands it over in the handshake.
|
|
3
|
+
*
|
|
4
|
+
* Requests leave encrypted and replies reach every parser in plain text. Without a key, and
|
|
5
|
+
* for an empty payload, frames pass through unchanged, as the vendor's own client does.
|
|
6
|
+
*/
|
|
7
|
+
declare class LepuSession {
|
|
8
|
+
private key;
|
|
9
|
+
begin: (key: readonly number[]) => void;
|
|
10
|
+
end: () => void;
|
|
11
|
+
encryptFrame: (frame: readonly string[]) => string[];
|
|
12
|
+
/** The frame in plain text, or `undefined` when its payload does not decrypt. */
|
|
13
|
+
decryptFrame: (frame: readonly string[]) => string[] | undefined;
|
|
14
|
+
private withPayload;
|
|
15
|
+
}
|
|
16
|
+
export { LepuSession };
|
|
17
|
+
//# sourceMappingURL=lepu.session.d.ts.map
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.session.ts"],"names":[],"mappings":"AAcA;;;;;GAKG;AACH,cAAM,WAAW;IACf,OAAO,CAAC,GAAG,CAAgC;IAEpC,KAAK,GAAI,KAAK,SAAS,MAAM,EAAE,KAAG,IAAI,CAE3C;IAEK,GAAG,QAAO,IAAI,CAEnB;IAEK,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE,CACE;IAE5D,iFAAiF;IAC1E,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE,GAAG,SAAS,CACxB;IAE9C,OAAO,CAAC,WAAW,CAajB;CACH;AAiBD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viatom.bp-monitors.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEvB,MAAM,yCAAyC,CAAC;AAgEjD,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,GACnB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,
|
|
1
|
+
{"version":3,"file":"viatom.bp-monitors.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEvB,MAAM,yCAAyC,CAAC;AAgEjD,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,GACnB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,sBAiCF,CAAC;AAEF,gDAAgD;AAChD,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,kFAAkF;AAClF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,kFAAkF;AAClF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,mFAAmF;AACnF,QAAA,MAAM,WAAW,GAAI,QAAQ,cAAc,KAAG,sBACb,CAAC;AAElC,gEAAgE;AAChE,QAAA,MAAM,aAAa,GAAI,QAAQ,cAAc,KAAG,sBACZ,CAAC;AAQrC,gGAAgG;AAChG,QAAA,MAAM,YAAY,GAChB,gBAAgB,MAAM,EACtB,QAAQ,cAAc,KACrB,sBAoCA,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAkBrC,CAAC;AAEF,2DAA2D;AAC3D,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAQrC,CAAC;AAEF,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,CAAC"}
|
|
@@ -33,7 +33,10 @@ export interface CustomLepuSpec {
|
|
|
33
33
|
requestStartByte?: string;
|
|
34
34
|
/** Selects the OxyII service and framing when the advertisement says protocol V2. */
|
|
35
35
|
manufacturerDataProtocol?: "viatom-oxygen";
|
|
36
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Manufacturer-data byte indexes whose high nibble of 2 means encryption is required, for
|
|
38
|
+
* protocols without the handshake; the standard protocol runs the handshake instead.
|
|
39
|
+
*/
|
|
37
40
|
rejectEncryptionAtBytes?: number[];
|
|
38
41
|
/** Where commands are written. The service must be one this declaration also monitors. */
|
|
39
42
|
write: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-lepu-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-lepu-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAE7B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAElC,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAElC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;IAEnD;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,eAAe,CAAC;IAE3C
|
|
1
|
+
{"version":3,"file":"custom-lepu-spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/types/custom-lepu-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAE7B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC;IAElC,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAElC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAErC;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;IAEnD;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qFAAqF;IACrF,wBAAwB,CAAC,EAAE,eAAe,CAAC;IAE3C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnC,0FAA0F;IAC1F,KAAK,EAAE;QAEL,4DAA4D;QAC5D,WAAW,EAAE,MAAM,CAAC;QAEpB,0DAA0D;QAC1D,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IAEF;;;;;;;OAOG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAE9B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,2EAA2E;IAC3E,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|