@ovok/native 1.3.0 → 1.5.0

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 (440) hide show
  1. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
  2. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
  3. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
  4. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
  5. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +23 -22
  6. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  7. package/lib/commonjs/modules/bt-device/constants/device-list-items.js +36 -0
  8. package/lib/commonjs/modules/bt-device/constants/device-list-items.js.map +1 -1
  9. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +38 -0
  10. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
  11. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +45 -0
  12. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
  13. package/lib/commonjs/modules/bt-device/constants/supported-devices.js +212 -42
  14. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +88 -0
  16. package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
  17. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +15 -8
  18. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  19. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  20. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/index.js +55 -0
  22. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +10 -4
  24. package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  25. package/lib/commonjs/modules/bt-management/services/bt-manager.js +43 -5
  26. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +2 -0
  28. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +2 -1
  30. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
  32. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
  34. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +6 -2
  36. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  37. package/lib/commonjs/modules/bt-management/services/device-creator.js +23 -8
  38. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js +50 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +78 -127
  44. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +60 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +74 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
  53. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +3 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +7 -3
  56. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +5 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  59. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +3 -1
  60. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  61. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
  62. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  63. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +43 -5
  64. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  65. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +13 -1
  66. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  67. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
  68. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
  69. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  70. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
  71. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  72. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +14 -2
  73. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  74. package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js +18 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
  77. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  78. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js +78 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +83 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js +60 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
  85. package/lib/commonjs/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
  86. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
  87. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
  88. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
  89. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  90. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +35 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
  93. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  94. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
  95. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
  96. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
  97. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  98. package/lib/commonjs/modules/bt-management/types/device-measurement-map.js.map +1 -1
  99. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +1 -0
  100. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  101. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +3 -0
  102. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  103. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +11 -2
  104. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  105. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +3 -1
  106. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  107. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +3 -1
  108. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  109. package/lib/commonjs/modules/data-sync/utils/health-units.js +22 -0
  110. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -0
  111. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js +9 -3
  112. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.js.map +1 -1
  113. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js +8 -2
  114. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.js.map +1 -1
  115. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +3 -2
  116. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  117. package/lib/module/modules/bt-device/constants/device-list-items.js +36 -0
  118. package/lib/module/modules/bt-device/constants/device-list-items.js.map +1 -1
  119. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +35 -0
  120. package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -0
  121. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +41 -0
  122. package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -0
  123. package/lib/module/modules/bt-device/constants/supported-devices.js +202 -32
  124. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  125. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +83 -0
  126. package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -0
  127. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +15 -8
  128. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  129. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  130. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  131. package/lib/module/modules/bt-management/index.js +5 -0
  132. package/lib/module/modules/bt-management/index.js.map +1 -1
  133. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +10 -4
  134. package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
  135. package/lib/module/modules/bt-management/services/bt-manager.js +45 -6
  136. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  137. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +2 -0
  138. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  139. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +2 -1
  140. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  141. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +24 -0
  142. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  143. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js +8 -1
  144. package/lib/module/modules/bt-management/services/custom/compile-custom-monitor.js.map +1 -1
  145. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +6 -2
  146. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  147. package/lib/module/modules/bt-management/services/device-creator.js +23 -8
  148. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  149. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +1 -1
  150. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -1
  151. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js +40 -0
  152. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-builders.js.map +1 -0
  153. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +59 -109
  154. package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +1 -1
  155. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +2 -0
  156. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  157. package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js +56 -0
  158. package/lib/module/modules/bt-management/services/devices/bc01/bc01.frame-reader.js.map +1 -0
  159. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +69 -0
  160. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -0
  161. package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +1 -1
  162. package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
  163. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +3 -0
  164. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  165. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +7 -3
  166. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  167. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +5 -0
  168. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  169. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +3 -1
  170. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  171. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -1
  172. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  173. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +42 -5
  174. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  175. package/lib/module/modules/bt-management/services/devices/frame-parser.js +13 -1
  176. package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  177. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +6 -3
  178. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -1
  179. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +2 -1
  180. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  181. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +84 -38
  182. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  183. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +14 -2
  184. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  185. package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js +14 -0
  186. package/lib/module/modules/bt-management/services/devices/spo/oxyfit.device.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -1
  188. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  189. package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js +73 -0
  190. package/lib/module/modules/bt-management/services/devices/uebe/mysense.device.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js +78 -0
  192. package/lib/module/modules/bt-management/services/devices/uebe/mysense.frame-reader.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js +55 -0
  194. package/lib/module/modules/bt-management/services/devices/uebe/mysense.sequencer.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js +1 -1
  196. package/lib/module/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.js.map +1 -1
  197. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +1 -1
  198. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +1 -1
  200. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +31 -0
  202. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +3 -2
  204. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  205. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +2 -1
  206. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -1
  207. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +54 -39
  208. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  209. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  210. package/lib/module/modules/bt-management/types/integrated-devices.js +1 -0
  211. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  212. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +3 -0
  213. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  214. package/lib/module/modules/data-sync/services/managers/data-processor.js +11 -2
  215. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  216. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +3 -1
  217. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  218. package/lib/module/modules/data-sync/utils/get-total-samples-count.js +3 -1
  219. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  220. package/lib/module/modules/data-sync/utils/health-units.js +17 -0
  221. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
  225. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +33 -0
  228. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
  230. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +43 -22
  232. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
  234. package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +5 -0
  238. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +5 -1
  240. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +19 -2
  242. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts +1 -1
  249. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
  251. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
  253. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
  255. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
  257. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts +1 -0
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +9 -2
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts +15 -0
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +5 -8
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
  312. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
  314. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +10 -0
  316. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +5 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +5 -4
  320. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +1 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +3 -0
  330. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
  331. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.d.ts.map +1 -1
  332. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.d.ts.map +1 -1
  333. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +1 -1
  334. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  335. package/lib/typescript/module/src/modules/bt-device/constants/device-list-items.d.ts.map +1 -1
  336. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +33 -0
  337. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -0
  338. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts +3 -0
  339. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -0
  340. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +43 -22
  341. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  342. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +11 -0
  343. package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -0
  344. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  345. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  346. package/lib/typescript/module/src/modules/bt-management/index.d.ts +5 -0
  347. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts +5 -1
  349. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
  350. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +19 -2
  351. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  352. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  353. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  354. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  355. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-monitor.d.ts.map +1 -1
  356. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  357. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts +1 -1
  358. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  359. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +2 -2
  360. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -1
  361. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts +31 -0
  362. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-builders.d.ts.map +1 -0
  363. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +6 -5
  364. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +1 -1
  365. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +2 -0
  366. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  367. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts +16 -0
  368. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.frame-reader.d.ts.map +1 -0
  369. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +19 -0
  370. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -0
  371. package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts +1 -1
  372. package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
  373. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  374. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +4 -0
  375. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  376. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  377. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  378. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  379. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  380. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -0
  381. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  382. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts +1 -0
  383. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  384. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +6 -1
  385. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -1
  386. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +3 -2
  387. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  388. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +10 -51
  389. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  390. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +9 -2
  391. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  392. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts +9 -0
  393. package/lib/typescript/module/src/modules/bt-management/services/devices/spo/oxyfit.device.d.ts.map +1 -0
  394. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +2 -2
  395. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  396. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts +15 -0
  397. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.device.d.ts.map +1 -0
  398. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts +8 -0
  399. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.frame-reader.d.ts.map +1 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts +17 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/mysense.sequencer.d.ts.map +1 -0
  402. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts +1 -1
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/uebe/visomat.comfort-soft-bt.d.ts.map +1 -1
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +1 -1
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -1
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +1 -1
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  408. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -0
  409. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -0
  410. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +1 -1
  411. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  412. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +1 -1
  413. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -1
  414. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +5 -8
  415. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  416. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +2 -0
  417. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
  418. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +1 -0
  419. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  420. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +6 -4
  421. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  422. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +2 -1
  423. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  424. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +10 -0
  425. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  426. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +5 -0
  427. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -1
  428. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +5 -4
  429. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  430. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  431. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  432. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +1 -0
  433. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  434. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  435. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  436. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  437. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  438. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +3 -0
  439. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -0
  440. package/package.json +5 -3
@@ -16,7 +16,7 @@ const MAX_MTU = 517;
16
16
  const MAX_STUCK_TIMEOUT_MS = 6_000_000;
17
17
  const HEX_BYTES = /^([0-9a-f]{2})+$/;
18
18
  const assertIdentity = spec => {
19
- const id = typeof spec?.id === "string" ? spec.id.trim() : "";
19
+ const id = typeof spec?.id === "string" ? spec.id.trim() : "ovok-custom-device";
20
20
  if (!id) {
21
21
  throw customDeviceError(String(spec?.id), "id", "must not be empty");
22
22
  }
@@ -35,9 +35,12 @@ const compileNameMatch = (id, spec) => {
35
35
  return nameMatch;
36
36
  }
37
37
  const exact = typeof nameMatch === "string" ? nameMatch.trim() : "";
38
- if (!exact) {
38
+ if (typeof nameMatch === "string" && !exact) {
39
39
  throw customDeviceError(id, "nameMatch", "must not be empty");
40
40
  }
41
+ if (!exact) {
42
+ return /.*/;
43
+ }
41
44
  return new RegExp(`^${exact.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}$`);
42
45
  };
43
46
  const assertStuckTimeout = (id, spec) => {
@@ -123,6 +126,7 @@ export const defineCustomDevice = spec => {
123
126
  id: id,
124
127
  spec,
125
128
  nameMatch,
129
+ matchByService: spec.matchByService === true,
126
130
  mainServices,
127
131
  stuckDataTimeout,
128
132
  fields,
@@ -1 +1 @@
1
- {"version":3,"names":["CUSTOM_DEVICE_BRAND","IntegratedDevices","compileCustomLepu","compileCustomMonitor","customDeviceError","normalizeBleUuid","MIN_STUCK_TIMEOUT_MS","MIN_MTU","MAX_MTU","MAX_STUCK_TIMEOUT_MS","HEX_BYTES","assertIdentity","spec","id","trim","String","builtIn","Object","values","find","name","toLowerCase","compileNameMatch","nameMatch","RegExp","global","sticky","exact","replace","assertStuckTimeout","timeout","stuckDataTimeoutMs","Number","isInteger","assertPreferredMtu","mtu","preferredMtu","undefined","compileWrite","path","write","commandHex","test","uuid","mainCommandUuid","defineCustomDevice","stuckDataTimeout","Array","isArray","services","length","fields","Map","frames","seenCharacteristics","Set","mainServices","map","service","serviceIndex","monitor","monitorUuids","monitorIndex","monitorPath","characteristic","frame","has","add","set","writeUuid","lepu"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/custom/define-custom-device.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,wCAAqC;AAMzE,SAASC,iBAAiB,QAAQ,mCAAgC;AAGlE,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,oBAAoB,GAAG,KAAK;;AAElC;AACA,MAAMC,OAAO,GAAG,EAAE;AAClB,MAAMC,OAAO,GAAG,GAAG;;AAEnB;AACA,MAAMC,oBAAoB,GAAG,SAAS;AACtC,MAAMC,SAAS,GAAG,kBAAkB;AAEpC,MAAMC,cAAc,GAAIC,IAAsB,IAAa;EACzD,MAAMC,EAAE,GAAG,OAAOD,IAAI,EAAEC,EAAE,KAAK,QAAQ,GAAGD,IAAI,CAACC,EAAE,CAACC,IAAI,CAAC,CAAC,GAAG,EAAE;EAE7D,IAAI,CAACD,EAAE,EAAE;IACP,MAAMT,iBAAiB,CAACW,MAAM,CAACH,IAAI,EAAEC,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC;EACtE;EAEA,MAAMG,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACjB,iBAAiB,CAAC,CAACkB,IAAI,CAClDC,IAAI,IAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKR,EAAE,CAACQ,WAAW,CAAC,CAClD,CAAC;EAED,IAAIL,OAAO,EAAE;IACX,MAAMZ,iBAAiB,CACrBS,EAAE,EACF,IAAI,EACJ,sCAAsCG,OA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,EAAE,EACF,GAAGkD,WAAW,OAAO,EACrB,0DACF,CAAC;MACH;MAEAT,mBAAmB,CAACa,GAAG,CAACH,cAAc,CAACrB,IAAI,CAAC;MAC5CU,MAAM,CAACe,GAAG,CAACJ,cAAc,CAACrB,IAAI,EAAEsB,KAAK,CAAC;MAEtC,OAAOD,cAAc;IACvB,CAAC,CAAC;IAEF,OAAO;MACLrB,IAAI,EAAEtC,gBAAgB,CAACQ,EAAE,EAAE,GAAG0B,IAAI,OAAO,EAAEmB,OAAO,CAACf,IAAI,CAAC;MACxDkB,YAAY;MACZQ,SAAS,EAAE/B,YAAY,CAACzB,EAAE,EAAE0B,IAAI,EAAEmB,OAAO,CAAClB,KAAK;IACjD,CAAC;EACH,CAAC,CAAC;EAEF,MAAM8B,IAAI,GAAGpE,iBAAiB,CAC5BW,EAAE,EACFD,IAAI,EACJ4C,YAAY,CAACC,GAAG,CAAEC,OAAO,IAAKA,OAAO,CAACf,IAAI,CAC5C,CAAC;EAED,OAAO;IACL,CAAC3C,mBAAmB,GAAG,IAAI;IAC3Ba,EAAE,EAAEA,EAAoB;IACxBD,IAAI;IACJW,SAAS;IACTiC,YAAY;IACZV,gBAAgB;IAChBK,MAAM;IACNE,MAAM;IACN,IAAIjB,YAAY,KAAKC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAED;IAAa,CAAC,CAAC;IACvD,IAAIkC,IAAI,KAAKjC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAEiC;IAAK,CAAC;EACxC,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["CUSTOM_DEVICE_BRAND","IntegratedDevices","compileCustomLepu","compileCustomMonitor","customDeviceError","normalizeBleUuid","MIN_STUCK_TIMEOUT_MS","MIN_MTU","MAX_MTU","MAX_STUCK_TIMEOUT_MS","HEX_BYTES","assertIdentity","spec","id","trim","String","builtIn","Object","values","find","name","toLowerCase","compileNameMatch","nameMatch","RegExp","global","sticky","exact","replace","assertStuckTimeout","timeout","stuckDataTimeoutMs","Number","isInteger","assertPreferredMtu","mtu","preferredMtu","undefined","compileWrite","path","write","commandHex","test","uuid","mainCommandUuid","defineCustomDevice","stuckDataTimeout","Array","isArray","services","length","fields","Map","frames","seenCharacteristics","Set","mainServices","map","service","serviceIndex","monitor","monitorUuids","monitorIndex","monitorPath","characteristic","frame","has","add","set","writeUuid","lepu","matchByService"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/custom/define-custom-device.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,wCAAqC;AAMzE,SAASC,iBAAiB,QAAQ,mCAAgC;AAGlE,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,MAAMC,oBAAoB,GAAG,KAAK;;AAElC;AACA,MAAMC,OAAO,GAAG,EAAE;AAClB,MAAMC,OAAO,GAAG,GAAG;;AAEnB;AACA,MAAMC,oBAAoB,GAAG,SAAS;AACtC,MAAMC,SAAS,GAAG,kBAAkB;AAEpC,MAAMC,cAAc,GAAIC,IAAsB,IAAa;EACzD,MAAMC,EAAE,GAAG,OAAOD,IAAI,EAAEC,EAAE,KAAK,QAAQ,GAAGD,IAAI,CAACC,EAAE,CAACC,IAAI,CAAC,CAAC,GAAG,oBAAoB;EAE/E,IAAI,CAACD,EAAE,EAAE;IACP,MAAMT,iBAAiB,CAACW,MAAM,CAACH,IAAI,EAAEC,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC;EACtE;EAEA,MAAMG,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACjB,iBAAiB,CAAC,CAACkB,IAAI,CAClDC,IAAI,IAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKR,EAAE,CAACQ,WAAW,CAAC,CAClD,CAAC;EAED,IAAIL,OAAO,EAAE;IACX,MAAMZ,iBAAiB,CACrBS,EAAE,EAC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PT,MACF,CAAC;MAED,IAAIG,mBAAmB,CAACY,GAAG,CAACF,cAAc,CAACrB,IAAI,CAAC,EAAE;QAChD,MAAMvC,iBAAiB,CACrBS,EAAE,EACF,GAAGkD,WAAW,OAAO,EACrB,0DACF,CAAC;MACH;MAEAT,mBAAmB,CAACa,GAAG,CAACH,cAAc,CAACrB,IAAI,CAAC;MAC5CU,MAAM,CAACe,GAAG,CAACJ,cAAc,CAACrB,IAAI,EAAEsB,KAAK,CAAC;MAEtC,OAAOD,cAAc;IACvB,CAAC,CAAC;IAEF,OAAO;MACLrB,IAAI,EAAEtC,gBAAgB,CAACQ,EAAE,EAAE,GAAG0B,IAAI,OAAO,EAAEmB,OAAO,CAACf,IAAI,CAAC;MACxDkB,YAAY;MACZQ,SAAS,EAAE/B,YAAY,CAACzB,EAAE,EAAE0B,IAAI,EAAEmB,OAAO,CAAClB,KAAK;IACjD,CAAC;EACH,CAAC,CAAC;EAEF,MAAM8B,IAAI,GAAGpE,iBAAiB,CAC5BW,EAAE,EACFD,IAAI,EACJ4C,YAAY,CAACC,GAAG,CAAEC,OAAO,IAAKA,OAAO,CAACf,IAAI,CAC5C,CAAC;EAED,OAAO;IACL,CAAC3C,mBAAmB,GAAG,IAAI;IAC3Ba,EAAE,EAAEA,EAAoB;IACxBD,IAAI;IACJW,SAAS;IACTgD,cAAc,EAAE3D,IAAI,CAAC2D,cAAc,KAAK,IAAI;IAC5Cf,YAAY;IACZV,gBAAgB;IAChBK,MAAM;IACNE,MAAM;IACN,IAAIjB,YAAY,KAAKC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAED;IAAa,CAAC,CAAC;IACvD,IAAIkC,IAAI,KAAKjC,SAAS,GAAG,CAAC,CAAC,GAAG;MAAEiC;IAAK,CAAC;EACxC,CAAC;AACH,CAAC","ignoreList":[]}
@@ -4,10 +4,13 @@ import { integratedDevicesMap } from "../constants/integrated-devices-map.js";
4
4
  import { IntegratedDevices } from "../types/integrated-devices.js";
5
5
  import { isCustomDeviceDefinition } from "../utils/is-custom-device-definition.js";
6
6
  import { BC01Device } from "./devices/bc01/bc01.device.js";
7
+ import { BloodGlucoseDevice } from "./devices/blood-glucose/blood-glucose.device.js";
7
8
  import { BP2Device } from "./devices/bp2/bp2.device.js";
8
9
  import { CustomDevice } from "./devices/custom/custom.device.js";
9
10
  import { F4Device } from "./devices/f4/f4.device.js";
11
+ import { OxyfitDevice } from "./devices/spo/oxyfit.device.js";
10
12
  import { SPO2Device } from "./devices/spo/spo2.device.js";
13
+ import { MySenseDevice } from "./devices/uebe/mysense.device.js";
11
14
  import { VerovalDuoControlDevice } from "./devices/veroval/veroval.duo-control-device.js";
12
15
  import { VerovalEcgDevice } from "./devices/veroval/veroval.ecg-device.js";
13
16
 
@@ -22,7 +25,12 @@ const DEVICE_CLASSES = {
22
25
  [IntegratedDevices.BP2]: BP2Device,
23
26
  [IntegratedDevices.F4]: F4Device,
24
27
  [IntegratedDevices.PC60WF]: SPO2Device,
28
+ [IntegratedDevices.SPO2]: OxyfitDevice,
29
+ [IntegratedDevices.MYSENSE]: MySenseDevice,
25
30
  [IntegratedDevices.BC01]: BC01Device,
31
+ [IntegratedDevices.TAIDOC_GLUCOSE]: BloodGlucoseDevice,
32
+ [IntegratedDevices.GLUCOCHECK]: BloodGlucoseDevice,
33
+ [IntegratedDevices.BGM]: BloodGlucoseDevice,
26
34
  [IntegratedDevices.VEROVAL_DUO_CONTROL]: VerovalDuoControlDevice,
27
35
  [IntegratedDevices.VEROVAL_ECG]: VerovalEcgDevice
28
36
  };
@@ -39,11 +47,13 @@ const collectCustomDevices = acceptedDevices => {
39
47
  if (customDevices.has(entry.id)) {
40
48
  throw new Error(`acceptedDevices[${index}] registers the custom device "${entry.id}" twice`);
41
49
  }
42
- if (matchers.has(entry.nameMatch.source)) {
50
+ if (!entry.matchByService && matchers.has(entry.nameMatch.source)) {
43
51
  throw new Error(`acceptedDevices[${index}] ("${entry.id}") matches the same advertised name as an earlier custom device, so one would silently shadow the other`);
44
52
  }
45
53
  customDevices.set(entry.id, entry);
46
- matchers.add(entry.nameMatch.source);
54
+ if (!entry.matchByService) {
55
+ matchers.add(entry.nameMatch.source);
56
+ }
47
57
  });
48
58
  return customDevices;
49
59
  };
@@ -54,14 +64,18 @@ export class DeviceCreator {
54
64
  this.acceptedDeviceNames = acceptedDeviceNames;
55
65
  this.customDevices = collectCustomDevices(acceptedDeviceNames);
56
66
  }
57
- getDeviceName = foundName => {
58
- if (!foundName) {
67
+ getDeviceName = (foundName, serviceUUIDs = []) => {
68
+ const normalizedServices = new Set(serviceUUIDs.map(uuid => uuid.toLowerCase()));
69
+ if (!foundName && normalizedServices.size === 0) {
59
70
  return undefined;
60
71
  }
72
+ if (!foundName && normalizedServices.size > 0) {
73
+ return this.matchDeviceName(foundName, normalizedServices);
74
+ }
61
75
  if (this.deviceNameCache.has(foundName)) {
62
76
  return this.deviceNameCache.get(foundName) ?? undefined;
63
77
  }
64
- const matched = this.matchDeviceName(foundName);
78
+ const matched = this.matchDeviceName(foundName, normalizedServices);
65
79
 
66
80
  // Cache the result (store null for non-matches to avoid repeated tests)
67
81
  this.cacheDeviceName(foundName, matched ?? null);
@@ -80,7 +94,7 @@ export class DeviceCreator {
80
94
  * `localName` carries the advertised name instead. Accept either so a scan-time
81
95
  * `createDevice` call for a real iOS ad is not rejected before it can connect.
82
96
  */
83
- if (!params.device.name?.trim() && !params.device.localName?.trim()) {
97
+ if (!params.device.name?.trim() && !params.device.localName?.trim() && !this.customDevices.get(params.deviceName)?.matchByService) {
84
98
  throw new Error("Device name is required");
85
99
  }
86
100
  if (!params.device.id) {
@@ -107,14 +121,15 @@ export class DeviceCreator {
107
121
  * A built-in device always wins over a declaration: its decoder is compiled and tested,
108
122
  * and a declaration that happens to match the same advertised name must not displace it.
109
123
  */
110
- matchDeviceName = deviceName => {
124
+ matchDeviceName = (deviceName, serviceUUIDs) => {
111
125
  for (const [regex, deviceType] of integratedDevicesMap) {
112
126
  if (regex.test(deviceName) && this.acceptedDeviceNames.some(name => name === deviceType)) {
113
127
  return deviceType;
114
128
  }
115
129
  }
116
130
  for (const custom of this.customDevices.values()) {
117
- if (custom.nameMatch.test(deviceName)) {
131
+ const serviceMatch = custom.matchByService && custom.mainServices.some(service => serviceUUIDs.has(service.uuid.toLowerCase()));
132
+ if (serviceMatch || deviceName && custom.nameMatch.test(deviceName)) {
118
133
  return custom.id;
119
134
  }
120
135
  }
@@ -1 +1 @@
1
- {"version":3,"names":["integratedDevicesMap","IntegratedDevices","isCustomDeviceDefinition","BC01Device","BP2Device","CustomDevice","F4Device","SPO2Device","VerovalDuoControlDevice","VerovalEcgDevice","DEVICE_CLASSES","BP2","F4","PC60WF","BC01","VEROVAL_DUO_CONTROL","VEROVAL_ECG","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","undefined","get","matched","matchDeviceName","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","localName","custom","deviceClass","Object","keys","join","destroy","clear","regex","deviceType","test","some","values","size","firstKey","next","value","delete"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/device-creator.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,wCAAqC;AAM1E,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,wBAAwB,QAAQ,yCAAsC;AAE/E,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,SAAS,QAAQ,6BAA0B;AAEpD,SAASC,YAAY,QAAQ,mCAAgC;AAC7D,SAASC,QAAQ,QAAQ,2BAAwB;AACjD,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,uBAAuB,QAAQ,iDAA8C;AACtF,SAASC,gBAAgB,QAAQ,yCAAsC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG;EACrB,CAACT,iBAAiB,CAACU,GAAG,G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AAI,IAAI,CAAC3B,eAAe,CAAC+B,IAAI,IAAI,IAAI,CAAC9B,cAAc,EAAE;MACpD,MAAM+B,QAAQ,GAAG,IAAI,CAAChC,eAAe,CAACsB,IAAI,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAACC,KAAK;MAEzD,IAAIF,QAAQ,KAAK1B,SAAS,EAAE;QAC1B,IAAI,CAACN,eAAe,CAACmC,MAAM,CAACH,QAAQ,CAAC;MACvC;IACF;IAEA,IAAI,CAAChC,eAAe,CAACH,GAAG,CAACiB,UAAU,EAAEa,UAAU,CAAC;EAClD;AACF","ignoreList":[]}
1
+ {"version":3,"names":["integratedDevicesMap","IntegratedDevices","isCustomDeviceDefinition","BC01Device","BloodGlucoseDevice","BP2Device","CustomDevice","F4Device","OxyfitDevice","SPO2Device","MySenseDevice","VerovalDuoControlDevice","VerovalEcgDevice","DEVICE_CLASSES","BP2","F4","PC60WF","SPO2","MYSENSE","BC01","TAIDOC_GLUCOSE","GLUCOCHECK","BGM","VEROVAL_DUO_CONTROL","VEROVAL_ECG","collectCustomDevices","acceptedDevices","customDevices","Map","matchers","Set","forEach","entry","index","Error","has","id","matchByService","nameMatch","source","set","add","DeviceCreator","deviceNameCache","CACHE_MAX_SIZE","constructor","acceptedDeviceNames","getDeviceName","foundName","serviceUUIDs","normalizedServices","map","uuid","toLowerCase","size","undefined","matchDeviceName","get","matched","cacheDeviceName","createDevice","params","String","deviceName","trim","device","name","localName","custom","deviceClass","Object","keys","join","destroy","clear","regex","deviceType","test","some","values","serviceMatch","mainServices","service","firstKey","next","value","delete"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/services/device-creator.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,wCAAqC;AAM1E,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,wBAAwB,QAAQ,yCAAsC;AAE/E,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,kBAAkB,QAAQ,iDAA8C;AACjF,SAASC,SAA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ACuC,IAAI,CAACd,UAAU,CAAE,EAAE;QACrE,OAAOK,MAAM,CAAChC,EAAE;MAClB;IACF;IAEA,OAAOmB,SAAS;EAClB,CAAC;EAEOI,eAAeA,CACrBI,UAAkB,EAClBa,UAA4B,EACtB;IACN;IACA,IAAI,IAAI,CAACjC,eAAe,CAACW,IAAI,IAAI,IAAI,CAACV,cAAc,EAAE;MACpD,MAAMuC,QAAQ,GAAG,IAAI,CAACxC,eAAe,CAAC4B,IAAI,CAAC,CAAC,CAACa,IAAI,CAAC,CAAC,CAACC,KAAK;MAEzD,IAAIF,QAAQ,KAAK5B,SAAS,EAAE;QAC1B,IAAI,CAACZ,eAAe,CAAC2C,MAAM,CAACH,QAAQ,CAAC;MACvC;IACF;IAEA,IAAI,CAACxC,eAAe,CAACH,GAAG,CAACuB,UAAU,EAAEa,UAAU,CAAC;EAClD;AACF","ignoreList":[]}
@@ -45,7 +45,7 @@ const SPOT_CHECK_TIMEOUT_MS = 60_000;
45
45
  * measurement would post old readings as though they had just been taken.
46
46
  */
47
47
  export const aoj20aThermometer = params => defineCustomDevice({
48
- id: params.id,
48
+ id: params.id ?? "aoj-20a-thermometer",
49
49
  nameMatch: params.nameMatch,
50
50
  stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? SPOT_CHECK_TIMEOUT_MS,
51
51
  services: [{
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","defineCustomDevice","FRAME_HEADER","COMMAND_BYTE","FRAME_BYTES","CHECKSUM_INDEX","CHECKSUM_FROM","PAYLOAD","TEMPERATURE_REPLY","TEMPERATURE_SCALE","TEMPERATURE_DECIMALS","SPOT_CHECK_TIMEOUT_MS","aoj20aThermometer","params","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","header","minLengthBytes","checksum","algorithm","index","from","caseSelectorBytes","cases","selector","kind","measurementTypeKey","temperature","fields","name","byteIndexes","byteOrder","unit","scale","decimals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices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gC,WAAW;QAClDC,MAAM,EAAE,CACN;UACEC,IAAI,EAAE,UAAU;UAChBC,WAAW,EAAE,CAAC5B,OAAO,EAAEA,OAAO,GAAG,CAAC,CAAC;UACnC6B,SAAS,EAAE,KAAK;UAChBC,IAAI,EAAE,KAAK;UACXC,KAAK,EAAE7B,iBAAiB;UACxB8B,QAAQ,EAAE7B;QACZ,CAAC;MAEL,CAAC;IAEL,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","defineCustomDevice","FRAME_HEADER","COMMAND_BYTE","FRAME_BYTES","CHECKSUM_INDEX","CHECKSUM_FROM","PAYLOAD","TEMPERATURE_REPLY","TEMPERATURE_SCALE","TEMPERATURE_DECIMALS","SPOT_CHECK_TIMEOUT_MS","aoj20aThermometer","params","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","header","minLengthBytes","checksum","algorithm","index","from","caseSelectorBytes","cases","selector","kind","measurementTypeKey","temperature","fields","name","byteIndexes","byteOrder","unit","scale","decimals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/aoj/aoj.thermometers.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,YAAY;AAG/C,SAASC,kBAAkB,QAAQ,sCAAmC;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMC,YAAY,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;AAEjC,MAAMC,YAAY,GAAG,CAAC;;AAEtB;AACA,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,cAAc,GAAG,CAAC;;AAExB;AACA,MAAMC,aAAa,GAAG,CAAC;AAEvB,MAAMC,OAAO,GAAG,CAAC;;AAEjB;AACA,MAAMC,iBAAiB,GAAG,IAAI;;AAE9B;AACA,MAAMC,iBAAiB,GAAG,IAAI;AAC9B,MAAMC,oBAAoB,GAAG,CAAC;AAE9B,MAAMC,qBAAqB,GAAG,MAAM;AAapC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC5BC,MAAuB,IAEvBZ,kBAAkB,CAAC;EACjBa,EAAE,EAAED,MAAM,CAACC,EAAE,IAAI,qBAAqB;EACtCC,SAAS,EAAEF,MAAM,CAACE,SAAS;EAC3BC,kBAAkB,EAAEH,MAAM,CAACG,kBAAkB,IAAIL,qBAAqB;EACtEM,QAAQ,EAAE,CACR;IACEC,IAAI,EAAE,MAAM;IACZC,OAAO,EAAE,CACP;MACED,IAAI,EAAE,MAAM;MACZE,KAAK,EAAE;QACLC,MAAM,EAAEnB,YAAY;QACpBoB,cAAc,EAAElB,WAAW;QAC3BmB,QAAQ,EAAE;UACRC,SAAS,EAAE,KAAK;UAChBC,KAAK,EAAEpB,cAAc;UACrBqB,IAAI,EAAEpB;QACR;MACF,CAAC;MACDqB,iBAAiB,EAAE,CAACxB,YAAY,CAAC;MACjCyB,KAAK,EAAE,CACL;QACEC,QAAQ,EAAErB,iBAAiB;QAC3BsB,IAAI,EAAE,QAAQ;QACdC,kBAAkB,EAAE/B,kBAAkB,CAACgC,WAAW;QAClDC,MAAM,EAAE,CACN;UACEC,IAAI,EAAE,UAAU;UAChBC,WAAW,EAAE,CAAC5B,OAAO,EAAEA,OAAO,GAAG,CAAC,CAAC;UACnC6B,SAAS,EAAE,KAAK;UAChBC,IAAI,EAAE,KAAK;UACXC,KAAK,EAAE7B,iBAAiB;UACxB8B,QAAQ,EAAE7B;QACZ,CAAC;MAEL,CAAC;IAEL,CAAC;EAEL,CAAC;AAEL,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ /** Wire constants and frame builders shared by the BC401 command sequencer. */
4
+ const OP_RESET = 0x80;
5
+ const OP_REQUEST_VERSION = 0x82;
6
+ const OP_SET_TIME = 0x83;
7
+ const OP_REQUEST_COUNT = 0x90;
8
+ const OP_REQUEST_RECORDS = 0x92;
9
+ const OP_REQUEST_QUANTITATIVE_RECORDS = 0x95;
10
+ const ACK_LAST_OF_SET = 0x7e;
11
+ const REQUEST_ALL = 0x00;
12
+ const REQUEST_NEXT_RECORD_GROUP = 0x01;
13
+ const RETRY_RECORD_GROUP = 0x02;
14
+ const FINAL_RECORD_DELAY_MS = 200;
15
+ const RESET_DELAY_MS = 100;
16
+ const RX = {
17
+ ACK: 0xf0,
18
+ VERSION_REPLY: 0xf2,
19
+ TIME_SYNC_ACK: 0xf3,
20
+ COUNT_REPLY: 0xe0,
21
+ STORED_RECORD_URS: 0xe1,
22
+ STORED_RECORD_PAGED: 0xe2,
23
+ FINISH: 0xe3,
24
+ STORED_QUANTITATIVE: 0xe4,
25
+ STORED_QUANTITATIVE_PAGED: 0xe5
26
+ };
27
+ const RECORD_FLAGS_INDEX = 1;
28
+ const RECORD_LAST_OF_SET_BIT = 0x40;
29
+ const asHex = byte => (byte & 0xff).toString(16).padStart(2, "0");
30
+ const bc401Checksum = bytes => bytes.reduce((acc, byte) => acc + (byte & 0x7f), 0) & 0x7f;
31
+ const buildCommand = (opcode, arg) => [opcode, arg, bc401Checksum([opcode, arg])];
32
+ const buildResetCommand = () => [OP_RESET, 0x00];
33
+ const buildRequestVersionCommand = () => [OP_REQUEST_VERSION, bc401Checksum([OP_REQUEST_VERSION])];
34
+ const buildSetTimeCommand = now => {
35
+ const payload = [OP_SET_TIME, now.getFullYear() - 2000, now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds() & 0xff, now.getMilliseconds() >> 8 & 0xff];
36
+ return [...payload, bc401Checksum(payload)];
37
+ };
38
+ const buildDeleteCommand = () => [0x93, 0x13];
39
+ export { ACK_LAST_OF_SET, asHex, bc401Checksum, buildCommand, buildDeleteCommand, buildRequestVersionCommand, buildResetCommand, buildSetTimeCommand, FINAL_RECORD_DELAY_MS, OP_REQUEST_COUNT, OP_REQUEST_QUANTITATIVE_RECORDS, OP_REQUEST_RECORDS, RECORD_FLAGS_INDEX, RECORD_LAST_OF_SET_BIT, REQUEST_ALL, REQUEST_NEXT_RECORD_GROUP, RESET_DELAY_MS, RETRY_RECORD_GROUP, RX };
40
+ //# sourceMappingURL=bc01-command-builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OP_RESET","OP_REQUEST_VERSION","OP_SET_TIME","OP_REQUEST_COUNT","OP_REQUEST_RECORDS","OP_REQUEST_QUANTITATIVE_RECORDS","ACK_LAST_OF_SET","REQUEST_ALL","REQUEST_NEXT_RECORD_GROUP","RETRY_RECORD_GROUP","FINAL_RECORD_DELAY_MS","RESET_DELAY_MS","RX","ACK","VERSION_REPLY","TIME_SYNC_ACK","COUNT_REPLY","STORED_RECORD_URS","STORED_RECORD_PAGED","FINISH","STORED_QUANTITATIVE","STORED_QUANTITATIVE_PAGED","RECORD_FLAGS_INDEX","RECORD_LAST_OF_SET_BIT","asHex","byte","toString","padStart","bc401Checksum","bytes","reduce","acc","buildCommand","opcode","arg","buildResetCommand","buildRequestVersionCommand","buildSetTimeCommand","now","payload","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","buildDeleteCommand"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01-command-builders.ts"],"mappings":";;AAAA;AACA,MAAMA,QAAQ,GAAG,IAAI;AACrB,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,+BAA+B,GAAG,IAAI;AAE5C,MAAMC,eAAe,GAAG,IAAI;AAC5B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,yBAAyB,GAAG,IAAI;AACtC,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,cAAc,GAAG,GAAG;AAE1B,MAAMC,EAAE,GAAG;EACTC,G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CAAC,EAChBN,GAAG,CAACO,UAAU,CAAC,CAAC,EAChBP,GAAG,CAACQ,eAAe,CAAC,CAAC,GAAG,IAAI,EAC3BR,GAAG,CAACQ,eAAe,CAAC,CAAC,IAAI,CAAC,GAAI,IAAI,CACpC;EAED,OAAO,CAAC,GAAGP,OAAO,EAAEX,aAAa,CAACW,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAMQ,kBAAkB,GAAGA,CAAA,KAAgB,CAAC,IAAI,EAAE,IAAI,CAAC;AAEvD,SACEzC,eAAe,EACfkB,KAAK,EACLI,aAAa,EACbI,YAAY,EACZe,kBAAkB,EAClBX,0BAA0B,EAC1BD,iBAAiB,EACjBE,mBAAmB,EACnB3B,qBAAqB,EACrBP,gBAAgB,EAChBE,+BAA+B,EAC/BD,kBAAkB,EAClBkB,kBAAkB,EAClBC,sBAAsB,EACtBhB,WAAW,EACXC,yBAAyB,EACzBG,cAAc,EACdF,kBAAkB,EAClBG,EAAE","ignoreList":[]}
@@ -1,103 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { hexToByte } from "../../../utils/hex-to-byte.js";
4
-
5
- /**
6
- * The FF01/FF02 opcodes the BC401 firmware speaks, as reverse-engineered from
7
- * PHMS 3.0.03 (`I1/b.java` for the switch, `B3/B5.java` for the builders and
8
- * checksum, `L1/f.java` for the reset write).
9
- */
10
- const OP_RESET = 0x80;
11
- const OP_REQUEST_VERSION = 0x82;
12
- const OP_SET_TIME = 0x83;
13
- const OP_REQUEST_COUNT = 0x90;
14
- const OP_REQUEST_RECORDS = 0x92;
15
-
16
- /** Payload byte for `OP_REQUEST_RECORDS` that acknowledges the last record of the set. */
17
- const ACK_LAST_OF_SET = 0x7e;
18
-
19
- /** Payload byte for `OP_REQUEST_COUNT` and the initial `OP_REQUEST_RECORDS`. */
20
- const REQUEST_ALL = 0x00;
21
-
22
- /**
23
- * Device-to-host frame prefixes the FSM keys on. Values are decimal opcodes as
24
- * they appear in the decompiled Java (`switch(bArr[0])`), rendered here as
25
- * their real hex opcodes.
26
- */
27
- const RX = {
28
- ACK: 0xf0,
29
- VERSION_REPLY: 0xf2,
30
- TIME_SYNC_ACK: 0xf3,
31
- COUNT_REPLY: 0xe0,
32
- STORED_RECORD_URS: 0xe1,
33
- STORED_RECORD_PAGED: 0xe2,
34
- FINISH: 0xe3
35
- };
36
-
37
- /** Position in a 16-byte URS record where the flags byte sits; bit 0x40 marks the last of a set. */
38
- const RECORD_FLAGS_INDEX = 1;
39
- const RECORD_LAST_OF_SET_BIT = 0x40;
40
- /**
41
- * Formats one byte as a two-digit lowercase hex string, matching the way the
42
- * SDK's transport already spells raw bytes.
43
- */
44
- const asHex = byte => (byte & 0xff).toString(16).padStart(2, "0");
45
-
46
- /**
47
- * BC401 checksum: sum of the low 7 bits of every byte, folded back into 7 bits.
48
- * Matches `B5.a` in the decompiled Java exactly.
49
- */
50
- const bc401Checksum = bytes => bytes.reduce((acc, byte) => acc + (byte & 0x7f), 0) & 0x7f;
51
-
52
- /**
53
- * Builds a "one payload byte plus checksum" command frame. This is the shape
54
- * of every BC401 host-to-device command that carries an argument: opcode,
55
- * argument, checksum-over-both.
56
- */
57
- const buildCommand = (opcode, arg) => {
58
- const chk = bc401Checksum([opcode, arg]);
59
- return [opcode, arg, chk];
60
- };
61
-
62
- /**
63
- * Builds the two-byte reset frame. It is the one command that does not carry
64
- * an argument or a checksum — PHMS writes it as `[0x80, 0x00]` verbatim
65
- * (`L1/f.java:694`).
66
- */
67
- const buildResetCommand = () => [OP_RESET, 0x00];
68
-
69
- /**
70
- * Builds the request-version reply. The Java sends it as `[0x82, 0x02]` where
71
- * `0x02` doubles as the checksum of `0x82` under the BC401 rule
72
- * (`0x82 & 0x7f = 0x02`), so the same formula that guards every other command
73
- * produces the right byte here.
74
- */
75
- const buildRequestVersionCommand = () => {
76
- const chk = bc401Checksum([OP_REQUEST_VERSION]);
77
- return [OP_REQUEST_VERSION, chk];
78
- };
79
-
80
- /**
81
- * Builds the `SET_TIME` frame for the moment the sequencer receives it. The
82
- * device does not run its own clock across power cycles, so timestamps on
83
- * stored records only make sense once the app tells it what "now" is.
84
- * Millisecond field is written little-endian, matching `I1/b.java`.
85
- */
86
- const buildSetTimeCommand = now => {
87
- const yy = now.getFullYear() - 2000;
88
- const mo = now.getMonth() + 1;
89
- const dd = now.getDate();
90
- const hh = now.getHours();
91
- const mi = now.getMinutes();
92
- const ss = now.getSeconds();
93
- const ms = now.getMilliseconds();
94
- const msLo = ms & 0xff;
95
- const msHi = ms >> 8 & 0xff;
96
- const payload = [OP_SET_TIME, yy, mo, dd, hh, mi, ss, msLo, msHi];
97
- const chk = bc401Checksum(payload);
98
- return [...payload, chk];
99
- };
100
-
4
+ import { ACK_LAST_OF_SET, asHex, bc401Checksum, buildCommand, buildDeleteCommand, buildRequestVersionCommand, buildResetCommand, buildSetTimeCommand, FINAL_RECORD_DELAY_MS, OP_REQUEST_COUNT, OP_REQUEST_QUANTITATIVE_RECORDS, OP_REQUEST_RECORDS, RECORD_FLAGS_INDEX, RECORD_LAST_OF_SET_BIT, REQUEST_ALL, REQUEST_NEXT_RECORD_GROUP, RESET_DELAY_MS, RETRY_RECORD_GROUP, RX } from "./bc01-command-builders.js";
101
5
  /**
102
6
  * Walks the BC401 through its post-reset handshake and pulls every stored
103
7
  * record.
@@ -118,13 +22,19 @@ const buildSetTimeCommand = now => {
118
22
  export class Bc01CommandSequencer {
119
23
  isDone = false;
120
24
 
25
+ /** Ten standard pages per request group; 10 means a new group. */
26
+ standardPage = 10;
27
+
28
+ /** Five quantitative pages per request group; 5 means a new group. */
29
+ quantitativePage = 5;
30
+
121
31
  /** Injectable for tests; production reads `Date.now()`. */
122
32
 
123
33
  constructor(params, clock = () => new Date()) {
124
34
  this.params = params;
125
35
  this.clock = clock;
126
36
  }
127
- initialCommands = () => [this.commandFor(buildResetCommand())];
37
+ initialCommands = () => [this.commandFor(buildResetCommand(), RESET_DELAY_MS)];
128
38
  nextCommand = frame => {
129
39
  if (this.isDone || frame.length === 0) {
130
40
  return undefined;
@@ -141,7 +51,10 @@ export class Bc01CommandSequencer {
141
51
  return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, REQUEST_ALL))];
142
52
  case RX.STORED_RECORD_URS:
143
53
  case RX.STORED_RECORD_PAGED:
144
- return this.answerStoredRecord(frame);
54
+ return this.answerStoredRecord(opcode, frame);
55
+ case RX.STORED_QUANTITATIVE:
56
+ case RX.STORED_QUANTITATIVE_PAGED:
57
+ return this.answerQuantitativeRecord(opcode, frame);
145
58
  case RX.FINISH:
146
59
  this.isDone = true;
147
60
  return undefined;
@@ -149,23 +62,60 @@ export class Bc01CommandSequencer {
149
62
  return undefined;
150
63
  }
151
64
  };
152
-
153
- /**
154
- * The device pages every record it holds, one 16-byte frame at a time. Only
155
- * the frame whose flags byte carries `0x40` needs an acknowledgement; every
156
- * other page is a status update we let ride while the transfer continues.
157
- */
158
- answerStoredRecord = frame => {
65
+ answerStoredRecord = (opcode, frame) => {
66
+ const flags = hexToByte(frame[RECORD_FLAGS_INDEX] ?? "0");
67
+ if (opcode === RX.STORED_RECORD_URS) {
68
+ return this.finishStoredRecords(OP_REQUEST_RECORDS);
69
+ }
70
+ const page = flags & 0x0f;
71
+ if (this.standardPage === 10) {
72
+ this.standardPage = 0;
73
+ }
74
+ if (page !== this.standardPage) {
75
+ this.standardPage = 10;
76
+ return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, RETRY_RECORD_GROUP))];
77
+ }
78
+ this.standardPage += 1;
79
+ if (this.standardPage === 10 && (flags & RECORD_LAST_OF_SET_BIT) === 0) {
80
+ return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, REQUEST_NEXT_RECORD_GROUP))];
81
+ }
82
+ if ((flags & RECORD_LAST_OF_SET_BIT) === 0) {
83
+ return undefined;
84
+ }
85
+ this.standardPage = 10;
86
+ return this.finishStoredRecords(OP_REQUEST_RECORDS);
87
+ };
88
+ answerQuantitativeRecord = (opcode, frame) => {
159
89
  const flags = hexToByte(frame[RECORD_FLAGS_INDEX] ?? "0");
90
+ if (opcode === RX.STORED_QUANTITATIVE) {
91
+ return this.finishStoredRecords(OP_REQUEST_QUANTITATIVE_RECORDS);
92
+ }
93
+ const page = flags & 0x0f;
94
+ if (this.quantitativePage === 5) {
95
+ this.quantitativePage = 0;
96
+ }
97
+ if (page !== this.quantitativePage) {
98
+ this.quantitativePage = 5;
99
+ return [this.commandFor(buildCommand(OP_REQUEST_QUANTITATIVE_RECORDS, RETRY_RECORD_GROUP))];
100
+ }
101
+ this.quantitativePage += 1;
102
+ if (this.quantitativePage === 5 && (flags & RECORD_LAST_OF_SET_BIT) === 0) {
103
+ return [this.commandFor(buildCommand(OP_REQUEST_QUANTITATIVE_RECORDS, REQUEST_NEXT_RECORD_GROUP))];
104
+ }
160
105
  if ((flags & RECORD_LAST_OF_SET_BIT) === 0) {
161
106
  return undefined;
162
107
  }
163
- return [this.commandFor(buildCommand(OP_REQUEST_RECORDS, ACK_LAST_OF_SET))];
108
+ this.quantitativePage = 5;
109
+ return this.finishStoredRecords(OP_REQUEST_QUANTITATIVE_RECORDS);
110
+ };
111
+ finishStoredRecords = opcode => {
112
+ this.isDone = true;
113
+ return [this.commandFor(buildCommand(opcode, ACK_LAST_OF_SET)), this.commandFor(buildDeleteCommand(), FINAL_RECORD_DELAY_MS)];
164
114
  };
165
- commandFor = bytes => ({
115
+ commandFor = (bytes, delayBeforeWriteMs = 0) => ({
166
116
  ...this.params.write,
167
117
  frame: bytes.map(asHex),
168
- withoutResponse: true
118
+ delayBeforeWriteMs
169
119
  });
170
120
  }
171
121
 
@@ -1 +1 @@
1
- {"version":3,"names":["hexToByte","OP_RESET","OP_REQUEST_VERSION","OP_SET_TIME","OP_REQUEST_COUNT","OP_REQUEST_RECORDS","ACK_LAST_OF_SET","REQUEST_ALL","RX","ACK","VERSION_REPLY","TIME_SYNC_ACK","COUNT_REPLY","STORED_RECORD_URS","STORED_RECORD_PAGED","FINISH","RECORD_FLAGS_INDEX","RECORD_LAST_OF_SET_BIT","asHex","byte","toString","padStart","bc401Checksum","bytes","reduce","acc","buildCommand","opcode","arg","chk","buildResetCommand","buildRequestVersionCommand","buildSetTimeCommand","now","yy","getFullYear","mo","getMonth","dd","getDate","hh","getHours","mi","getMinutes","ss","getSeconds","ms","getMilliseconds","msLo","msHi","payload","Bc01CommandSequencer","isDone","constructor","params","clock","Date","initialCommands","commandFor","nextCommand","frame","length","undefined","answerStoredRecord","flags","write","map","withoutResponse","bc01CommandSequencerInternals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01-command-sequencer.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;;AAEtD;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,IAAI;AACrB,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,WAAW,GAAG,IAAI;AACxB,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;;AAE/B;AACA,MAAMC,eAAe,GAAG,IAAI;;AAE5B;AACA,MAAMC,WAAW,GAAG,IAAI;;AAExB;AACA;AACA;AACA;AACA;AACA,MAAMC,EAAE,GAAG;EACTC,GAAG,EAAE,IAAI;EACTC,aAAa,EAAE,IAAI;EACnBC,aAAa,EAAE,IAAI;EACnBC,WAAW,EAAE,IAAI;EACjBC,iBAAiB,EAAE,IAAI;EACvBC,mBAAmB,EAAE,IAAI;EACzBC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA,MAAMC,kBAAkB,GAAG,CAAC;AAC5B,MAAMC,sBAAsB,GAAG,IAAI;AAenC;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAIC,IAAY,IACzB,CAACA,IAAI,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;;AAE7C;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAIC,KAAwB,IAC7CA,KAAK,CAACC,M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a;QACnB,OAAO,CACL,IAAI,CAAC+C,UAAU,CAAChC,YAAY,CAACtB,gBAAgB,EAAEG,WAAW,CAAC,CAAC,CAC7D;MAEH,KAAKC,EAAE,CAACI,WAAW;QACjB,OAAO,CACL,IAAI,CAAC8C,UAAU,CAAChC,YAAY,CAACrB,kBAAkB,EAAEE,WAAW,CAAC,CAAC,CAC/D;MAEH,KAAKC,EAAE,CAACK,iBAAiB;MACzB,KAAKL,EAAE,CAACM,mBAAmB;QACzB,OAAO,IAAI,CAACiD,kBAAkB,CAACH,KAAK,CAAC;MAEvC,KAAKpD,EAAE,CAACO,MAAM;QACZ,IAAI,CAACqC,MAAM,GAAG,IAAI;QAElB,OAAOU,SAAS;MAElB;QACE,OAAOA,SAAS;IACpB;EACF,CAAC;;EAED;AACF;AACA;AACA;AACA;EACUC,kBAAkB,GACxBH,KAAwB,IACiB;IACzC,MAAMI,KAAK,GAAGhE,SAAS,CAAC4D,KAAK,CAAC5C,kBAAkB,CAAC,IAAI,GAAG,CAAC;IAEzD,IAAI,CAACgD,KAAK,GAAG/C,sBAAsB,MAAM,CAAC,EAAE;MAC1C,OAAO6C,SAAS;IAClB;IAEA,OAAO,CAAC,IAAI,CAACJ,UAAU,CAAChC,YAAY,CAACrB,kBAAkB,EAAEC,eAAe,CAAC,CAAC,CAAC;EAC7E,CAAC;EAEOoD,UAAU,GAAInC,KAAwB,KAAqB;IACjE,GAAG,IAAI,CAAC+B,MAAM,CAACW,KAAK;IACpBL,KAAK,EAAErC,KAAK,CAAC2C,GAAG,CAAChD,KAAK,CAAC;IACvBiD,eAAe,EAAE;EACnB,CAAC,CAAC;AACJ;;AAEA;AACA,OAAO,MAAMC,6BAA6B,GAAG;EAC3C9C,aAAa;EACbI,YAAY;EACZI,iBAAiB;EACjBC,0BAA0B;EAC1BC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["hexToByte","ACK_LAST_OF_SET","asHex","bc401Checksum","buildCommand","buildDeleteCommand","buildRequestVersionCommand","buildResetCommand","buildSetTimeCommand","FINAL_RECORD_DELAY_MS","OP_REQUEST_COUNT","OP_REQUEST_QUANTITATIVE_RECORDS","OP_REQUEST_RECORDS","RECORD_FLAGS_INDEX","RECORD_LAST_OF_SET_BIT","REQUEST_ALL","REQUEST_NEXT_RECORD_GROUP","RESET_DELAY_MS","RETRY_RECORD_GROUP","RX","Bc01CommandSequencer","isDone","standardPage","quantitativePage","constructor","params","clock","Date","initialCommands","commandFor","nextCommand","frame","length","undefined","opcode","ACK","VERSION_REPLY","TIME_SYNC_ACK","COUNT_REPLY","STORED_RECORD_URS","STORED_RECORD_PAGED","answerStoredRecord","STORED_QUANTITATIVE","STORED_QUANTITATIVE_PAGED","answerQuantitativeRecord","FINISH","flags","finishStoredRecords","page","bytes","delayBeforeWriteMs","write","map","bc01CommandSequencerInternals"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01-command-sequencer.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,+BAA4B;AAEtD,SACEC,eAAe,EACfC,KAAK,EACLC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,0BAA0B,EAC1BC,iBAAiB,EACjBC,mBAAmB,EACnBC,qBAAqB,EACrBC,gBAAgB,EAChBC,+BAA+B,EAC/BC,kBAAkB,EAClBC,kBAAkB,EAClBC,sBAAsB,EACtBC,WAAW,EACXC,yBAAyB,EACzBC,cAAc,EACdC,kBAAkB,EAClBC,EAAE,QACG,4BAAyB;AAehC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAA6B;EACpDC,MAAM,GAAG,KAAK;;EAEtB;EACQC,YAAY,GAAG,EAAE;;EAEzB;EACQC,gBAAgB,GAAG,CAAC;;EAE5B;;EAGOC,WAAWA,CACCC,MAA2B,EAC5CC,KAAiB,GAAGA,CAAA,KAAM,IAAIC,IAAI,CAAC,CAAC,EACpC;I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kBAAkB,GAAG,CAAC,MACH;IACnB,GAAG,IAAI,CAACzB,MAAM,CAAC0B,KAAK;IACpBpB,KAAK,EAAEkB,KAAK,CAACG,GAAG,CAAClD,KAAK,CAAC;IACvBgD;EACF,CAAC,CAAC;AACJ;;AAEA;AACA,OAAO,MAAMG,6BAA6B,GAAG;EAC3ClD,aAAa;EACbC,YAAY;EACZG,iBAAiB;EACjBD,0BAA0B;EAC1BE;AACF,CAAC","ignoreList":[]}
@@ -6,6 +6,7 @@ import { hexToByte } from "../../../utils/hex-to-byte.js";
6
6
  import { BTManagedDevice } from "../bt-managed-device.js";
7
7
  import { Bc01CommandSequencer } from "./bc01-command-sequencer.js";
8
8
  import { BC01_ANALYTE_ORDER, parseBc01Record } from "./bc01-frame-parser.js";
9
+ import { Bc01FrameReader } from "./bc01.frame-reader.js";
9
10
  import { bc01MainServices } from "./bc01.main-services.js";
10
11
 
11
12
  /** Minimum bytes a complete frame carries, keyed by its opening opcode. */
@@ -42,6 +43,7 @@ const BC01_FRAME_MIN_LENGTH = {
42
43
  export class BC01Device extends BTManagedDevice {
43
44
  onStreamStart = () => {};
44
45
  mainServices = bc01MainServices;
46
+ frameReader = new Bc01FrameReader();
45
47
 
46
48
  /**
47
49
  * 90 s covers the maximum firmware-side reagent-pad settle time on a URS-7
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","BTManagedDevice","Bc01CommandSequencer","BC01_ANALYTE_ORDER","parseBc01Record","bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","onStreamStart","mainServices","stuckDataTimeout","constructor","device","params","createCommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","OTHER","handleSuccessResult","parsed","measuredValues","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAiC,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,wBAAqB;AACzE,SAASC,gBAAgB,QAAQ,yBAAsB;;AAEvD;AACA,MAAMC,qBAA6C,GAAG;EACpD,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,CAAC;EAAE;EACT,IAAI,EAAE,EAAE;EAAE;EACV,IAAI,EAAE,EAAE,CAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,SAASN,eAAe,CAAyB;EAC5DO,aAAa,GAAeA,CAAA,KAAM,CAAC,CAAC;EAEpCC,YAAY,GAAeJ,gBAAgB;;EAErD;AACF;AACA;AACA;AACA;AACA;EACYK,gBAAgB,GAAG,MAAM;EAEnCC,WAAWA,CAACC,MAAc,EAAEC,MAAkD,EAAE;IAC9E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;;IAErB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,sBAAsB,GAAG,MAC5B,IAAIZ,oBAAoB,CAAC;MACvBa,KAAK,EAAE;QACLC,WAAW,EAAEX,gBAAgB,CAAC,CAAC,CAAC,CAAEY,IAAI;QACtCC,kBAAkB,EAAEb,gBAAgB,CAAC,CAAC,CAAC,CAAEc,SAAS,CAAEF;MACtD,CAAC;MACDG,SAAS,EAAGC,M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AAC,GAAGC,KAAK;MACtB;MAEA,OAAOF,GAAG;IACZ,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAII,MAAM,CAACC,IAAI,CAACP,cAAc,CAAC,CAACb,MAAM,KAAK,CAAC,EAAE;MAC5C,IAAI,CAACJ,OAAO,GAAG,sDAAsD,CAAC;MAEtE;IACF;IAEA,MAAMyB,OAAO,GAAG;MACdZ,QAAQ,EAAEpC,QAAQ,CAACiD,MAAM;MACzBC,kBAAkB,EAAEnD,kBAAkB,CAACoD,QAAQ;MAC/CC,WAAW,EAAE,EAAE;MACfC,UAAU,EAAEd,MAAM,CAACe,SAAS;MAC5B,GAAGd;IACL,CAEC;IAED,IAAI,CAACe,QAAQ,GAAGP,OAAO,CAAC;EAC1B;AACF","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","hexToByte","BTManagedDevice","Bc01CommandSequencer","BC01_ANALYTE_ORDER","parseBc01Record","Bc01FrameReader","bc01MainServices","BC01_FRAME_MIN_LENGTH","BC01Device","onStreamStart","mainServices","frameReader","stuckDataTimeout","constructor","device","params","createCommandSequencer","write","serviceUuid","uuid","characteristicUuid","writeUuid","onRefused","reason","onError","Error","validatePackage","pkg","length","opcode","minLength","undefined","handleDependentResult","data","frame","reportUrsRecord","parsingCase","caseType","OTHER","handleSuccessResult","parsed","measuredValues","reduce","acc","analyte","value","values","Object","keys","reading","RESULT","measurementTypeKey","uricAcid","urineValues","recordedAt","timestamp","onResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.device.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAiC,YAAY;AAGxE,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SAASC,SAAS,QAAQ,+BAA4B;AACtD,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,wBAAqB;AACzE,SAASC,eAAe,QAAQ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B,OAAO,GAAG;MACdZ,QAAQ,EAAEtC,QAAQ,CAACmD,MAAM;MACzBC,kBAAkB,EAAErD,kBAAkB,CAACsD,QAAQ;MAC/CC,WAAW,EAAE,EAAE;MACfC,UAAU,EAAEd,MAAM,CAACe,SAAS;MAC5B,GAAGd;IACL,CAEC;IAED,IAAI,CAACe,QAAQ,GAAGP,OAAO,CAAC;EAC1B;AACF","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
4
+ /** Fixed BC401 reply lengths, keyed by the first byte of each PHMS frame. */
5
+ const BC01_FRAME_LENGTHS = {
6
+ f0: 2,
7
+ f2: 8,
8
+ f3: 3,
9
+ e0: 7,
10
+ e1: 16,
11
+ e2: 16,
12
+ e3: 3,
13
+ e4: 36,
14
+ e5: 36
15
+ };
16
+ const lower = byte => (byte ?? "").toLowerCase();
17
+
18
+ /**
19
+ * Isolates the fixed-length frames used by Contec BC401BT.
20
+ *
21
+ * PHMS keeps a byte queue and repeatedly consumes complete replies. BLE notifications are
22
+ * not frame boundaries, so the SDK must retain partial replies and drain multiple replies
23
+ * when Android combines them into one notification.
24
+ */
25
+ class Bc01FrameReader {
26
+ readFrame(buffer) {
27
+ const start = buffer.findIndex(byte => Object.prototype.hasOwnProperty.call(BC01_FRAME_LENGTHS, lower(byte)));
28
+ if (start === -1) {
29
+ return {
30
+ status: FrameReadStatus.INCOMPLETE,
31
+ consumedBytes: buffer.length
32
+ };
33
+ }
34
+ const opcode = lower(buffer[start]);
35
+ const length = BC01_FRAME_LENGTHS[opcode];
36
+ if (length === undefined) {
37
+ return {
38
+ status: FrameReadStatus.INCOMPLETE,
39
+ consumedBytes: start + 1
40
+ };
41
+ }
42
+ if (start + length > buffer.length) {
43
+ return {
44
+ status: FrameReadStatus.INCOMPLETE,
45
+ consumedBytes: start
46
+ };
47
+ }
48
+ return {
49
+ status: FrameReadStatus.COMPLETE,
50
+ consumedBytes: start + length,
51
+ frame: buffer.slice(start, start + length)
52
+ };
53
+ }
54
+ }
55
+ export { Bc01FrameReader, BC01_FRAME_LENGTHS as bc01FrameLengths };
56
+ //# sourceMappingURL=bc01.frame-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","BC01_FRAME_LENGTHS","f0","f2","f3","e0","e1","e2","e3","e4","e5","lower","byte","toLowerCase","Bc01FrameReader","readFrame","buffer","start","findIndex","Object","prototype","hasOwnProperty","call","status","INCOMPLETE","consumedBytes","length","opcode","undefined","COMPLETE","frame","slice","bc01FrameLengths"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/bc01/bc01.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAGlE;AACA,MAAMC,kBAAoD,GAAG;EAC3DC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE;AACN,CAAC;AAED,MAAMC,KAAK,GAAIC,IAAwB,IAAa,CAACA,IAAI,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAAwB;EACpCC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,CAAEN,IAAI,IAClCO,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACrB,kBAAkB,EAAEU,KAAK,CAACC,IAAI,CAAC,CACtE,CAAC;IAED,IAAIK,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLM,MAAM,EAAEvB,eAAe,CAACwB,UAAU;QAClCC,aAAa,EAAET,MAAM,CAACU;MACxB,CAAC;IACH;IAEA,MAAMC,MAAM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