@ovok/native 0.4.5 → 0.4.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/lib/commonjs/modules/bt-management/index.js +176 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +49 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +47 -41
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +98 -0
- package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +24 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +15 -8
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +85 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -74
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +141 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +16 -50
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +17 -6
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +21 -14
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +36 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +81 -14
- 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.command-builder.js +48 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +37 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js +83 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +26 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js +36 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +155 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +98 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js +29 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +103 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +32 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js +64 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +143 -0
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +38 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +156 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +124 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +113 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +117 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +82 -0
- package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/command-sequencer.js +6 -0
- package/lib/commonjs/modules/bt-management/types/command-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js +6 -0
- package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js +2 -0
- package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js +6 -0
- package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/device-command.js +2 -0
- package/lib/commonjs/modules/bt-management/types/device-command.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/measurement-group.js +6 -0
- package/lib/commonjs/modules/bt-management/types/measurement-group.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js +49 -0
- package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +9 -0
- package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js +19 -0
- package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js +13 -0
- package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js +22 -0
- package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
- package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js +18 -0
- package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +16 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +44 -0
- package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +47 -41
- package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
- package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +93 -0
- package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +24 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +16 -8
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +81 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -73
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +136 -0
- package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +16 -50
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +17 -6
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +21 -14
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +32 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +81 -14
- 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.command-builder.js +43 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +33 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js +79 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +22 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js +32 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +150 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +93 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js +24 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +98 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +27 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js +59 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +140 -0
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +34 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +149 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +118 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +108 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +114 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +79 -0
- package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
- package/lib/module/modules/bt-management/types/command-sequencer.js +4 -0
- package/lib/module/modules/bt-management/types/command-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
- package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-checksum-spec.js +4 -0
- package/lib/module/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
- package/lib/module/modules/bt-management/types/custom-lepu-spec.js +2 -0
- package/lib/module/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-measurement-spec.js +4 -0
- package/lib/module/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
- package/lib/module/modules/bt-management/types/device-command.js +2 -0
- package/lib/module/modules/bt-management/types/device-command.js.map +1 -0
- package/lib/module/modules/bt-management/types/measurement-group.js +4 -0
- package/lib/module/modules/bt-management/types/measurement-group.js.map +1 -0
- package/lib/module/modules/bt-management/utils/calculate-checksum.js +44 -0
- package/lib/module/modules/bt-management/utils/calculate-checksum.js.map +1 -0
- package/lib/module/modules/bt-management/utils/create-frame-validator.js +9 -0
- package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -1
- package/lib/module/modules/bt-management/utils/hex-to-bytes.js +14 -0
- package/lib/module/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
- package/lib/module/modules/bt-management/utils/le-32-to-bytes.js +8 -0
- package/lib/module/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
- package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js +17 -0
- package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
- package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js +13 -0
- package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
- 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/bt-command-writer.d.ts +67 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +33 -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.command-builder.d.ts +24 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +44 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
- 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/bt-command-writer.d.ts +67 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +33 -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.command-builder.d.ts +24 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +44 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts +14 -0
- package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
- package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
- package/package.json +12 -1
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Names are a fixed sixteen bytes, zero padded, in both the listing and the request. */
|
|
2
|
+
declare const NAME_BYTES = 16;
|
|
3
|
+
/**
|
|
4
|
+
* A file name as the device expects it: sixteen bytes, zero padded, truncated.
|
|
5
|
+
*
|
|
6
|
+
* The truncation is the device's, not ours - it copies at most sixteen bytes and pads the
|
|
7
|
+
* rest - so two names that agree in their first sixteen bytes are the same file as far as
|
|
8
|
+
* the protocol is concerned.
|
|
9
|
+
*/
|
|
10
|
+
declare const lepuNameBytes: (name: string) => number[];
|
|
11
|
+
/** The names in a file listing: a count, then that many fixed-width padded names. */
|
|
12
|
+
declare const lepuNamesFrom: (payload: readonly string[]) => string[];
|
|
13
|
+
export { lepuNameBytes, lepuNamesFrom, NAME_BYTES };
|
|
14
|
+
//# sourceMappingURL=lepu.file-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.file-names.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.file-names.ts"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,QAAA,MAAM,UAAU,KAAK,CAAC;AAItB;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAAM,EAGzC,CAAC;AAEJ,qFAAqF;AACrF,QAAA,MAAM,aAAa,GAAI,SAAS,SAAS,MAAM,EAAE,KAAG,MAAM,EAczD,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
2
|
+
import { DeviceCommand } from "../../../types/device-command";
|
|
3
|
+
import { LepuCommandBuilder } from "./lepu.command-builder";
|
|
4
|
+
interface LepuFile {
|
|
5
|
+
name: string;
|
|
6
|
+
content: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
interface LepuFileTransferParams {
|
|
9
|
+
/** The characteristic commands are written to. */
|
|
10
|
+
write: Omit<DeviceCommand, "frame">;
|
|
11
|
+
/** Builds this connection's frames. One per connection: it carries a sequence number. */
|
|
12
|
+
builder: LepuCommandBuilder;
|
|
13
|
+
maxFileBytes?: number;
|
|
14
|
+
/** Called once per file, and only after its length was confirmed exactly. */
|
|
15
|
+
onFile: (file: LepuFile) => void;
|
|
16
|
+
/** Called with why a transfer stopped. Required, so a failed read cannot pass unseen. */
|
|
17
|
+
onError: (reason: string) => void;
|
|
18
|
+
/** Called as each chunk lands, for a long file with a person waiting on it. */
|
|
19
|
+
onProgress?: (progress: {
|
|
20
|
+
name: string;
|
|
21
|
+
receivedBytes: number;
|
|
22
|
+
totalBytes: number;
|
|
23
|
+
}) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Downloads the records a Lepu device has stored.
|
|
27
|
+
*
|
|
28
|
+
* Every opcode this uses is generic and inert - list, open, read, close - so unlike a
|
|
29
|
+
* realtime poll it is safe on hardware whose model is not known. That is what makes it the
|
|
30
|
+
* one thing the whole family can be asked for without identifying it first.
|
|
31
|
+
*
|
|
32
|
+
* The exchange is self-clocking and has no windowing: each reply decides the next request,
|
|
33
|
+
* and the device chooses how much to send, so the offset advances by what actually arrived
|
|
34
|
+
* rather than by an assumed chunk size. There is no retry in the protocol either - a single
|
|
35
|
+
* dropped reply stalls the transfer with nothing to resume it - which is what the data
|
|
36
|
+
* processor's stuck-data timeout is the watchdog for.
|
|
37
|
+
*
|
|
38
|
+
* A short read is an error, not a truncated success: the device is asked to close the file
|
|
39
|
+
* and the reading is discarded, because half an ECG that looks like a whole one is worse
|
|
40
|
+
* than none.
|
|
41
|
+
*/
|
|
42
|
+
export declare class LepuFileTransfer implements CommandSequencer {
|
|
43
|
+
private readonly params;
|
|
44
|
+
private files;
|
|
45
|
+
private fileIndex;
|
|
46
|
+
private name;
|
|
47
|
+
private totalBytes;
|
|
48
|
+
private content;
|
|
49
|
+
private isSessionOpen;
|
|
50
|
+
private isDone;
|
|
51
|
+
constructor(params: LepuFileTransferParams);
|
|
52
|
+
initialCommands: () => readonly DeviceCommand[];
|
|
53
|
+
nextCommand: (frame: readonly string[]) => readonly DeviceCommand[] | undefined;
|
|
54
|
+
private openNextFile;
|
|
55
|
+
/** The reply to opening a file states its whole length, which bounds everything after. */
|
|
56
|
+
private openedFile;
|
|
57
|
+
/**
|
|
58
|
+
* A reply with no bytes in it ends the transfer rather than asking again from the same
|
|
59
|
+
* offset, which is a request the device would answer the same way for as long as the link
|
|
60
|
+
* stayed up.
|
|
61
|
+
*/
|
|
62
|
+
private appendChunk;
|
|
63
|
+
private closedFile;
|
|
64
|
+
private closeFile;
|
|
65
|
+
/**
|
|
66
|
+
* Stops, and releases the device's file handle if one is open.
|
|
67
|
+
*
|
|
68
|
+
* The device holds that handle from the moment a file is opened until it is closed, so
|
|
69
|
+
* walking away from a failed read can leave it open until the device times out or resets.
|
|
70
|
+
*/
|
|
71
|
+
private fail;
|
|
72
|
+
private commandFor;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=lepu.file-transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.file-transfer.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.file-transfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAI9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAsB5D,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B;AAED,UAAU,sBAAsB;IAE9B,kDAAkD;IAClD,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAEpC,yFAAyF;IACzF,OAAO,EAAE,kBAAkB,CAAC;IAE5B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,6EAA6E;IAC7E,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEjC,yFAAyF;IACzF,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,+EAA+E;IAC/E,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,IAAI,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAiB,YAAW,gBAAgB;IASpC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAR1C,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEa,MAAM,EAAE,sBAAsB;IAE3D,eAAe,QAAO,SAAS,aAAa,EAAE,CAEnD;IAEK,WAAW,GAChB,OAAO,SAAS,MAAM,EAAE,KACvB,SAAS,aAAa,EAAE,GAAG,SAAS,CA2BrC;IAEF,OAAO,CAAC,YAAY,CAmBlB;IAEF,0FAA0F;IAC1F,OAAO,CAAC,UAAU,CAqBhB;IAEF;;;;OAIG;IACH,OAAO,CAAC,WAAW,CA2BjB;IAEF,OAAO,CAAC,UAAU,CAgBhB;IAEF,OAAO,CAAC,SAAS,CAEf;IAEF;;;;;OAKG;IACH,OAAO,CAAC,IAAI,CAWV;IAEF,OAAO,CAAC,UAAU,CAMf;CACJ"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FrameReadResult } from "../../../types/frame-read-result";
|
|
2
|
+
import { FrameReader } from "../../../types/frame-reader";
|
|
3
|
+
/**
|
|
4
|
+
* Reads the frame every Lepu device shares.
|
|
5
|
+
*
|
|
6
|
+
* Layout: `start | cmd | ~cmd | type | seq | lenLow lenHigh | payload | crc8`, where the
|
|
7
|
+
* checksum covers every byte before it. The complement of the command byte only narrows the
|
|
8
|
+
* search for a start; the checksum is what actually decides a frame is trustworthy.
|
|
9
|
+
*
|
|
10
|
+
* The start byte is the only part that varies across the family. Most devices use `a5`, a
|
|
11
|
+
* smaller group uses `55`, and a few accept either and settle on one at runtime - so it is a
|
|
12
|
+
* list rather than a single value. Everything else is identical on every device speaking this
|
|
13
|
+
* protocol, which is why it is worth having once rather than once per device.
|
|
14
|
+
*/
|
|
15
|
+
export declare class LepuFrameReader implements FrameReader {
|
|
16
|
+
private readonly startBytes;
|
|
17
|
+
constructor(startBytes: readonly string[]);
|
|
18
|
+
readFrame(buffer: readonly string[]): FrameReadResult;
|
|
19
|
+
private isFrameStart;
|
|
20
|
+
private findFrameStart;
|
|
21
|
+
/**
|
|
22
|
+
* Bytes that cannot begin a frame start, and are therefore safe to drop when no start was
|
|
23
|
+
* found. The trailing bytes are kept because a start pattern may still be arriving.
|
|
24
|
+
*/
|
|
25
|
+
private droppableLeadingBytes;
|
|
26
|
+
private hasValidChecksum;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=lepu.frame-reader.d.ts.map
|
|
@@ -0,0 +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;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAe1D;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,YAAW,WAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,SAAS,MAAM,EAAE;IAE1D,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe;IAiC5D,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,cAAc;IAYtB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,gBAAgB;CAMzB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The opcode a frame answers, which is what correlates a reply to its request. */
|
|
2
|
+
declare const lepuCommandOf: (frame: readonly string[]) => number;
|
|
3
|
+
/**
|
|
4
|
+
* The bytes a frame carries, from its own declared length.
|
|
5
|
+
*
|
|
6
|
+
* Declared rather than derived from what arrived: the frame reader has already checked that
|
|
7
|
+
* the buffer holds the whole frame, so the length field is the payload's end, and trusting
|
|
8
|
+
* the array instead would fold the checksum byte into the data.
|
|
9
|
+
*/
|
|
10
|
+
declare const lepuPayloadOf: (frame: readonly string[]) => string[];
|
|
11
|
+
export { lepuCommandOf, lepuPayloadOf };
|
|
12
|
+
//# sourceMappingURL=lepu.frame.d.ts.map
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.frame.ts"],"names":[],"mappings":"AAOA,mFAAmF;AACnF,QAAA,MAAM,aAAa,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MACV,CAAC;AAEzC;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAIvD,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { CommandSequencer } from "../../../types/command-sequencer";
|
|
2
|
+
import { DeviceCommand } from "../../../types/device-command";
|
|
3
|
+
import { LepuCommandBuilder } from "./lepu.command-builder";
|
|
4
|
+
import { LepuDeviceInfo } from "./lepu.device-info";
|
|
5
|
+
interface LepuIdentityGateParams {
|
|
6
|
+
/** The characteristic this device's commands are written to. */
|
|
7
|
+
write: Omit<DeviceCommand, "frame">;
|
|
8
|
+
/** Builds this connection's frames. One per connection: it carries a sequence number. */
|
|
9
|
+
builder: LepuCommandBuilder;
|
|
10
|
+
/** The models this driver was written for. */
|
|
11
|
+
expectedDeviceTypes: readonly number[];
|
|
12
|
+
/**
|
|
13
|
+
* The opcode to poll with, once the device has proved it is one of them.
|
|
14
|
+
*
|
|
15
|
+
* Optional, and its absence is a working mode rather than a gap: the gate asks what the
|
|
16
|
+
* device is, reports it, and sends nothing else. That is how a model number is learned
|
|
17
|
+
* in the first place - every one of them lives on the hardware and nowhere else, because
|
|
18
|
+
* the vendor's own SDK never checks the field and so never had to write the values down.
|
|
19
|
+
*/
|
|
20
|
+
pollCommand?: number;
|
|
21
|
+
/** Called with what the device said it was, whether or not it was expected. */
|
|
22
|
+
onIdentified?: (info: LepuDeviceInfo) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Called with why the device was refused. Required, so a refusal cannot pass unseen.
|
|
25
|
+
*
|
|
26
|
+
* The reason is built here rather than by the caller, because the gate is the only place
|
|
27
|
+
* that knows which of the several ways it can go wrong actually happened.
|
|
28
|
+
*/
|
|
29
|
+
onRefused: (reason: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Asks a Lepu device what it is before sending it anything that acts.
|
|
33
|
+
*
|
|
34
|
+
* The family shares one frame format, one checksum and one opcode space, but not one
|
|
35
|
+
* meaning: `0x08` polls realtime data on a BP2, starts a blood-pressure measurement on an
|
|
36
|
+
* AirBp and starts an ECG on a Lepod. A frame built for the wrong device is therefore
|
|
37
|
+
* perfectly well-formed - the CRC is computed the same way on every one of them - so
|
|
38
|
+
* nothing in the protocol catches a driver bound to the wrong hardware. What comes back is
|
|
39
|
+
* a cuff inflating on someone's arm because a name matched during a scan.
|
|
40
|
+
*
|
|
41
|
+
* `GET_INFO` is the one command that cannot cause that: it is generic, inert, and answered
|
|
42
|
+
* identically family-wide. So it goes first, and everything else waits on its reply.
|
|
43
|
+
*
|
|
44
|
+
* A declaration that names the models it was written for is refused permanently when the
|
|
45
|
+
* device answers with a different one. A declaration that names none is identified by the
|
|
46
|
+
* advertised name it already matched, which is the basis the vendor's own SDK binds every
|
|
47
|
+
* one of its products on; it is asked what it is anyway, and the answer reported, because
|
|
48
|
+
* that is the only place these model numbers exist - the vendor never reads the field back,
|
|
49
|
+
* so there is no table of them to copy.
|
|
50
|
+
*
|
|
51
|
+
* A reply that never arrives leaves the gate closed and nothing sent, which the data
|
|
52
|
+
* processor's stuck-data timeout reports and disconnects on. That is the watchdog for this
|
|
53
|
+
* too - the protocol has no retry of its own, so a dropped reply is recovered by
|
|
54
|
+
* reconnecting rather than by asking again.
|
|
55
|
+
*/
|
|
56
|
+
export declare class LepuIdentityGate implements CommandSequencer {
|
|
57
|
+
private readonly params;
|
|
58
|
+
private isIdentified;
|
|
59
|
+
private isRefused;
|
|
60
|
+
constructor(params: LepuIdentityGateParams);
|
|
61
|
+
initialCommands: () => readonly DeviceCommand[];
|
|
62
|
+
nextCommand: (frame: readonly string[]) => readonly DeviceCommand[] | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Decides on the reply to `GET_INFO`.
|
|
65
|
+
*
|
|
66
|
+
* A frame that is not that reply leaves the gate as it was rather than provoking another
|
|
67
|
+
* command, because the only command outstanding is the one still being waited on.
|
|
68
|
+
*
|
|
69
|
+
* A reply that is that command but carries an error type is refused rather than parsed.
|
|
70
|
+
* The payload of an error is the reason for it, so reading a model number out of it would
|
|
71
|
+
* identify the hardware from an error code.
|
|
72
|
+
*/
|
|
73
|
+
private admit;
|
|
74
|
+
/** Closes the gate for good. There is no state a refused device can be talked back from. */
|
|
75
|
+
private refuse;
|
|
76
|
+
/** Nothing, for a declaration that asks what the device is and stops there. */
|
|
77
|
+
private poll;
|
|
78
|
+
private commandFor;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=lepu.identity-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.identity-gate.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.identity-gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AAMzE,UAAU,sBAAsB;IAE9B,gEAAgE;IAChE,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAEpC,yFAAyF;IACzF,OAAO,EAAE,kBAAkB,CAAC;IAE5B,8CAA8C;IAC9C,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;;;;OAKG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAID;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,gBAAiB,YAAW,gBAAgB;IAIpC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAH1C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAS;gBAEU,MAAM,EAAE,sBAAsB;IAE3D,eAAe,QAAO,SAAS,aAAa,EAAE,CAEnD;IAEK,WAAW,GAChB,OAAO,SAAS,MAAM,EAAE,KACvB,SAAS,aAAa,EAAE,GAAG,SAAS,CAUrC;IAEF;;;;;;;;;OASG;IACH,OAAO,CAAC,KAAK,CAsCX;IAEF,4FAA4F;IAC5F,OAAO,CAAC,MAAM,CAKZ;IAEF,+EAA+E;IAC/E,OAAO,CAAC,IAAI,CAGqC;IAEjD,OAAO,CAAC,UAAU,CAGf;CACJ"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a matcher for one advertised name that cannot also match a longer one.
|
|
3
|
+
*
|
|
4
|
+
* The vendor tests these names with a substring check in a hand-ordered cascade, so `BP2`
|
|
5
|
+
* only fails to match a BP2W because `BP2W` happens to be checked first. Order is a fragile
|
|
6
|
+
* place to keep a safety property: it lives in whoever wrote the list, is invisible at the
|
|
7
|
+
* point of use, and an insertion in the wrong place silently binds the wrong driver.
|
|
8
|
+
*
|
|
9
|
+
* Here the exclusions are derived instead. Every name in the vocabulary that extends this
|
|
10
|
+
* one becomes a negative lookahead, so the matcher is correct wherever it is used and in
|
|
11
|
+
* whatever order it is tried.
|
|
12
|
+
*
|
|
13
|
+
* The match is deliberately open at the end, because these devices advertise a serial after
|
|
14
|
+
* the model - `BP2 1234` - and the serial's shape varies across the family.
|
|
15
|
+
*/
|
|
16
|
+
export declare const lepuNameMatch: (name: string, vocabulary?: readonly string[]) => RegExp;
|
|
17
|
+
//# sourceMappingURL=lepu.name-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.name-match.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.name-match.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,aAAY,SAAS,MAAM,EAAsB,KAChD,MASF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a Lepu device says about the request it just answered.
|
|
3
|
+
*
|
|
4
|
+
* Only `SUCCESS` means the payload holds what was asked for. Every other value is an error
|
|
5
|
+
* whose payload is not the requested data, so a reply has to be checked before it is
|
|
6
|
+
* decoded - otherwise a refusal is read as a reading, out of whatever bytes happen to
|
|
7
|
+
* follow the header.
|
|
8
|
+
*/
|
|
9
|
+
declare const LepuResponseType: {
|
|
10
|
+
/** A request, phone to device. Never seen on a reply. */
|
|
11
|
+
readonly REQUEST: 0;
|
|
12
|
+
readonly SUCCESS: 1;
|
|
13
|
+
/** The device rejected our checksum. */
|
|
14
|
+
readonly CRC_ERROR: 2;
|
|
15
|
+
readonly FILE_NOT_FOUND: 224;
|
|
16
|
+
readonly FILE_READ_FAILED: 225;
|
|
17
|
+
readonly FILE_WRITE_FAILED: 226;
|
|
18
|
+
readonly PARAMETER_ILLEGAL: 241;
|
|
19
|
+
readonly PERMISSION_DENIED: 242;
|
|
20
|
+
readonly DECRYPT_FAILED: 243;
|
|
21
|
+
/** Mid-measurement or otherwise occupied. Worth backing off rather than giving up. */
|
|
22
|
+
readonly DEVICE_BUSY: 251;
|
|
23
|
+
readonly COMMAND_FORMAT_ERROR: 252;
|
|
24
|
+
/** The opcode is unknown to this firmware, which is how a feature is detected. */
|
|
25
|
+
readonly COMMAND_NOT_SUPPORTED: 253;
|
|
26
|
+
readonly ERROR: 255;
|
|
27
|
+
};
|
|
28
|
+
declare const lepuResponseType: (frame: readonly string[]) => number;
|
|
29
|
+
declare const isLepuSuccess: (frame: readonly string[]) => boolean;
|
|
30
|
+
/** Why a device refused, in words, for an error a person will read. */
|
|
31
|
+
declare const describeLepuResponseType: (frame: readonly string[]) => string;
|
|
32
|
+
export { describeLepuResponseType, isLepuSuccess, LepuResponseType, lepuResponseType, };
|
|
33
|
+
//# sourceMappingURL=lepu.response-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.response-type.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.response-type.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,QAAA,MAAM,gBAAgB;IACpB,yDAAyD;;;IAKzD,wCAAwC;;;;;;;;IAUxC,sFAAsF;;;IAKtF,kFAAkF;;;CAI1E,CAAC;AAiBX,QAAA,MAAM,gBAAgB,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MACP,CAAC;AAE/C,QAAA,MAAM,aAAa,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,OACI,CAAC;AAEvD,uEAAuE;AACvE,QAAA,MAAM,wBAAwB,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAM5D,CAAC;AAEF,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,CAAC"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { CustomCaseSpec } from "../../../types/custom-case-spec";
|
|
2
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
3
|
+
/**
|
|
4
|
+
* The characteristics each group of products exposes, read from the vendor's own managers.
|
|
5
|
+
*
|
|
6
|
+
* `standard` and `aw1` match the vendor's published SDK reference exactly, and `standard`
|
|
7
|
+
* also matches the SDK's existing BP2 driver, which has run against hardware on precisely
|
|
8
|
+
* these UUIDs. `ding` and `aiTele` were read from an OEM build and the vendor documents no
|
|
9
|
+
* product on them, so they are the two entries here that nothing independent confirms.
|
|
10
|
+
*/
|
|
11
|
+
declare const lepuTransports: {
|
|
12
|
+
readonly standard: {
|
|
13
|
+
readonly serviceUuid: "14839ac4-7d7e-415c-9a42-167340cf2339";
|
|
14
|
+
readonly notifyUuid: "0734594a-a8e7-4b1a-a6b1-cd5243059a57";
|
|
15
|
+
readonly writeUuid: "8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3";
|
|
16
|
+
readonly preferredMtu: 247;
|
|
17
|
+
};
|
|
18
|
+
/** The same characteristics on a link that will not grow past the minimum. */
|
|
19
|
+
readonly standardSmallMtu: {
|
|
20
|
+
readonly serviceUuid: "14839ac4-7d7e-415c-9a42-167340cf2339";
|
|
21
|
+
readonly notifyUuid: "0734594a-a8e7-4b1a-a6b1-cd5243059a57";
|
|
22
|
+
readonly writeUuid: "8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3";
|
|
23
|
+
readonly preferredMtu: 23;
|
|
24
|
+
};
|
|
25
|
+
readonly aw1: {
|
|
26
|
+
readonly serviceUuid: "e8fb0001-a14b-98f9-831b-4e2941d01248";
|
|
27
|
+
readonly notifyUuid: "e8fb0003-a14b-98f9-831b-4e2941d01248";
|
|
28
|
+
readonly writeUuid: "e8fb0002-a14b-98f9-831b-4e2941d01248";
|
|
29
|
+
readonly preferredMtu: 247;
|
|
30
|
+
};
|
|
31
|
+
readonly ding: {
|
|
32
|
+
readonly serviceUuid: "0000fe60-0000-1000-8000-00805f9b34fb";
|
|
33
|
+
readonly notifyUuid: "0000fe62-0000-1000-8000-00805f9b34fb";
|
|
34
|
+
readonly writeUuid: "0000fe61-0000-1000-8000-00805f9b34fb";
|
|
35
|
+
readonly preferredMtu: 247;
|
|
36
|
+
};
|
|
37
|
+
readonly aiTele: {
|
|
38
|
+
readonly serviceUuid: "00002760-08c2-11e1-9073-0e8ac72e5450";
|
|
39
|
+
readonly notifyUuid: "00002760-08c2-11e1-9073-0e8ac72e5402";
|
|
40
|
+
readonly writeUuid: "00002760-08c2-11e1-9073-0e8ac72e5401";
|
|
41
|
+
readonly preferredMtu: 247;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type LepuTransportName = keyof typeof lepuTransports;
|
|
45
|
+
interface LepuDeviceParams {
|
|
46
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
47
|
+
id: string;
|
|
48
|
+
/** The name the hardware advertises. */
|
|
49
|
+
nameMatch: string | RegExp;
|
|
50
|
+
/** Which characteristics the product exposes. Nearly all of them are "standard". */
|
|
51
|
+
transport?: LepuTransportName;
|
|
52
|
+
/**
|
|
53
|
+
* The models this declaration was written for, as the device reports them.
|
|
54
|
+
*
|
|
55
|
+
* Required to poll, and only ever learned from hardware: declare the device without a
|
|
56
|
+
* `pollCommand` first, connect, and read the model it reports.
|
|
57
|
+
*/
|
|
58
|
+
expectedDeviceTypes?: number[];
|
|
59
|
+
/**
|
|
60
|
+
* The opcode to poll with once the device has proved it is one of those models.
|
|
61
|
+
*
|
|
62
|
+
* Leave it out and the device identifies itself and nothing more. That is the safe first
|
|
63
|
+
* connection to hardware nobody has identified, because the low opcodes in this family
|
|
64
|
+
* act - one inflates a cuff, another starts an ECG - and mean different things on
|
|
65
|
+
* different products.
|
|
66
|
+
*/
|
|
67
|
+
pollCommand?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Shortest frame any declared case may be read from. The seven-byte header and the
|
|
70
|
+
* trailing checksum are part of it, so a one-byte payload is nine.
|
|
71
|
+
*/
|
|
72
|
+
minLengthBytes: number;
|
|
73
|
+
/**
|
|
74
|
+
* Byte offsets that pick the case. The command byte at index 1 is the usual choice, and
|
|
75
|
+
* products that answer one command with several shapes add the byte that distinguishes
|
|
76
|
+
* them.
|
|
77
|
+
*/
|
|
78
|
+
caseSelectorBytes?: number[];
|
|
79
|
+
cases: CustomCaseSpec[];
|
|
80
|
+
stuckDataTimeoutMs?: number;
|
|
81
|
+
}
|
|
82
|
+
declare const lepuDevice: (params: LepuDeviceParams) => CustomDeviceDefinition;
|
|
83
|
+
export { lepuDevice, lepuTransports };
|
|
84
|
+
export type { LepuDeviceParams, LepuTransportName };
|
|
85
|
+
//# sourceMappingURL=lepu.transports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lepu.transports.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.transports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAyEjF;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc;;;;;;;IAQlB,8EAA8E;;;;;;;;;;;;;;;;;;;;;;;;;CA4B9B,CAAC;AAEnD,KAAK,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC;AAErD,UAAU,gBAAgB;IAExB,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX,wCAAwC;IACxC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B,oFAAoF;IACpF,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAID,QAAA,MAAM,UAAU,GAAI,QAAQ,gBAAgB,KAAG,sBAiC9C,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommandSequencer } from "../../types/command-sequencer";
|
|
2
|
+
import { DeviceCommand } from "../../types/device-command";
|
|
3
|
+
import { IMedicalDevice } from "../../types/i-medical-device";
|
|
4
|
+
/**
|
|
5
|
+
* Sends the same commands on connect and after every frame.
|
|
6
|
+
*
|
|
7
|
+
* This is what the SDK did before a device could express anything else, and it remains
|
|
8
|
+
* right for the devices that only ever ask one question: a poll goes out, a reading comes
|
|
9
|
+
* back, and the answer is another poll. Keeping it as a named policy rather than as
|
|
10
|
+
* behaviour built into the transport is what lets a device replace it without every other
|
|
11
|
+
* device changing.
|
|
12
|
+
*/
|
|
13
|
+
declare class PollingCommandSequencer implements CommandSequencer {
|
|
14
|
+
private readonly commands;
|
|
15
|
+
constructor(commands: readonly DeviceCommand[]);
|
|
16
|
+
initialCommands: () => readonly DeviceCommand[];
|
|
17
|
+
nextCommand: () => readonly DeviceCommand[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Builds the polling policy a device's declared services already describe.
|
|
21
|
+
*
|
|
22
|
+
* A service without a write characteristic contributes nothing, so a listen-only device
|
|
23
|
+
* gets an empty policy and is never written to.
|
|
24
|
+
*/
|
|
25
|
+
declare const pollingSequencerFor: (services: IMedicalDevice["mainService"]) => PollingCommandSequencer;
|
|
26
|
+
export { PollingCommandSequencer, pollingSequencerFor };
|
|
27
|
+
//# sourceMappingURL=polling-command-sequencer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polling-command-sequencer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/devices/polling-command-sequencer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D;;;;;;;;GAQG;AACH,cAAM,uBAAwB,YAAW,gBAAgB;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,SAAS,aAAa,EAAE;IAE/D,eAAe,QAAO,SAAS,aAAa,EAAE,CAAkB;IAEhE,WAAW,QAAO,SAAS,aAAa,EAAE,CAAkB;CACpE;AAED;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,GACvB,UAAU,cAAc,CAAC,aAAa,CAAC,KACtC,uBAaA,CAAC;AAEJ,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
2
|
+
interface StandardDeviceParams {
|
|
3
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The name the hardware advertises. */
|
|
6
|
+
nameMatch: string | RegExp;
|
|
7
|
+
/** Overrides the default settle time, for hardware slower than most. */
|
|
8
|
+
stuckDataTimeoutMs?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Blood Pressure Service 0x1810, Blood Pressure Measurement 0x2A35.
|
|
12
|
+
*
|
|
13
|
+
* The pulse rate is deliberately not read. Its offset moves with the timestamp flag, and
|
|
14
|
+
* every byte a declaration reads must fit inside one `minLengthBytes` for the whole
|
|
15
|
+
* characteristic - reading it would raise the minimum to sixteen bytes and reject the
|
|
16
|
+
* shorter frames outright. The pressures sit at bytes 1-4 whatever the flags say, so they
|
|
17
|
+
* are always safe. A device whose pulse matters needs a device class.
|
|
18
|
+
*/
|
|
19
|
+
declare const standardBloodPressureDevice: (params: StandardDeviceParams) => CustomDeviceDefinition;
|
|
20
|
+
/** Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C. */
|
|
21
|
+
declare const standardThermometerDevice: (params: StandardDeviceParams) => CustomDeviceDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
|
|
24
|
+
*
|
|
25
|
+
* The reading is a scaled integer rather than a float, so the resolution is applied here.
|
|
26
|
+
*/
|
|
27
|
+
declare const standardWeightScaleDevice: (params: StandardDeviceParams) => CustomDeviceDefinition;
|
|
28
|
+
/**
|
|
29
|
+
* Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
|
|
30
|
+
*
|
|
31
|
+
* Saturation and pulse rate are both required by the catalog, which matches the
|
|
32
|
+
* specification: a spot-check measurement always carries both.
|
|
33
|
+
*/
|
|
34
|
+
declare const standardPulseOximeterDevice: (params: StandardDeviceParams) => CustomDeviceDefinition;
|
|
35
|
+
/**
|
|
36
|
+
* Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
|
|
37
|
+
*
|
|
38
|
+
* Only the eight-bit layout is declared. The sixteen-bit variant needs byte 2, which would
|
|
39
|
+
* raise `minLengthBytes` to three and reject every eight-bit frame - the common case - so it
|
|
40
|
+
* is left out rather than made to displace it.
|
|
41
|
+
*/
|
|
42
|
+
declare const standardHeartRateDevice: (params: StandardDeviceParams) => CustomDeviceDefinition;
|
|
43
|
+
export { standardBloodPressureDevice, standardHeartRateDevice, standardPulseOximeterDevice, standardThermometerDevice, standardWeightScaleDevice, };
|
|
44
|
+
//# sourceMappingURL=standard-gatt.devices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-gatt.devices.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAwBjF,UAAU,oBAAoB;IAE5B,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX,wCAAwC;IACxC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAkED;;;;;;;;GAQG;AACH,QAAA,MAAM,2BAA2B,GAC/B,QAAQ,oBAAoB,KAC3B,sBAaC,CAAC;AAEL,yEAAyE;AACzE,QAAA,MAAM,yBAAyB,GAC7B,QAAQ,oBAAoB,KAC3B,sBAUC,CAAC;AAKL;;;;GAIG;AACH,QAAA,MAAM,yBAAyB,GAC7B,QAAQ,oBAAoB,KAC3B,sBAgBC,CAAC;AAEL;;;;;GAKG;AACH,QAAA,MAAM,2BAA2B,GAC/B,QAAQ,oBAAoB,KAC3B,sBAWC,CAAC;AAEL;;;;;;GAMG;AACH,QAAA,MAAM,uBAAuB,GAC3B,QAAQ,oBAAoB,KAC3B,sBAUC,CAAC;AAEL,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
2
|
+
interface ViatomBpParams {
|
|
3
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
4
|
+
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* The advertised name, defaulting to a matcher for this product that cannot also match a
|
|
7
|
+
* longer one in the family.
|
|
8
|
+
*/
|
|
9
|
+
nameMatch?: string | RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* The models this declaration may poll, once they are known. Left empty the advertised
|
|
12
|
+
* name is the identification, which is what the vendor's own SDK binds on.
|
|
13
|
+
*/
|
|
14
|
+
expectedDeviceTypes?: number[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Declares one monitor of the BP2 series.
|
|
18
|
+
*
|
|
19
|
+
* `advertisedName` is the name the vendor's SDK matches - `BP2A`, `BP2T` - and the matcher
|
|
20
|
+
* derived from it excludes every longer name in the family, so a declaration for `BP2`
|
|
21
|
+
* cannot pick up a `BP2W`.
|
|
22
|
+
*/
|
|
23
|
+
declare const viatomBpMonitor: (advertisedName: string, params: ViatomBpParams) => CustomDeviceDefinition;
|
|
24
|
+
/** BP2A, the arm-cuff monitor of the series. */
|
|
25
|
+
declare const bp2aMonitor: (params: ViatomBpParams) => CustomDeviceDefinition;
|
|
26
|
+
/** BP2T, documented by the vendor alongside BP2 and BP2A as the same protocol. */
|
|
27
|
+
declare const bp2tMonitor: (params: ViatomBpParams) => CustomDeviceDefinition;
|
|
28
|
+
/** BP2W. Documented in its own section, but decoding the same realtime struct. */
|
|
29
|
+
declare const bp2wMonitor: (params: ViatomBpParams) => CustomDeviceDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* The names the BP3 range advertises.
|
|
32
|
+
*
|
|
33
|
+
* Fifteen products differing in cuff and casing rather than in protocol, so declaring the
|
|
34
|
+
* range is one line per name:
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const bp3Devices = BP3_MODEL_NAMES.map((name) =>
|
|
38
|
+
* viatomBpMonitor(name, { id: `viatom-${name.toLowerCase()}` }),
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare const BP3_MODEL_NAMES: readonly string[];
|
|
43
|
+
export { bp2aMonitor, bp2tMonitor, bp2wMonitor, BP3_MODEL_NAMES, viatomBpMonitor, };
|
|
44
|
+
//# sourceMappingURL=viatom.bp-monitors.d.ts.map
|
|
@@ -0,0 +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":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAsFjF,UAAU,cAAc;IAEtB,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX;;;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,sBAWC,CAAC;AAEL,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;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAgBrC,CAAC;AAEF,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
2
|
+
interface ViatomEcgParams {
|
|
3
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
4
|
+
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* The advertised name, defaulting to a matcher for this product that cannot also match a
|
|
7
|
+
* longer one in the family.
|
|
8
|
+
*/
|
|
9
|
+
nameMatch?: string | RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* The models this declaration may poll, once they are known. Worth more here than
|
|
12
|
+
* elsewhere in the family, because of what these opcodes mean on the wrong hardware.
|
|
13
|
+
*/
|
|
14
|
+
expectedDeviceTypes?: number[];
|
|
15
|
+
}
|
|
16
|
+
/** The ER1, and the handheld recorders sold under other names on the same protocol. */
|
|
17
|
+
declare const er1Recorder: (advertisedName: string, params: ViatomEcgParams) => CustomDeviceDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* The ER2, which reads the same block but over a link that grants nothing beyond the
|
|
20
|
+
* minimum. Asking it for the MTU the rest of the family grants is what the vendor's own SDK
|
|
21
|
+
* declines to do, and a command longer than the link carries is truncated rather than
|
|
22
|
+
* refused.
|
|
23
|
+
*/
|
|
24
|
+
declare const er2Recorder: (advertisedName: string, params: ViatomEcgParams) => CustomDeviceDefinition;
|
|
25
|
+
/** The ER3, which reads the same parameter block from a different opcode. */
|
|
26
|
+
declare const er3Recorder: (advertisedName: string, params: ViatomEcgParams) => CustomDeviceDefinition;
|
|
27
|
+
/** The names the ER1 recorders advertise. */
|
|
28
|
+
declare const ER1_MODEL_NAMES: readonly string[];
|
|
29
|
+
/** The names the ER2 recorders advertise, all of them on the small-MTU link. */
|
|
30
|
+
declare const ER2_MODEL_NAMES: readonly string[];
|
|
31
|
+
export { er1Recorder, ER1_MODEL_NAMES, er2Recorder, ER2_MODEL_NAMES, er3Recorder, };
|
|
32
|
+
//# sourceMappingURL=viatom.ecg-recorders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viatom.ecg-recorders.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAqDjF,UAAU,eAAe;IAEvB,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AA4CD,uFAAuF;AACvF,QAAA,MAAM,WAAW,GACf,gBAAgB,MAAM,EACtB,QAAQ,eAAe,KACtB,sBASA,CAAC;AAEJ;;;;;GAKG;AACH,QAAA,MAAM,WAAW,GACf,gBAAgB,MAAM,EACtB,QAAQ,eAAe,KACtB,sBASA,CAAC;AAEJ,6EAA6E;AAC7E,QAAA,MAAM,WAAW,GACf,gBAAgB,MAAM,EACtB,QAAQ,eAAe,KACtB,sBASA,CAAC;AAEJ,6CAA6C;AAC7C,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EASrC,CAAC;AAEF,gFAAgF;AAChF,QAAA,MAAM,eAAe,EAAE,SAAS,MAAM,EAA+C,CAAC;AAEtF,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EACX,eAAe,EACf,WAAW,GACZ,CAAC"}
|
package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
2
|
+
interface LepodParams {
|
|
3
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
4
|
+
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* The advertised name, defaulting to a matcher for this product that cannot also match a
|
|
7
|
+
* longer one in the family.
|
|
8
|
+
*/
|
|
9
|
+
nameMatch?: string | RegExp;
|
|
10
|
+
/** The models this declaration may poll, once they are known. */
|
|
11
|
+
expectedDeviceTypes?: number[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Declares a Lepod, reporting every reading its realtime frame carries.
|
|
15
|
+
*
|
|
16
|
+
* An instrument that is not attached reports a value outside the physiological range for
|
|
17
|
+
* what it measures, so that reading is discarded and reported while the others in the same
|
|
18
|
+
* frame are still delivered. The device also marks those conditions in bits of a lead-off
|
|
19
|
+
* byte, which a declaration cannot select on - reading them quietly needs a device class.
|
|
20
|
+
*/
|
|
21
|
+
declare const lepodMonitor: (advertisedName: string, params: LepodParams) => CustomDeviceDefinition;
|
|
22
|
+
/** The names the Lepod range advertises. */
|
|
23
|
+
declare const LEPOD_MODEL_NAMES: readonly string[];
|
|
24
|
+
export { LEPOD_MODEL_NAMES, lepodMonitor };
|
|
25
|
+
//# sourceMappingURL=viatom.lepod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viatom.lepod.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.lepod.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAoGjF,UAAU,WAAW;IAEnB,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,YAAY,GAChB,gBAAgB,MAAM,EACtB,QAAQ,WAAW,KAClB,sBAsBC,CAAC;AAEL,4CAA4C;AAC5C,QAAA,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAA0B,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CustomDeviceDefinition } from "../../../types/custom-device-definition";
|
|
2
|
+
interface ViatomOximeterParams {
|
|
3
|
+
/** Reported back as deviceData.name, and must not collide with a built-in device. */
|
|
4
|
+
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* The advertised name, defaulting to a matcher for this product that cannot also match a
|
|
7
|
+
* longer one in the family.
|
|
8
|
+
*/
|
|
9
|
+
nameMatch?: string | RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* The models this declaration may poll, once they are known. Left empty the advertised
|
|
12
|
+
* name is the identification, which is what the vendor's own SDK binds on.
|
|
13
|
+
*/
|
|
14
|
+
expectedDeviceTypes?: number[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Declares one oximeter of the range.
|
|
18
|
+
*
|
|
19
|
+
* **A finger that is not in the sensor yields no reading, reported as an error.** The device
|
|
20
|
+
* answers every poll whether or not it is measuring, and marks an unusable reading in two
|
|
21
|
+
* bits of a status byte - which a declaration cannot read, because a case is selected by
|
|
22
|
+
* whole bytes. What it can do is refuse the number: an oxygen saturation measured off the
|
|
23
|
+
* finger falls outside the physiological range, so it is discarded rather than reported.
|
|
24
|
+
* The reading is therefore never wrong, but a device left connected with nobody wearing it
|
|
25
|
+
* reports a decoding failure on each poll. Reading those bits quietly needs a device class.
|
|
26
|
+
*/
|
|
27
|
+
declare const viatomOximeter: (advertisedName: string, params: ViatomOximeterParams) => CustomDeviceDefinition;
|
|
28
|
+
/**
|
|
29
|
+
* The names the oximeter range advertises.
|
|
30
|
+
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const oximeters = VIATOM_OXIMETER_NAMES.map((name) =>
|
|
33
|
+
* viatomOximeter(name, { id: `viatom-${name.toLowerCase()}` }),
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare const VIATOM_OXIMETER_NAMES: readonly string[];
|
|
38
|
+
export { VIATOM_OXIMETER_NAMES, viatomOximeter };
|
|
39
|
+
//# sourceMappingURL=viatom.oximeters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viatom.oximeters.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AA2BjF,UAAU,oBAAoB;IAE5B,qFAAqF;IACrF,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,cAAc,GAClB,gBAAgB,MAAM,EACtB,QAAQ,oBAAoB,KAC3B,sBAkCC,CAAC;AAEL;;;;;;;;GAQG;AACH,QAAA,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAqB3C,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
|