@ovok/native 1.10.9 → 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 +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_btManagedDevice","require","_liveOximeterSequencer","_aojBpProtocol","aoj70bMainServices","uuid","AOJ_BP","service","monitorUuids","notify","parsingModel","caseValuePosition","cases","Aoj70bDevice","BTManagedDevice","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","createCommandSequencer","LiveOximeterSequencer","isValuesFrame","AOJ_VALUES","onResult","result","validatePackage","handleSuccessResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj-70b.device.ts"],"mappings":";;;;;;AAOA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AAEA,MAAMG,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEC,qBAAM,CAACC,OAAO;EACpBC,YAAY,EAAE,CAAC;IAAEH,IAAI,EAAEC,qBAAM,CAACG,MAAM;IAAEC,YAAY,EAAE;MAAEC,iBAAiB,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAG;EAAE,CAAC;AAC5F,CAAC,CACF;;AAED;AACA,MAAMC,YAAY,SAASC,gCAAe,CAA4B;EAC1DC,YAAY,GAAGX,kBAAkB;EACjCY,gBAAgB,GAAG,OAAO;EAC1BC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAqD,EAAE;IACxF,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAIC,4CAAqB,CAAC;MACxBC,aAAa,EAAEC,iCAAU;MACzBC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAAjB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AojBpDevice = void 0;
7
+ var _integratedDevices = require("../../../types/integrated-devices.js");
8
+ var _btManagedDevice = require("../bt-managed-device.js");
9
+ var _aojBpProtocol = require("./aoj-bp.protocol.js");
10
+ var _aojBpSequencer = require("./aoj-bp.sequencer.js");
11
+ const passThrough = {
12
+ caseValuePosition: [],
13
+ cases: []
14
+ };
15
+ const servicesFor = gatt => [{
16
+ uuid: gatt.service,
17
+ monitorUuids: [{
18
+ uuid: gatt.notify,
19
+ parsingModel: passThrough
20
+ }]
21
+ }];
22
+
23
+ /** AOJ Medical blood-pressure monitors; the FFF0 variant is the Cazon BSX530B. */
24
+ class AojBpDeviceClass extends _btManagedDevice.BTManagedDevice {
25
+ stuckDataTimeout = 90_000;
26
+ onStreamStart = undefined;
27
+ constructor(device, params) {
28
+ super(device, params);
29
+ const fff0 = params.deviceName === _integratedDevices.IntegratedDevices.AOJ_BPM_FFF0;
30
+ const gatt = fff0 ? _aojBpProtocol.AOJ_BP_FFF0 : _aojBpProtocol.AOJ_BP;
31
+ this.mainServices = servicesFor(gatt);
32
+ this.frameReader = new _aojBpProtocol.AojBpFrameReader();
33
+ this.createCommandSequencer = () => new _aojBpSequencer.AojBpSequencer({
34
+ service: gatt.service,
35
+ write: gatt.write,
36
+ listenOnly: fff0,
37
+ onResult: result => this.onResult?.(result)
38
+ });
39
+ }
40
+ handleSuccessResult() {
41
+ return;
42
+ }
43
+ }
44
+ exports.AojBpDevice = AojBpDeviceClass;
45
+ //# sourceMappingURL=aoj-bp.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_integratedDevices","require","_btManagedDevice","_aojBpProtocol","_aojBpSequencer","passThrough","caseValuePosition","cases","servicesFor","gatt","uuid","service","monitorUuids","notify","parsingModel","AojBpDeviceClass","BTManagedDevice","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","fff0","deviceName","IntegratedDevices","AOJ_BPM_FFF0","AOJ_BP_FFF0","AOJ_BP","mainServices","frameReader","AojBpFrameReader","createCommandSequencer","AojBpSequencer","write","listenOnly","onResult","result","handleSuccessResult","exports","AojBpDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj-bp.device.ts"],"mappings":";;;;;;AAIA,IAAAA,kBAAA,GAAAC,OAAA;AAGA,IAAAC,gBAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAIA,MAAMI,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,WAAW,GAAIC,IAAyC,IAAiB,CAC7E;EAAEC,IAAI,EAAED,IAAI,CAACE,OAAO;EAAEC,YAAY,EAAE,CAAC;IAAEF,IAAI,EAAED,IAAI,CAACI,MAAM;IAAEC,YAAY,EAAET;EAAY,CAAC;AAAE,CAAC,CACzF;;AAED;AACA,MAAMU,gBAAgB,SAASC,gCAAe,CAAc;EAEhDC,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAuC,EAAE;IAC1E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IAErB,MAAMC,IAAI,GAAGD,MAAM,CAACE,UAAU,KAAKC,oCAAiB,CAACC,YAAY;IACjE,MAAMjB,IAAI,GAAGc,IAAI,GAAGI,0BAAW,GAAGC,qBAAM;IAExC,IAAI,CAACC,YAAY,GAAGrB,WAAW,CAACC,IAAI,CAAC;IACrC,IAAI,CAACqB,WAAW,GAAG,IAAIC,+BAAgB,CAAC,CAAC;IACzC,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAIC,8BAAc,CAAC;MACjBtB,OAAO,EAAEF,IAAI,CAACE,OAAO;MACrBuB,KAAK,EAAEzB,IAAI,CAACyB,KAAK;MACjBC,UAAU,EAAEZ,IAAI;MAChBa,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MACF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAAC,WAAA,GAAAzB,gBAAA","ignoreList":[]}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.updateStatusCommand = exports.turnOffCommand = exports.setVoiceCommand = exports.setTimeCommand = exports.readUnsentCount = exports.readBloodPressure = exports.payloadOf = exports.getSystemInfoCommand = exports.getSerialCommand = exports.getDataCommand = exports.frame = exports.commandOf = exports.ackCommand = exports.AojBpFrameReader = exports.AOJ_COMMAND = exports.AOJ_BP_FFF0 = exports.AOJ_BP = void 0;
7
+ var _frameReadStatus = require("../../../types/frame-read-status.js");
8
+ var _calculateCrc8Maxim = require("../../../utils/calculate-crc-8-maxim.js");
9
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
10
+ /* eslint-disable import/group-exports */
11
+
12
+ /**
13
+ * AOJ Medical's blood-pressure protocol (AOJ-30x/33x, ARM-111, WRS-35E and rebrands), from
14
+ * MedM Health Diary 3.12.11's `CAOJMedical_BPM`. It is not the AOJ-20A thermometer's framing.
15
+ *
16
+ * Frames are `BE B0` (app to device) or `D0 C2` (device to app), a length counting the command
17
+ * and payload, the command, the payload, and CRC-8/MAXIM over every byte before it.
18
+ */
19
+ const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
20
+ const AOJ_BP = exports.AOJ_BP = {
21
+ service: sig16("ffe0"),
22
+ notify: sig16("ffe1"),
23
+ write: sig16("ffe2")
24
+ };
25
+
26
+ /** The Cazon BSX530B variant: one characteristic for both directions, and a listen-only session. */
27
+ const AOJ_BP_FFF0 = exports.AOJ_BP_FFF0 = {
28
+ service: sig16("fff0"),
29
+ notify: sig16("fff6"),
30
+ write: sig16("fff6")
31
+ };
32
+ const AOJ_COMMAND = exports.AOJ_COMMAND = {
33
+ ack: 0x00,
34
+ serial: 0xd6,
35
+ systemInfo: 0xd8,
36
+ voice: 0xd9,
37
+ record: 0xcc
38
+ };
39
+ const DEVICE_HEADER = [0xd0, 0xc2];
40
+ const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
41
+ const frame = (command, payload = []) => {
42
+ const bytes = toHex([0xbe, 0xb0, payload.length + 1, command, ...payload]);
43
+ return [...bytes, ...toHex([(0, _calculateCrc8Maxim.calculateCrc8Maxim)(bytes, bytes.length)])];
44
+ };
45
+ exports.frame = frame;
46
+ const commandOf = received => (0, _hexToByte.hexToByte)(received[3] ?? "00");
47
+ exports.commandOf = commandOf;
48
+ const payloadOf = received => received.slice(4, -1).map(byte => (0, _hexToByte.hexToByte)(byte));
49
+ exports.payloadOf = payloadOf;
50
+ const updateStatusCommand = () => frame(0xb2);
51
+ exports.updateStatusCommand = updateStatusCommand;
52
+ const setTimeCommand = now => frame(0xb1, [now.getFullYear() >> 8, now.getFullYear() & 0xff, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()]);
53
+ exports.setTimeCommand = setTimeCommand;
54
+ const getSerialCommand = () => frame(0xd6, [0x00]);
55
+ exports.getSerialCommand = getSerialCommand;
56
+ const getSystemInfoCommand = () => frame(0xd8);
57
+
58
+ /** Voice off: the SDK has no setting for spoken readings. */
59
+ exports.getSystemInfoCommand = getSystemInfoCommand;
60
+ const setVoiceCommand = () => frame(0xd9, [0x03, 0x00]);
61
+
62
+ /** `D7 FF 01`: send stored records for every user. */
63
+ exports.setVoiceCommand = setVoiceCommand;
64
+ const getDataCommand = () => frame(0xd7, [0xff, 0x01]);
65
+ exports.getDataCommand = getDataCommand;
66
+ const ackCommand = () => frame(0x00, [0x00]);
67
+ exports.ackCommand = ackCommand;
68
+ const turnOffCommand = () => frame(0xd0);
69
+
70
+ /** Isolates `D0 C2` frames whatever the notification boundaries. */
71
+ exports.turnOffCommand = turnOffCommand;
72
+ class AojBpFrameReader {
73
+ readFrame(buffer) {
74
+ const start = buffer.findIndex((byte, index) => (0, _hexToByte.hexToByte)(byte) === DEVICE_HEADER[0] && (index + 1 >= buffer.length || (0, _hexToByte.hexToByte)(buffer[index + 1] ?? "00") === DEVICE_HEADER[1]));
75
+ if (start === -1) {
76
+ return {
77
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
78
+ consumedBytes: buffer.length
79
+ };
80
+ }
81
+ if (start + 3 > buffer.length) {
82
+ return {
83
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
84
+ consumedBytes: start
85
+ };
86
+ }
87
+ const length = (0, _hexToByte.hexToByte)(buffer[start + 2] ?? "00") + 4;
88
+ if (start + length > buffer.length) {
89
+ return {
90
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
91
+ consumedBytes: start
92
+ };
93
+ }
94
+ const received = buffer.slice(start, start + length);
95
+ if ((0, _calculateCrc8Maxim.calculateCrc8Maxim)(received, length - 1) !== (0, _hexToByte.hexToByte)(received[length - 1] ?? "00")) {
96
+ return {
97
+ status: _frameReadStatus.FrameReadStatus.CORRUPT,
98
+ consumedBytes: start + 1
99
+ };
100
+ }
101
+ return {
102
+ status: _frameReadStatus.FrameReadStatus.COMPLETE,
103
+ consumedBytes: start + length,
104
+ frame: received
105
+ };
106
+ }
107
+ }
108
+
109
+ /** `D8`: the unsent-record counts for users 1 and 2, used to know when the upload is done. */
110
+ exports.AojBpFrameReader = AojBpFrameReader;
111
+ const readUnsentCount = payload => (payload[4] ?? 0) + (payload[5] ?? 0);
112
+ exports.readUnsentCount = readUnsentCount;
113
+ /**
114
+ * `CC`: systolic, diastolic and pulse (mmHg, bpm), flags (bit 0 irregular heartbeat, top nibble
115
+ * the user), then `YYYY MM DD hh mm ss` local time. Diastolic, pulse and flags all zero is an
116
+ * error record whose first byte is the error code; a zero year means the clock was never set.
117
+ */
118
+ const readBloodPressure = payload => {
119
+ if (payload.length < 11) {
120
+ return undefined;
121
+ }
122
+ const [systolic = 0, diastolic = 0, heartRate = 0, flags = 0] = payload;
123
+ const year = (payload[4] ?? 0) << 8 | (payload[5] ?? 0);
124
+ if (diastolic === 0 && heartRate === 0 && flags === 0 || year === 0) {
125
+ return undefined;
126
+ }
127
+ const user = flags >> 4;
128
+ return {
129
+ systolic,
130
+ diastolic,
131
+ heartRate,
132
+ irregularHeartbeat: (flags & 0x01) !== 0,
133
+ recordedAt: new Date(year, (payload[6] ?? 1) - 1, payload[7] ?? 1, payload[8] ?? 0, payload[9] ?? 0, payload[10] ?? 0),
134
+ ...(user > 0 ? {
135
+ memorySlot: user
136
+ } : {})
137
+ };
138
+ };
139
+ exports.readBloodPressure = readBloodPressure;
140
+ //# sourceMappingURL=aoj-bp.protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_frameReadStatus","require","_calculateCrc8Maxim","_hexToByte","sig16","assigned","AOJ_BP","exports","service","notify","write","AOJ_BP_FFF0","AOJ_COMMAND","ack","serial","systemInfo","voice","record","DEVICE_HEADER","toHex","bytes","map","value","toString","padStart","frame","command","payload","length","calculateCrc8Maxim","commandOf","received","hexToByte","payloadOf","slice","byte","updateStatusCommand","setTimeCommand","now","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getSerialCommand","getSystemInfoCommand","setVoiceCommand","getDataCommand","ackCommand","turnOffCommand","AojBpFrameReader","readFrame","buffer","start","findIndex","index","status","FrameReadStatus","INCOMPLETE","consumedBytes","CORRUPT","COMPLETE","readUnsentCount","readBloodPressure","undefined","systolic","diastolic","heartRate","flags","year","user","irregularHeartbeat","recordedAt","Date","memorySlot"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj-bp.protocol.ts"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AANA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAExC,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,OAAO,EAAEJ,KAAK,CAAC,MAAM,CAAC;EACtBK,MAAM,EAAEL,KAAK,CAAC,MAAM,CAAC;EACrBM,KAAK,EAAEN,KAAK,CAAC,MAAM;AACrB,CAAU;;AAEV;AACO,MAAMO,WAAW,GAAAJ,OAAA,CAAAI,WAAA,GAAG;EACzBH,OAAO,EAAEJ,KAAK,CAAC,MAAM,CAA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AQ;IACRC,SAAS;IACTC,SAAS;IACTI,kBAAkB,EAAE,CAACH,KAAK,GAAG,IAAI,MAAM,CAAC;IACxCI,UAAU,EAAE,IAAIC,IAAI,CAClBJ,IAAI,EACJ,CAAC3C,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACrBA,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EACfA,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EACfA,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EACfA,OAAO,CAAC,EAAE,CAAC,IAAI,CACjB,CAAC;IACD,IAAI4C,IAAI,GAAG,CAAC,GAAG;MAAEI,UAAU,EAAEJ;IAAK,CAAC,GAAG,CAAC,CAAC;EAC1C,CAAC;AACH,CAAC;AAAChE,OAAA,CAAAyD,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AojBpSequencer = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _caseType = require("../../../types/case-type.js");
9
+ var _aojBpProtocol = require("./aoj-bp.protocol.js");
10
+ /** MedM re-sends the time every 5 s, five times, then turns the monitor off. */
11
+ const TIME_RETRY_MS = 5_000;
12
+ const TIME_ATTEMPTS = 5;
13
+ const SYSTEM_INFO_RETRY_MS = 2_000;
14
+
15
+ /** Quiet time after the last record before the monitor is turned off. */
16
+ const END_AFTER_MS = 30_000;
17
+
18
+ /**
19
+ * The AOJ blood-pressure session: status, time, serial, system info, voice, then "send stored
20
+ * data", acknowledging every record. Records stay on the monitor - the SDK never sends MedM's
21
+ * optional delete - and the monitor is turned off after the upload goes quiet.
22
+ */
23
+ class AojBpSequencer {
24
+ phase = "time";
25
+ timeAttempts = 0;
26
+ recorded = false;
27
+ turnedOff = false;
28
+ unsent = 0;
29
+ constructor(params) {
30
+ this.params = params;
31
+ }
32
+ initialCommands = () => {
33
+ if (this.params.listenOnly) {
34
+ this.phase = "data";
35
+ return [];
36
+ }
37
+ this.timeAttempts = 1;
38
+ return [this.command((0, _aojBpProtocol.updateStatusCommand)()), this.command((0, _aojBpProtocol.setTimeCommand)(this.now()), 1_000)];
39
+ };
40
+ isNormalDisconnect = () => this.turnedOff || this.recorded;
41
+ commandTimeoutMs = () => {
42
+ switch (this.phase) {
43
+ case "time":
44
+ return this.params.listenOnly ? undefined : TIME_RETRY_MS;
45
+ case "system-info":
46
+ return SYSTEM_INFO_RETRY_MS;
47
+ case "data":
48
+ return this.recorded && !this.params.listenOnly ? END_AFTER_MS : undefined;
49
+ default:
50
+ return undefined;
51
+ }
52
+ };
53
+ onCommandTimeout = () => {
54
+ if (this.phase === "time") {
55
+ if (this.timeAttempts >= TIME_ATTEMPTS) {
56
+ return this.turnOff();
57
+ }
58
+ this.timeAttempts += 1;
59
+ return {
60
+ commands: [this.command((0, _aojBpProtocol.setTimeCommand)(this.now()))]
61
+ };
62
+ }
63
+ if (this.phase === "system-info") {
64
+ return {
65
+ commands: [this.command((0, _aojBpProtocol.getSystemInfoCommand)())]
66
+ };
67
+ }
68
+ return this.phase === "data" ? this.turnOff() : {};
69
+ };
70
+ commandProgress = frame => (0, _aojBpProtocol.commandOf)(frame) === _aojBpProtocol.AOJ_COMMAND.record ? "partial" : "complete";
71
+ nextCommand = frame => {
72
+ const command = (0, _aojBpProtocol.commandOf)(frame);
73
+ if (command === _aojBpProtocol.AOJ_COMMAND.record) {
74
+ return this.record((0, _aojBpProtocol.payloadOf)(frame));
75
+ }
76
+ if (this.phase === "time" && command === _aojBpProtocol.AOJ_COMMAND.ack) {
77
+ this.phase = "serial";
78
+ return [this.command((0, _aojBpProtocol.getSerialCommand)())];
79
+ }
80
+ if (this.phase === "serial" && command === _aojBpProtocol.AOJ_COMMAND.serial) {
81
+ this.phase = "system-info";
82
+ return [this.command((0, _aojBpProtocol.getSystemInfoCommand)())];
83
+ }
84
+ if (this.phase === "system-info" && command === _aojBpProtocol.AOJ_COMMAND.systemInfo) {
85
+ this.unsent = (0, _aojBpProtocol.readUnsentCount)((0, _aojBpProtocol.payloadOf)(frame));
86
+ this.phase = "voice";
87
+ return [this.command((0, _aojBpProtocol.setVoiceCommand)())];
88
+ }
89
+ if (this.phase === "voice" && command === _aojBpProtocol.AOJ_COMMAND.voice) {
90
+ this.phase = "data";
91
+ return [this.command((0, _aojBpProtocol.getDataCommand)())];
92
+ }
93
+ return undefined;
94
+ };
95
+ record = payload => {
96
+ this.unsent -= 1;
97
+ const reading = (0, _aojBpProtocol.readBloodPressure)(payload);
98
+
99
+ // MedM acknowledges only a readable record; an error record is left unanswered.
100
+ if (!reading) {
101
+ return undefined;
102
+ }
103
+ this.recorded = true;
104
+ this.params.onResult({
105
+ caseType: _caseType.CaseType.RESULT,
106
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
107
+ systolic: reading.systolic,
108
+ diastolic: reading.diastolic,
109
+ heartRate: reading.heartRate,
110
+ recordedAt: reading.recordedAt,
111
+ ...(reading.memorySlot ? {
112
+ memorySlot: reading.memorySlot
113
+ } : {}),
114
+ ...(reading.irregularHeartbeat ? {
115
+ irregularHeartbeat: true
116
+ } : {})
117
+ });
118
+ return [this.command((0, _aojBpProtocol.ackCommand)())];
119
+ };
120
+ turnOff = () => {
121
+ this.phase = "done";
122
+ this.turnedOff = true;
123
+ return {
124
+ commands: [this.command((0, _aojBpProtocol.turnOffCommand)())]
125
+ };
126
+ };
127
+ now = () => this.params.now?.() ?? new Date();
128
+ command = (frame, delayBeforeWriteMs) => ({
129
+ serviceUuid: this.params.service,
130
+ characteristicUuid: this.params.write,
131
+ frame,
132
+ ...(delayBeforeWriteMs ? {
133
+ delayBeforeWriteMs
134
+ } : {})
135
+ });
136
+ }
137
+ exports.AojBpSequencer = AojBpSequencer;
138
+ //# sourceMappingURL=aoj-bp.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_caseType","_aojBpProtocol","TIME_RETRY_MS","TIME_ATTEMPTS","SYSTEM_INFO_RETRY_MS","END_AFTER_MS","AojBpSequencer","phase","timeAttempts","recorded","turnedOff","unsent","constructor","params","initialCommands","listenOnly","command","updateStatusCommand","setTimeCommand","now","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","turnOff","commands","getSystemInfoCommand","commandProgress","frame","commandOf","AOJ_COMMAND","record","nextCommand","payloadOf","ack","getSerialCommand","serial","systemInfo","readUnsentCount","setVoiceCommand","voice","getDataCommand","payload","reading","readBloodPressure","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodPressure","systolic","diastolic","heartRate","recordedAt","memorySlot","irregularHeartbeat","ackCommand","turnOffCommand","Date","delayBeforeWriteMs","serviceUuid","service","characteristicUuid","write","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj-bp.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,cAAA,GAAAF,OAAA;AA4BA;AACA,MAAMG,aAAa,GAAG,KAAK;AAC3B,MAAMC,aAAa,GAAG,CAAC;AACvB,MAAMC,oBAAoB,GAAG,KAAK;;AAElC;AACA,MAAMC,YAAY,GAAG,MAAM;;AAE3B;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,CAA6B;EACvCC,KAAK,GAAU,MAAM;EACrBC,YAAY,GAAG,CAAC;EAChBC,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAG,KAAK;EACjBC,MAAM,GAAG,CAAC;EAEXC,WAAWA,CAAkBC,MAA4B,EAAE;IAAA,KAA9BA,MAA4B,GAA5BA,MAA4B;EAAG;EAE5DC,eAAe,GAAGA,CAAA,KAAgC;IACvD,IAAI,IAAI,CAACD,MAAM,CAACE,UAAU,EAAE;MAC1B,IAAI,CAACR,KAAK,GAAG,MAAM;MAEnB,OAAO,EAAE;IACX;IAEA,IAAI,CAACC,YAAY,GAAG,CA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EAEOxC,GAAG,GAAGA,CAAA,KAAY,IAAI,CAACN,MAAM,CAACM,GAAG,GAAG,CAAC,IAAI,IAAIyC,IAAI,CAAC,CAAC;EAEnD5C,OAAO,GAAGA,CAACY,KAAwB,EAAEiC,kBAA2B,MAAqB;IAC3FC,WAAW,EAAE,IAAI,CAACjD,MAAM,CAACkD,OAAO;IAChCC,kBAAkB,EAAE,IAAI,CAACnD,MAAM,CAACoD,KAAK;IACrCrC,KAAK;IACL,IAAIiC,kBAAkB,GAAG;MAAEA;IAAmB,CAAC,GAAG,CAAC,CAAC;EACtD,CAAC,CAAC;AACJ;AAACK,OAAA,CAAA5D,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -14,6 +14,24 @@ const LEGACY_CHARACTERISTIC = "00001524-1212-efde-1523-785feabcd123";
14
14
  const BGM_SERVICE = "0003cdd0-0000-1000-8000-00805f9b0131";
15
15
  const BGM_CHARACTERISTIC = "0003cdd1-0000-1000-8000-00805f9b0131";
16
16
  const GLUCOSE_REQUEST = "512600000000a31a";
17
+
18
+ /**
19
+ * Frame byte 5 of the TaiDoc `0x26` stored-result reply (`51 26 d0 d1 d2 d3 a5 cs`) is d3:
20
+ * bits 6-7 the meal flag, where `11` marks a control-solution test, and on multi-parameter
21
+ * meters bits 2-5 the parameter - 0 glucose; 6 haematocrit, 7 ketone, 8 uric acid,
22
+ * 9 cholesterol, 11 haemoglobin, 12 lactate, 13 triglycerides. Single-parameter TaiDoc meters
23
+ * keep the strip code in bits 2-5 instead, so this check holds only for multi-parameter ones;
24
+ * the TD-4216 and GlucoCheck Gold behind these two parsers both are.
25
+ */
26
+ const RECORD_FLAGS_BYTE = 5;
27
+ const CONTROL_SOLUTION_FLAG = 0b11;
28
+ const GLUCOSE_PARAMETER = 0;
29
+
30
+ /** A stored TaiDoc result is a patient glucose reading, not another analyte or a control test. */
31
+ const isPatientGlucoseRecord = frame => {
32
+ const flags = (0, _hexToByte.hexToByte)(frame[RECORD_FLAGS_BYTE] ?? "00");
33
+ return flags >> 6 !== CONTROL_SOLUTION_FLAG && (flags >> 2 & 0x0f) === GLUCOSE_PARAMETER;
34
+ };
17
35
  const servicesFor = device => {
18
36
  const isBgm = device === _integratedDevices.IntegratedDevices.BGM;
19
37
  return [{
@@ -63,10 +81,15 @@ class BloodGlucoseDevice extends _btManagedDevice.BTManagedDevice {
63
81
  this.mainServices = servicesFor(params.deviceName);
64
82
  }
65
83
  validatePackage = pkg => pkg.length >= (this.deviceData.name === _integratedDevices.IntegratedDevices.BGM ? 12 : 8);
66
- handleSuccessResult(result) {
84
+ handleSuccessResult(result, frame) {
67
85
  if (result.caseType !== _caseType.CaseType.RESULT || result.bloodGlucose === 0) {
68
86
  return;
69
87
  }
88
+
89
+ // A ketone, cholesterol or control-solution record decodes to a number too; it is not glucose.
90
+ if (this.deviceData.name !== _integratedDevices.IntegratedDevices.BGM && !isPatientGlucoseRecord(frame)) {
91
+ return;
92
+ }
70
93
  this.onResult?.(result);
71
94
  }
72
95
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_caseType","_integratedDevices","_hexToByte","_btManagedDevice","LEGACY_SERVICE","LEGACY_CHARACTERISTIC","BGM_SERVICE","BGM_CHARACTERISTIC","GLUCOSE_REQUEST","servicesFor","device","isBgm","IntegratedDevices","BGM","uuid","monitorUuids","parsingModel","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","CaseType","OTHER","parseDefinitions","measurementTypeKey","MeasurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","hexToByte","slice","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","BloodGlucoseDevice","BTManagedDevice","stuckDataTimeout","constructor","params","mainServices","deviceName","validatePackage","pkg","length","deviceData","handleSuccessResult","result","onResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;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A,CAC3BC,MAA2E,EACrE;IACN,IAAIA,MAAM,CAACnC,QAAQ,KAAKC,kBAAQ,CAACM,MAAM,IAAI4B,MAAM,CAAC7B,YAAY,KAAK,CAAC,EAAE;MACpE;IACF;IAEA,IAAI,CAAC8B,QAAQ,GAAGD,MAA0D,CAAC;EAC7E;AACF;AAACE,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_caseType","_integratedDevices","_hexToByte","_btManagedDevice","LEGACY_SERVICE","LEGACY_CHARACTERISTIC","BGM_SERVICE","BGM_CHARACTERISTIC","GLUCOSE_REQUEST","RECORD_FLAGS_BYTE","CONTROL_SOLUTION_FLAG","GLUCOSE_PARAMETER","isPatientGlucoseRecord","frame","flags","hexToByte","servicesFor","device","isBgm","IntegratedDevices","BGM","uuid","monitorUuids","parsingModel","caseValuePosition","cases","GLUCOCHECK","map","caseValue","caseType","CaseType","OTHER","parseDefinitions","measurementTypeKey","MeasurementTypeKey","bloodGlucose","RESULT","name","parseType","byteIndexes","parseReference","customParserDefinition","value","slice","raw","parseInt","TAIDOC_GLUCOSE","Number","toFixed","writeUuid","mainCommandUuid","BloodGlucoseDevice","BTManagedDevice","stuckDataTimeout","constructor","params","mainServices","deviceName","validatePackage","pkg","length","deviceData","handleSuccessResult","result","onResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/blood-glucose/blood-glucose.device.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,kBAAA,GAAAF,OAAA;AAGA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAEA,MAAMK,cAAc,GAAG,sCAAsC;AAC7D,MAAMC,qBAAqB,GAAG,sCAAsC;AACpE,MAAMC,WAAW,GAAG,sCAAsC;AAC1D,MAAMC,kBAAkB,GAAG,sCAAsC;AACjE,MAAMC,eAAe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,MAAM,KAAK,IAAI,CAACC,UAAU,CAACxB,IAAI,KAAKlB,oCAAiB,CAACC,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;EAE/D0C,mBAAmBA,CAC3BC,MAA2E,EAC3ElD,KAAe,EACT;IACN,IAAIkD,MAAM,CAAClC,QAAQ,KAAKC,kBAAQ,CAACM,MAAM,IAAI2B,MAAM,CAAC5B,YAAY,KAAK,CAAC,EAAE;MACpE;IACF;;IAEA;IACA,IACE,IAAI,CAAC0B,UAAU,CAACxB,IAAI,KAAKlB,oCAAiB,CAACC,GAAG,IAC9C,CAACR,sBAAsB,CAACC,KAAK,CAAC,EAC9B;MACA;IACF;IAEA,IAAI,CAACmD,QAAQ,GAAGD,MAA0D,CAAC;EAC7E;AACF;AAACE,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -182,9 +182,35 @@ class BTConnectionHandler {
182
182
  this.callbacks.onStatusChanged?.(_deviceStatus.DeviceStatus.DISCONNECTED);
183
183
  this.destroy();
184
184
  };
185
+
186
+ /** Declared services minus any optional one discovery did not find. */
187
+ servicesPresent = async () => {
188
+ if (!this.mainServices.some(({
189
+ optional
190
+ }) => optional) || typeof this.device.services !== "function") {
191
+ return this.mainServices;
192
+ }
193
+ let discovered;
194
+ try {
195
+ discovered = new Set((await this.device.services()).map(({
196
+ uuid
197
+ }) => uuid.toLowerCase()));
198
+ } catch {
199
+ // Without a service list, subscribe as declared rather than not at all.
200
+ return this.mainServices;
201
+ }
202
+ return this.mainServices.filter(({
203
+ uuid,
204
+ optional
205
+ }) => !optional || discovered.has(uuid.toLowerCase()));
206
+ };
185
207
  subscribeToAllCharacteristics = async () => {
186
208
  try {
187
- for (const mainService of this.mainServices) {
209
+ const services = await this.servicesPresent();
210
+ this.callbacks.onServicesDiscovered?.(services.map(({
211
+ uuid
212
+ }) => uuid));
213
+ for (const mainService of services) {
188
214
  for (const monitorUuid of mainService.monitorUuids) {
189
215
  const subscription = this.device.monitorCharacteristicForService(mainService.uuid, monitorUuid.uuid, (error, result) => {
190
216
  if (error) {
@@ -1 +1 @@
1
- {"version":3,"names":["_sentryLogger","require","_telemetry","_bluetoothError","_deviceStatus","_base64ToHex","_btCommandWriter","_btDeviceInformation","BTConnectionHandler","characteristicSubscriptions","disconnectObserved","constructor","device","mainServices","callbacks","preferredMtu","writer","BTCommandWriter","onError","isNormalDisconnect","connect","startedAt","Date","now","span","startOvokSpan","connectWithRetries","requestPreferredMtu","discoverAllServicesAndCharacteristics","readDeviceInformation","onDeviceInfo","readBatteryLevel","isConnected","Error","onStatusChanged","DeviceStatus","CONNECTED","subscribeToAllCharacteristics","setStatus","code","error","errorCode","toBluetoothError","sentryLogger","BluetoothErrorCode","PAIRING_REQUIRED","recordOvokMetric","addOvokSpanEvent","onConnectionEvent","kind","pairingCodeRequired","DISCONNECTED","message","recordOvokDuration","end","destroy","forEach","sub","remove","reset","onDisconnectSubscription","undefined","sendCommands","commands","send","negotiated","requestMTU","useNegotiatedMtu","mtu","requestedMtu","characteristic","readCharacteristicForService","value","Number","parseInt","base64ToHex","isFinite","batteryLevel","maxRetries","retryDelay","maxDelay","connected","retryCount","listenForDisconnect","willRetry","Promise","resolve","setTimeout","Math","min","pow","onDisconnected","onDeviceDisconnected","mainService","monitorUuid","monitorUuids","subscription","monitorCharacteristicForService","uuid","result","processData","hexValue","onDataReceived","push","initialCommands","length","onCommandSent","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAMA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAnBA;;AAwCO,MAAMO,mBAAmB,CAAC;EAEvBC,2BAA2B,GAAmB,E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EAAE;cACT,IAAI,CAAC1B,SAAS,CAACI,OAAO,GAAGsB,KAAK,CAAC;cAE/B;YACF;YAEA,IAAI,CAAC2D,MAAM,IAAI,CAACA,MAAM,CAAC3B,KAAK,EAAE;cAC5B,IAAI,CAAC1D,SAAS,CAACI,OAAO,GACpB,IAAIe,KAAK,CAAC,iCAAiC,CAC7C,CAAC;cAED;YACF;YAEA,IAAI6D,WAAW,CAACM,WAAW,KAAK,KAAK,EAAE;cACrC,MAAMC,QAAQ,GAAG,IAAA1B,wBAAW,EAACwB,MAAM,CAAC3B,KAAK,CAAC;cAE1C,IAAI,CAAC1D,SAAS,CAACwF,cAAc,GAAGH,MAAM,CAACD,IAAI,EAAEG,QAAQ,CAAC;YACxD;UACF,CACF,CAAC;UAED,IAAI,CAAC5F,2BAA2B,CAAC8F,IAAI,CAACP,YAAY,CAAC;QACrD;MACF;MAEA,MAAMQ,eAAe,GAAG,IAAI,CAAC1F,SAAS,CAAC0F,eAAe,GAAG,CAAC,IAAI,EAAE;MAEhE,IAAIA,eAAe,CAACC,MAAM,GAAG,CAAC,EAAE;QAC9B,MAAM,IAAI,CAAC3C,YAAY,CAAC0C,eAAe,CAAC;QACxC,IAAI,CAAC1F,SAAS,CAAC4F,aAAa,GAAG,CAAC;MAClC;IACF,CAAC,CAAC,OAAOlE,KAAK,EAAE;MACd,MAAMC,SAAS,GAAG,IAAAC,gCAAgB,EAACF,KAAK,CAAC,CAACD,IAAI;MAE9C,IAAAI,0BAAY,EACV,OAAO,EACP,kDAAkD,EAClD;QACEF;MACF,CACF,CAAC;MACD,IAAI,CAAC3B,SAAS,CAACI,OAAO,GAAGsB,KAAyB,CAAC;IACrD;EACF,CAAC;AACH;AAACmE,OAAA,CAAAnG,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_sentryLogger","require","_telemetry","_bluetoothError","_deviceStatus","_base64ToHex","_btCommandWriter","_btDeviceInformation","BTConnectionHandler","characteristicSubscriptions","disconnectObserved","constructor","device","mainServices","callbacks","preferredMtu","writer","BTCommandWriter","onError","isNormalDisconnect","connect","startedAt","Date","now","span","startOvokSpan","connectWithRetries","requestPreferredMtu","discoverAllServicesAndCharacteristics","readDeviceInformation","onDeviceInfo","readBatteryLevel","isConnected","Error","onStatusChanged","DeviceStatus","CONNECTED","subscribeToAllCharacteristics","setStatus","code","error","errorCode","toBluetoothError","sentryLogger","BluetoothErrorCode","PAIRING_REQUIRED","recordOvokMetric","addOvokSpanEvent","onConnectionEvent","kind","pairingCodeRequired","DISCONNECTED","message","recordOvokDuration","end","destroy","forEach","sub","remove","reset","onDisconnectSubscription","undefined","sendCommands","commands","send","negotiated","requestMTU","useNegotiatedMtu","mtu","requestedMtu","characteristic","readCharacteristicForService","value","Number","parseInt","base64ToHex","isFinite","batteryLevel","maxRetries","retryDelay","maxDelay","connected","retryCount","listenForDisconnect","willRetry","Promise","resolve","setTimeout","Math","min","pow","onDisconnected","onDeviceDisconnected","servicesPresent","some","optional","services","discovered","Set","map","uuid","toLowerCase","filter","has","onServicesDiscovered","mainService","monitorUuid","monitorUuids","subscription","monitorCharacteristicForService","result","processData","hexValue","onDataReceived","push","initialCommands","length","onCommandSent","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-connection-handler.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAMA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AAGA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AApBA;;AA0CO,MAAMO,mBAAmB,CAAC;EAEvBC,2BAA2B,GAAmB,EAAE;EAChDC,kBAAkB,GAAG,KAAK;EAGlCC,WAAWA,CACQC,MAAc,EACdC,YAA2C,EAC3CC,SAAqC,EACrCC,YAAqB,EACtC;IAAA,KAJiBH,MAAc,GA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F,CAAC;UAED,IAAI,CAACvG,2BAA2B,CAACyG,IAAI,CAACN,YAAY,CAAC;QACrD;MACF;MAEA,MAAMO,eAAe,GAAG,IAAI,CAACrG,SAAS,CAACqG,eAAe,GAAG,CAAC,IAAI,EAAE;MAEhE,IAAIA,eAAe,CAACC,MAAM,GAAG,CAAC,EAAE;QAC9B,MAAM,IAAI,CAACtD,YAAY,CAACqD,eAAe,CAAC;QACxC,IAAI,CAACrG,SAAS,CAACuG,aAAa,GAAG,CAAC;MAClC;IACF,CAAC,CAAC,OAAO7E,KAAK,EAAE;MACd,MAAMC,SAAS,GAAG,IAAAC,gCAAgB,EAACF,KAAK,CAAC,CAACD,IAAI;MAE9C,IAAAI,0BAAY,EACV,OAAO,EACP,kDAAkD,EAClD;QACEF;MACF,CACF,CAAC;MACD,IAAI,CAAC3B,SAAS,CAACI,OAAO,GAAGsB,KAAyB,CAAC;IACrD;EACF,CAAC;AACH;AAAC8E,OAAA,CAAA9G,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -82,7 +82,7 @@ class BTDataProcessor {
82
82
  buffer.splice(0, result.consumedBytes);
83
83
  if (result.status === _frameReadStatus.FrameReadStatus.COMPLETE) {
84
84
  this.handleFrame(uuid, result.frame);
85
- this.answerFrame(result.frame);
85
+ this.answerFrame(result.frame, uuid);
86
86
  continue;
87
87
  }
88
88
  if (result.status === _frameReadStatus.FrameReadStatus.CORRUPT) {
@@ -103,7 +103,7 @@ class BTDataProcessor {
103
103
  }
104
104
  this.handleFrame(uuid, buffer);
105
105
  this.buffers.set(this.currentUuid, []);
106
- this.answerFrame(buffer);
106
+ this.answerFrame(buffer, uuid);
107
107
  };
108
108
 
109
109
  /**
@@ -114,9 +114,9 @@ class BTDataProcessor {
114
114
  * could not take the step that follows - the exchange would stop dead on the first frame
115
115
  * that was protocol rather than data.
116
116
  */
117
- answerFrame = frame => {
117
+ answerFrame = (frame, uuid) => {
118
118
  const progress = this.callbacks.commandProgress?.(frame) ?? "complete";
119
- const commands = this.callbacks.nextCommand?.(frame);
119
+ const commands = this.callbacks.nextCommand?.(frame, uuid);
120
120
  if (progress === "complete") {
121
121
  clearTimeout(this.commandTimeout);
122
122
  this.commandTimeout = undefined;
@@ -1 +1 @@
1
- {"version":3,"names":["_sentryLogger","require","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","FrameReadStatus","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","INCOMPLETE","validatePackage","progress","commandProgress","commands","nextCommand","sendCommands","data","parse","sentryLogger","frameLength","dependentData","parsingCase","caseType","CaseType","DEPENDENT","handleDependentResult","isMeasuring","measuring","advance","onError","Error","cause","message","setTimeout","cancelConnection","duration","commandTimeoutMs","onCommandTimeout","terminal","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAhBA;;AAuDO,MAAMK,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAK7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB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A,QAAQ,IAAI,CAAC,EAAE;MAC9B;IACF;IAEA5D,YAAY,CAAC,IAAI,CAACG,cAAc,CAAC;IACjC,IAAI,CAACA,cAAc,GAAGuD,UAAU,CAAC,MAAM;MACrC,IAAI,CAACvD,cAAc,GAAGD,SAAS;MAE/B,MAAMmB,MAAM,GAAG,IAAI,CAACnC,SAAS,CAAC4E,gBAAgB,GAAG,CAAC;MAElD,IAAIzC,MAAM,EAAEiB,QAAQ,IAAIjB,MAAM,CAACiB,QAAQ,CAAClB,MAAM,GAAG,CAAC,EAAE;QAClD,IAAI,CAAClC,SAAS,CAACsD,YAAY,GAAGnB,MAAM,CAACiB,QAAQ,CAAC;QAC9C,IAAI,CAACpB,mBAAmB,CAAC,CAAC;QAE1B;MACF;MAEA,IAAIG,MAAM,EAAE0C,QAAQ,EAAE;QACpB,IAAI,CAAC7E,SAAS,CAACoE,OAAO,GACpB,IAAIC,KAAK,CAAC,+CAA+C,CAC3D,CAAC;QACD,KAAK,IAAI,CAACxE,MAAM,CAAC4E,gBAAgB,GAAG,CAAC;MACvC;IACF,CAAC,EAAEC,QAAQ,CAAC;EACd,CAAC;AACH;AAACI,OAAA,CAAArF,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_sentryLogger","require","_caseType","_frameReadStatus","_frameParser","_measurementStateMachine","BTDataProcessor","buffers","Map","constructor","device","mainServices","stuckDataTimeoutDuration","callbacks","frameReader","frameParser","FrameParser","measurementState","MeasurementStateMachine","onStatusChanged","onStreamStart","onMeasurementEnd","onResult","currentUuid","destroy","clear","reset","clearTimeout","stuckDataTimeout","undefined","commandTimeout","processData","uuid","hexValue","String","toLowerCase","buffer","get","push","set","startStuckTimeout","readFramesFromBuffer","readWholeBuffer","armStuckTimeout","armCommandTimeout","startCommandTimeout","reader","length","result","readFrame","hasProgressed","consumedBytes","splice","status","FrameReadStatus","COMPLETE","handleFrame","frame","answerFrame","CORRUPT","reportCorruptFrame","INCOMPLETE","validatePackage","progress","commandProgress","commands","nextCommand","sendCommands","data","parse","sentryLogger","frameLength","dependentData","parsingCase","caseType","CaseType","DEPENDENT","handleDependentResult","isMeasuring","measuring","advance","onError","Error","cause","message","setTimeout","cancelConnection","duration","commandTimeoutMs","onCommandTimeout","terminal","exports"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/bt-data-processor.ts"],"mappings":";;;;;;AAIA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAhBA;;AA0DO,MAAMK,eAAe,CAAwB;EAClD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACUC,OAAO,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAK7CC,WAAWA,CACQC,MAAc,EAC/BC,YAA2C,EAC1BC,wBAAgC,EAChCC,SAAoC,EACpCC,WAAyB,EAC1C;IAAA,KALiBJ,MAAc,GAAdA,MAAc;IAAA,KAEdE,wBAAgC,GAAhCA,wBAAgC;IAAA,KAChCC,SAAoC,GAApCA,SAAoC;IAAA,KACpCC,WAAyB,GAAzBA,WAAyB;IAE1C,IAAI,CAACC,WAAW,GAAG,IAAIC,wBAAW,CAACL,YAAY,CAAC;IAChD,IAAI,CAACM,gBAAgB,GAAG,IAAIC,gDAAuB,CAAC;MAClDC,eAAe,EAAEN,SAAS,CAACM,eAAe;MAC1CC,aAAa,EAAEP,SAAS,CAACO,aAAa;MACtCC,gBAAgB,EAAER,SAAS,CAACQ,gBAAgB;MAC5CC,QAAQ,EAAET,SAAS,CAACS;IACtB,CAAC,CAAC;EACJ;EAEQC,WAAW,GAAW,EAAE;EAEzBC,OAAO,GAAGA,CAAA,KAAM;IACrB,IAAI,CAACjB,OAAO,CAACkB,KAAK,CAAC,CAAC;IACpB,IAAI,CAACF,WAAW,GAAG,EAAE;IACrB,IAAI,CAACN,gBAAg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,GACpB,IAAIC,KAAK,CAAC,+CAA+C,CAC3D,CAAC;QACD,KAAK,IAAI,CAACxE,MAAM,CAAC4E,gBAAgB,GAAG,CAAC;MACvC;IACF,CAAC,EAAEC,QAAQ,CAAC;EACd,CAAC;AACH;AAACI,OAAA,CAAArF,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.BTManagedDevice = void 0;
7
7
  var _sentryLogger = require("../../../helpers/utils/sentry-logger.js");
8
8
  var _telemetry = require("../../../helpers/utils/telemetry.js");
9
+ var _deviceVariants = require("../../constants/device-variants.js");
9
10
  var _bluetoothError = require("../../types/bluetooth-error.js");
10
11
  var _clockSync = require("../../types/clock-sync.js");
11
12
  var _deviceStatus = require("../../types/device-status.js");
@@ -106,6 +107,15 @@ class BTManagedDevice {
106
107
  measurementTypes: [],
107
108
  clockSync: (0, _clockSync.clockSyncCapabilityForDevice)(deviceName)
108
109
  };
110
+
111
+ // The scan matched the parser on `name` first and `localName` second; Android can report two different strings.
112
+ const variant = (0, _deviceVariants.findDeviceVariant)(String(deviceName), device.name ?? "") ?? (0, _deviceVariants.findDeviceVariant)(String(deviceName), device.localName ?? "");
113
+ if (variant) {
114
+ this.deviceData.variant = {
115
+ manufacturer: variant.manufacturer,
116
+ model: variant.model
117
+ };
118
+ }
109
119
  this.id = device.id;
110
120
  this.onDeviceStatusChanged = (status, measurementTypeKey) => {
111
121
  (0, _sentryLogger.sentryLogger)("info", "BT_MANAGER: Calling onDeviceStatusChanged callback", {
@@ -286,6 +296,7 @@ class BTManagedDevice {
286
296
  this.deviceData.sn = info.serialNumber;
287
297
  }
288
298
  },
299
+ onServicesDiscovered: uuids => sequencer.onServicesDiscovered?.(uuids),
289
300
  initialCommands: () => sequencer.initialCommands(),
290
301
  onCommandSent: () => {
291
302
  this.dataProcessor?.armStuckTimeout();
@@ -305,7 +316,7 @@ class BTManagedDevice {
305
316
  this.onError?.bind(this)(error);
306
317
  }
307
318
  },
308
- nextCommand: frame => sequencer.nextCommand(frame),
319
+ nextCommand: (frame, uuid) => sequencer.nextCommand(frame, uuid),
309
320
  sendCommands: commands => void this.connectionHandler?.sendCommands(commands),
310
321
  commandTimeoutMs: () => sequencer.commandTimeoutMs?.(),
311
322
  onCommandTimeout: () => sequencer.onCommandTimeout?.() ?? {},