@ovok/native 0.4.6 → 0.4.8

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.
Files changed (520) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +3 -1
  2. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  4. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  5. package/lib/commonjs/modules/bt-management/index.js +220 -0
  6. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +49 -0
  8. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  9. package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js +52 -0
  10. package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
  11. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +53 -41
  12. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  13. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +3 -0
  14. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  16. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  17. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +98 -0
  18. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  19. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +24 -1
  20. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/services/device-creator.js +19 -8
  22. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +85 -0
  24. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -74
  26. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +155 -0
  28. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  30. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  32. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  34. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +55 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +82 -29
  38. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +2 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +48 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +37 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js +83 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +26 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js +36 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +155 -0
  52. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +98 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js +29 -0
  56. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  57. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +103 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +32 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js +64 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +143 -0
  64. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +38 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js +84 -0
  68. package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +130 -0
  70. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +55 -0
  72. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +43 -0
  74. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +113 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +120 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +92 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +64 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +94 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +124 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +113 -0
  88. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +117 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +82 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  93. package/lib/commonjs/modules/bt-management/types/command-sequencer.js +6 -0
  94. package/lib/commonjs/modules/bt-management/types/command-sequencer.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  96. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js +6 -0
  98. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js +2 -0
  100. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  101. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js +6 -0
  102. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  103. package/lib/commonjs/modules/bt-management/types/device-command.js +2 -0
  104. package/lib/commonjs/modules/bt-management/types/device-command.js.map +1 -0
  105. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +2 -0
  106. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  107. package/lib/commonjs/modules/bt-management/types/measurement-group.js +6 -0
  108. package/lib/commonjs/modules/bt-management/types/measurement-group.js.map +1 -0
  109. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js +49 -0
  110. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  111. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +21 -0
  112. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  113. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +9 -0
  114. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  115. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js +19 -0
  116. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  117. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js +13 -0
  118. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  119. package/lib/commonjs/modules/bt-management/utils/parse-measurement.js +10 -7
  120. package/lib/commonjs/modules/bt-management/utils/parse-measurement.js.map +1 -1
  121. package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js +34 -0
  122. package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
  123. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js +22 -0
  124. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  125. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js +18 -0
  126. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  127. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +3 -1
  128. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  129. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  130. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  131. package/lib/module/modules/bt-management/index.js +20 -0
  132. package/lib/module/modules/bt-management/index.js.map +1 -1
  133. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +44 -0
  134. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  135. package/lib/module/modules/bt-management/services/custom/compile-case-shape.js +48 -0
  136. package/lib/module/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
  137. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +53 -41
  138. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  139. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +3 -0
  140. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  141. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  142. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  143. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +93 -0
  144. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  145. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +24 -1
  146. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  147. package/lib/module/modules/bt-management/services/device-creator.js +20 -8
  148. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  149. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +81 -0
  150. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  151. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -73
  152. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  153. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +150 -0
  154. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  155. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  156. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  157. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  158. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  159. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  160. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  161. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +51 -0
  162. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  163. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +82 -29
  164. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  165. package/lib/module/modules/bt-management/services/devices/frame-parser.js +2 -1
  166. package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  167. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +43 -0
  168. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  169. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +33 -0
  170. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  171. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js +79 -0
  172. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  173. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +22 -0
  174. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  175. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js +32 -0
  176. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  177. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +150 -0
  178. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  179. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +93 -0
  180. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  181. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js +24 -0
  182. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  183. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +98 -0
  184. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  185. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +27 -0
  186. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js +59 -0
  188. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  189. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +140 -0
  190. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +34 -0
  192. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js +79 -0
  194. package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +123 -0
  196. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  197. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +50 -0
  198. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
  199. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +38 -0
  200. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
  201. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +108 -0
  202. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +116 -0
  204. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
  205. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +87 -0
  206. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +60 -0
  208. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +89 -0
  210. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
  211. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +118 -0
  212. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  213. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +108 -0
  214. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  215. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +114 -0
  216. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  217. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +79 -0
  218. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  219. package/lib/module/modules/bt-management/types/command-sequencer.js +4 -0
  220. package/lib/module/modules/bt-management/types/command-sequencer.js.map +1 -0
  221. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  222. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  223. package/lib/module/modules/bt-management/types/custom-checksum-spec.js +4 -0
  224. package/lib/module/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  225. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  226. package/lib/module/modules/bt-management/types/custom-lepu-spec.js +2 -0
  227. package/lib/module/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  228. package/lib/module/modules/bt-management/types/custom-measurement-spec.js +4 -0
  229. package/lib/module/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  230. package/lib/module/modules/bt-management/types/device-command.js +2 -0
  231. package/lib/module/modules/bt-management/types/device-command.js.map +1 -0
  232. package/lib/module/modules/bt-management/types/device-measurement-map.js +3 -3
  233. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  234. package/lib/module/modules/bt-management/types/integrated-devices.js +2 -0
  235. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  236. package/lib/module/modules/bt-management/types/measurement-group.js +4 -0
  237. package/lib/module/modules/bt-management/types/measurement-group.js.map +1 -0
  238. package/lib/module/modules/bt-management/utils/calculate-checksum.js +44 -0
  239. package/lib/module/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  240. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +21 -0
  241. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  242. package/lib/module/modules/bt-management/utils/create-frame-validator.js +9 -0
  243. package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  244. package/lib/module/modules/bt-management/utils/hex-to-bytes.js +14 -0
  245. package/lib/module/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  246. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js +8 -0
  247. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  248. package/lib/module/modules/bt-management/utils/parse-measurement.js +10 -7
  249. package/lib/module/modules/bt-management/utils/parse-measurement.js.map +1 -1
  250. package/lib/module/modules/bt-management/utils/reject-custom-reading.js +29 -0
  251. package/lib/module/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
  252. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js +17 -0
  253. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  254. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js +13 -0
  255. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  256. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +20 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +30 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  309. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
  317. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
  319. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
  321. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
  323. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
  325. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
  327. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
  329. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
  331. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  333. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  335. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  337. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  339. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  341. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
  343. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  345. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  347. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  349. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  351. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
  353. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  355. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  357. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  359. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
  361. package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +27 -0
  363. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  365. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +3 -1
  367. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  369. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +17 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  373. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
  381. package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
  383. package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  385. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  387. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  388. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  389. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  390. package/lib/typescript/module/src/modules/bt-management/index.d.ts +20 -0
  391. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  392. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  393. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  394. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
  395. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
  396. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  397. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  398. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  399. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  402. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
  408. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  409. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  410. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  411. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  412. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  413. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  414. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  415. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +30 -0
  416. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  417. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
  418. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  419. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  420. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  421. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  422. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  423. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  424. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  425. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  426. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  427. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  428. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  429. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  430. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  431. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  432. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  433. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  434. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  435. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  436. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  437. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  438. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  439. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  440. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  441. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  442. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  443. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  444. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  445. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  446. package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
  447. package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
  448. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
  449. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  450. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
  451. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
  452. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
  453. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
  454. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
  455. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
  456. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
  457. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
  458. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
  459. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
  460. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
  461. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
  462. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
  463. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
  464. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  465. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  466. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  467. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  468. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  469. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  470. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  471. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  472. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  473. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  474. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
  475. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  476. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  477. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  478. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  479. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  480. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  481. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  482. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  483. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  484. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
  485. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  486. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  487. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  488. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  489. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  490. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  491. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  492. package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
  493. package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
  494. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +27 -0
  495. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  496. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  497. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  498. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +3 -1
  499. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  501. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  502. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +17 -0
  503. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  504. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  505. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  506. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  507. package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  508. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  509. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  510. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  511. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  512. package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
  513. package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
  514. package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
  515. package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
  516. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  517. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  518. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  519. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  520. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.lepuTransports = exports.lepuDevice = void 0;
7
+ var _defineCustomDevice = require("../../custom/define-custom-device.js");
8
+ /**
9
+ * Declares a device from the Lepu/Viatom family.
10
+ *
11
+ * Thirty products in that family share one frame format, one CRC and one generic opcode
12
+ * space, and they differ in only three things: which characteristics they expose, what
13
+ * their payload means, and what they call themselves. The first of those is the same for
14
+ * almost all of them and is recorded here; the other two belong to the product and are
15
+ * asked of the caller.
16
+ *
17
+ * Two things a declaration cannot supply, and where they come from:
18
+ *
19
+ * - **The model numbers.** A device reports one in its information reply, but the vendor's
20
+ * own SDK never reads that field back - it binds a driver from the advertised name - so
21
+ * no table of them exists to copy. Declare the device without a `pollCommand`, connect
22
+ * once, and it reports what it is without sending anything that acts.
23
+ * - **The payload layout.** Every product decodes differently, and a guessed offset yields
24
+ * a plausible wrong reading rather than an error. Declared cases are the caller's.
25
+ *
26
+ * Some of these products negotiate encryption in the vendor app (`Bp2`, `Er2` and the
27
+ * oximeters do; `Er1`, `Er3`, `Bp3` and `Lepod` do not). The SDK speaks the cleartext
28
+ * protocol, which is what the BP2 already runs on in production, so a product that turns out
29
+ * to require the handshake will identify itself and then stop rather than mis-report.
30
+ */
31
+
32
+ /**
33
+ * Most of the family. The vendor's own SDK reference lists 71 products on these three
34
+ * characteristics - the BP2 and BP3 monitors, Er1/Er2/Er3, Lepod, the whole O2Ring and
35
+ * Oxyfit range, Checkme, AirBp - and the SDK's own BP2 driver has run against them on real
36
+ * hardware.
37
+ */
38
+ const STANDARD_SERVICE = "14839ac4-7d7e-415c-9a42-167340cf2339";
39
+ const STANDARD_WRITE = "8b00ace7-eb0b-49b0-bbe9-9aee0a26e1a3";
40
+ const STANDARD_NOTIFY = "0734594a-a8e7-4b1a-a6b1-cd5243059a57";
41
+
42
+ /** Nine products in the vendor's reference: O2Ring S, the PF-10 wearables and the BBSM bands. */
43
+ const AW1_SERVICE = "e8fb0001-a14b-98f9-831b-4e2941d01248";
44
+ const AW1_WRITE = "e8fb0002-a14b-98f9-831b-4e2941d01248";
45
+ const AW1_NOTIFY = "e8fb0003-a14b-98f9-831b-4e2941d01248";
46
+
47
+ /**
48
+ * Read from an OEM build rather than from the vendor's published reference, which documents
49
+ * no product on these characteristics. Real, but unconfirmed by the vendor and untried here.
50
+ */
51
+ const DING_SERVICE = "0000fe60-0000-1000-8000-00805f9b34fb";
52
+ const DING_WRITE = "0000fe61-0000-1000-8000-00805f9b34fb";
53
+ const DING_NOTIFY = "0000fe62-0000-1000-8000-00805f9b34fb";
54
+
55
+ /** Also from an OEM build only, and likewise absent from the vendor's published reference. */
56
+ const AI_TELE_SERVICE = "00002760-08c2-11e1-9073-0e8ac72e5450";
57
+ const AI_TELE_WRITE = "00002760-08c2-11e1-9073-0e8ac72e5401";
58
+ const AI_TELE_NOTIFY = "00002760-08c2-11e1-9073-0e8ac72e5402";
59
+
60
+ /** What the vendor app asks for on every one of these links but the Er2's. */
61
+ const PREFERRED_MTU = 247;
62
+
63
+ /** The Er2 negotiates the link minimum, which is why commands are split to fit. */
64
+ const MINIMUM_MTU = 23;
65
+
66
+ /** Long enough for a device that waits on a person to start a measurement. */
67
+ const DEFAULT_STUCK_TIMEOUT_MS = 60_000;
68
+ const START_BYTE = "a5";
69
+ /**
70
+ * The characteristics each group of products exposes, read from the vendor's own managers.
71
+ *
72
+ * `standard` and `aw1` match the vendor's published SDK reference exactly, and `standard`
73
+ * also matches the SDK's existing BP2 driver, which has run against hardware on precisely
74
+ * these UUIDs. `ding` and `aiTele` were read from an OEM build and the vendor documents no
75
+ * product on them, so they are the two entries here that nothing independent confirms.
76
+ */
77
+ const lepuTransports = exports.lepuTransports = {
78
+ standard: {
79
+ serviceUuid: STANDARD_SERVICE,
80
+ notifyUuid: STANDARD_NOTIFY,
81
+ writeUuid: STANDARD_WRITE,
82
+ preferredMtu: PREFERRED_MTU
83
+ },
84
+ /** The same characteristics on a link that will not grow past the minimum. */
85
+ standardSmallMtu: {
86
+ serviceUuid: STANDARD_SERVICE,
87
+ notifyUuid: STANDARD_NOTIFY,
88
+ writeUuid: STANDARD_WRITE,
89
+ preferredMtu: MINIMUM_MTU
90
+ },
91
+ aw1: {
92
+ serviceUuid: AW1_SERVICE,
93
+ notifyUuid: AW1_NOTIFY,
94
+ writeUuid: AW1_WRITE,
95
+ preferredMtu: PREFERRED_MTU
96
+ },
97
+ ding: {
98
+ serviceUuid: DING_SERVICE,
99
+ notifyUuid: DING_NOTIFY,
100
+ writeUuid: DING_WRITE,
101
+ preferredMtu: PREFERRED_MTU
102
+ },
103
+ aiTele: {
104
+ serviceUuid: AI_TELE_SERVICE,
105
+ notifyUuid: AI_TELE_NOTIFY,
106
+ writeUuid: AI_TELE_WRITE,
107
+ preferredMtu: PREFERRED_MTU
108
+ }
109
+ };
110
+ const COMMAND_BYTE = 1;
111
+ const lepuDevice = params => {
112
+ const transport = lepuTransports[params.transport ?? "standard"];
113
+ return (0, _defineCustomDevice.defineCustomDevice)({
114
+ id: params.id,
115
+ nameMatch: params.nameMatch,
116
+ stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? DEFAULT_STUCK_TIMEOUT_MS,
117
+ preferredMtu: transport.preferredMtu,
118
+ lepu: {
119
+ startBytes: [START_BYTE],
120
+ write: {
121
+ serviceUuid: transport.serviceUuid,
122
+ characteristicUuid: transport.writeUuid
123
+ },
124
+ expectedDeviceTypes: [...(params.expectedDeviceTypes ?? [])],
125
+ ...(params.pollCommand === undefined ? {} : {
126
+ pollCommand: params.pollCommand
127
+ })
128
+ },
129
+ services: [{
130
+ uuid: transport.serviceUuid,
131
+ monitor: [{
132
+ uuid: transport.notifyUuid,
133
+ frame: {
134
+ minLengthBytes: params.minLengthBytes
135
+ },
136
+ caseSelectorBytes: params.caseSelectorBytes ?? [COMMAND_BYTE],
137
+ cases: params.cases
138
+ }]
139
+ }]
140
+ });
141
+ };
142
+ exports.lepuDevice = lepuDevice;
143
+ //# sourceMappingURL=lepu.transports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_defineCustomDevice","require","STANDARD_SERVICE","STANDARD_WRITE","STANDARD_NOTIFY","AW1_SERVICE","AW1_WRITE","AW1_NOTIFY","DING_SERVICE","DING_WRITE","DING_NOTIFY","AI_TELE_SERVICE","AI_TELE_WRITE","AI_TELE_NOTIFY","PREFERRED_MTU","MINIMUM_MTU","DEFAULT_STUCK_TIMEOUT_MS","START_BYTE","lepuTransports","exports","standard","serviceUuid","notifyUuid","writeUuid","preferredMtu","standardSmallMtu","aw1","ding","aiTele","COMMAND_BYTE","lepuDevice","params","transport","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","lepu","startBytes","write","characteristicUuid","expectedDeviceTypes","pollCommand","undefined","services","uuid","monitor","frame","minLengthBytes","caseSelectorBytes","cases"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.transports.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pollingSequencerFor = exports.PollingCommandSequencer = void 0;
7
+ var _hexToBytes = require("../../utils/hex-to-bytes.js");
8
+ /**
9
+ * Sends the same commands on connect and after every frame.
10
+ *
11
+ * This is what the SDK did before a device could express anything else, and it remains
12
+ * right for the devices that only ever ask one question: a poll goes out, a reading comes
13
+ * back, and the answer is another poll. Keeping it as a named policy rather than as
14
+ * behaviour built into the transport is what lets a device replace it without every other
15
+ * device changing.
16
+ */
17
+ class PollingCommandSequencer {
18
+ constructor(commands) {
19
+ this.commands = commands;
20
+ }
21
+ initialCommands = () => this.commands;
22
+ nextCommand = () => this.commands;
23
+ }
24
+
25
+ /**
26
+ * Builds the polling policy a device's declared services already describe.
27
+ *
28
+ * A service without a write characteristic contributes nothing, so a listen-only device
29
+ * gets an empty policy and is never written to.
30
+ */
31
+ exports.PollingCommandSequencer = PollingCommandSequencer;
32
+ const pollingSequencerFor = services => new PollingCommandSequencer(services.flatMap(service => service.writeUuid ? [{
33
+ serviceUuid: service.uuid,
34
+ characteristicUuid: service.writeUuid.uuid,
35
+ frame: (0, _hexToBytes.hexToBytes)(service.writeUuid.mainCommandUuid)
36
+ }] : []));
37
+ exports.pollingSequencerFor = pollingSequencerFor;
38
+ //# sourceMappingURL=polling-command-sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hexToBytes","require","PollingCommandSequencer","constructor","commands","initialCommands","nextCommand","exports","pollingSequencerFor","services","flatMap","service","writeUuid","serviceUuid","uuid","characteristicUuid","frame","hexToBytes","mainCommandUuid"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/polling-command-sequencer.ts"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,CAA6B;EACjDC,WAAWA,CAAkBC,QAAkC,EAAE;IAAA,KAApCA,QAAkC,GAAlCA,QAAkC;EAAG;EAElEC,eAAe,GAAGA,CAAA,KAAgC,IAAI,CAACD,QAAQ;EAE/DE,WAAW,GAAGA,CAAA,KAAgC,IAAI,CAACF,QAAQ;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AALAG,OAAA,CAAAL,uBAAA,GAAAA,uBAAA;AAMA,MAAMM,mBAAmB,GACvBC,QAAuC,IAEvC,IAAIP,uBAAuB,CACzBO,QAAQ,CAACC,OAAO,CAAEC,OAAO,IACvBA,OAAO,CAACC,SAAS,GACb,CACE;EACEC,WAAW,EAAEF,OAAO,CAACG,IAAI;EACzBC,kBAAkB,EAAEJ,OAAO,CAACC,SAAS,CAACE,IAAI;EAC1CE,KAAK,EAAE,IAAAC,sBAAU,EAACN,OAAO,CAACC,SAAS,CAACM,eAAe;AACrD,CAAC,CACF,GACD,EACN,CACF,CAAC;AAACX,OAAA,CAAAC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SentinelFrameReader = void 0;
7
+ var _frameReadStatus = require("../../types/frame-read-status.js");
8
+ const lower = byte => (byte ?? "").toLowerCase();
9
+
10
+ /**
11
+ * Reads a reply that ends on a sentinel byte rather than declaring its length.
12
+ *
13
+ * The Veroval duo control answers this way, as serial protocols generally do: a request is
14
+ * answered across as many notifications as it takes and the end is marked, not counted. The
15
+ * reader therefore cannot know how much is coming and holds the buffer until the terminator
16
+ * lands - which is why the cap exists.
17
+ *
18
+ * There is no integrity check to make. A sentinel protocol carries no checksum, so a frame
19
+ * that reaches a parser here has been delimited, not verified, and whatever decodes it is
20
+ * the only thing standing between a corrupted reply and a reported reading. Declare a range
21
+ * for every field.
22
+ */
23
+ class SentinelFrameReader {
24
+ constructor(spec) {
25
+ this.spec = spec;
26
+ }
27
+ readFrame(buffer) {
28
+ const first = lower(buffer[0]);
29
+ if (buffer.length > 0 && (this.spec.standaloneBytes ?? []).includes(first)) {
30
+ return {
31
+ status: _frameReadStatus.FrameReadStatus.COMPLETE,
32
+ consumedBytes: 1,
33
+ frame: [first]
34
+ };
35
+ }
36
+ const start = this.frameStart(buffer);
37
+
38
+ /**
39
+ * A declared start byte is one byte, so there is no partial match to preserve: a buffer
40
+ * without it holds no frame start and is junk in its entirety.
41
+ */
42
+ if (start === undefined) {
43
+ return {
44
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
45
+ consumedBytes: buffer.length
46
+ };
47
+ }
48
+ const end = buffer.findIndex((byte, index) => index >= start && lower(byte) === this.spec.terminator);
49
+ if (end === -1) {
50
+ return this.incompleteOrOverlong(buffer, start);
51
+ }
52
+ return {
53
+ status: _frameReadStatus.FrameReadStatus.COMPLETE,
54
+ consumedBytes: end + 1,
55
+ frame: buffer.slice(start, end)
56
+ };
57
+ }
58
+
59
+ /**
60
+ * Where the payload begins: after the start byte when one is declared, and at zero when
61
+ * none is. A declared start byte that has not arrived means the reply has not begun.
62
+ */
63
+ frameStart(buffer) {
64
+ if (this.spec.start === undefined) {
65
+ return 0;
66
+ }
67
+ const index = buffer.findIndex(byte => lower(byte) === this.spec.start);
68
+ return index === -1 ? undefined : index + 1;
69
+ }
70
+ incompleteOrOverlong(buffer, start) {
71
+ if (buffer.length - start <= this.spec.maxFrameBytes) {
72
+ return {
73
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
74
+ consumedBytes: 0
75
+ };
76
+ }
77
+ return {
78
+ status: _frameReadStatus.FrameReadStatus.CORRUPT,
79
+ consumedBytes: buffer.length
80
+ };
81
+ }
82
+ }
83
+ exports.SentinelFrameReader = SentinelFrameReader;
84
+ //# sourceMappingURL=sentinel-frame-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_frameReadStatus","require","lower","byte","toLowerCase","SentinelFrameReader","constructor","spec","readFrame","buffer","first","length","standaloneBytes","includes","status","FrameReadStatus","COMPLETE","consumedBytes","frame","start","frameStart","undefined","INCOMPLETE","end","findIndex","index","terminator","incompleteOrOverlong","slice","maxFrameBytes","CORRUPT","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/sentinel-frame-reader.ts"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AAgCA,MAAMC,KAAK,GAAIC,IAAwB,IAAa,CAACA,IAAI,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,CAAwB;EAC/CC,WAAWA,CAAkBC,IAAuB,EAAE;IAAA,KAAzBA,IAAuB,GAAvBA,IAAuB;EAAG;EAEvDC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGR,KAAK,CAACO,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAIA,MAAM,CAACE,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAACJ,IAAI,CAACK,eAAe,IAAI,EAAE,EAAEC,QAAQ,CAACH,KAAK,CAAC,EAAE;MAC1E,OAAO;QACLI,MAAM,EAAEC,gCAAe,CAACC,QAAQ;QAChCC,aAAa,EAAE,CAAC;QAChBC,KAAK,EAAE,CAACR,KAAK;MACf,CAAC;IACH;IAEA,MAAMS,KAAK,GAAG,IAAI,CAACC,UAAU,CAACX,MAAM,CAAC;;IAErC;AACJ;AACA;AACA;IACI,IAAIU,KAAK,KAAKE,SAAS,EAAE;MACvB,OAAO;QAAEP,MAAM,EAAEC,gCAAe,CAACO,UAAU;QAAEL,aAAa,EAAER,MAAM,CAACE;MAAO,CAAC;IAC7E;IAEA,MAAMY,GAAG,GAAGd,MAAM,CAACe,SAAS,CAC1B,CAACrB,IAAI,EAAEsB,KAAK,KAAKA,KAAK,IAAIN,KAAK,IAAIjB,KAAK,CAACC,IAAI,CAAC,KAAK,IAAI,CAACI,IAAI,CAACmB,UAC/D,CAAC;IAED,IAAIH,GAAG,KAAK,CAAC,CAAC,EAAE;MACd,OAAO,IAAI,CAACI,oBAAoB,CAAClB,MAAM,EAAEU,KAAK,CAAC;IACjD;IAEA,OAAO;MACLL,MAAM,EAAEC,gCAAe,CAACC,QAAQ;MAChCC,aAAa,EAAEM,GAAG,GAAG,CAAC;MACtBL,KAAK,EAAET,MAAM,CAACmB,KAAK,CAACT,KAAK,EAAEI,GAAG;IAChC,CAAC;EACH;;EAEA;AACF;AACA;AACA;EACUH,UAAUA,CAACX,MAAyB,EAAsB;IAChE,IAAI,IAAI,CAACF,IAAI,CAACY,KAAK,KAAKE,SAAS,EAAE;MACjC,OAAO,CAAC;IACV;IAEA,MAAMI,KAAK,GAAGhB,MAAM,CAACe,SAAS,CAAErB,IAAI,IAAKD,KAAK,CAACC,IAAI,CAAC,KAAK,IAAI,CAACI,IAAI,CAACY,KAAK,CAAC;IAEzE,OAAOM,KAAK,KAAK,CAAC,CAAC,GAAGJ,SAAS,GAAGI,KAAK,GAAG,CAAC;EAC7C;EAEQE,oBAAoBA,CAC1BlB,MAAyB,EACzBU,KAAa,EACI;IACjB,IAAIV,MAAM,CAACE,MAAM,GAAGQ,KAAK,IAAI,IAAI,CAACZ,IAAI,CAACsB,aAAa,EAAE;MACpD,OAAO;QAAEf,MAAM,EAAEC,gCAAe,CAACO,UAAU;QAAEL,aAAa,EAAE;MAAE,CAAC;IACjE;IAEA,OAAO;MAAEH,MAAM,EAAEC,gCAAe,CAACe,OAAO;MAAEb,aAAa,EAAER,MAAM,CAACE;IAAO,CAAC;EAC1E;AACF;AAACoB,OAAA,CAAA1B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.standardWeightScaleDevice = exports.standardThermometerDevice = exports.standardPulseOximeterDevice = exports.standardHeartRateDevice = exports.standardBloodPressureDevice = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _standardGattProfile = require("./standard-gatt.profile.js");
9
+ /**
10
+ * Declarations for the Bluetooth SIG vital-signs profiles.
11
+ *
12
+ * These are the profiles a compliant patient device implements, and their layouts come from
13
+ * the public specification rather than from reading a vendor's app, so they can be written
14
+ * down exactly instead of inferred.
15
+ *
16
+ * The advertised name stays the caller's, because the SDK matches a scan result by name and
17
+ * every vendor names its hardware differently. A product declares the profile and supplies
18
+ * the name its own hardware advertises.
19
+ *
20
+ * Values are little-endian, as the specification requires. Only the layouts using each
21
+ * catalog's canonical unit are declared: a device reporting kPa, Fahrenheit or pounds needs
22
+ * a conversion a declaration cannot express, and leaving those flag values undeclared means
23
+ * such a device yields no reading rather than one that is quietly wrong.
24
+ */
25
+
26
+ /**
27
+ * Blood Pressure Service 0x1810, Blood Pressure Measurement 0x2A35.
28
+ *
29
+ * The pressures sit at bytes 1-4 whatever the flags say. The pulse rate sits behind two of
30
+ * them: bit 1 puts a seven-byte timestamp in front of it and bit 2 says whether it is there
31
+ * at all, so it is read at byte 7 in one shape and byte 14 in the other, and each shape
32
+ * declares the length it needs. A device that reports no pulse still decodes, because the
33
+ * flags value it sends selects a case that never looks for one.
34
+ */
35
+ const standardBloodPressureDevice = params => (0, _standardGattProfile.declareProfile)(params, {
36
+ service: "1810",
37
+ characteristic: "2a35",
38
+ minLengthBytes: 7,
39
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
40
+ /** mmHg, with and without the timestamp and pulse the pressures sit in front of. */
41
+ selectors: ["00", "02", "04", "06"],
42
+ fields: [(0, _standardGattProfile.littleEndian)("systolic", [1, 2], "mmHg", "sfloat"), (0, _standardGattProfile.littleEndian)("diastolic", [3, 4], "mmHg", "sfloat")],
43
+ optionalFields: {
44
+ /** Pulse, no timestamp: it follows the mean pressure. */
45
+ "04": {
46
+ fields: [(0, _standardGattProfile.littleEndian)("heartRate", [7, 8], "bpm", "sfloat")],
47
+ minLengthBytes: 9
48
+ },
49
+ /** Pulse behind a seven-byte timestamp. */
50
+ "06": {
51
+ fields: [(0, _standardGattProfile.littleEndian)("heartRate", [14, 15], "bpm", "sfloat")],
52
+ minLengthBytes: 16
53
+ }
54
+ }
55
+ });
56
+
57
+ /** Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C. */
58
+ exports.standardBloodPressureDevice = standardBloodPressureDevice;
59
+ const standardThermometerDevice = params => (0, _standardGattProfile.declareProfile)(params, {
60
+ service: "1809",
61
+ characteristic: "2a1c",
62
+ minLengthBytes: 5,
63
+ measurementTypeKey: _core.MeasurementTypeKey.temperature,
64
+ /** Celsius, with and without the timestamp that follows the reading. */
65
+ selectors: ["00", "02"],
66
+ fields: [(0, _standardGattProfile.littleEndian)("bodyTemp", [1, 2, 3, 4], "Cel", "float")]
67
+ });
68
+
69
+ /** The SI weight resolution the specification fixes at five grams per count. */
70
+ exports.standardThermometerDevice = standardThermometerDevice;
71
+ const WEIGHT_KG_PER_COUNT = 0.005;
72
+
73
+ /**
74
+ * Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
75
+ *
76
+ * The reading is a scaled integer rather than a float, so the resolution is applied here.
77
+ */
78
+ const standardWeightScaleDevice = params => (0, _standardGattProfile.declareProfile)(params, {
79
+ service: "181d",
80
+ characteristic: "2a9d",
81
+ minLengthBytes: 3,
82
+ measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
83
+ /** Kilograms, with and without the timestamp that follows the reading. */
84
+ selectors: ["00", "02"],
85
+ fields: [{
86
+ ...(0, _standardGattProfile.littleEndian)("bodyWeight", [1, 2], "kg", "uint"),
87
+ scale: WEIGHT_KG_PER_COUNT,
88
+ decimals: 3
89
+ }]
90
+ });
91
+
92
+ /**
93
+ * Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
94
+ *
95
+ * Saturation and pulse rate are both required by the catalog, which matches the
96
+ * specification: a spot-check measurement always carries both.
97
+ */
98
+ exports.standardWeightScaleDevice = standardWeightScaleDevice;
99
+ const standardPulseOximeterDevice = params => (0, _standardGattProfile.declareProfile)(params, {
100
+ service: "1822",
101
+ characteristic: "2a5e",
102
+ minLengthBytes: 5,
103
+ measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
104
+ selectors: ["00"],
105
+ fields: [(0, _standardGattProfile.littleEndian)("bloodOxygen", [1, 2], "%", "sfloat"), (0, _standardGattProfile.littleEndian)("pulseRate", [3, 4], "bpm", "sfloat")]
106
+ });
107
+
108
+ /**
109
+ * Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
110
+ *
111
+ * Only the eight-bit layout is declared. The sixteen-bit variant needs byte 2, which would
112
+ * raise `minLengthBytes` to three and reject every eight-bit frame - the common case - so it
113
+ * is left out rather than made to displace it.
114
+ */
115
+ exports.standardPulseOximeterDevice = standardPulseOximeterDevice;
116
+ const standardHeartRateDevice = params => (0, _standardGattProfile.declareProfile)(params, {
117
+ service: "180d",
118
+ characteristic: "2a37",
119
+ minLengthBytes: 2,
120
+ measurementTypeKey: _core.MeasurementTypeKey.heartRate,
121
+ selectors: ["00"],
122
+ fields: [{
123
+ name: "heartRate",
124
+ byteIndexes: [1],
125
+ encoding: "uint",
126
+ unit: "bpm"
127
+ }]
128
+ });
129
+ exports.standardHeartRateDevice = standardHeartRateDevice;
130
+ //# sourceMappingURL=standard-gatt.devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_standardGattProfile","standardBloodPressureDevice","params","declareProfile","service","characteristic","minLengthBytes","measurementTypeKey","MeasurementTypeKey","bloodPressure","selectors","fields","littleEndian","optionalFields","exports","standardThermometerDevice","temperature","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","scale","decimals","standardPulseOximeterDevice","bloodOxygenPulseRate","standardHeartRateDevice","heartRate","name","byteIndexes","encoding","unit"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAD,OAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,2BAA2B,GAC/BC,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBC,cAAc,EAAE,CAAC;EACjBC,kBAAkB,EAAEC,wBAAkB,CAACC,aAAa;EAEpD;EACAC,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;EACnCC,MAAM,EAAE,CACN,IAAAC,iCAAY,EAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAClD,IAAAA,iCAAY,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CACpD;EACDC,cAAc,EAAE;IACd;IACA,IAAI,EAAE;MACJF,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;MAC5DN,cAAc,EAAE;IAClB,CAAC;IAED;IACA,IAAI,EAAE;MACJK,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;MAC9DN,cAAc,EAAE;IAClB;EACF;AACF,CAAC,CAAC;;AAEJ;AAAAQ,OAAA,CAAAb,2BAAA,GAAAA,2BAAA;AACA,MAAMc,yBAAyB,GAC7Bb,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBC,cAAc,EAAE,CAAC;EACjBC,kBAAkB,EAAEC,wBAAkB,CAACQ,WAAW;EAElD;EACAN,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EACvBC,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC;AACjE,CAAC,CAAC;;AAEJ;AAAAE,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AACA,MAAME,mBAAmB,GAAG,KAAK;;AAEjC;AACA;AACA;AACA;AACA;AACA,MAAMC,yBAAyB,GAC7BhB,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBC,cAAc,EAAE,CAAC;EACjBC,kBAAkB,EAAEC,wBAAkB,CAACW,UAAU;EAEjD;EACAT,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EACvBC,MAAM,EAAE,CACN;IACE,GAAG,IAAAC,iCAAY,EAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC;IACnDQ,KAAK,EAAEH,mBAAmB;IAC1BI,QAAQ,EAAE;EACZ,CAAC;AAEL,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AALAP,OAAA,CAAAI,yBAAA,GAAAA,yBAAA;AAMA,MAAMI,2BAA2B,GAC/BpB,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBC,cAAc,EAAE,CAAC;EACjBC,kBAAkB,EAAEC,wBAAkB,CAACe,oBAAoB;EAC3Db,SAAS,EAAE,CAAC,IAAI,CAAC;EACjBC,MAAM,EAAE,CACN,IAAAC,iCAAY,EAAC,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,EAClD,IAAAA,iCAAY,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC;AAEtD,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AANAE,OAAA,CAAAQ,2BAAA,GAAAA,2BAAA;AAOA,MAAME,uBAAuB,GAC3BtB,MAA4B,IAE5B,IAAAC,mCAAc,EAACD,MAAM,EAAE;EACrBE,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,MAAM;EACtBC,cAAc,EAAE,CAAC;EACjBC,kBAAkB,EAAEC,wBAAkB,CAACiB,SAAS;EAChDf,SAAS,EAAE,CAAC,IAAI,CAAC;EACjBC,MAAM,EAAE,CACN;IAAEe,IAAI,EAAE,WAAW;IAAEC,WAAW,EAAE,CAAC,CAAC,CAAC;IAAEC,QAAQ,EAAE,MAAM;IAAEC,IAAI,EAAE;EAAM,CAAC;AAE1E,CAAC,CAAC;AAACf,OAAA,CAAAU,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sigUuid = exports.littleEndian = exports.declareProfile = void 0;
7
+ var _defineCustomDevice = require("../../custom/define-custom-device.js");
8
+ /** Milliseconds a spot-check device may take to produce its reading. */
9
+ const SPOT_CHECK_TIMEOUT_MS = 60_000;
10
+ const sigUuid = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
11
+
12
+ /**
13
+ * The flags byte selects the case, because it decides which optional fields are present and
14
+ * therefore where the later ones sit. Fields common to every shape are declared once; a
15
+ * field a flag adds is declared against the selector that carries it, at the offset that
16
+ * flag combination puts it and with the frame length that shape guarantees.
17
+ */
18
+ exports.sigUuid = sigUuid;
19
+ const declareProfile = (params, profile) => (0, _defineCustomDevice.defineCustomDevice)({
20
+ id: params.id,
21
+ nameMatch: params.nameMatch,
22
+ stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
23
+ services: [{
24
+ uuid: sigUuid(profile.service),
25
+ monitor: [{
26
+ uuid: sigUuid(profile.characteristic),
27
+ frame: {
28
+ minLengthBytes: profile.minLengthBytes
29
+ },
30
+ caseSelectorBytes: [0],
31
+ cases: profile.selectors.map(selector => {
32
+ const optional = profile.optionalFields?.[selector];
33
+ return {
34
+ selector,
35
+ kind: "result",
36
+ measurementTypeKey: profile.measurementTypeKey,
37
+ fields: [...profile.fields, ...(optional?.fields ?? [])],
38
+ ...(optional ? {
39
+ minLengthBytes: optional.minLengthBytes
40
+ } : {})
41
+ };
42
+ })
43
+ }]
44
+ }]
45
+ });
46
+ exports.declareProfile = declareProfile;
47
+ const littleEndian = (name, byteIndexes, unit, encoding) => ({
48
+ name,
49
+ byteIndexes,
50
+ byteOrder: "little",
51
+ encoding,
52
+ unit
53
+ });
54
+ exports.littleEndian = littleEndian;
55
+ //# sourceMappingURL=standard-gatt.profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_defineCustomDevice","require","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","exports","declareProfile","params","profile","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","optional","optionalFields","kind","measurementTypeKey","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.ts"],"mappings":";;;;;;AAIA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,qBAAqB,GAAG,MAAM;AAyCpC,MAAMC,OAAO,GAAIC,QAAgB,IAC/B,OAAOA,QAAQ,8BAA8B;;AAE/C;AACA;AACA;AACA;AACA;AACA;AALAC,OAAA,CAAAF,OAAA,GAAAA,OAAA;AAMA,MAAMG,cAAc,GAAGA,CACrBC,MAA4B,EAC5BC,OAAoB,KAEpB,IAAAC,sCAAkB,EAAC;EACjBC,EAAE,EAAEH,MAAM,CAACG,EAAE;EACbC,SAAS,EAAEJ,MAAM,CAACI,SAAS;EAC3BC,kBAAkB,EAAEL,MAAM,CAACK,kBAAkB,IAAIV,qBAAqB;EACtEW,QAAQ,EAAE,CACR;IACEC,IAAI,EAAEX,OAAO,CAACK,OAAO,CAACO,OAAO,CAAC;IAC9BC,OAAO,EAAE,CACP;MACEF,IAAI,EAAEX,OAAO,CAACK,OAAO,CAACS,cAAc,CAAC;MACrCC,KAAK,EAAE;QAAEC,cAAc,EAAEX,OAAO,CAACW;MAAe,CAAC;MACjDC,iBAAiB,EAAE,CAAC,CAAC,CAAC;MACtBC,KAAK,EAAEb,OAAO,CAACc,SAAS,CAACC,GAAG,CAAEC,QAAQ,IAAK;QACzC,MAAMC,QAAQ,GAAGjB,OAAO,CAACkB,cAAc,GAAGF,QAAQ,CAAC;QAEnD,OAAO;UACLA,QAAQ;UACRG,IAAI,EAAE,QAAiB;UACvBC,kBAAkB,EAAEpB,OAAO,CAACoB,kBAAkB;UAC9CC,MAAM,EAAE,CAAC,GAAGrB,OAAO,CAACqB,MAAM,EAAE,IAAIJ,QAAQ,EAAEI,MAAM,IAAI,EAAE,CAAC,CAAC;UACxD,IAAIJ,QAAQ,GACR;YAAEN,cAAc,EAAEM,QAAQ,CAACN;UAAe,CAAC,GAC3C,CAAC,CAAC;QACR,CAAC;MACH,CAAC;IACH,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC;AAACd,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAEL,MAAMwB,YAAY,GAAGA,CACnBC,IAAY,EACZC,WAAqB,EACrBC,IAAY,EACZC,QAAqC,MAChB;EACrBH,IAAI;EACJC,WAAW;EACXG,SAAS,EAAE,QAAQ;EACnBD,QAAQ;EACRD;AACF,CAAC,CAAC;AAAC5B,OAAA,CAAAyB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.verovalCompactMonitor = exports.bpw26Monitor = exports.bpu26Monitor = exports.VEROVAL_BP_MODEL_NAMES = void 0;
7
+ var _standardGattDevices = require("../standard-gatt/standard-gatt.devices.js");
8
+ /**
9
+ * The Veroval compact+ blood-pressure monitors.
10
+ *
11
+ * There is nothing vendor-specific to decode here: these implement the Bluetooth
12
+ * blood-pressure profile as published - service 0x1810, measurement 0x2A35, notifications on
13
+ * the standard descriptor - so the layout comes from the specification and the SDK already
14
+ * reads it. What this adds is the identity, which is the only part the specification does
15
+ * not supply.
16
+ *
17
+ * The vendor's own app compares the advertised name for exact equality, ignoring case, so
18
+ * that is what these matchers do. The duo control and the Fusion are not here: those speak a
19
+ * protocol of their own on a private service, and so does the ECG.
20
+ */
21
+
22
+ const BPU_26 = "BPU26";
23
+ const BPW_26 = "BPW26";
24
+ const verovalCompactMonitor = (advertisedName, params) => (0, _standardGattDevices.standardBloodPressureDevice)({
25
+ id: params.id,
26
+ nameMatch: params.nameMatch ?? new RegExp(`^${advertisedName}$`, "i"),
27
+ ...(params.stuckDataTimeoutMs === undefined ? {} : {
28
+ stuckDataTimeoutMs: params.stuckDataTimeoutMs
29
+ })
30
+ });
31
+
32
+ /** BPU 26, the Veroval compact+ upper-arm monitor. */
33
+ exports.verovalCompactMonitor = verovalCompactMonitor;
34
+ const bpu26Monitor = params => verovalCompactMonitor(BPU_26, params);
35
+
36
+ /** BPW 26, the Veroval compact+ wrist monitor. */
37
+ exports.bpu26Monitor = bpu26Monitor;
38
+ const bpw26Monitor = params => verovalCompactMonitor(BPW_26, params);
39
+
40
+ /** The names these monitors advertise. */
41
+ exports.bpw26Monitor = bpw26Monitor;
42
+ const VEROVAL_BP_MODEL_NAMES = exports.VEROVAL_BP_MODEL_NAMES = [BPU_26, BPW_26];
43
+ //# sourceMappingURL=veroval.bp-monitors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_standardGattDevices","require","BPU_26","BPW_26","verovalCompactMonitor","advertisedName","params","standardBloodPressureDevice","id","nameMatch","RegExp","stuckDataTimeoutMs","undefined","exports","bpu26Monitor","bpw26Monitor","VEROVAL_BP_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/veroval/veroval.bp-monitors.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,MAAM,GAAG,OAAO;AACtB,MAAMC,MAAM,GAAG,OAAO;AActB,MAAMC,qBAAqB,GAAGA,CAC5BC,cAAsB,EACtBC,MAAuB,KAEvB,IAAAC,gDAA2B,EAAC;EAC1BC,EAAE,EAAEF,MAAM,CAACE,EAAE;EACbC,SAAS,EAAEH,MAAM,CAACG,SAAS,IAAI,IAAIC,MAAM,CAAC,IAAIL,cAAc,GAAG,EAAE,GAAG,CAAC;EACrE,IAAIC,MAAM,CAACK,kBAAkB,KAAKC,SAAS,GACvC,CAAC,CAAC,GACF;IAAED,kBAAkB,EAAEL,MAAM,CAACK;EAAmB,CAAC;AACvD,CAAC,CAAC;;AAEJ;AAAAE,OAAA,CAAAT,qBAAA,GAAAA,qBAAA;AACA,MAAMU,YAAY,GAAIR,MAAuB,IAC3CF,qBAAqB,CAACF,MAAM,EAAEI,MAAM,CAAC;;AAEvC;AAAAO,OAAA,CAAAC,YAAA,GAAAA,YAAA;AACA,MAAMC,YAAY,GAAIT,MAAuB,IAC3CF,qBAAqB,CAACD,MAAM,EAAEG,MAAM,CAAC;;AAEvC;AAAAO,OAAA,CAAAE,YAAA,GAAAA,YAAA;AACA,MAAMC,sBAAyC,GAAAH,OAAA,CAAAG,sBAAA,GAAG,CAACd,MAAM,EAAEC,MAAM,CAAC","ignoreList":[]}
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VerovalDuoControlDevice = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _defineCustomDevice = require("../../custom/define-custom-device.js");
9
+ var _customDevice = require("../custom/custom.device.js");
10
+ var _sentinelFrameReader = require("../sentinel-frame-reader.js");
11
+ var _verovalDuoControlSequencer = require("./veroval.duo-control-sequencer.js");
12
+ const SERVICE = "5d4b8aa6-a26a-4a1b-99f5-cd4473c786e3";
13
+ const NOTIFY = "5d4b8aa6-a26a-4a1b-99f5-cd4473c786e4";
14
+ const WRITE = "5d4b8aa6-a26a-4a1b-99f5-cd4473c786e5";
15
+ const STX = "02";
16
+ const ETX = "03";
17
+ const ACK = "06";
18
+ const NAK = "15";
19
+
20
+ /** One stored measurement, as the device writes it: twenty-six characters. */
21
+ const RECORD_BYTES = 26;
22
+
23
+ /** A reply opens by echoing the four-character command it answers. */
24
+ const TAG_BYTES = 4;
25
+
26
+ /** `?MDR`, the reply carrying stored records. */
27
+ const DATA_REPLY = "3f4d4452";
28
+
29
+ /** `?MRN`, the reply carrying a record count. The sequencer reads it; no reading comes of it. */
30
+ const COUNT_REPLY = "3f4d524e";
31
+
32
+ /** Two memories of a hundred records each, plus the echo, with room to spare. */
33
+ const MAX_REPLY_BYTES = 8_192;
34
+
35
+ /** The device sleeps between measurements, so it is given a while to answer. */
36
+ const STUCK_TIMEOUT_MS = 120_000;
37
+ const asciiField = (name, from, unit) => ({
38
+ name,
39
+ byteIndexes: [from, from + 1, from + 2],
40
+ encoding: "ascii",
41
+ unit
42
+ });
43
+
44
+ /**
45
+ * The record layout, read from HARTMANN's own application.
46
+ *
47
+ * Offsets are relative to a record, and every field is decimal digits written as text. The
48
+ * timestamp at the front of each record is not declared: the SDK stamps a reading when it
49
+ * arrives, and a stored record's own clock would need the device's timezone to be
50
+ * meaningful.
51
+ */
52
+ const duoControlDefinition = (0, _defineCustomDevice.defineCustomDevice)({
53
+ id: "veroval-duo-control",
54
+ nameMatch: /^Veroval duo control$/i,
55
+ stuckDataTimeoutMs: STUCK_TIMEOUT_MS,
56
+ services: [{
57
+ uuid: SERVICE,
58
+ monitor: [{
59
+ uuid: NOTIFY,
60
+ frame: {
61
+ minLengthBytes: TAG_BYTES + RECORD_BYTES
62
+ },
63
+ caseSelectorBytes: [0, 1, 2, 3],
64
+ cases: [{
65
+ selector: DATA_REPLY,
66
+ kind: "result",
67
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
68
+ description: "Stored measurements, one record each",
69
+ repeatedRecords: {
70
+ recordBytes: RECORD_BYTES,
71
+ from: TAG_BYTES
72
+ },
73
+ fields: [asciiField("systolic", 11, "mmHg"), asciiField("diastolic", 14, "mmHg"), asciiField("heartRate", 17, "bpm")]
74
+ }, {
75
+ selector: COUNT_REPLY,
76
+ kind: "idle",
77
+ description: "How many records a memory holds"
78
+ }]
79
+ }]
80
+ }]
81
+ });
82
+
83
+ /**
84
+ * The Veroval duo control.
85
+ *
86
+ * A device class rather than a declaration, because reading it is a conversation: the two
87
+ * user memories are asked in turn, and the device answers with bare control bytes as often
88
+ * as with payload. The decoding is still declared - the class supplies the framing and the
89
+ * walk, and nothing else.
90
+ *
91
+ * Readings are stored measurements, not live ones. The device hands over its history when
92
+ * asked, so what arrives was taken before the connection and may be days old.
93
+ */
94
+ class VerovalDuoControlDevice extends _customDevice.CustomDevice {
95
+ constructor(device, params) {
96
+ super(device, params, duoControlDefinition);
97
+ this.frameReader = new _sentinelFrameReader.SentinelFrameReader({
98
+ start: STX,
99
+ terminator: ETX,
100
+ maxFrameBytes: MAX_REPLY_BYTES,
101
+ standaloneBytes: [ACK, NAK]
102
+ });
103
+ this.createCommandSequencer = () => new _verovalDuoControlSequencer.VerovalDuoControlSequencer({
104
+ write: {
105
+ serviceUuid: SERVICE,
106
+ characteristicUuid: WRITE
107
+ },
108
+ onRefused: reason => this.onError?.(new Error(`Veroval duo control: ${reason}.`))
109
+ });
110
+ }
111
+ }
112
+ exports.VerovalDuoControlDevice = VerovalDuoControlDevice;
113
+ //# sourceMappingURL=veroval.duo-control-device.js.map