@ovok/native 1.10.8 → 1.10.10

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 (450) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +16 -1
  2. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  3. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-aoj-variants.js +137 -0
  4. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
  5. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
  6. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
  7. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
  8. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
  9. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +227 -0
  10. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
  11. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +95 -0
  12. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
  13. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +149 -0
  14. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
  15. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js +1001 -0
  16. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
  17. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1093 -0
  18. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
  19. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +312 -0
  20. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
  21. package/lib/commonjs/modules/bt-device/constants/supported-devices.js +75 -9
  22. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +2 -1
  24. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  25. package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js +112 -0
  26. package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
  27. package/lib/commonjs/modules/bt-management/constants/device-variants.js +252 -0
  28. package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -0
  29. package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js +190 -0
  30. package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
  31. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +9 -1
  32. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js +80 -0
  34. package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
  35. package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js +115 -0
  36. package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js +802 -0
  38. package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js +890 -0
  40. package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
  41. package/lib/commonjs/modules/bt-management/index.js +20 -0
  42. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
  44. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +7 -1
  46. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/device-classes.js +22 -1
  48. package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
  49. package/lib/commonjs/modules/bt-management/services/device-secrets.js +68 -0
  50. package/lib/commonjs/modules/bt-management/services/device-secrets.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +41 -0
  52. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js +45 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +140 -0
  56. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
  57. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +138 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
  60. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  61. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
  62. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  63. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +4 -4
  64. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  65. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +12 -1
  66. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  67. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +12 -4
  68. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  69. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js +49 -0
  70. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +163 -0
  72. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +95 -0
  74. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js +40 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js +162 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js +63 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +56 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js +67 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js +60 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js +85 -0
  88. package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
  90. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
  91. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +13 -2
  92. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  93. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +153 -0
  94. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js +71 -0
  96. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +112 -0
  98. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js +132 -0
  100. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
  101. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +145 -0
  102. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
  103. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js +91 -0
  104. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
  105. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +15 -0
  106. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  107. package/lib/commonjs/modules/bt-management/utils/device-title.js +5 -1
  108. package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -1
  109. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +16 -1
  110. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  111. package/lib/module/modules/bt-device/constants/supported-device-catalog-aoj-variants.js +135 -0
  112. package/lib/module/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
  113. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
  114. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
  115. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
  116. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
  117. package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +225 -0
  118. package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
  119. package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +93 -0
  120. package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
  121. package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +147 -0
  122. package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
  123. package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js +999 -0
  124. package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
  125. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1091 -0
  126. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
  127. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +309 -0
  128. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
  129. package/lib/module/modules/bt-device/constants/supported-devices.js +76 -10
  130. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  131. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +2 -1
  132. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  133. package/lib/module/modules/bt-management/constants/aoj-device-variants.js +110 -0
  134. package/lib/module/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
  135. package/lib/module/modules/bt-management/constants/device-variants.js +249 -0
  136. package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -0
  137. package/lib/module/modules/bt-management/constants/famidoc-device-variants.js +188 -0
  138. package/lib/module/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
  139. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +9 -1
  140. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  141. package/lib/module/modules/bt-management/constants/joytech-device-variants.js +78 -0
  142. package/lib/module/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
  143. package/lib/module/modules/bt-management/constants/jumper-device-variants.js +113 -0
  144. package/lib/module/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
  145. package/lib/module/modules/bt-management/constants/standard-device-variants.js +799 -0
  146. package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -0
  147. package/lib/module/modules/bt-management/constants/transtek-device-variants.js +888 -0
  148. package/lib/module/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
  149. package/lib/module/modules/bt-management/index.js +2 -0
  150. package/lib/module/modules/bt-management/index.js.map +1 -1
  151. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
  152. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  153. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +7 -1
  154. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  155. package/lib/module/modules/bt-management/services/device-classes.js +22 -1
  156. package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
  157. package/lib/module/modules/bt-management/services/device-secrets.js +59 -0
  158. package/lib/module/modules/bt-management/services/device-secrets.js.map +1 -0
  159. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +37 -0
  160. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
  161. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js +41 -0
  162. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
  163. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +123 -0
  164. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
  165. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +134 -0
  166. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
  167. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
  168. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  169. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
  170. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  171. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +4 -4
  172. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  173. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +12 -1
  174. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  175. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +12 -4
  176. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  177. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js +45 -0
  178. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
  179. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +149 -0
  180. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
  181. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +91 -0
  182. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
  183. package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js +36 -0
  184. package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
  185. package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js +150 -0
  186. package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js +60 -0
  188. package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
  189. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +52 -0
  190. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js +62 -0
  192. package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js +57 -0
  194. package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js +79 -0
  196. package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
  197. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
  198. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +6 -2
  200. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +149 -0
  202. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js +67 -0
  204. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
  205. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +94 -0
  206. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js +125 -0
  208. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +142 -0
  210. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
  211. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js +85 -0
  212. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
  213. package/lib/module/modules/bt-management/types/custom-device-definition.js +2 -0
  214. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  215. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  216. package/lib/module/modules/bt-management/types/integrated-devices.js +15 -0
  217. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  218. package/lib/module/modules/bt-management/utils/device-title.js +5 -1
  219. package/lib/module/modules/bt-management/utils/device-title.js.map +1 -1
  220. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts +5 -0
  222. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -1
  224. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
  227. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
  229. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
  231. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
  233. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
  235. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
  237. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
  239. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/modules/bt-management/constants/aoj-device-variants.d.ts +5 -0
  242. package/lib/typescript/commonjs/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts +23 -0
  244. package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
  246. package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/modules/bt-management/constants/joytech-device-variants.d.ts +5 -0
  249. package/lib/typescript/commonjs/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
  251. package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
  253. package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
  255. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +3 -0
  257. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts +21 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts +22 -0
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -0
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +1 -1
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +16 -0
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts +7 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
  317. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +4 -2
  318. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +2 -1
  320. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts +6 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +5 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +15 -0
  326. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +16 -1
  328. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/bt-management/types/service.type.d.ts +6 -0
  330. package/lib/typescript/commonjs/src/modules/bt-management/types/service.type.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
  332. package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +2 -1
  334. package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -1
  335. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  336. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts +5 -0
  337. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
  338. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -1
  339. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
  340. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
  341. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
  342. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
  343. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
  344. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
  345. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
  346. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
  347. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
  348. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
  349. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
  350. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
  351. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
  352. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
  353. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
  354. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  355. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  356. package/lib/typescript/module/src/modules/bt-management/constants/aoj-device-variants.d.ts +5 -0
  357. package/lib/typescript/module/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
  358. package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts +23 -0
  359. package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
  360. package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
  361. package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
  362. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  363. package/lib/typescript/module/src/modules/bt-management/constants/joytech-device-variants.d.ts +5 -0
  364. package/lib/typescript/module/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
  365. package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
  366. package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
  367. package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
  368. package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
  369. package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
  370. package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
  371. package/lib/typescript/module/src/modules/bt-management/index.d.ts +3 -0
  372. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  373. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  374. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  375. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts +21 -0
  376. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  377. package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts +22 -0
  378. package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
  379. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
  380. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
  381. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
  382. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
  383. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
  384. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
  385. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
  386. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
  387. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
  388. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  389. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -0
  390. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  391. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +1 -1
  392. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  393. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  394. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
  395. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  396. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +16 -0
  397. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
  398. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
  399. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
  402. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
  408. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
  409. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
  410. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
  411. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
  412. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
  413. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
  414. package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
  415. package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
  416. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
  417. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
  418. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
  419. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
  420. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts +7 -0
  421. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
  422. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
  423. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
  424. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
  425. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
  426. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
  427. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
  428. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
  429. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
  430. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
  431. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
  432. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +4 -2
  433. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  434. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +2 -1
  435. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  436. package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts +6 -0
  437. package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
  438. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +5 -0
  439. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  440. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +15 -0
  441. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  442. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +16 -1
  443. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  444. package/lib/typescript/module/src/modules/bt-management/types/service.type.d.ts +6 -0
  445. package/lib/typescript/module/src/modules/bt-management/types/service.type.d.ts.map +1 -1
  446. package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
  447. package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
  448. package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +2 -1
  449. package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -1
  450. package/package.json +2 -2
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import { IntegratedDevices } from "../../../types/integrated-devices.js";
4
+ import { BTManagedDevice } from "../bt-managed-device.js";
5
+ import { FAMIDOC_NOTIFY, FAMIDOC_SERVICE, FamidocFrameReader } from "./famidoc.protocol.js";
6
+ import { FamidocSequencer } from "./famidoc.sequencer.js";
7
+ /** The sequencer decodes records itself; the declarative parser only passes frames on. */
8
+ const passThrough = {
9
+ caseValuePosition: [],
10
+ cases: []
11
+ };
12
+ const famidocMainServices = [{
13
+ uuid: FAMIDOC_SERVICE,
14
+ monitorUuids: [{
15
+ uuid: FAMIDOC_NOTIFY,
16
+ parsingModel: passThrough
17
+ }]
18
+ }];
19
+
20
+ /** Models differ only in the address byte their commands carry. */
21
+ const ADDRESS = {
22
+ [IntegratedDevices.FAMIDOC_BPM]: 0xa5,
23
+ [IntegratedDevices.FAMIDOC_IR_THERMOMETER]: 0xa7,
24
+ [IntegratedDevices.FAMIDOC_CONTACT_THERMOMETER]: 0xa3
25
+ };
26
+
27
+ /** Famidoc blood-pressure monitors and contact and infrared thermometers. */
28
+ class FamidocDeviceClass extends BTManagedDevice {
29
+ mainServices = famidocMainServices;
30
+ stuckDataTimeout = 90_000;
31
+ onStreamStart = undefined;
32
+ constructor(device, params) {
33
+ super(device, params);
34
+ this.frameReader = new FamidocFrameReader();
35
+ this.createCommandSequencer = () => new FamidocSequencer({
36
+ address: ADDRESS[params.deviceName],
37
+ onResult: result => this.onResult?.(result)
38
+ });
39
+ }
40
+ handleSuccessResult() {
41
+ return;
42
+ }
43
+ }
44
+ export { FamidocDeviceClass as FamidocDevice };
45
+ //# sourceMappingURL=famidoc.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IntegratedDevices","BTManagedDevice","FAMIDOC_NOTIFY","FAMIDOC_SERVICE","FamidocFrameReader","FamidocSequencer","passThrough","caseValuePosition","cases","famidocMainServices","uuid","monitorUuids","parsingModel","ADDRESS","FAMIDOC_BPM","FAMIDOC_IR_THERMOMETER","FAMIDOC_CONTACT_THERMOMETER","FamidocDeviceClass","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","frameReader","createCommandSequencer","address","deviceName","onResult","result","handleSuccessResult","FamidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/famidoc/famidoc.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SACEC,cAAc,EACdC,eAAe,EACfC,kBAAkB,QACb,uBAAoB;AAC3B,SAASC,gBAAgB,QAAQ,wBAAqB;AAOtD;AACA,MAAMC,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,mBAA+B,GAAG,CACtC;EAAEC,IAAI,EAAEP,eAAe;EAAEQ,YAAY,EAAE,CAAC;IAAED,IAAI,EAAER,cAAc;IAAEU,YAAY,EAAEN;EAAY,CAAC;AAAE,CAAC,CAC/F;;AAED;AACA,MAAMO,OAAsC,GAAG;EAC7C,CAACb,iBAAiB,CAACc,WAAW,GAAG,IAAI;EACrC,CAACd,iBAAiB,CAACe,sBAAsB,GAAG,IAAI;EAChD,CAACf,iBAAiB,CAACgB,2BAA2B,GAAG;AACnD,CAAC;;AAED;AACA,MAAMC,kBAAkB,SAAShB,eAAe,CAAgB;EACpDiB,YAAY,GAAGT,mBAAmB;EAClCU,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAyC,EAAE;IAC5E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIrB,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACsB,sBAAsB,GAAG,MAC5B,IAAIrB,gBAAgB,CAAC;MACnBsB,OAAO,EAAEd,OAAO,CAACW,MAAM,CAACI,UAAU,CAAC;MACnCC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASd,kBAAkB,IAAIe,aAAa","ignoreList":[]}
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
6
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
7
+
8
+ /**
9
+ * Famidoc's protocol, shared by its blood-pressure monitors and contact and infrared
10
+ * thermometers. Layouts are from MedM Health Diary 3.12.11's `CFamidoc_Device`.
11
+ *
12
+ * Every frame, both ways, is `AA addr LL cmd body CS 55`: LL counts the command byte and the
13
+ * body, CS is the one's complement of the 8-bit sum of address, length, command and body, and
14
+ * multi-byte fields are big-endian. Models differ only in the address byte.
15
+ */
16
+ const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
17
+ export const FAMIDOC_SERVICE = sig16("ffff");
18
+ export const FAMIDOC_WRITE = sig16("ff02");
19
+ export const FAMIDOC_NOTIFY = sig16("ff01");
20
+
21
+ /** Device-to-app commands. */
22
+ export const FAMIDOC = {
23
+ version: 0xa1,
24
+ bloodPressureStatus: 0x40,
25
+ thermometerStatus: [0x10, 0x20],
26
+ bloodPressure: 0x42,
27
+ contactTemperature: 0x23,
28
+ infraredTemperature: 0x13
29
+ };
30
+ const START = 0xaa;
31
+ const END = 0x55;
32
+
33
+ /** The longest frame the devices send is twenty bytes; anything longer is a misread length. */
34
+ const MAX_FRAME_BYTES = 64;
35
+ const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
36
+ const byteAt = (frame, index) => hexToByte(frame[index] ?? "00");
37
+ const checksum = bytes => ~bytes.reduce((sum, value) => sum + value, 0) & 0xff;
38
+ export const frame = (address, command, data = []) => {
39
+ const body = [address, data.length + 1, command, ...data];
40
+ return toHex([START, ...body, checksum(body), END]);
41
+ };
42
+ export const commandOf = received => byteAt(received, 3);
43
+
44
+ /** The bytes after the command, before the checksum. */
45
+ export const bodyOf = received => received.slice(4, -2).map(byte => hexToByte(byte));
46
+
47
+ /** The fixed acknowledgement MedM sends for every frame, whatever the model. */
48
+ export const ACK = toHex([0xaa, 0xa4, 0x03, 0xf2, 0x4f, 0x4b, 0xcc, 0x55]);
49
+ export const getVersionCommand = address => frame(address, 0xa1);
50
+ export const getStateCommand = address => frame(address, 0xa2);
51
+
52
+ /** Set time and end-session go to the model's address minus one, as MedM sends them. */
53
+ export const setTimeCommand = (address, now) => frame(address - 1, 0xa3, [now.getFullYear() - 2000 & 0xff, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()]);
54
+ export const endSessionCommand = address => frame(address - 1, 0xf2, [0x4f, 0x4d]);
55
+
56
+ /** Isolates `AA … 55` frames whatever the notification boundaries, skipping noise to the next start. */
57
+ export class FamidocFrameReader {
58
+ readFrame(buffer) {
59
+ const start = buffer.findIndex(byte => hexToByte(byte) === START);
60
+ if (start === -1) {
61
+ return {
62
+ status: FrameReadStatus.INCOMPLETE,
63
+ consumedBytes: buffer.length
64
+ };
65
+ }
66
+ if (start + 3 > buffer.length) {
67
+ return {
68
+ status: FrameReadStatus.INCOMPLETE,
69
+ consumedBytes: start
70
+ };
71
+ }
72
+ const length = byteAt(buffer, start + 2) + 5;
73
+ if (length > MAX_FRAME_BYTES || length < 6) {
74
+ return {
75
+ status: FrameReadStatus.CORRUPT,
76
+ consumedBytes: start + 1
77
+ };
78
+ }
79
+ if (start + length > buffer.length) {
80
+ return {
81
+ status: FrameReadStatus.INCOMPLETE,
82
+ consumedBytes: start
83
+ };
84
+ }
85
+ const received = buffer.slice(start, start + length);
86
+ const covered = received.slice(1, -2).map(byte => hexToByte(byte));
87
+ if (byteAt(received, length - 1) !== END || checksum(covered) !== byteAt(received, length - 2)) {
88
+ return {
89
+ status: FrameReadStatus.CORRUPT,
90
+ consumedBytes: start + 1
91
+ };
92
+ }
93
+ return {
94
+ status: FrameReadStatus.COMPLETE,
95
+ consumedBytes: start + length,
96
+ frame: received
97
+ };
98
+ }
99
+ }
100
+
101
+ /** A record's `YY MM DD hh mm ss`, local time. */
102
+ const readTime = (body, at, year) => new Date(year, (body[at + 1] ?? 1) - 1, body[at + 2] ?? 1, body[at + 3] ?? 0, body[at + 4] ?? 0, body[at + 5] ?? 0);
103
+ /**
104
+ * `42`: user, status (anything but 0 is an error, Lo or Hi), time, then one byte each for
105
+ * systolic, diastolic and pulse in mmHg and bpm, a skipped byte, the irregular-heartbeat flag
106
+ * and an error code.
107
+ *
108
+ * The year byte is the low byte of the full year (2024 → 0xE8); MedM reads anything else,
109
+ * such as a two-digit year, as this year.
110
+ */
111
+ export const readBloodPressure = (body, now) => {
112
+ if (body.length < 14 || body[1] !== 0) {
113
+ return undefined;
114
+ }
115
+ const yearByte = body[2] ?? 0;
116
+ return {
117
+ recordedAt: readTime(body, 2, yearByte >= 0xd0 ? 1792 + yearByte : now.getFullYear()),
118
+ systolic: body[8] ?? 0,
119
+ diastolic: body[9] ?? 0,
120
+ heartRate: body[10] ?? 0,
121
+ irregularHeartbeat: (body[12] ?? 0) !== 0
122
+ };
123
+ };
124
+ const isErrorStatus = status => status >= 3 && status <= 6;
125
+
126
+ /** `23`: contact thermometer; the temperature's decimal places are in byte 2. */
127
+ export const readContactTemperature = body => {
128
+ if (body.length < 12 || isErrorStatus(body[11] ?? 0)) {
129
+ return undefined;
130
+ }
131
+ const raw = (body[9] ?? 0) << 8 | (body[10] ?? 0);
132
+ return {
133
+ bodyTemp: raw / 10 ** (body[2] ?? 0),
134
+ recordedAt: readTime(body, 3, 2000 + (body[3] ?? 0))
135
+ };
136
+ };
137
+
138
+ /** `13`: infrared thermometer, always hundredths of a degree; ambient temperature is ignored. */
139
+ export const readInfraredTemperature = body => {
140
+ const raw = (body[9] ?? 0) << 8 | (body[10] ?? 0);
141
+ if (body.length < 14 || raw === 0 || isErrorStatus(body[13] ?? 0)) {
142
+ return undefined;
143
+ }
144
+ return {
145
+ bodyTemp: raw / 100,
146
+ recordedAt: readTime(body, 3, 2000 + (body[3] ?? 0))
147
+ };
148
+ };
149
+ //# sourceMappingURL=famidoc.protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","hexToByte","sig16","assigned","FAMIDOC_SERVICE","FAMIDOC_WRITE","FAMIDOC_NOTIFY","FAMIDOC","version","bloodPressureStatus","thermometerStatus","bloodPressure","contactTemperature","infraredTemperature","START","END","MAX_FRAME_BYTES","toHex","bytes","map","value","toString","padStart","byteAt","frame","index","checksum","reduce","sum","address","command","data","body","length","commandOf","received","bodyOf","slice","byte","ACK","getVersionCommand","getStateCommand","setTimeCommand","now","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","endSessionCommand","FamidocFrameReader","readFrame","buffer","start","findIndex","status","INCOMPLETE","consumedBytes","CORRUPT","covered","COMPLETE","readTime","at","year","Date","readBloodPressure","undefined","yearByte","recordedAt","systolic","diastolic","heartRate","irregularHeartbeat","isErrorStatus","readContactTemperature","raw","bodyTemp","readInfraredTemperature"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/famidoc/famidoc.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAE/C,OAAO,MAAMC,eAAe,GAAGF,KAAK,CAAC,MAAM,CAAC;AAC5C,OAAO,MAAMG,aAAa,GAAGH,KAAK,CAAC,MAAM,CAAC;AAC1C,OAAO,MAAMI,cAAc,GAAGJ,KAAK,CAAC,MAAM,CAAC;;AAE3C;AACA,OAAO,MAAMK,OAAO,GAAG;EACrBC,OAAO,EAAE,IAAI;EACbC,mBAAmB,EAAE,IAAI;EACzBC,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EAC/BC,aAAa,EAAE,IAAI;EACnBC,kBAAkB,EAAE,IAAI;EACxBC,mBAAmB,EAAE;AACvB,CAAU;AAEV,MAAMC,KAAK,GAAG,IAAI;AAClB,MAAMC,GAAG,GAAG,IAAI;;AAEhB;AACA,MAAMC,eAAe,GAAG,EAAE;AAE1B,MAAMC,KAAK,GAAIC,KAAwB,IACrCA,KAAK,CAACC,GAAG,CAAEC,KAAK,IAAK,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,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EAAE,CAAC,IAAI,CAAC,CAAC;EAEnD,OAAO;IACL6C,QAAQ,EAAED,GAAG,GAAG,EAAE,KAAK5C,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACpCqC,UAAU,EAAEP,QAAQ,CAAC9B,IAAI,EAAE,CAAC,EAAE,IAAI,IAAIA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EACrD,CAAC;AACH,CAAC;;AAED;AACA,OAAO,MAAM8C,uBAAuB,GAClC9C,IAAuB,IACgC;EACvD,MAAM4C,GAAG,GAAI,CAAC5C,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAKA,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;EAEnD,IAAIA,IAAI,CAACC,MAAM,GAAG,EAAE,IAAI2C,GAAG,KAAK,CAAC,IAAIF,aAAa,CAAC1C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE;IACjE,OAAOmC,SAAS;EAClB;EAEA,OAAO;IAAEU,QAAQ,EAAED,GAAG,GAAG,GAAG;IAAEP,UAAU,EAAEP,QAAQ,CAAC9B,IAAI,EAAE,CAAC,EAAE,IAAI,IAAIA,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAAE,CAAC;AACtF,CAAC","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { CaseType } from "../../../types/case-type.js";
5
+ import { ACK, bodyOf, commandOf, endSessionCommand, FAMIDOC, FAMIDOC_SERVICE, FAMIDOC_WRITE, getStateCommand, getVersionCommand, readBloodPressure, readContactTemperature, readInfraredTemperature, setTimeCommand } from "./famidoc.protocol.js";
6
+ /** MedM ends the session after this long without a record. */
7
+ const END_AFTER_MS = 60_000;
8
+ const RECORDS = [FAMIDOC.bloodPressure, FAMIDOC.contactTemperature, FAMIDOC.infraredTemperature];
9
+
10
+ /**
11
+ * Asks for the version and state, sets the clock once, then acknowledges every frame while the
12
+ * device pushes its records. Every valid frame is acknowledged, whatever it carries.
13
+ */
14
+ class FamidocSequencer {
15
+ timeSet = false;
16
+ receiving = false;
17
+ recorded = false;
18
+ ended = false;
19
+ constructor(params) {
20
+ this.params = params;
21
+ }
22
+ initialCommands = () => [this.command(getVersionCommand(this.params.address))];
23
+ isNormalDisconnect = () => this.ended || this.recorded;
24
+ commandTimeoutMs = () => this.receiving ? END_AFTER_MS : undefined;
25
+ onCommandTimeout = () => {
26
+ this.receiving = false;
27
+ this.ended = true;
28
+ return {
29
+ commands: [this.command(endSessionCommand(this.params.address))]
30
+ };
31
+ };
32
+ commandProgress = frame => {
33
+ if (!RECORDS.includes(commandOf(frame))) {
34
+ return "complete";
35
+ }
36
+ this.receiving = !this.ended;
37
+ return "partial";
38
+ };
39
+ nextCommand = frame => {
40
+ const command = commandOf(frame);
41
+ const replies = [this.command(ACK)];
42
+ if (command === FAMIDOC.version) {
43
+ replies.push(this.command(getStateCommand(this.params.address)));
44
+ } else if ((command === FAMIDOC.bloodPressureStatus || FAMIDOC.thermometerStatus.includes(command)) && !this.timeSet) {
45
+ this.timeSet = true;
46
+ replies.push(this.command(setTimeCommand(this.params.address, this.now())));
47
+ } else {
48
+ this.record(command, bodyOf(frame));
49
+ }
50
+ return replies;
51
+ };
52
+ record = (command, body) => {
53
+ const reading = this.decode(command, body);
54
+ if (!reading) {
55
+ return;
56
+ }
57
+ this.recorded = true;
58
+ this.params.onResult({
59
+ caseType: CaseType.RESULT,
60
+ ...reading
61
+ });
62
+ };
63
+ decode = (command, body) => {
64
+ if (command === FAMIDOC.bloodPressure) {
65
+ const reading = readBloodPressure(body, this.now());
66
+ return reading && {
67
+ measurementTypeKey: MeasurementTypeKey.bloodPressure,
68
+ systolic: reading.systolic,
69
+ diastolic: reading.diastolic,
70
+ heartRate: reading.heartRate,
71
+ recordedAt: reading.recordedAt,
72
+ ...(reading.irregularHeartbeat ? {
73
+ irregularHeartbeat: true
74
+ } : {})
75
+ };
76
+ }
77
+ const temperature = command === FAMIDOC.contactTemperature ? readContactTemperature(body) : command === FAMIDOC.infraredTemperature ? readInfraredTemperature(body) : undefined;
78
+ return temperature && {
79
+ measurementTypeKey: MeasurementTypeKey.temperature,
80
+ ...temperature
81
+ };
82
+ };
83
+ now = () => this.params.now?.() ?? new Date();
84
+ command = frame => ({
85
+ serviceUuid: FAMIDOC_SERVICE,
86
+ characteristicUuid: FAMIDOC_WRITE,
87
+ frame
88
+ });
89
+ }
90
+ export { FamidocSequencer };
91
+ //# sourceMappingURL=famidoc.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","ACK","bodyOf","commandOf","endSessionCommand","FAMIDOC","FAMIDOC_SERVICE","FAMIDOC_WRITE","getStateCommand","getVersionCommand","readBloodPressure","readContactTemperature","readInfraredTemperature","setTimeCommand","END_AFTER_MS","RECORDS","bloodPressure","contactTemperature","infraredTemperature","FamidocSequencer","timeSet","receiving","recorded","ended","constructor","params","initialCommands","command","address","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","commands","commandProgress","frame","includes","nextCommand","replies","version","push","bloodPressureStatus","thermometerStatus","now","record","body","reading","decode","onResult","caseType","RESULT","measurementTypeKey","systolic","diastolic","heartRate","recordedAt","irregularHeartbeat","temperature","Date","serviceUuid","characteristicUuid"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/famidoc/famidoc.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SACEC,GAAG,EACHC,MAAM,EACNC,SAAS,EACTC,iBAAiB,EACjBC,OAAO,EACPC,eAAe,EACfC,aAAa,EACbC,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,sBAAsB,EACtBC,uBAAuB,EACvBC,cAAc,QACT,uBAAoB;AAU3B;AACA,MAAMC,YAAY,GAAG,MAAM;AAE3B,MAA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CAAC,CAAC,CAAC;MAEnD,OACEG,OAAO,IAAI;QACTK,kBAAkB,EAAEpD,kBAAkB,CAACiB,aAAa;QACpDoC,QAAQ,EAAEN,OAAO,CAACM,QAAQ;QAC1BC,SAAS,EAAEP,OAAO,CAACO,SAAS;QAC5BC,SAAS,EAAER,OAAO,CAACQ,SAAS;QAC5BC,UAAU,EAAET,OAAO,CAACS,UAAU;QAC9B,IAAIT,OAAO,CAACU,kBAAkB,GAAG;UAAEA,kBAAkB,EAAE;QAAK,CAAC,GAAG,CAAC,CAAC;MACpE,CAAC;IAEL;IAEA,MAAMC,WAAW,GACf9B,OAAO,KAAKtB,OAAO,CAACY,kBAAkB,GAClCN,sBAAsB,CAACkC,IAAI,CAAC,GAC5BlB,OAAO,KAAKtB,OAAO,CAACa,mBAAmB,GACrCN,uBAAuB,CAACiC,IAAI,CAAC,GAC7Bd,SAAS;IAEjB,OAAO0B,WAAW,IAAI;MAAEN,kBAAkB,EAAEpD,kBAAkB,CAAC0D,WAAW;MAAE,GAAGA;IAAY,CAAC;EAC9F,CAAC;EAEOd,GAAG,GAAGA,CAAA,KAAY,IAAI,CAAClB,MAAM,CAACkB,GAAG,GAAG,CAAC,IAAI,IAAIe,IAAI,CAAC,CAAC;EAEnD/B,OAAO,GAAIQ,KAAwB,KAAqB;IAC9DwB,WAAW,EAAErD,eAAe;IAC5BsD,kBAAkB,EAAErD,aAAa;IACjC4B;EACF,CAAC,CAAC;AACJ;AAEA,SAAShB,gBAAgB","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ import { IntegratedDevices } from "../../../types/integrated-devices.js";
4
+ import { BTManagedDevice } from "../bt-managed-device.js";
5
+ import { JOYTECH, JoytechFrameReader } from "./joytech.protocol.js";
6
+ import { JoytechSequencer } from "./joytech.sequencer.js";
7
+ const joytechMainServices = [{
8
+ uuid: JOYTECH.service,
9
+ monitorUuids: [{
10
+ uuid: JOYTECH.notify,
11
+ parsingModel: {
12
+ caseValuePosition: [],
13
+ cases: []
14
+ }
15
+ }]
16
+ }];
17
+
18
+ /** Joytech (Sejoy) blood-pressure monitors and DET thermometers. */
19
+ class JoytechDeviceClass extends BTManagedDevice {
20
+ mainServices = joytechMainServices;
21
+ stuckDataTimeout = 90_000;
22
+ onStreamStart = undefined;
23
+ constructor(device, params) {
24
+ super(device, params);
25
+ this.frameReader = new JoytechFrameReader();
26
+ this.createCommandSequencer = () => new JoytechSequencer({
27
+ thermometer: params.deviceName === IntegratedDevices.JOYTECH_THERMOMETER,
28
+ onResult: result => this.onResult?.(result)
29
+ });
30
+ }
31
+ handleSuccessResult() {
32
+ return;
33
+ }
34
+ }
35
+ export { JoytechDeviceClass as JoytechDevice };
36
+ //# sourceMappingURL=joytech.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["IntegratedDevices","BTManagedDevice","JOYTECH","JoytechFrameReader","JoytechSequencer","joytechMainServices","uuid","service","monitorUuids","notify","parsingModel","caseValuePosition","cases","JoytechDeviceClass","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","frameReader","createCommandSequencer","thermometer","deviceName","JOYTECH_THERMOMETER","onResult","result","handleSuccessResult","JoytechDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/joytech/joytech.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,OAAO,EAAEC,kBAAkB,QAAQ,uBAAoB;AAChE,SAASC,gBAAgB,QAAQ,wBAAqB;AAItD,MAAMC,mBAA+B,GAAG,CACtC;EACEC,IAAI,EAAEJ,OAAO,CAACK,OAAO;EACrBC,YAAY,EAAE,CAAC;IAAEF,IAAI,EAAEJ,OAAO,CAACO,MAAM;IAAEC,YAAY,EAAE;MAAEC,iBAAiB,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAG;EAAE,CAAC;AAC7F,CAAC,CACF;;AAED;AACA,MAAMC,kBAAkB,SAASZ,eAAe,CAAgB;EACpDa,YAAY,GAAGT,mBAAmB;EAClCU,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAyC,EAAE;IAC5E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIlB,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACmB,sBAAsB,GAAG,MAC5B,IAAIlB,gBAAgB,CAAC;MACnBmB,WAAW,EAAEH,MAAM,CAACI,UAAU,KAAKxB,iBAAiB,CAACyB,mBAAmB;MACxEC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MACF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASf,kBAAkB,IAAIgB,aAAa","ignoreList":[]}
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
6
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
7
+
8
+ /**
9
+ * Joytech (Sejoy) blood-pressure monitors and DET thermometers, from MedM Health Diary
10
+ * 3.12.11's `CSejoy_*` classes.
11
+ *
12
+ * Frames, both ways: `FA AA AA AF`, the whole frame's length (u16 big-endian), the command, the
13
+ * payload, the 8-bit sum of length, command and payload, then `F5 5F`. A reply to a device
14
+ * command adds 0x80 to it, wrapping - so the BP record command `83` is acknowledged as `03`.
15
+ */
16
+ const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
17
+ export const JOYTECH = {
18
+ service: sig16("fff0"),
19
+ notify: sig16("fff1"),
20
+ write: sig16("fff2")
21
+ };
22
+ export const JOYTECH_COMMAND = {
23
+ bloodPressureRecord: 0x83,
24
+ temperatureRecords: 0x03,
25
+ setTimeRequest: 0x06,
26
+ deviceInfo: 0x19
27
+ };
28
+
29
+ /** Device status commands MedM simply acknowledges. */
30
+ export const ACK_ONLY = [0x04, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11];
31
+ const MAGIC = [0xfa, 0xaa, 0xaa, 0xaf];
32
+ const HEADER = 7;
33
+ const TAIL = 3;
34
+ const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
35
+ export const frame = (command, payload = []) => {
36
+ const length = payload.length + HEADER + TAIL;
37
+ const covered = [length >> 8, length & 0xff, command & 0xff, ...payload];
38
+ const sum = covered.reduce((total, value) => total + value, 0) & 0xff;
39
+ return toHex([...MAGIC, ...covered, sum, 0xf5, 0x5f]);
40
+ };
41
+ export const ack = command => frame(command + 0x80);
42
+ const timePayload = now => [now.getFullYear() - 2000 & 0xff, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes()];
43
+
44
+ /** Blood-pressure monitors take the time as command `04`, thermometers as `86`. */
45
+ export const setTimeCommand = (now, thermometer) => frame(thermometer ? 0x86 : 0x04, timePayload(now));
46
+ export const getHistoryCommand = () => frame(0x0a);
47
+
48
+ /** What MedM writes in answer to device info: four `FF` bytes, unframed. */
49
+ export const DEVICE_INFO_REPLY = toHex([0xff, 0xff, 0xff, 0xff]);
50
+ export const commandOf = received => hexToByte(received[6] ?? "00");
51
+ export const payloadOf = received => received.slice(HEADER, -TAIL).map(byte => hexToByte(byte));
52
+
53
+ /** Isolates `FA AA AA AF … F5 5F` frames whatever the notification boundaries. */
54
+ export class JoytechFrameReader {
55
+ readFrame(buffer) {
56
+ const values = buffer.map(byte => hexToByte(byte));
57
+ const start = values.findIndex((_, index) => MAGIC.every((magic, offset) => index + offset >= values.length || values[index + offset] === magic));
58
+ if (start === -1) {
59
+ return {
60
+ status: FrameReadStatus.INCOMPLETE,
61
+ consumedBytes: Math.max(0, values.length - 3)
62
+ };
63
+ }
64
+ if (start + HEADER > values.length) {
65
+ return {
66
+ status: FrameReadStatus.INCOMPLETE,
67
+ consumedBytes: start
68
+ };
69
+ }
70
+ const length = (values[start + 4] ?? 0) << 8 | (values[start + 5] ?? 0);
71
+ if (length < HEADER + TAIL || length > 512) {
72
+ return {
73
+ status: FrameReadStatus.CORRUPT,
74
+ consumedBytes: start + 1
75
+ };
76
+ }
77
+ if (start + length > values.length) {
78
+ return {
79
+ status: FrameReadStatus.INCOMPLETE,
80
+ consumedBytes: start
81
+ };
82
+ }
83
+ const received = values.slice(start, start + length);
84
+ const sum = received.slice(4, length - TAIL).reduce((total, value) => total + value, 0) & 0xff;
85
+ if (received[length - 2] !== 0xf5 || received[length - 1] !== 0x5f || received[length - 3] !== sum) {
86
+ return {
87
+ status: FrameReadStatus.CORRUPT,
88
+ consumedBytes: start + 1
89
+ };
90
+ }
91
+ return {
92
+ status: FrameReadStatus.COMPLETE,
93
+ consumedBytes: start + length,
94
+ frame: buffer.slice(start, start + length)
95
+ };
96
+ }
97
+ }
98
+
99
+ /** `YY MM DD hh mm`, local time; a zero year means the clock was never set. */
100
+ const readTime = (payload, at) => {
101
+ const year = payload[at] ?? 0;
102
+ return year === 0 ? undefined : new Date(2000 + year, (payload[at + 1] ?? 1) - 1, payload[at + 2] ?? 1, payload[at + 3] ?? 0, payload[at + 4] ?? 0);
103
+ };
104
+
105
+ /** AFib status codes; MedM tags `0x07` AFib alone and `0x7F` AFib with an irregular pulse. */
106
+ const AFIB_STATUS = [0x07, 0x7f];
107
+
108
+ /**
109
+ * `83`: systolic and diastolic (u16 big-endian, mmHg), pulse, rhythm status, time, device user.
110
+ * Status `0x00` is a normal rhythm, `0x07` AFib, `0x7F` both and any other value an irregular
111
+ * pulse. Monitors without AFib detection only ever send `0x00` or `0xFF`.
112
+ */
113
+ export const readBloodPressure = payload => {
114
+ const recordedAt = readTime(payload, 6);
115
+ if (payload.length < 12 || !recordedAt) {
116
+ return undefined;
117
+ }
118
+ const status = payload[5] ?? 0;
119
+ const user = payload[11] ?? 0;
120
+ return {
121
+ systolic: (payload[0] ?? 0) << 8 | (payload[1] ?? 0),
122
+ diastolic: (payload[2] ?? 0) << 8 | (payload[3] ?? 0),
123
+ heartRate: payload[4] ?? 0,
124
+ irregularHeartbeat: status !== 0x00 && status !== 0x07,
125
+ atrialFibrillation: AFIB_STATUS.includes(status),
126
+ recordedAt,
127
+ ...(user > 0 ? {
128
+ memorySlot: user
129
+ } : {})
130
+ };
131
+ };
132
+
133
+ /**
134
+ * `03`: one or more eight-byte records - site (3 is skipped, as MedM does), temperature in
135
+ * hundredths of a degree Celsius (bit 15 ignored), time.
136
+ */
137
+ export const readTemperatures = payload => {
138
+ const records = [];
139
+ for (let at = 0; at + 8 <= payload.length; at += 8) {
140
+ const recordedAt = readTime(payload, at + 3);
141
+ if (payload[at] !== 3 && recordedAt) {
142
+ records.push({
143
+ bodyTemp: (((payload[at + 1] ?? 0) << 8 | (payload[at + 2] ?? 0)) & 0x7fff) / 100,
144
+ recordedAt
145
+ });
146
+ }
147
+ }
148
+ return records;
149
+ };
150
+ //# sourceMappingURL=joytech.protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","hexToByte","sig16","assigned","JOYTECH","service","notify","write","JOYTECH_COMMAND","bloodPressureRecord","temperatureRecords","setTimeRequest","deviceInfo","ACK_ONLY","MAGIC","HEADER","TAIL","toHex","bytes","map","value","toString","padStart","frame","command","payload","length","covered","sum","reduce","total","ack","timePayload","now","getFullYear","getMonth","getDate","getHours","getMinutes","setTimeCommand","thermometer","getHistoryCommand","DEVICE_INFO_REPLY","commandOf","received","payloadOf","slice","byte","JoytechFrameReader","readFrame","buffer","values","start","findIndex","_","index","every","magic","offset","status","INCOMPLETE","consumedBytes","Math","max","CORRUPT","COMPLETE","readTime","at","year","undefined","Date","AFIB_STATUS","readBloodPressure","recordedAt","user","systolic","diastolic","heartRate","irregularHeartbeat","atrialFibrillation","includes","memorySlot","readTemperatures","records","push","bodyTemp"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/joytech/joytech.protocol.ts"],"mappings":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B;EAC7C,MAAM0D,OAAiD,GAAG,EAAE;EAE5D,KAAK,IAAIhB,EAAE,GAAG,CAAC,EAAEA,EAAE,GAAG,CAAC,IAAI1C,OAAO,CAACC,MAAM,EAAEyC,EAAE,IAAI,CAAC,EAAE;IAClD,MAAMM,UAAU,GAAGP,QAAQ,CAACzC,OAAO,EAAE0C,EAAE,GAAG,CAAC,CAAC;IAE5C,IAAI1C,OAAO,CAAC0C,EAAE,CAAC,KAAK,CAAC,IAAIM,UAAU,EAAE;MACnCU,OAAO,CAACC,IAAI,CAAC;QACXC,QAAQ,EAAE,CAAC,CAAE,CAAC5D,OAAO,CAAC0C,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAK1C,OAAO,CAAC0C,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI,GAAG;QACnFM;MACF,CAAC,CAAC;IACJ;EACF;EAEA,OAAOU,OAAO;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { CaseType } from "../../../types/case-type.js";
5
+ import { ack, ACK_ONLY, commandOf, DEVICE_INFO_REPLY, getHistoryCommand, JOYTECH, JOYTECH_COMMAND, payloadOf, readBloodPressure, readTemperatures, setTimeCommand } from "./joytech.protocol.js";
6
+
7
+ /**
8
+ * Sets the clock, asks for history (blood pressure), and acknowledges every record frame. The
9
+ * monitor waits a second after connecting before each of the first two commands, as MedM does.
10
+ */
11
+ class JoytechSequencer {
12
+ recorded = false;
13
+ constructor(params) {
14
+ this.params = params;
15
+ }
16
+ initialCommands = () => this.params.thermometer ? [this.command(setTimeCommand(this.now(), true))] : [this.command(setTimeCommand(this.now(), false), 1_000), this.command(getHistoryCommand(), 1_000)];
17
+ isNormalDisconnect = () => this.recorded;
18
+ nextCommand = frame => {
19
+ const command = commandOf(frame);
20
+ const dataCommand = this.params.thermometer ? JOYTECH_COMMAND.temperatureRecords : JOYTECH_COMMAND.bloodPressureRecord;
21
+ if (command === dataCommand) {
22
+ this.report(payloadOf(frame));
23
+ return [this.command(ack(command))];
24
+ }
25
+ if (command === JOYTECH_COMMAND.setTimeRequest) {
26
+ return [this.command(setTimeCommand(this.now(), this.params.thermometer))];
27
+ }
28
+ if (command === JOYTECH_COMMAND.deviceInfo) {
29
+ return [this.command(DEVICE_INFO_REPLY)];
30
+ }
31
+ return ACK_ONLY.includes(command) ? [this.command(ack(command))] : undefined;
32
+ };
33
+ report = payload => {
34
+ const readings = this.params.thermometer ? readTemperatures(payload).map(reading => ({
35
+ measurementTypeKey: MeasurementTypeKey.temperature,
36
+ ...reading
37
+ })) : [readBloodPressure(payload)].flatMap(reading => reading ? [{
38
+ measurementTypeKey: MeasurementTypeKey.bloodPressure,
39
+ ...reading
40
+ }] : []);
41
+ readings.forEach(reading => {
42
+ this.recorded = true;
43
+ this.params.onResult({
44
+ caseType: CaseType.RESULT,
45
+ ...reading
46
+ });
47
+ });
48
+ };
49
+ now = () => this.params.now?.() ?? new Date();
50
+ command = (frame, delayBeforeWriteMs) => ({
51
+ serviceUuid: JOYTECH.service,
52
+ characteristicUuid: JOYTECH.write,
53
+ frame,
54
+ ...(delayBeforeWriteMs ? {
55
+ delayBeforeWriteMs
56
+ } : {})
57
+ });
58
+ }
59
+ export { JoytechSequencer };
60
+ //# sourceMappingURL=joytech.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","ack","ACK_ONLY","commandOf","DEVICE_INFO_REPLY","getHistoryCommand","JOYTECH","JOYTECH_COMMAND","payloadOf","readBloodPressure","readTemperatures","setTimeCommand","JoytechSequencer","recorded","constructor","params","initialCommands","thermometer","command","now","isNormalDisconnect","nextCommand","frame","dataCommand","temperatureRecords","bloodPressureRecord","report","setTimeRequest","deviceInfo","includes","undefined","payload","readings","map","reading","measurementTypeKey","temperature","flatMap","bloodPressure","forEach","onResult","caseType","RESULT","Date","delayBeforeWriteMs","serviceUuid","service","characteristicUuid","write"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/joytech/joytech.sequencer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AAInD,SACEC,GAAG,EACHC,QAAQ,EACRC,SAAS,EACTC,iBAAiB,EACjBC,iBAAiB,EACjBC,OAAO,EACPC,eAAe,EACfC,SAAS,EACTC,iBAAiB,EACjBC,gBAAgB,EAChBC,cAAc,QACT,uBAAoB;;AAE3B;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAA6B;EACzCC,QAAQ,GAAG,KAAK;EAEjBC,WAAWA,CACCC,MAIhB,EACD;IAAA,KALiBA,MAIhB,GAJgBA,MAIhB;EACA;EAEIC,eAAe,GAAGA,CAAA,KACvB,IAAI,CAACD,MAAM,CAACE,WAAW,GACnB,CAAC,IAAI,CAACC,OAAO,CAACP,cAAc,CAAC,IAAI,CAACQ,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAChD,CACE,IAAI,CAACD,OAAO,CAACP,cAAc,CAAC,IAAI,CAACQ,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EACtD,IAAI,CAACD,OAAO,CAACb,iBAAiB,CAAC,CAAC,EAAE,KAAK,CAAC,CACzC;EAEAe,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACP,QAAQ;EAEjDQ,WAAW,GAAIC,KAAwB,IAA2C;IACvF,MAAMJ,OAAO,GAAGf,SAAS,CAACmB,KAAK,CAAC;IAEhC,MAAMC,WAAW,GAAG,IAAI,CAACR,MAAM,CAACE,WAAW,GACvCV,eAAe,CAACiB,kBAAkB,GAClCjB,eAAe,CAACkB,mBAAmB;IAEvC,IAAIP,OAAO,KAAKK,WAAW,EAAE;MAC3B,IAAI,CAACG,MAAM,CAAClB,SAAS,CAACc,KAAK,CAAC,CAAC;MAE7B,OAAO,CAAC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AG,GAAGA,CAAA,KAAY,IAAI,CAACJ,MAAM,CAACI,GAAG,GAAG,CAAC,IAAI,IAAIwB,IAAI,CAAC,CAAC;EAEnDzB,OAAO,GAAGA,CAACI,KAAwB,EAAEsB,kBAA2B,MAAqB;IAC3FC,WAAW,EAAEvC,OAAO,CAACwC,OAAO;IAC5BC,kBAAkB,EAAEzC,OAAO,CAAC0C,KAAK;IACjC1B,KAAK;IACL,IAAIsB,kBAAkB,GAAG;MAAEA;IAAmB,CAAC,GAAG,CAAC,CAAC;EACtD,CAAC,CAAC;AACJ;AAEA,SAAShC,gBAAgB","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ import { IntegratedDevices } from "../../../types/integrated-devices.js";
4
+ import { BTManagedDevice } from "../bt-managed-device.js";
5
+ import { JUMPER_VALUES, LiveOximeterSequencer } from "../live-oximeter.sequencer.js";
6
+ import { JUMPER_GATT, JUMPER_NOTIFY, JUMPER_SERVICE } from "./jumper.protocol.js";
7
+ import { JumperSequencer } from "./jumper.sequencer.js";
8
+ const passThrough = {
9
+ caseValuePosition: [],
10
+ cases: []
11
+ };
12
+ const service = (uuid, notify, optional) => ({
13
+ uuid,
14
+ optional,
15
+ monitorUuids: [{
16
+ uuid: notify,
17
+ parsingModel: passThrough
18
+ }]
19
+ });
20
+
21
+ /** Each kind listens on Jumper's own service or, on some revisions, a 16-bit one. */
22
+ const SERVICES = {
23
+ [IntegratedDevices.JUMPER_OXIMETER]: [service(JUMPER_SERVICE, JUMPER_NOTIFY, true), service(JUMPER_GATT.oximeterAlternate.service, JUMPER_GATT.oximeterAlternate.notify, true)],
24
+ [IntegratedDevices.JUMPER_THERMOMETER]: [service(JUMPER_SERVICE, JUMPER_NOTIFY, true), service(JUMPER_GATT.thermometerAlternate.service, JUMPER_GATT.thermometerAlternate.notify, true)],
25
+ [IntegratedDevices.JUMPER_BPM]: [service(JUMPER_GATT.bloodPressure.service, JUMPER_GATT.bloodPressure.notify, false)]
26
+ };
27
+
28
+ /** Jumper JPD-500D oximeters, HA120 blood-pressure monitors and FR302-family thermometers. */
29
+ class JumperDeviceClass extends BTManagedDevice {
30
+ stuckDataTimeout = 120_000;
31
+ onStreamStart = undefined;
32
+ constructor(device, params) {
33
+ super(device, params);
34
+ this.mainServices = SERVICES[params.deviceName];
35
+ const onResult = result => this.onResult?.(result);
36
+ this.createCommandSequencer = () => params.deviceName === IntegratedDevices.JUMPER_OXIMETER ? new LiveOximeterSequencer({
37
+ isValuesFrame: JUMPER_VALUES,
38
+ onResult
39
+ }) : new JumperSequencer({
40
+ kind: params.deviceName === IntegratedDevices.JUMPER_BPM ? "blood-pressure" : "thermometer",
41
+ onResult
42
+ });
43
+ }
44
+
45
+ /** One notification is one frame. */
46
+ validatePackage = () => true;
47
+ handleSuccessResult() {
48
+ return;
49
+ }
50
+ }
51
+ export { JumperDeviceClass as JumperDevice };
52
+ //# sourceMappingURL=jumper.device.js.map