@ovok/native 0.4.6 → 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.
Files changed (380) hide show
  1. package/lib/commonjs/modules/bt-management/index.js +176 -0
  2. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +49 -0
  4. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  5. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +47 -41
  6. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  8. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  9. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +98 -0
  10. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  11. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +24 -1
  12. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  13. package/lib/commonjs/modules/bt-management/services/device-creator.js +15 -8
  14. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +85 -0
  16. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  17. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -74
  18. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  19. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +141 -0
  20. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  21. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  22. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  24. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  25. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  26. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +36 -0
  28. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +81 -14
  30. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +48 -0
  32. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  33. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +37 -0
  34. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  35. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js +83 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +26 -0
  38. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js +36 -0
  40. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  41. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +155 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +98 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js +29 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +103 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +32 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js +64 -0
  52. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +143 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +38 -0
  56. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  57. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +156 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +124 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +113 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +117 -0
  64. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +82 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/types/command-sequencer.js +6 -0
  68. package/lib/commonjs/modules/bt-management/types/command-sequencer.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  70. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js +6 -0
  72. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js +2 -0
  74. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js +6 -0
  76. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/types/device-command.js +2 -0
  78. package/lib/commonjs/modules/bt-management/types/device-command.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/types/measurement-group.js +6 -0
  80. package/lib/commonjs/modules/bt-management/types/measurement-group.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js +49 -0
  82. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +9 -0
  84. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  85. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js +19 -0
  86. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js +13 -0
  88. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js +22 -0
  90. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js +18 -0
  92. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  93. package/lib/module/modules/bt-management/index.js +16 -0
  94. package/lib/module/modules/bt-management/index.js.map +1 -1
  95. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +44 -0
  96. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  97. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +47 -41
  98. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  99. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  100. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  101. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +93 -0
  102. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  103. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +24 -1
  104. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  105. package/lib/module/modules/bt-management/services/device-creator.js +16 -8
  106. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  107. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +81 -0
  108. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  109. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -73
  110. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  111. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +136 -0
  112. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  113. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  114. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  115. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  116. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  117. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  118. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  119. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +32 -0
  120. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  121. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +81 -14
  122. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  123. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +43 -0
  124. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  125. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +33 -0
  126. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  127. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js +79 -0
  128. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  129. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +22 -0
  130. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  131. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js +32 -0
  132. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  133. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +150 -0
  134. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  135. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +93 -0
  136. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  137. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js +24 -0
  138. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  139. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +98 -0
  140. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  141. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +27 -0
  142. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  143. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js +59 -0
  144. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  145. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +140 -0
  146. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  147. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +34 -0
  148. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  149. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +149 -0
  150. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  151. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +118 -0
  152. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  153. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +108 -0
  154. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  155. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +114 -0
  156. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  157. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +79 -0
  158. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  159. package/lib/module/modules/bt-management/types/command-sequencer.js +4 -0
  160. package/lib/module/modules/bt-management/types/command-sequencer.js.map +1 -0
  161. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  162. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  163. package/lib/module/modules/bt-management/types/custom-checksum-spec.js +4 -0
  164. package/lib/module/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  165. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  166. package/lib/module/modules/bt-management/types/custom-lepu-spec.js +2 -0
  167. package/lib/module/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  168. package/lib/module/modules/bt-management/types/custom-measurement-spec.js +4 -0
  169. package/lib/module/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  170. package/lib/module/modules/bt-management/types/device-command.js +2 -0
  171. package/lib/module/modules/bt-management/types/device-command.js.map +1 -0
  172. package/lib/module/modules/bt-management/types/measurement-group.js +4 -0
  173. package/lib/module/modules/bt-management/types/measurement-group.js.map +1 -0
  174. package/lib/module/modules/bt-management/utils/calculate-checksum.js +44 -0
  175. package/lib/module/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  176. package/lib/module/modules/bt-management/utils/create-frame-validator.js +9 -0
  177. package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  178. package/lib/module/modules/bt-management/utils/hex-to-bytes.js +14 -0
  179. package/lib/module/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  180. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js +8 -0
  181. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  182. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js +17 -0
  183. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  184. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js +13 -0
  185. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  186. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +16 -0
  187. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  188. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  189. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  193. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  196. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  197. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  199. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +67 -0
  201. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  203. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  205. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  207. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +21 -0
  209. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +33 -0
  211. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  213. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  215. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  217. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  219. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  221. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  223. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  225. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  227. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  229. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  231. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  233. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  235. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  237. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +44 -0
  239. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  241. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  243. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  245. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  247. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  249. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +13 -0
  251. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  253. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  255. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  257. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  263. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  265. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +18 -0
  267. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  269. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +9 -0
  271. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  273. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  276. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  278. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  280. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  282. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  283. package/lib/typescript/module/src/modules/bt-management/index.d.ts +16 -0
  284. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  285. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  286. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  287. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  288. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  289. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  290. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  291. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  292. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  293. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  294. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  295. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  296. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  297. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +67 -0
  298. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  299. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  300. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  301. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  302. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  303. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  304. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  305. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +21 -0
  306. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  307. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +33 -0
  308. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  309. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  310. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  311. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  312. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  313. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  314. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  315. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  316. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  317. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  318. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  319. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  320. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  321. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  322. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  323. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  324. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  325. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  326. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  327. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  328. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  329. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  330. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  331. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  332. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  333. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  334. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  335. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +44 -0
  336. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  337. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  338. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  339. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  340. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  341. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  342. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  343. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  344. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  345. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  346. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  347. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +13 -0
  348. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  349. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  350. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  351. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  352. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  353. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  354. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  355. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  356. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  357. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  358. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  359. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  360. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  361. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  362. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  363. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +18 -0
  364. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  365. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  366. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  367. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +9 -0
  368. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  369. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  370. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  371. package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  372. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  373. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  374. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  375. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  376. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  377. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  378. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  379. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  380. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.lepuNameMatch = void 0;
7
+ var _lepuDeviceNames = require("./lepu.device-names.js");
8
+ const REGEXP_SPECIAL = /[.*+?^${}()|[\]\\]/g;
9
+ const escapeRegExp = value => value.replace(REGEXP_SPECIAL, "\\$&");
10
+
11
+ /**
12
+ * Builds a matcher for one advertised name that cannot also match a longer one.
13
+ *
14
+ * The vendor tests these names with a substring check in a hand-ordered cascade, so `BP2`
15
+ * only fails to match a BP2W because `BP2W` happens to be checked first. Order is a fragile
16
+ * place to keep a safety property: it lives in whoever wrote the list, is invisible at the
17
+ * point of use, and an insertion in the wrong place silently binds the wrong driver.
18
+ *
19
+ * Here the exclusions are derived instead. Every name in the vocabulary that extends this
20
+ * one becomes a negative lookahead, so the matcher is correct wherever it is used and in
21
+ * whatever order it is tried.
22
+ *
23
+ * The match is deliberately open at the end, because these devices advertise a serial after
24
+ * the model - `BP2 1234` - and the serial's shape varies across the family.
25
+ */
26
+ const lepuNameMatch = (name, vocabulary = _lepuDeviceNames.LEPU_DEVICE_NAMES) => {
27
+ const extensions = vocabulary.filter(other => other !== name && other.startsWith(name)).map(other => escapeRegExp(other.slice(name.length)));
28
+ const exclusion = extensions.length > 0 ? `(?!${extensions.join("|")})` : "";
29
+ return new RegExp(`^${escapeRegExp(name)}${exclusion}`);
30
+ };
31
+ exports.lepuNameMatch = lepuNameMatch;
32
+ //# sourceMappingURL=lepu.name-match.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_lepuDeviceNames","require","REGEXP_SPECIAL","escapeRegExp","value","replace","lepuNameMatch","name","vocabulary","LEPU_DEVICE_NAMES","extensions","filter","other","startsWith","map","slice","length","exclusion","join","RegExp","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.name-match.ts"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,MAAMC,cAAc,GAAG,qBAAqB;AAE5C,MAAMC,YAAY,GAAIC,KAAa,IACjCA,KAAK,CAACC,OAAO,CAACH,cAAc,EAAE,MAAM,CAAC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMI,aAAa,GAAGA,CAC3BC,IAAY,EACZC,UAA6B,GAAGC,kCAAiB,KACtC;EACX,MAAMC,UAAU,GAAGF,UAAU,CAC1BG,MAAM,CAAEC,KAAK,IAAKA,KAAK,KAAKL,IAAI,IAAIK,KAAK,CAACC,UAAU,CAACN,IAAI,CAAC,CAAC,CAC3DO,GAAG,CAAEF,KAAK,IAAKT,YAAY,CAACS,KAAK,CAACG,KAAK,CAACR,IAAI,CAACS,MAAM,CAAC,CAAC,CAAC;EAEzD,MAAMC,SAAS,GACbP,UAAU,CAACM,MAAM,GAAG,CAAC,GAAG,MAAMN,UAAU,CAACQ,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE;EAE5D,OAAO,IAAIC,MAAM,CAAC,IAAIhB,YAAY,CAACI,IAAI,CAAC,GAAGU,SAAS,EAAE,CAAC;AACzD,CAAC;AAACG,OAAA,CAAAd,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.lepuResponseType = exports.isLepuSuccess = exports.describeLepuResponseType = exports.LepuResponseType = void 0;
7
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
8
+ /** Byte 3 of every frame: the direction on a request, the outcome on a reply. */
9
+ const RESPONSE_TYPE_INDEX = 3;
10
+
11
+ /**
12
+ * What a Lepu device says about the request it just answered.
13
+ *
14
+ * Only `SUCCESS` means the payload holds what was asked for. Every other value is an error
15
+ * whose payload is not the requested data, so a reply has to be checked before it is
16
+ * decoded - otherwise a refusal is read as a reading, out of whatever bytes happen to
17
+ * follow the header.
18
+ */
19
+ const LepuResponseType = exports.LepuResponseType = {
20
+ /** A request, phone to device. Never seen on a reply. */
21
+ REQUEST: 0x00,
22
+ SUCCESS: 0x01,
23
+ /** The device rejected our checksum. */
24
+ CRC_ERROR: 0x02,
25
+ FILE_NOT_FOUND: 0xe0,
26
+ FILE_READ_FAILED: 0xe1,
27
+ FILE_WRITE_FAILED: 0xe2,
28
+ PARAMETER_ILLEGAL: 0xf1,
29
+ PERMISSION_DENIED: 0xf2,
30
+ DECRYPT_FAILED: 0xf3,
31
+ /** Mid-measurement or otherwise occupied. Worth backing off rather than giving up. */
32
+ DEVICE_BUSY: 0xfb,
33
+ COMMAND_FORMAT_ERROR: 0xfc,
34
+ /** The opcode is unknown to this firmware, which is how a feature is detected. */
35
+ COMMAND_NOT_SUPPORTED: 0xfd,
36
+ ERROR: 0xff
37
+ };
38
+ const RESPONSE_TYPE_NAMES = {
39
+ [LepuResponseType.CRC_ERROR]: "it rejected our checksum",
40
+ [LepuResponseType.FILE_NOT_FOUND]: "the file does not exist",
41
+ [LepuResponseType.FILE_READ_FAILED]: "the file could not be read",
42
+ [LepuResponseType.FILE_WRITE_FAILED]: "the file could not be written",
43
+ [LepuResponseType.PARAMETER_ILLEGAL]: "the parameter was rejected",
44
+ [LepuResponseType.PERMISSION_DENIED]: "permission was denied",
45
+ [LepuResponseType.DECRYPT_FAILED]: "it could not decrypt the request",
46
+ [LepuResponseType.DEVICE_BUSY]: "it is busy",
47
+ [LepuResponseType.COMMAND_FORMAT_ERROR]: "the command was malformed",
48
+ [LepuResponseType.COMMAND_NOT_SUPPORTED]: "the opcode is unknown to this firmware",
49
+ [LepuResponseType.ERROR]: "it reported a generic error"
50
+ };
51
+ const lepuResponseType = frame => (0, _hexToByte.hexToByte)(frame[RESPONSE_TYPE_INDEX] ?? "0");
52
+ exports.lepuResponseType = lepuResponseType;
53
+ const isLepuSuccess = frame => lepuResponseType(frame) === LepuResponseType.SUCCESS;
54
+
55
+ /** Why a device refused, in words, for an error a person will read. */
56
+ exports.isLepuSuccess = isLepuSuccess;
57
+ const describeLepuResponseType = frame => {
58
+ const type = lepuResponseType(frame);
59
+ const known = RESPONSE_TYPE_NAMES[type];
60
+ const code = `0x${type.toString(16).padStart(2, "0")}`;
61
+ return known ? `${known} (${code})` : `it answered with ${code}`;
62
+ };
63
+ exports.describeLepuResponseType = describeLepuResponseType;
64
+ //# sourceMappingURL=lepu.response-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hexToByte","require","RESPONSE_TYPE_INDEX","LepuResponseType","exports","REQUEST","SUCCESS","CRC_ERROR","FILE_NOT_FOUND","FILE_READ_FAILED","FILE_WRITE_FAILED","PARAMETER_ILLEGAL","PERMISSION_DENIED","DECRYPT_FAILED","DEVICE_BUSY","COMMAND_FORMAT_ERROR","COMMAND_NOT_SUPPORTED","ERROR","RESPONSE_TYPE_NAMES","lepuResponseType","frame","hexToByte","isLepuSuccess","describeLepuResponseType","type","known","code","toString","padStart"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/lepu/lepu.response-type.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA,MAAMC,mBAAmB,GAAG,CAAC;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD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aAAA,GAAAA,aAAA;AACA,MAAMC,wBAAwB,GAAIH,KAAwB,IAAa;EACrE,MAAMI,IAAI,GAAGL,gBAAgB,CAACC,KAAK,CAAC;EACpC,MAAMK,KAAK,GAAGP,mBAAmB,CAACM,IAAI,CAAC;EACvC,MAAME,IAAI,GAAG,KAAKF,IAAI,CAACG,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;EAEtD,OAAOH,KAAK,GAAG,GAAGA,KAAK,KAAKC,IAAI,GAAG,GAAG,oBAAoBA,IAAI,EAAE;AAClE,CAAC;AAACtB,OAAA,CAAAmB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -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":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,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AAC/B,OAAA,CAAAW,UAAA,GAAAA,UAAA","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,156 @@
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 _defineCustomDevice = require("../../custom/define-custom-device.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
+ /** Milliseconds a spot-check device may take to produce its reading. */
27
+ const SPOT_CHECK_TIMEOUT_MS = 60_000;
28
+ const sigUuid = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
29
+
30
+ /**
31
+ * The flags byte selects the case, because it decides which optional fields are present and
32
+ * therefore where the later ones sit. Every declared case reads the same offsets, so only
33
+ * fields that keep their position across all of them may be declared.
34
+ */
35
+ const declareProfile = (params, profile) => (0, _defineCustomDevice.defineCustomDevice)({
36
+ id: params.id,
37
+ nameMatch: params.nameMatch,
38
+ stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
39
+ services: [{
40
+ uuid: sigUuid(profile.service),
41
+ monitor: [{
42
+ uuid: sigUuid(profile.characteristic),
43
+ frame: {
44
+ minLengthBytes: profile.minLengthBytes
45
+ },
46
+ caseSelectorBytes: [0],
47
+ cases: profile.selectors.map(selector => ({
48
+ selector,
49
+ kind: "result",
50
+ measurementTypeKey: profile.measurementTypeKey,
51
+ fields: [...profile.fields]
52
+ }))
53
+ }]
54
+ }]
55
+ });
56
+ const littleEndian = (name, byteIndexes, unit, encoding) => ({
57
+ name,
58
+ byteIndexes,
59
+ byteOrder: "little",
60
+ encoding,
61
+ unit
62
+ });
63
+
64
+ /**
65
+ * Blood Pressure Service 0x1810, Blood Pressure Measurement 0x2A35.
66
+ *
67
+ * The pulse rate is deliberately not read. Its offset moves with the timestamp flag, and
68
+ * every byte a declaration reads must fit inside one `minLengthBytes` for the whole
69
+ * characteristic - reading it would raise the minimum to sixteen bytes and reject the
70
+ * shorter frames outright. The pressures sit at bytes 1-4 whatever the flags say, so they
71
+ * are always safe. A device whose pulse matters needs a device class.
72
+ */
73
+ const standardBloodPressureDevice = params => declareProfile(params, {
74
+ service: "1810",
75
+ characteristic: "2a35",
76
+ minLengthBytes: 7,
77
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
78
+ /** mmHg, with and without the timestamp and pulse the pressures sit in front of. */
79
+ selectors: ["00", "02", "04", "06"],
80
+ fields: [littleEndian("systolic", [1, 2], "mmHg", "sfloat"), littleEndian("diastolic", [3, 4], "mmHg", "sfloat")]
81
+ });
82
+
83
+ /** Health Thermometer Service 0x1809, Temperature Measurement 0x2A1C. */
84
+ exports.standardBloodPressureDevice = standardBloodPressureDevice;
85
+ const standardThermometerDevice = params => declareProfile(params, {
86
+ service: "1809",
87
+ characteristic: "2a1c",
88
+ minLengthBytes: 5,
89
+ measurementTypeKey: _core.MeasurementTypeKey.temperature,
90
+ /** Celsius, with and without the timestamp that follows the reading. */
91
+ selectors: ["00", "02"],
92
+ fields: [littleEndian("bodyTemp", [1, 2, 3, 4], "Cel", "float")]
93
+ });
94
+
95
+ /** The SI weight resolution the specification fixes at five grams per count. */
96
+ exports.standardThermometerDevice = standardThermometerDevice;
97
+ const WEIGHT_KG_PER_COUNT = 0.005;
98
+
99
+ /**
100
+ * Weight Scale Service 0x181D, Weight Measurement 0x2A9D.
101
+ *
102
+ * The reading is a scaled integer rather than a float, so the resolution is applied here.
103
+ */
104
+ const standardWeightScaleDevice = params => declareProfile(params, {
105
+ service: "181d",
106
+ characteristic: "2a9d",
107
+ minLengthBytes: 3,
108
+ measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
109
+ /** Kilograms, with and without the timestamp that follows the reading. */
110
+ selectors: ["00", "02"],
111
+ fields: [{
112
+ ...littleEndian("bodyWeight", [1, 2], "kg", "uint"),
113
+ scale: WEIGHT_KG_PER_COUNT,
114
+ decimals: 3
115
+ }]
116
+ });
117
+
118
+ /**
119
+ * Pulse Oximeter Service 0x1822, PLX Spot-Check Measurement 0x2A5E.
120
+ *
121
+ * Saturation and pulse rate are both required by the catalog, which matches the
122
+ * specification: a spot-check measurement always carries both.
123
+ */
124
+ exports.standardWeightScaleDevice = standardWeightScaleDevice;
125
+ const standardPulseOximeterDevice = params => declareProfile(params, {
126
+ service: "1822",
127
+ characteristic: "2a5e",
128
+ minLengthBytes: 5,
129
+ measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
130
+ selectors: ["00"],
131
+ fields: [littleEndian("bloodOxygen", [1, 2], "%", "sfloat"), littleEndian("pulseRate", [3, 4], "bpm", "sfloat")]
132
+ });
133
+
134
+ /**
135
+ * Heart Rate Service 0x180D, Heart Rate Measurement 0x2A37.
136
+ *
137
+ * Only the eight-bit layout is declared. The sixteen-bit variant needs byte 2, which would
138
+ * raise `minLengthBytes` to three and reject every eight-bit frame - the common case - so it
139
+ * is left out rather than made to displace it.
140
+ */
141
+ exports.standardPulseOximeterDevice = standardPulseOximeterDevice;
142
+ const standardHeartRateDevice = params => declareProfile(params, {
143
+ service: "180d",
144
+ characteristic: "2a37",
145
+ minLengthBytes: 2,
146
+ measurementTypeKey: _core.MeasurementTypeKey.heartRate,
147
+ selectors: ["00"],
148
+ fields: [{
149
+ name: "heartRate",
150
+ byteIndexes: [1],
151
+ encoding: "uint",
152
+ unit: "bpm"
153
+ }]
154
+ });
155
+ exports.standardHeartRateDevice = standardHeartRateDevice;
156
+ //# sourceMappingURL=standard-gatt.devices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_defineCustomDevice","SPOT_CHECK_TIMEOUT_MS","sigUuid","assigned","declareProfile","params","profile","defineCustomDevice","id","nameMatch","stuckDataTimeoutMs","services","uuid","service","monitor","characteristic","frame","minLengthBytes","caseSelectorBytes","cases","selectors","map","selector","kind","measurementTypeKey","fields","littleEndian","name","byteIndexes","unit","encoding","byteOrder","standardBloodPressureDevice","MeasurementTypeKey","bloodPressure","exports","standardThermometerDevice","temperature","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","scale","decimals","standardPulseOximeterDevice","bloodOxygenPulseRate","standardHeartRateDevice","heartRate"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/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AAC;IAAEE,QAAQ,EAAE,MAAM;IAAED,IAAI,EAAE;EAAM,CAAC;AAE1E,CAAC,CAAC;AAACM,OAAA,CAAAU,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.viatomBpMonitor = exports.bp2wMonitor = exports.bp2tMonitor = exports.bp2aMonitor = exports.BP3_MODEL_NAMES = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _lepuNameMatch = require("../lepu/lepu.name-match.js");
9
+ var _lepuTransports = require("../lepu/lepu.transports.js");
10
+ /**
11
+ * The Viatom blood-pressure monitors that report a reading over the realtime channel.
12
+ *
13
+ * The vendor documents BP2, BP2A and BP2T as one product group on one set of characteristics
14
+ * with one API, and the SDK's own BP2 device class has run against that protocol on real
15
+ * hardware. The byte offsets below are that class's, unchanged.
16
+ *
17
+ * BP2W and the BP3 range decode the same struct rather than merely sharing a transport:
18
+ * their interfaces build `Bp2BleRtData`, which holds the device state in its first nine
19
+ * bytes and the result immediately after, and all of them answer the same `RT_DATA` opcode.
20
+ * That is still one step short of BP2A and BP2T, which the vendor groups with BP2 outright.
21
+ */
22
+
23
+ /** Realtime data. Inert on this series: it reads state, it does not start a measurement. */
24
+ const RT_DATA = 0x08;
25
+
26
+ /**
27
+ * The command byte and the device's state byte together pick the case.
28
+ *
29
+ * The state is the first byte of the realtime payload and is what says whether the numbers
30
+ * that follow are a finished reading or a cuff still inflating.
31
+ */
32
+ const CASE_SELECTOR_BYTES = [1, 7];
33
+
34
+ /** Header, realtime state, and the result struct through its pulse-rate field. */
35
+ const MIN_LENGTH_BYTES = 28;
36
+ const READING = [{
37
+ name: "systolic",
38
+ byteIndexes: [20, 21],
39
+ byteOrder: "little",
40
+ encoding: "uint",
41
+ unit: "mmHg"
42
+ }, {
43
+ name: "diastolic",
44
+ byteIndexes: [22, 23],
45
+ byteOrder: "little",
46
+ encoding: "uint",
47
+ unit: "mmHg"
48
+ }, {
49
+ name: "heartRate",
50
+ byteIndexes: [26, 27],
51
+ byteOrder: "little",
52
+ encoding: "uint",
53
+ unit: "bpm"
54
+ }];
55
+ const result = (selector, description) => ({
56
+ selector,
57
+ kind: "result",
58
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
59
+ fields: [...READING],
60
+ description
61
+ });
62
+ const measuring = (selector, description) => ({
63
+ selector,
64
+ kind: "stream",
65
+ description
66
+ });
67
+
68
+ /**
69
+ * The states the series reports, and what each means for a reading.
70
+ *
71
+ * A finished measurement keeps reporting itself for as long as the device sits on the
72
+ * result screen, so the same numbers arrive on every poll. The state transition is what
73
+ * separates one measurement from the next, which is why the states in between are declared
74
+ * rather than ignored.
75
+ */
76
+ const BP2_CASES = [measuring("0804", "Cuff inflating or deflating"), result("0805", "Measurement finished"), measuring("080f", "Averaging run: a measurement is in progress"), measuring("0810", "Averaging run: waiting between measurements"), result("0811", "Averaging run finished, carrying the same payload")];
77
+ /**
78
+ * Declares one monitor of the BP2 series.
79
+ *
80
+ * `advertisedName` is the name the vendor's SDK matches - `BP2A`, `BP2T` - and the matcher
81
+ * derived from it excludes every longer name in the family, so a declaration for `BP2`
82
+ * cannot pick up a `BP2W`.
83
+ */
84
+ const viatomBpMonitor = (advertisedName, params) => (0, _lepuTransports.lepuDevice)({
85
+ id: params.id,
86
+ nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)(advertisedName),
87
+ pollCommand: RT_DATA,
88
+ minLengthBytes: MIN_LENGTH_BYTES,
89
+ caseSelectorBytes: CASE_SELECTOR_BYTES,
90
+ cases: BP2_CASES.map(each => ({
91
+ ...each
92
+ })),
93
+ ...(params.expectedDeviceTypes ? {
94
+ expectedDeviceTypes: params.expectedDeviceTypes
95
+ } : {})
96
+ });
97
+
98
+ /** BP2A, the arm-cuff monitor of the series. */
99
+ exports.viatomBpMonitor = viatomBpMonitor;
100
+ const bp2aMonitor = params => viatomBpMonitor("BP2A", params);
101
+
102
+ /** BP2T, documented by the vendor alongside BP2 and BP2A as the same protocol. */
103
+ exports.bp2aMonitor = bp2aMonitor;
104
+ const bp2tMonitor = params => viatomBpMonitor("BP2T", params);
105
+
106
+ /** BP2W. Documented in its own section, but decoding the same realtime struct. */
107
+ exports.bp2tMonitor = bp2tMonitor;
108
+ const bp2wMonitor = params => viatomBpMonitor("BP2W", params);
109
+
110
+ /**
111
+ * The names the BP3 range advertises.
112
+ *
113
+ * Fifteen products differing in cuff and casing rather than in protocol, so declaring the
114
+ * range is one line per name:
115
+ *
116
+ * ```typescript
117
+ * const bp3Devices = BP3_MODEL_NAMES.map((name) =>
118
+ * viatomBpMonitor(name, { id: `viatom-${name.toLowerCase()}` }),
119
+ * );
120
+ * ```
121
+ */
122
+ exports.bp2wMonitor = bp2wMonitor;
123
+ const BP3_MODEL_NAMES = exports.BP3_MODEL_NAMES = ["BP3", "BP3-B", "BP3-C1", "BP3-C2", "BP3A", "BP3B", "BP3C", "BP3D", "BP3E", "BP3F", "BP3G", "BP3H", "BP3K", "BP3L", "BP3Z"];
124
+ //# sourceMappingURL=viatom.bp-monitors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_lepuNameMatch","_lepuTransports","RT_DATA","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","READING","name","byteIndexes","byteOrder","encoding","unit","result","selector","description","kind","measurementTypeKey","MeasurementTypeKey","bloodPressure","fields","measuring","BP2_CASES","viatomBpMonitor","advertisedName","params","lepuDevice","id","nameMatch","lepuNameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","map","each","expectedDeviceTypes","exports","bp2aMonitor","bp2tMonitor","bp2wMonitor","BP3_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.bp-monitors.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAA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