@ovok/native 1.10.10 → 1.10.12

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 (418) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +20 -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-and-medical-variants.js +47 -0
  4. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-and-medical-variants.js.map +1 -0
  5. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js +119 -0
  6. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js.map +1 -0
  7. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js +6 -0
  8. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -1
  9. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-taidoc-variants.js +173 -0
  10. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-taidoc-variants.js.map +1 -0
  11. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js +107 -0
  12. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js.map +1 -0
  13. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +10 -0
  14. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
  15. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-yonker-variants.js +113 -0
  16. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-yonker-variants.js.map +1 -0
  17. package/lib/commonjs/modules/bt-device/constants/supported-devices.js +5 -37
  18. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  19. package/lib/commonjs/modules/bt-management/constants/and-medical-device-variants.js +39 -0
  20. package/lib/commonjs/modules/bt-management/constants/and-medical-device-variants.js.map +1 -0
  21. package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js +86 -0
  22. package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
  23. package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js +101 -0
  24. package/lib/commonjs/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
  25. package/lib/commonjs/modules/bt-management/constants/device-variants.js +6 -1
  26. package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  28. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js +5 -0
  30. package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/constants/taidoc-device-variants.js +144 -0
  32. package/lib/commonjs/modules/bt-management/constants/taidoc-device-variants.js.map +1 -0
  33. package/lib/commonjs/modules/bt-management/constants/transtek-a6-device-variants.js +89 -0
  34. package/lib/commonjs/modules/bt-management/constants/transtek-a6-device-variants.js.map +1 -0
  35. package/lib/commonjs/modules/bt-management/constants/yonker-device-variants.js +93 -0
  36. package/lib/commonjs/modules/bt-management/constants/yonker-device-variants.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/core/resolve-device-key.js +6 -0
  38. package/lib/commonjs/modules/bt-management/core/resolve-device-key.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +18 -0
  40. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/device-classes.js +27 -1
  42. package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/device-creator.js +5 -3
  44. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js +61 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +113 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js +77 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
  53. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +7 -25
  54. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +3 -2
  56. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +7 -2
  58. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  59. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js +86 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js +155 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js +33 -0
  64. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js +87 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +185 -0
  68. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +86 -0
  70. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +1 -1
  72. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
  73. package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js +10 -6
  74. package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -1
  75. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js +50 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +127 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.records.js +181 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.records.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js +139 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js +50 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.measurements.js +78 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.measurements.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +134 -0
  88. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +102 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js +51 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -0
  93. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js +48 -0
  94. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js +181 -0
  96. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js +73 -0
  98. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js +90 -0
  100. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -0
  101. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js +202 -0
  102. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -0
  103. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js +137 -0
  104. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.sequencer.js.map +1 -0
  105. package/lib/commonjs/modules/bt-management/types/clock-sync.js +2 -0
  106. package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
  107. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +19 -0
  108. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  109. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +20 -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-and-medical-variants.js +45 -0
  112. package/lib/module/modules/bt-device/constants/supported-device-catalog-and-medical-variants.js.map +1 -0
  113. package/lib/module/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js +117 -0
  114. package/lib/module/modules/bt-device/constants/supported-device-catalog-cofoe-variants.js.map +1 -0
  115. package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js +6 -0
  116. package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -1
  117. package/lib/module/modules/bt-device/constants/supported-device-catalog-taidoc-variants.js +171 -0
  118. package/lib/module/modules/bt-device/constants/supported-device-catalog-taidoc-variants.js.map +1 -0
  119. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js +105 -0
  120. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.js.map +1 -0
  121. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +10 -0
  122. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
  123. package/lib/module/modules/bt-device/constants/supported-device-catalog-yonker-variants.js +111 -0
  124. package/lib/module/modules/bt-device/constants/supported-device-catalog-yonker-variants.js.map +1 -0
  125. package/lib/module/modules/bt-device/constants/supported-devices.js +5 -37
  126. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  127. package/lib/module/modules/bt-management/constants/and-medical-device-variants.js +37 -0
  128. package/lib/module/modules/bt-management/constants/and-medical-device-variants.js.map +1 -0
  129. package/lib/module/modules/bt-management/constants/built-in-measurement-types.js +84 -0
  130. package/lib/module/modules/bt-management/constants/built-in-measurement-types.js.map +1 -0
  131. package/lib/module/modules/bt-management/constants/cofoe-device-variants.js +99 -0
  132. package/lib/module/modules/bt-management/constants/cofoe-device-variants.js.map +1 -0
  133. package/lib/module/modules/bt-management/constants/device-variants.js +6 -1
  134. package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -1
  135. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  136. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  137. package/lib/module/modules/bt-management/constants/standard-device-variants.js +5 -0
  138. package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -1
  139. package/lib/module/modules/bt-management/constants/taidoc-device-variants.js +142 -0
  140. package/lib/module/modules/bt-management/constants/taidoc-device-variants.js.map +1 -0
  141. package/lib/module/modules/bt-management/constants/transtek-a6-device-variants.js +87 -0
  142. package/lib/module/modules/bt-management/constants/transtek-a6-device-variants.js.map +1 -0
  143. package/lib/module/modules/bt-management/constants/yonker-device-variants.js +91 -0
  144. package/lib/module/modules/bt-management/constants/yonker-device-variants.js.map +1 -0
  145. package/lib/module/modules/bt-management/core/resolve-device-key.js +6 -0
  146. package/lib/module/modules/bt-management/core/resolve-device-key.js.map +1 -1
  147. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +18 -0
  148. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  149. package/lib/module/modules/bt-management/services/device-classes.js +27 -1
  150. package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
  151. package/lib/module/modules/bt-management/services/device-creator.js +5 -3
  152. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  153. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js +57 -0
  154. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -0
  155. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +106 -0
  156. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -0
  157. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js +74 -0
  158. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.sequencer.js.map +1 -0
  159. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +2 -2
  160. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
  161. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +6 -24
  162. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  163. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +3 -2
  164. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  165. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +7 -2
  166. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  167. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js +82 -0
  168. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.js.map +1 -0
  169. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js +148 -0
  170. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.js.map +1 -0
  171. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js +30 -0
  172. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.js.map +1 -0
  173. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js +83 -0
  174. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -0
  175. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +173 -0
  176. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -0
  177. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +78 -0
  178. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -0
  179. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +2 -2
  180. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
  181. package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js +10 -6
  182. package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -1
  183. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js +46 -0
  184. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -0
  185. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +114 -0
  186. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.records.js +168 -0
  188. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.records.js.map +1 -0
  189. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js +136 -0
  190. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.sequencer.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js +45 -0
  192. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.measurements.js +73 -0
  194. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.measurements.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +121 -0
  196. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -0
  197. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +97 -0
  198. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -0
  199. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js +46 -0
  200. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -0
  201. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js +43 -0
  202. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.measurements.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js +174 -0
  204. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.protocol.js.map +1 -0
  205. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js +68 -0
  206. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js +86 -0
  208. package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js +186 -0
  210. package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -0
  211. package/lib/module/modules/bt-management/services/devices/yonker/yonker.sequencer.js +133 -0
  212. package/lib/module/modules/bt-management/services/devices/yonker/yonker.sequencer.js.map +1 -0
  213. package/lib/module/modules/bt-management/types/clock-sync.js +2 -0
  214. package/lib/module/modules/bt-management/types/clock-sync.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 +19 -0
  217. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  218. package/lib/typescript/commonjs/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  219. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts +5 -0
  221. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts +5 -0
  223. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-taidoc-variants.d.ts +5 -0
  226. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-taidoc-variants.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts +5 -0
  228. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-yonker-variants.d.ts +5 -0
  231. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-yonker-variants.d.ts.map +1 -0
  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/constants/and-medical-device-variants.d.ts +5 -0
  234. package/lib/typescript/commonjs/src/modules/bt-management/constants/and-medical-device-variants.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/modules/bt-management/constants/built-in-measurement-types.d.ts +9 -0
  236. package/lib/typescript/commonjs/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/src/modules/bt-management/constants/cofoe-device-variants.d.ts +5 -0
  238. package/lib/typescript/commonjs/src/modules/bt-management/constants/cofoe-device-variants.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/modules/bt-management/constants/taidoc-device-variants.d.ts +5 -0
  243. package/lib/typescript/commonjs/src/modules/bt-management/constants/taidoc-device-variants.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-device-variants.d.ts +5 -0
  245. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-device-variants.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/src/modules/bt-management/constants/yonker-device-variants.d.ts +5 -0
  247. package/lib/typescript/commonjs/src/modules/bt-management/constants/yonker-device-variants.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/src/modules/bt-management/core/resolve-device-key.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts +26 -0
  251. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +18 -0
  254. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +30 -0
  256. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts +26 -0
  258. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +4 -1
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts +32 -0
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts +46 -0
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts +15 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +18 -0
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +75 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts +22 -0
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +6 -2
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +16 -0
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts +50 -0
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts +40 -0
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts +38 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +16 -0
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts +5 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +22 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +28 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +16 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts +6 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts +18 -0
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts +21 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +21 -0
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +62 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts +46 -0
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +1 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +20 -1
  312. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/src/modules/bt-management/types/frame-reader.d.ts +2 -1
  314. package/lib/typescript/commonjs/src/modules/bt-management/types/frame-reader.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +20 -1
  316. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +2 -2
  318. package/lib/typescript/module/src/modules/auth/hooks/use-sign-in.d.ts +1 -1
  319. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  320. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts +5 -0
  321. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-and-medical-variants.d.ts.map +1 -0
  322. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts +5 -0
  323. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-cofoe-variants.d.ts.map +1 -0
  324. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -1
  325. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-taidoc-variants.d.ts +5 -0
  326. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-taidoc-variants.d.ts.map +1 -0
  327. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts +5 -0
  328. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-variants.d.ts.map +1 -0
  329. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
  330. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-yonker-variants.d.ts +5 -0
  331. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-yonker-variants.d.ts.map +1 -0
  332. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  333. package/lib/typescript/module/src/modules/bt-management/constants/and-medical-device-variants.d.ts +5 -0
  334. package/lib/typescript/module/src/modules/bt-management/constants/and-medical-device-variants.d.ts.map +1 -0
  335. package/lib/typescript/module/src/modules/bt-management/constants/built-in-measurement-types.d.ts +9 -0
  336. package/lib/typescript/module/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -0
  337. package/lib/typescript/module/src/modules/bt-management/constants/cofoe-device-variants.d.ts +5 -0
  338. package/lib/typescript/module/src/modules/bt-management/constants/cofoe-device-variants.d.ts.map +1 -0
  339. package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts.map +1 -1
  340. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  341. package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -1
  342. package/lib/typescript/module/src/modules/bt-management/constants/taidoc-device-variants.d.ts +5 -0
  343. package/lib/typescript/module/src/modules/bt-management/constants/taidoc-device-variants.d.ts.map +1 -0
  344. package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-device-variants.d.ts +5 -0
  345. package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-device-variants.d.ts.map +1 -0
  346. package/lib/typescript/module/src/modules/bt-management/constants/yonker-device-variants.d.ts +5 -0
  347. package/lib/typescript/module/src/modules/bt-management/constants/yonker-device-variants.d.ts.map +1 -0
  348. package/lib/typescript/module/src/modules/bt-management/core/resolve-device-key.d.ts.map +1 -1
  349. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  350. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts +26 -0
  351. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  352. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  353. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +18 -0
  354. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -0
  355. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +30 -0
  356. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -0
  357. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts +26 -0
  358. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.sequencer.d.ts.map +1 -0
  359. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  360. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  361. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +4 -1
  362. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  363. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts +32 -0
  364. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-bp.sequencer.d.ts.map +1 -0
  365. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts +46 -0
  366. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-glucose.sequencer.d.ts.map +1 -0
  367. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts +15 -0
  368. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe-thermometer.sequencer.d.ts.map +1 -0
  369. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +18 -0
  370. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -0
  371. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +75 -0
  372. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -0
  373. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts +22 -0
  374. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -0
  375. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -1
  376. package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +6 -2
  377. package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -1
  378. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +16 -0
  379. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -0
  380. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts +50 -0
  381. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -0
  382. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts +40 -0
  383. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.records.d.ts.map +1 -0
  384. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts +38 -0
  385. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.sequencer.d.ts.map +1 -0
  386. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +16 -0
  387. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +1 -0
  388. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts +5 -0
  389. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.measurements.d.ts.map +1 -0
  390. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +22 -0
  391. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -0
  392. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +28 -0
  393. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -0
  394. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +16 -0
  395. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -0
  396. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts +6 -0
  397. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.measurements.d.ts.map +1 -0
  398. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts +18 -0
  399. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.protocol.d.ts.map +1 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts +21 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.sequencer.d.ts.map +1 -0
  402. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +21 -0
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -0
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +62 -0
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -0
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts +46 -0
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.sequencer.d.ts.map +1 -0
  408. package/lib/typescript/module/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
  409. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +1 -0
  410. package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts.map +1 -1
  411. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +20 -1
  412. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  413. package/lib/typescript/module/src/modules/bt-management/types/frame-reader.d.ts +2 -1
  414. package/lib/typescript/module/src/modules/bt-management/types/frame-reader.d.ts.map +1 -1
  415. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +20 -1
  416. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  417. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +2 -2
  418. package/package.json +1 -1
@@ -8,8 +8,9 @@ var _core = require("@ovok/core");
8
8
  var _caseType = require("../../types/case-type.js");
9
9
  var _hexToByte = require("../../utils/hex-to-byte.js");
10
10
  /**
11
- * Pulse oximeters that only notify live values - `PR SpO2 PI×10` after a header byte - with no
12
- * stored records and no clock: the AOJ-70A/70B and Jumper JPD-500D families.
11
+ * Pulse oximeters that only notify live values - `PR SpO2 PI×10` after a header byte (Yonker YK-81C:
12
+ * `SpO2 PR PI×10`, the AOJ header) - with no stored records and no clock: the AOJ-70A/70B, Jumper JPD-500D and
13
+ * Yonker YK-81C/YK-80B families.
13
14
  *
14
15
  * A spot reading is the last valid saturation and pulse once valid values stop for a few
15
16
  * seconds - the finger came out or the device went to sleep - which is also how MedM forms one.
@@ -19,6 +20,8 @@ const SETTLE_MS = 3_000;
19
20
 
20
21
  /** Picks the values frame out of whatever else the device sends (waveform, status). */
21
22
 
23
+ /** Which of pulse and SpO2 comes first after the header byte. */
24
+
22
25
  /** AOJ-70: header exactly `81`, extra bytes ignored. */
23
26
  const AOJ_VALUES = (header, length) => header === 0x81 && length >= 4;
24
27
 
@@ -28,12 +31,13 @@ const JUMPER_VALUES = (header, length) => (header & 0x0f) === 1 && length === 4;
28
31
 
29
32
  /** Pulse rate counts at 1-254 bpm, SpO2 is invalid at 0 or 0x7F, PI 0 means none. */
30
33
  exports.JUMPER_VALUES = JUMPER_VALUES;
31
- const readOximeterData = (frame, isValuesFrame = AOJ_VALUES) => {
34
+ const readOximeterData = (frame, isValuesFrame = AOJ_VALUES, fieldOrder = "pulse-spo2") => {
32
35
  if (!isValuesFrame((0, _hexToByte.hexToByte)(frame[0] ?? "00"), frame.length)) {
33
36
  return undefined;
34
37
  }
35
- const pulseRate = (0, _hexToByte.hexToByte)(frame[1] ?? "00");
36
- const bloodOxygen = (0, _hexToByte.hexToByte)(frame[2] ?? "00");
38
+ const first = (0, _hexToByte.hexToByte)(frame[1] ?? "00");
39
+ const second = (0, _hexToByte.hexToByte)(frame[2] ?? "00");
40
+ const [pulseRate, bloodOxygen] = fieldOrder === "pulse-spo2" ? [first, second] : [second, first];
37
41
  const perfusionIndex = (0, _hexToByte.hexToByte)(frame[3] ?? "00");
38
42
  if (pulseRate < 1 || pulseRate > 254 || bloodOxygen === 0 || bloodOxygen === 0x7f) {
39
43
  return undefined;
@@ -69,7 +73,7 @@ class LiveOximeterSequencer {
69
73
 
70
74
  /** A valid value restarts the settle time; anything else leaves it running. */
71
75
  commandProgress = frame => {
72
- const values = readOximeterData(frame, this.params.isValuesFrame);
76
+ const values = this.params.readValues(frame);
73
77
  if (!values) {
74
78
  return "ignored";
75
79
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_caseType","_hexToByte","SETTLE_MS","AOJ_VALUES","header","length","exports","JUMPER_VALUES","readOximeterData","frame","isValuesFrame","hexToByte","undefined","pulseRate","bloodOxygen","perfusionIndex","LiveOximeterSequencer","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","latest","onCommandTimeout","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","commandProgress","values","recordedAt","Date","nextCommand"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/live-oximeter.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,KAAK;;AASvB;;AAGA;AACA,MAAMC,UAAyB,GAAGA,CAACC,MAAM,EAAEC,MAAM,KAAKD,MAAM,KAAK,IAAI,IAAIC,MAAM,IAAI,CAAC;;AAEpF;AAAAC,OAAA,CAAAH,UAAA,GAAAA,UAAA;AACA,MAAMI,aAA4B,GAAGA,CAACH,MAAM,EAAEC,MAAM,KAAK,CAACD,MAAM,GAAG,IAAI,MAAM,CAAC,IAAIC,MAAM,KAAK,CAAC;;AAE9F;AAAAC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AACA,MAAMC,gBAAgB,GAAGA,CACvBC,KAAwB,EACxBC,aAA4B,GAAGP,UAAU,KACE;EAC3C,IAAI,CAACO,aAAa,CAAC,IAAAC,oBAAS,EAACF,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAEA,KAAK,CAACJ,MAAM,CAAC,EAAE;IAC7D,OAAOO,SAAS;EAClB;EAEA,MAAMC,SAAS,GAAG,IAAAF,oBAAS,EAACF,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;EAC7C,MAAMK,WAAW,GAAG,IAAA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IAEjE,IAAI,CAACsB,MAAM,EAAE;MACX,OAAO,SAAS;IAClB;IAEA,IAAI,CAACV,MAAM,GAAG;MAAE,GAAGU,MAAM;MAAEC,UAAU,EAAE,IAAIC,IAAI,CAAC;IAAE,CAAC;IAEnD,OAAO,SAAS;EAClB,CAAC;EAEMC,WAAW,GAAGA,CAAA,KAAiBvB,SAAS;AACjD;AAACN,OAAA,CAAAU,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_caseType","_hexToByte","SETTLE_MS","AOJ_VALUES","header","length","exports","JUMPER_VALUES","readOximeterData","frame","isValuesFrame","fieldOrder","hexToByte","undefined","first","second","pulseRate","bloodOxygen","perfusionIndex","LiveOximeterSequencer","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","latest","onCommandTimeout","onResult","caseType","CaseType","RESULT","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","commandProgress","values","readValues","recordedAt","Date","nextCommand"],"sourceRoot":"../../../../../../src","sources":["modules/bt-management/services/devices/live-oximeter.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,KAAK;;AAWvB;;AAGA;;AAGA;AACA,MAAMC,UAAyB,GAAGA,CAACC,MAAM,EAAEC,MAAM,KAAKD,MAAM,KAAK,IAAI,IAAIC,MAAM,IAAI,CAAC;;AAEpF;AAAAC,OAAA,CAAAH,UAAA,GAAAA,UAAA;AACA,MAAMI,aAA4B,GAAGA,CAACH,MAAM,EAAEC,MAAM,KAAK,CAACD,MAAM,GAAG,IAAI,MAAM,CAAC,IAAIC,MAAM,KAAK,CAAC;;AAE9F;AAAAC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AACA,MAAMC,gBAAgB,GAAGA,CACvBC,KAAwB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AU;EAElFa,gBAAgB,GAAGA,CAAA,KAA4B;IACpD,MAAMD,MAAM,GAAG,IAAI,CAACA,MAAM;IAE1B,IAAI,CAACA,MAAM,GAAGZ,SAAS;IAEvB,IAAIY,MAAM,EAAE;MACV,IAAI,CAACJ,MAAM,CAACM,QAAQ,CAAC;QACnBC,QAAQ,EAAEC,kBAAQ,CAACC,MAAM;QACzBC,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;QAC3D,GAAGR;MACL,CAAC,CAAC;IACJ;IAEA,OAAO,CAAC,CAAC;EACX,CAAC;;EAED;EACOS,eAAe,GAAIzB,KAAwB,IAAyC;IACzF,MAAM0B,MAAM,GAAG,IAAI,CAACd,MAAM,CAACe,UAAU,CAAC3B,KAAK,CAAC;IAE5C,IAAI,CAAC0B,MAAM,EAAE;MACX,OAAO,SAAS;IAClB;IAEA,IAAI,CAACV,MAAM,GAAG;MAAE,GAAGU,MAAM;MAAEE,UAAU,EAAE,IAAIC,IAAI,CAAC;IAAE,CAAC;IAEnD,OAAO,SAAS;EAClB,CAAC;EAEMC,WAAW,GAAGA,CAAA,KAAiB1B,SAAS;AACjD;AAACP,OAAA,CAAAa,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TaidocDevice = void 0;
7
+ var _integratedDevices = require("../../../types/integrated-devices.js");
8
+ var _btManagedDevice = require("../bt-managed-device.js");
9
+ var _taidocProtocol = require("./taidoc.protocol.js");
10
+ var _taidocSequencer = require("./taidoc.sequencer.js");
11
+ const KIND = {
12
+ [_integratedDevices.IntegratedDevices.TAIDOC_MULTI]: "multi",
13
+ [_integratedDevices.IntegratedDevices.TAIDOC_BPM]: "bpm",
14
+ [_integratedDevices.IntegratedDevices.TAIDOC_THERMOMETER]: "thermometer",
15
+ [_integratedDevices.IntegratedDevices.TAIDOC_OXIMETER]: "oximeter",
16
+ [_integratedDevices.IntegratedDevices.TAIDOC_SCALE]: "scale"
17
+ };
18
+
19
+ /** The sequencer decodes records itself; the declarative parser only passes frames on. */
20
+ const passThrough = {
21
+ caseValuePosition: [],
22
+ cases: []
23
+ };
24
+ const taidocMainServices = [{
25
+ uuid: _taidocProtocol.TAIDOC_SERVICE,
26
+ monitorUuids: [{
27
+ uuid: _taidocProtocol.TAIDOC_CHARACTERISTIC,
28
+ parsingModel: passThrough
29
+ }]
30
+ }];
31
+
32
+ /** TaiDoc and FORA meters on the 0x51 command protocol: history download of every device user. */
33
+ class TaidocDeviceClass extends _btManagedDevice.BTManagedDevice {
34
+ mainServices = taidocMainServices;
35
+ stuckDataTimeout = 90_000;
36
+ onStreamStart = undefined;
37
+ constructor(device, params) {
38
+ super(device, params);
39
+ this.frameReader = new _taidocProtocol.TaidocFrameReader();
40
+ this.createCommandSequencer = () => new _taidocSequencer.TaidocSequencer({
41
+ kind: KIND[params.deviceName],
42
+ onResult: result => this.onResult?.(result)
43
+ });
44
+ }
45
+ handleSuccessResult() {
46
+ return;
47
+ }
48
+ }
49
+ exports.TaidocDevice = TaidocDeviceClass;
50
+ //# sourceMappingURL=taidoc.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_integratedDevices","require","_btManagedDevice","_taidocProtocol","_taidocSequencer","KIND","IntegratedDevices","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","passThrough","caseValuePosition","cases","taidocMainServices","uuid","TAIDOC_SERVICE","monitorUuids","TAIDOC_CHARACTERISTIC","parsingModel","TaidocDeviceClass","BTManagedDevice","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","frameReader","TaidocFrameReader","createCommandSequencer","TaidocSequencer","kind","deviceName","onResult","result","handleSuccessResult","exports","TaidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.device.ts"],"mappings":";;;;;;AAIA,IAAAA,kBAAA,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+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.weightRecordCommand = exports.usersFor = exports.taidocCommand = exports.setTimeCommand = exports.readingCountCommand = exports.readingCommand = exports.readCount = exports.isHostFrame = exports.commandOf = exports.TaidocFrameReader = exports.TAIDOC_SERVICE = exports.TAIDOC_CHARACTERISTIC = exports.TAIDOC = void 0;
7
+ var _frameReadStatus = require("../../../types/frame-read-status.js");
8
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
9
+ /* eslint-disable import/group-exports */
10
+
11
+ /**
12
+ * TaiDoc's "0x51" command protocol, shared by its glucose meters, blood-pressure monitors,
13
+ * thermometers, pulse oximeters and scales. Layouts are from MedM Health Diary 3.12.11's
14
+ * `CTaiDocCommandDevice` and its per-driver subclasses.
15
+ *
16
+ * A frame is `51 cmd d0 d1 d2 d3 end cs`: `end` is A3 from the app and A5 from the device, and
17
+ * `cs` is the 8-bit sum of every byte before it. The scale's record and set-user frames are
18
+ * variable, `51 cmd LL data[LL] end cs`. One characteristic is both written and notified, so
19
+ * the device echoes every command back; an A3-terminated frame is that echo.
20
+ */
21
+ const TAIDOC_SERVICE = exports.TAIDOC_SERVICE = "00001523-1212-efde-1523-785feabcd123";
22
+ const TAIDOC_CHARACTERISTIC = exports.TAIDOC_CHARACTERISTIC = "00001524-1212-efde-1523-785feabcd123";
23
+ const TAIDOC = exports.TAIDOC = {
24
+ wakeUp: 0x22,
25
+ deviceTime: 0x23,
26
+ model: 0x24,
27
+ readingTime: 0x25,
28
+ readingResult: 0x26,
29
+ serial1: 0x27,
30
+ serial2: 0x28,
31
+ oximeterAfterTime: 0x29,
32
+ readingCount: 0x2b,
33
+ setTime: 0x33,
34
+ shutdown: 0x50,
35
+ wakeNotice: 0x54,
36
+ weightRecord: 0x71,
37
+ setUser: 0x72,
38
+ busy: 0xe0
39
+ };
40
+ const START = 0x51;
41
+ const HOST_END = 0xa3;
42
+ const DEVICE_END = 0xa5;
43
+ const FIXED_FRAME_BYTES = 8;
44
+ const VARIABLE_COMMANDS = [TAIDOC.weightRecord, TAIDOC.setUser];
45
+ const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
46
+ const byteAt = (frame, index) => (0, _hexToByte.hexToByte)(frame[index] ?? "00");
47
+ const sum = bytes => bytes.reduce((total, value) => total + value, 0) & 0xff;
48
+ const withChecksum = bytes => toHex([...bytes, sum(bytes)]);
49
+ const commandOf = frame => byteAt(frame, 1);
50
+
51
+ /** `51 cmd a b c d A3 cs`. */
52
+ exports.commandOf = commandOf;
53
+ const taidocCommand = (command, a = 0, b = 0, c = 0, d = 0) => withChecksum([START, command, a, b, c, d, HOST_END]);
54
+ exports.taidocCommand = taidocCommand;
55
+ const readingCountCommand = user => taidocCommand(TAIDOC.readingCount, user);
56
+ exports.readingCountCommand = readingCountCommand;
57
+ const readingCommand = (command, index, user) => taidocCommand(command, index & 0xff, index >> 8 & 0xff, 0, user);
58
+
59
+ /** `date16 = yy << 9 | month << 5 | day`, then minute and hour; the meter keeps local time. */
60
+ exports.readingCommand = readingCommand;
61
+ const setTimeCommand = now => {
62
+ const date = now.getFullYear() % 100 << 9 | now.getMonth() + 1 << 5 | now.getDate();
63
+ return taidocCommand(TAIDOC.setTime, date & 0xff, date >> 8, now.getMinutes(), now.getHours());
64
+ };
65
+
66
+ /** The scale's record request, `51 71 02 idxLo idxHi A3 cs`. */
67
+ exports.setTimeCommand = setTimeCommand;
68
+ const weightRecordCommand = index => withChecksum([START, TAIDOC.weightRecord, 2, index & 0xff, index >> 8 & 0xff, HOST_END]);
69
+
70
+ /** The app's own command, echoed back on the shared characteristic. */
71
+ exports.weightRecordCommand = weightRecordCommand;
72
+ const isHostFrame = frame => byteAt(frame, frame.length - 2) === HOST_END;
73
+
74
+ /** Isolates 0x51 frames whatever the notification boundaries, skipping noise to the next start. */
75
+ exports.isHostFrame = isHostFrame;
76
+ class TaidocFrameReader {
77
+ readFrame(buffer) {
78
+ const start = buffer.findIndex(byte => (0, _hexToByte.hexToByte)(byte) === START);
79
+ if (start === -1) {
80
+ return {
81
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
82
+ consumedBytes: buffer.length
83
+ };
84
+ }
85
+ if (start + 3 > buffer.length) {
86
+ return {
87
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
88
+ consumedBytes: start
89
+ };
90
+ }
91
+ const length = VARIABLE_COMMANDS.includes(byteAt(buffer, start + 1)) ? byteAt(buffer, start + 2) + 5 : FIXED_FRAME_BYTES;
92
+ if (start + length > buffer.length) {
93
+ return {
94
+ status: _frameReadStatus.FrameReadStatus.INCOMPLETE,
95
+ consumedBytes: start
96
+ };
97
+ }
98
+ const received = buffer.slice(start, start + length);
99
+ const bytes = received.map(byte => (0, _hexToByte.hexToByte)(byte));
100
+ const end = bytes[length - 2];
101
+ if (end !== HOST_END && end !== DEVICE_END || sum(bytes.slice(0, -1)) !== bytes[length - 1]) {
102
+ return {
103
+ status: _frameReadStatus.FrameReadStatus.CORRUPT,
104
+ consumedBytes: start + 1
105
+ };
106
+ }
107
+ return {
108
+ status: _frameReadStatus.FrameReadStatus.COMPLETE,
109
+ consumedBytes: start + length,
110
+ frame: received
111
+ };
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Device users by the project code of the 0x24 answer (`d0 | d1 << 8`), from
117
+ * `CTaiDocBTM::OnProjectCode`. Any other code is a single-user meter.
118
+ */
119
+ exports.TaidocFrameReader = TaidocFrameReader;
120
+ const MULTI_USER_CODES = new Set([0x3128, 0x3132, 0x3252, 0x3261]);
121
+ const usersFor = model => MULTI_USER_CODES.has(byteAt(model, 2) | byteAt(model, 3) << 8) ? 4 : 1;
122
+
123
+ /** The 0x2B answer: the current user's record count, little-endian. */
124
+ exports.usersFor = usersFor;
125
+ const readCount = frame => byteAt(frame, 2) | byteAt(frame, 3) << 8;
126
+ exports.readCount = readCount;
127
+ //# sourceMappingURL=taidoc.protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_frameReadStatus","require","_hexToByte","TAIDOC_SERVICE","exports","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","toHex","bytes","map","value","toString","padStart","byteAt","frame","index","hexToByte","sum","reduce","total","withChecksum","commandOf","taidocCommand","command","a","b","c","d","readingCountCommand","user","readingCommand","setTimeCommand","now","date","getFullYear","getMonth","getDate","getMinutes","getHours","weightRecordCommand","isHostFrame","length","TaidocFrameReader","readFrame","buffer","start","findIndex","byte","status","FrameReadStatus","INCOMPLETE","consumedBytes","includes","received","slice","end","CORRUPT","COMPLETE","MULTI_USER_CODES","Set","usersFor","has","readCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.protocol.ts"],"mappings":";;;;;;AAGA,IAAAA,gBAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AALA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,sCAAsC;AAC7D,MAAME,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,GAAG,sCAAsC;AAEpE,MAAMC,MAAM,GAAAF,OAAA,CAAAE,MAAA,GAAG;EACpBC,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI;EAChBC,KAAK,EAAE,IAAI;EACXC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,OAAO,EAAE,IAAI;EACbC,OAAO,EAAE,IAAI;EACbC,iBAAiB,EAAE,IAAI;EACvBC,YAAY,EAAE,IAAI;EAClBC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,YAAY,EAAE,IAAI;EAClBC,OAA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AAU,IAAKa,GAAG,CAACT,KAAK,CAAC8C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK9C,KAAK,CAACiC,MAAM,GAAG,CAAC,CAAC,EAAE;MAC7F,OAAO;QAAEO,MAAM,EAAEC,gCAAe,CAACO,OAAO;QAAEL,aAAa,EAAEN,KAAK,GAAG;MAAE,CAAC;IACtE;IAEA,OAAO;MAAEG,MAAM,EAAEC,gCAAe,CAACQ,QAAQ;MAAEN,aAAa,EAAEN,KAAK,GAAGJ,MAAM;MAAE3B,KAAK,EAAEuC;IAAS,CAAC;EAC7F;AACF;;AAEA;AACA;AACA;AACA;AAHArE,OAAA,CAAA0D,iBAAA,GAAAA,iBAAA;AAIA,MAAMgB,gBAAqC,GAAG,IAAIC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhF,MAAMC,QAAQ,GAAIvE,KAAwB,IAC/CqE,gBAAgB,CAACG,GAAG,CAAChD,MAAM,CAACxB,KAAK,EAAE,CAAC,CAAC,GAAIwB,MAAM,CAACxB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,GAAG,CAAC;;AAE1E;AAAAL,OAAA,CAAA4E,QAAA,GAAAA,QAAA;AACO,MAAME,SAAS,GAAIhD,KAAwB,IAChDD,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,GAAID,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE;AAAC9B,OAAA,CAAA8E,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.readWeight = exports.readTemperature = exports.readRecordTime = exports.readOximeter = exports.readGlucose = exports.readBloodPressure = exports.isPatientGlucoseRecord = exports.isBloodPressureRecord = exports.decodeWeightRecord = exports.decodeRecord = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _hexToByte = require("../../../utils/hex-to-byte.js");
9
+ /* eslint-disable import/group-exports */
10
+
11
+ /**
12
+ * TaiDoc record layouts, from MedM Health Diary 3.12.11's `CTaiDocBTM`, `CTaiDocTM`,
13
+ * `CTaiDoc_8255` and `CTaiDocW` parsers. A record is the 0x25 answer (its time and flags) and
14
+ * the 0x26 answer (its values); the scale's 0x71 record carries both.
15
+ */
16
+ const byteAt = (frame, index) => (0, _hexToByte.hexToByte)(frame[index] ?? "00");
17
+
18
+ /** The 0x25 answer's flags byte: bits 0-5 minute, 6 irregular pulse, 7 blood-pressure record. */
19
+ const FLAGS_BYTE = 4;
20
+ const isBloodPressureRecord = time => (byteAt(time, FLAGS_BYTE) & 0x80) !== 0;
21
+
22
+ /**
23
+ * The record time in a 0x25 answer: `date16` as in set time, minute and hour. A year byte past
24
+ * 2069 is MedM's "clock not valid", and such a record is dropped rather than given today's date.
25
+ */
26
+ exports.isBloodPressureRecord = isBloodPressureRecord;
27
+ const readRecordTime = time => {
28
+ const date = byteAt(time, 2) | byteAt(time, 3) << 8;
29
+ const year = date >> 9;
30
+ const month = date >> 5 & 0x0f;
31
+ const day = date & 0x1f;
32
+ if (year > 69 || month < 1 || month > 12 || day < 1) {
33
+ return undefined;
34
+ }
35
+ return new Date(2000 + year, month - 1, day, byteAt(time, 5) & 0x1f, byteAt(time, FLAGS_BYTE) & 0x3f);
36
+ };
37
+
38
+ /** 0x26 blood pressure: systolic, mean arterial pressure, diastolic, pulse. */
39
+ exports.readRecordTime = readRecordTime;
40
+ const readBloodPressure = (time, result) => {
41
+ const systolic = byteAt(result, 2);
42
+ const diastolic = byteAt(result, 4);
43
+ if (systolic === 0 || diastolic === 0) {
44
+ return undefined;
45
+ }
46
+ return {
47
+ systolic,
48
+ diastolic,
49
+ heartRate: byteAt(result, 5),
50
+ ...((byteAt(time, FLAGS_BYTE) & 0x40) !== 0 ? {
51
+ irregularHeartbeat: true
52
+ } : {})
53
+ };
54
+ };
55
+
56
+ /**
57
+ * Frame byte 5 of the 0x26 stored result is d3: bits 6-7 the meal flag, where `11` marks a
58
+ * control-solution test, and on multi-parameter meters bits 2-5 the parameter - 0 glucose;
59
+ * 6 haematocrit, 7 ketone, 8 uric acid, 9 cholesterol, 11 haemoglobin, 12 lactate,
60
+ * 13 triglycerides. Single-parameter TaiDoc meters keep the strip code in bits 2-5 instead,
61
+ * so this check holds only for multi-parameter ones.
62
+ */
63
+ exports.readBloodPressure = readBloodPressure;
64
+ const CONTROL_SOLUTION_FLAG = 0b11;
65
+ const GLUCOSE_PARAMETER = 0;
66
+
67
+ /** A stored TaiDoc result is a patient glucose reading, not another analyte or a control test. */
68
+ const isPatientGlucoseRecord = result => {
69
+ const flags = byteAt(result, 5);
70
+ return flags >> 6 !== CONTROL_SOLUTION_FLAG && (flags >> 2 & 0x0f) === GLUCOSE_PARAMETER;
71
+ };
72
+
73
+ /**
74
+ * 0x26 glucose, mg/dL little-endian in d0-d1. The meters on this parser are glucose-only or
75
+ * BP+glucose, whose bits 2-5 may hold a strip code, so only control-solution tests are dropped.
76
+ */
77
+ exports.isPatientGlucoseRecord = isPatientGlucoseRecord;
78
+ const readGlucose = result => {
79
+ const bloodGlucose = byteAt(result, 2) | byteAt(result, 3) << 8;
80
+ return bloodGlucose > 0 && byteAt(result, 5) >> 6 !== CONTROL_SOLUTION_FLAG ? bloodGlucose : undefined;
81
+ };
82
+
83
+ /** 0x26 temperature, tenths of a degree Celsius; above 60.0 is MedM's object (surface) mode. */
84
+ exports.readGlucose = readGlucose;
85
+ const readTemperature = result => {
86
+ const tenths = byteAt(result, 2) | byteAt(result, 3) << 8;
87
+ return tenths > 0 && tenths <= 600 ? tenths / 10 : undefined;
88
+ };
89
+
90
+ /** 0x26 pulse oximetry: SpO2 % in d0-d1, pulse in d3. */
91
+ exports.readTemperature = readTemperature;
92
+ const readOximeter = result => {
93
+ const bloodOxygen = byteAt(result, 2) | byteAt(result, 3) << 8;
94
+ const pulseRate = byteAt(result, 5);
95
+ return bloodOxygen > 0 && bloodOxygen <= 100 && pulseRate > 0 ? {
96
+ bloodOxygen,
97
+ pulseRate
98
+ } : undefined;
99
+ };
100
+
101
+ /**
102
+ * The scale's 34-byte 0x71 record: yy MM dd hh mm at 4-8, user at 9, a unit selector at 15 and
103
+ * the weight in tenths, big-endian, at 16. Selector 1 puts the weight in a second slot in a unit
104
+ * MedM does not name, so it is dropped rather than guessed. Body composition is not decoded:
105
+ * which quantity each of its fields carries is not known.
106
+ */
107
+ exports.readOximeter = readOximeter;
108
+ const readWeight = record => {
109
+ const year = byteAt(record, 4);
110
+ const month = byteAt(record, 5);
111
+ const selector = byteAt(record, 0x0f);
112
+ const tenths = byteAt(record, 0x10) << 8 | byteAt(record, 0x11);
113
+ if (record.length !== 34 || selector !== 0 && selector !== 2 || tenths === 0 || year > 69 || month < 1 || month > 12) {
114
+ return undefined;
115
+ }
116
+ return {
117
+ bodyWeight: tenths / 10,
118
+ recordedAt: new Date(2000 + year, month - 1, byteAt(record, 6), byteAt(record, 7), byteAt(record, 8)),
119
+ user: byteAt(record, 9)
120
+ };
121
+ };
122
+
123
+ /** What the 0x26 record holds: `multi` is glucose or blood pressure by the type bit, `bpm` always blood pressure. */
124
+ exports.readWeight = readWeight;
125
+ const readValues = (kind, time, result) => {
126
+ if (kind === "bpm" || kind === "multi" && isBloodPressureRecord(time)) {
127
+ const reading = readBloodPressure(time, result);
128
+ return reading && {
129
+ measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
130
+ ...reading
131
+ };
132
+ }
133
+ if (kind === "multi") {
134
+ const bloodGlucose = readGlucose(result);
135
+ return bloodGlucose === undefined ? undefined : {
136
+ measurementTypeKey: _core.MeasurementTypeKey.bloodGlucose,
137
+ bloodGlucose
138
+ };
139
+ }
140
+ if (kind === "thermometer") {
141
+ const bodyTemp = readTemperature(result);
142
+ return bodyTemp === undefined ? undefined : {
143
+ measurementTypeKey: _core.MeasurementTypeKey.temperature,
144
+ bodyTemp
145
+ };
146
+ }
147
+ const reading = kind === "oximeter" ? readOximeter(result) : undefined;
148
+ return reading && {
149
+ measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
150
+ ...reading
151
+ };
152
+ };
153
+
154
+ /** One 0x25/0x26 record pair as a result, or undefined when it is invalid or not a reading. */
155
+ const decodeRecord = (kind, time, result, user) => {
156
+ const recordedAt = readRecordTime(time);
157
+ const values = recordedAt && readValues(kind, time, result);
158
+ return values && {
159
+ ...values,
160
+ recordedAt,
161
+ ...(user > 0 ? {
162
+ memorySlot: user
163
+ } : {})
164
+ };
165
+ };
166
+
167
+ /** The scale's 0x71 record as a result. */
168
+ exports.decodeRecord = decodeRecord;
169
+ const decodeWeightRecord = record => {
170
+ const weight = readWeight(record);
171
+ return weight && {
172
+ measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
173
+ bodyWeight: weight.bodyWeight,
174
+ recordedAt: weight.recordedAt,
175
+ ...(weight.user > 0 ? {
176
+ memorySlot: weight.user
177
+ } : {})
178
+ };
179
+ };
180
+ exports.decodeWeightRecord = decodeWeightRecord;
181
+ //# sourceMappingURL=taidoc.records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_hexToByte","byteAt","frame","index","hexToByte","FLAGS_BYTE","isBloodPressureRecord","time","exports","readRecordTime","date","year","month","day","undefined","Date","readBloodPressure","result","systolic","diastolic","heartRate","irregularHeartbeat","CONTROL_SOLUTION_FLAG","GLUCOSE_PARAMETER","isPatientGlucoseRecord","flags","readGlucose","bloodGlucose","readTemperature","tenths","readOximeter","bloodOxygen","pulseRate","readWeight","record","selector","length","bodyWeight","recordedAt","user","readValues","kind","reading","measurementTypeKey","MeasurementTypeKey","bloodPressure","bodyTemp","temperature","bloodOxygenPulseRate","decodeRecord","values","memorySlot","decodeWeightRecord","weight"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.records.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAA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7
+ var _caseType = require("../../../types/case-type.js");
8
+ var _taidocProtocol = require("./taidoc.protocol.js");
9
+ var _taidocRecords = require("./taidoc.records.js");
10
+ /** MedM's wait after connecting before the first command: 1.5 s, 3 s for the 8255, 8 s for the cuff. */
11
+ const START_DELAY_MS = {
12
+ multi: 1_500,
13
+ bpm: 8_000,
14
+ thermometer: 1_500,
15
+ oximeter: 3_000,
16
+ scale: 1_500
17
+ };
18
+
19
+ /** The scale paces its record requests 250 ms apart. */
20
+ const SCALE_RECORD_DELAY_MS = 250;
21
+ const RESPONSE_TIMEOUT_MS = 3_000;
22
+ const RETRIES = 3;
23
+
24
+ /**
25
+ * MedM's history session: model, serial, device time, set time, then for every device user the
26
+ * record count and each record by index (record time 0x25, then result 0x26; the scale's 0x71
27
+ * carries both). It ends with power off 0x50; the clear-memory command 0x52 is never sent.
28
+ */
29
+ class TaidocSequencer {
30
+ retries = RETRIES;
31
+ ended = false;
32
+ user = 0;
33
+ maxUser = 0;
34
+ count = 0;
35
+ index = 0;
36
+ recordTime = [];
37
+ constructor(params) {
38
+ this.params = params;
39
+ }
40
+ initialCommands = () => [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.model), START_DELAY_MS[this.params.kind])];
41
+ isHistoryTransfer = () => true;
42
+ isNormalDisconnect = () => this.ended;
43
+ commandTimeoutMs = () => this.ended ? undefined : RESPONSE_TIMEOUT_MS;
44
+ onCommandTimeout = () => {
45
+ if (this.retries === 0 || !this.last) {
46
+ return {
47
+ terminal: true
48
+ };
49
+ }
50
+ this.retries -= 1;
51
+ return {
52
+ commands: [this.last]
53
+ };
54
+ };
55
+ commandProgress = frame => (0, _taidocProtocol.isHostFrame)(frame) ? "ignored" : "complete";
56
+ nextCommand = frame => {
57
+ if ((0, _taidocProtocol.isHostFrame)(frame) || this.ended) {
58
+ return undefined;
59
+ }
60
+ this.retries = RETRIES;
61
+ switch ((0, _taidocProtocol.commandOf)(frame)) {
62
+ case _taidocProtocol.TAIDOC.busy:
63
+ return this.last && [this.last];
64
+ case _taidocProtocol.TAIDOC.wakeUp:
65
+ case _taidocProtocol.TAIDOC.wakeNotice:
66
+ return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.model))];
67
+ case _taidocProtocol.TAIDOC.model:
68
+ {
69
+ const users = (0, _taidocProtocol.usersFor)(frame);
70
+ this.user = users > 1 ? 1 : 0;
71
+ this.maxUser = users > 1 ? users : 0;
72
+ return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.serial1))];
73
+ }
74
+ case _taidocProtocol.TAIDOC.serial1:
75
+ return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.serial2))];
76
+ case _taidocProtocol.TAIDOC.serial2:
77
+ return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.deviceTime))];
78
+ case _taidocProtocol.TAIDOC.deviceTime:
79
+ return [this.send((0, _taidocProtocol.setTimeCommand)(this.now()))];
80
+ case _taidocProtocol.TAIDOC.setTime:
81
+ return [this.send(this.params.kind === "oximeter" ? (0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.oximeterAfterTime) : (0, _taidocProtocol.readingCountCommand)(this.user))];
82
+ case _taidocProtocol.TAIDOC.oximeterAfterTime:
83
+ return [this.send((0, _taidocProtocol.readingCountCommand)(this.user))];
84
+ case _taidocProtocol.TAIDOC.readingCount:
85
+ this.count = (0, _taidocProtocol.readCount)(frame);
86
+ this.index = 0;
87
+ return this.nextReading();
88
+ case _taidocProtocol.TAIDOC.readingTime:
89
+ this.recordTime = frame;
90
+ return [this.send((0, _taidocProtocol.readingCommand)(_taidocProtocol.TAIDOC.readingResult, this.index - 1, this.user))];
91
+ case _taidocProtocol.TAIDOC.readingResult:
92
+ this.report((0, _taidocRecords.decodeRecord)(this.params.kind, this.recordTime, frame, this.user));
93
+ return this.nextReading();
94
+ case _taidocProtocol.TAIDOC.weightRecord:
95
+ this.report((0, _taidocRecords.decodeWeightRecord)(frame));
96
+ return this.nextReading();
97
+ default:
98
+ return undefined;
99
+ }
100
+ };
101
+
102
+ /** Requests the next index, then the next user's count, then powers the device off. */
103
+ nextReading = () => {
104
+ if (this.index < this.count) {
105
+ const index = this.index;
106
+ this.index += 1;
107
+ return [this.params.kind === "scale" ? this.send((0, _taidocProtocol.weightRecordCommand)(index), SCALE_RECORD_DELAY_MS) : this.send((0, _taidocProtocol.readingCommand)(_taidocProtocol.TAIDOC.readingTime, index, this.user))];
108
+ }
109
+ if (this.user < this.maxUser) {
110
+ this.user += 1;
111
+ return [this.send((0, _taidocProtocol.readingCountCommand)(this.user))];
112
+ }
113
+ this.ended = true;
114
+ return [this.send((0, _taidocProtocol.taidocCommand)(_taidocProtocol.TAIDOC.shutdown))];
115
+ };
116
+ report = reading => {
117
+ if (reading) {
118
+ this.params.onResult({
119
+ caseType: _caseType.CaseType.RESULT,
120
+ ...reading
121
+ });
122
+ }
123
+ };
124
+ now = () => this.params.now?.() ?? new Date();
125
+ send = (frame, delayBeforeWriteMs) => {
126
+ // A re-send goes out at once: the start delay only settles the link after connecting.
127
+ this.last = {
128
+ serviceUuid: _taidocProtocol.TAIDOC_SERVICE,
129
+ characteristicUuid: _taidocProtocol.TAIDOC_CHARACTERISTIC,
130
+ frame
131
+ };
132
+ return delayBeforeWriteMs ? {
133
+ ...this.last,
134
+ delayBeforeWriteMs
135
+ } : this.last;
136
+ };
137
+ }
138
+ exports.TaidocSequencer = TaidocSequencer;
139
+ //# sourceMappingURL=taidoc.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_caseType","require","_taidocProtocol","_taidocRecords","START_DELAY_MS","multi","bpm","thermometer","oximeter","scale","SCALE_RECORD_DELAY_MS","RESPONSE_TIMEOUT_MS","RETRIES","TaidocSequencer","retries","ended","user","maxUser","count","index","recordTime","constructor","params","initialCommands","send","taidocCommand","TAIDOC","model","kind","isHistoryTransfer","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","last","terminal","commands","commandProgress","frame","isHostFrame","nextCommand","commandOf","busy","wakeUp","wakeNotice","users","usersFor","serial1","serial2","deviceTime","setTimeCommand","now","setTime","oximeterAfterTime","readingCountCommand","readingCount","readCount","nextReading","readingTime","readingCommand","readingResult","report","decodeRecord","weightRecord","decodeWeightRecord","weightRecordCommand","shutdown","reading","onResult","caseType","CaseType","RESULT","Date","delayBeforeWriteMs","serviceUuid","TAIDOC_SERVICE","characteristicUuid","TAIDOC_CHARACTERISTIC","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.sequencer.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAcA,IAAAE,cAAA,GAAAF,OAAA;AAEA;AACA,MAAMG,cAA0C,GAAG;EACjDC,KAAK,EAAE,KAAK;EACZC,GAAG,EAAE,KAAK;EACVC,WAAW,EAAE,KAAK;EAClBC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAE;AACT,CAAC;;AAED;AACA,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,mBAAmB,GAAG,KAAK;AACjC,MAAMC,OAAO,GAAG,CAAC;;AAEjB;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,CAA6B;EAExCC,OAAO,GAAGF,OAAO;EACjBG,KAAK,GAAG,KAAK;EACbC,IAAI,GAAG,CAAC;EACRC,OAAO,GAAG,CAAC;EACXC,KAAK,GAAG,CAAC;EACTC,KAAK,GAAG,CAAC;EACTC,UAAU,GAAsB,EAAE;EAEnCC,WAAWA,CACCC,MAIhB,EACD;IAAA,KALiBA,MAIhB,GAJgBA,MAIhB;EACA;EAEIC,eAAe,GAAGA,CAAA,KAAgC,CACvD,IAAI,CAACC,IAAI,CAAC,IAAAC,6BAAa,EAACC,sBAAM,CAACC,KAAK,CAAC,EAAEvB,cAAc,CAAC,IAAI,CAACkB,MAAM,CAACM,IAAI,CAAC,CAAC,CACzE;EA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