@ovok/native 1.6.43 → 1.6.45

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 (194) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +8 -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-devices.js +41 -0
  4. package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
  5. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  6. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +3 -0
  8. package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  9. package/lib/commonjs/modules/bt-management/services/device-creator.js +15 -1
  10. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  11. package/lib/commonjs/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  12. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js +46 -0
  13. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -0
  14. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.protocol.js +79 -0
  15. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.protocol.js.map +1 -0
  16. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.sequencer.js +37 -0
  17. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.sequencer.js.map +1 -0
  18. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +50 -0
  19. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
  20. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +115 -0
  21. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
  22. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +58 -0
  23. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
  24. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +41 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
  26. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +61 -0
  27. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
  28. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +41 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
  30. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +50 -0
  31. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
  32. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +141 -0
  33. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
  34. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +76 -0
  35. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +50 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
  38. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +149 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
  40. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +81 -0
  41. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +50 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +228 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +122 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
  48. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +7 -0
  49. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  50. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +8 -1
  51. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  52. package/lib/module/modules/bt-device/constants/supported-devices.js +41 -0
  53. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  54. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  55. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  56. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +3 -0
  57. package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
  58. package/lib/module/modules/bt-management/services/device-creator.js +15 -1
  59. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  60. package/lib/module/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  61. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js +41 -0
  62. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -0
  63. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.protocol.js +71 -0
  64. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.protocol.js.map +1 -0
  65. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.sequencer.js +32 -0
  66. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.sequencer.js.map +1 -0
  67. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +45 -0
  68. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
  69. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +106 -0
  70. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
  71. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +53 -0
  72. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
  73. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +36 -0
  74. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
  75. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +55 -0
  76. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
  77. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +36 -0
  78. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
  79. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +45 -0
  80. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
  81. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +130 -0
  82. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
  83. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +71 -0
  84. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
  85. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +45 -0
  86. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
  87. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +136 -0
  88. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
  89. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +76 -0
  90. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
  91. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +45 -0
  92. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
  93. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +209 -0
  94. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
  95. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +117 -0
  96. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
  97. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  98. package/lib/module/modules/bt-management/types/integrated-devices.js +7 -0
  99. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  100. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts +5 -3
  106. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +16 -0
  108. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.protocol.d.ts +21 -0
  110. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.protocol.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.sequencer.d.ts +22 -0
  112. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.sequencer.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
  114. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
  116. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
  118. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
  120. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
  122. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
  124. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
  126. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
  128. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
  130. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
  132. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
  134. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
  136. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
  138. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
  140. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
  142. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +8 -1
  144. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +8 -1
  146. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  147. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  148. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  149. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  150. package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
  151. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  152. package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts +5 -3
  153. package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  154. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +16 -0
  155. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -0
  156. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.protocol.d.ts +21 -0
  157. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.protocol.d.ts.map +1 -0
  158. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.sequencer.d.ts +22 -0
  159. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.sequencer.d.ts.map +1 -0
  160. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
  161. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
  162. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
  163. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
  164. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
  165. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
  166. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
  167. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
  168. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
  169. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
  170. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
  171. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
  172. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
  173. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
  174. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
  175. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
  176. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
  177. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
  178. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
  179. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
  180. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
  181. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
  182. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
  183. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
  184. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
  185. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
  186. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
  187. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
  188. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
  189. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
  190. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +8 -1
  191. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  192. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +8 -1
  193. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  194. package/package.json +1 -1
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { CaseType } from "../../../types/case-type.js";
5
+ import { decodePc100Response, parsePc100BloodOxygenResult, parsePc100BloodPressureResult, pc100GetBloodPressureResult, pc100GetDeviceId, pc100GetDeviceInfo, pc100Handshake, Pc100Command } from "./viatom.pc100.protocol.js";
6
+ const command = (write, frame) => ({
7
+ ...write,
8
+ frame,
9
+ withoutResponse: true
10
+ });
11
+
12
+ /** Reads the last PC-100 BP result and accepts live oxygen frames when present. */
13
+ export class Pc100Sequencer {
14
+ phase = "handshake";
15
+ constructor(params) {
16
+ this.params = params;
17
+ }
18
+ initialCommands = () => [this.write(pc100Handshake())];
19
+ isNormalDisconnect = () => this.phase === "done";
20
+ commandTimeoutMs = () => this.phase === "done" ? undefined : 5_000;
21
+ nextCommand = frame => {
22
+ const response = decodePc100Response(frame);
23
+ if (!response) {
24
+ return undefined;
25
+ }
26
+ const recordedAt = this.params.now?.() ?? new Date();
27
+ if (response.command === Pc100Command.bloodOxygenParameters) {
28
+ const result = parsePc100BloodOxygenResult(response.content);
29
+ if (result) {
30
+ this.params.onResult({
31
+ caseType: CaseType.RESULT,
32
+ measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
33
+ ...result,
34
+ recordedAt
35
+ });
36
+ }
37
+ return undefined;
38
+ }
39
+ if (this.phase === "handshake" && response.command === 0xff) {
40
+ this.phase = "device-id";
41
+ return [this.write(pc100GetDeviceId())];
42
+ }
43
+ if (this.phase === "device-id" && response.command === 0xff) {
44
+ this.phase = "info";
45
+ return [this.write(pc100GetDeviceInfo())];
46
+ }
47
+ if (this.phase === "info" && response.command === Pc100Command.deviceInfo) {
48
+ this.phase = "result";
49
+ return [this.write(pc100GetBloodPressureResult())];
50
+ }
51
+ if (this.phase === "result" && response.command === Pc100Command.bloodPressureResult && response.type === 1) {
52
+ const result = parsePc100BloodPressureResult(response.content);
53
+ if (result) {
54
+ this.params.onResult({
55
+ caseType: CaseType.RESULT,
56
+ measurementTypeKey: MeasurementTypeKey.bloodPressure,
57
+ systolic: result.systolic,
58
+ diastolic: result.diastolic,
59
+ heartRate: result.heartRate,
60
+ irregularHeartbeat: result.irregularHeartbeat,
61
+ recordedAt
62
+ });
63
+ }
64
+ this.phase = "done";
65
+ }
66
+ return undefined;
67
+ };
68
+ onCommandTimeout = () => {
69
+ this.phase = "done";
70
+ return {
71
+ terminal: true
72
+ };
73
+ };
74
+ write = frame => command(this.params.write, frame);
75
+ }
76
+ //# sourceMappingURL=viatom.pc100.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","decodePc100Response","parsePc100BloodOxygenResult","parsePc100BloodPressureResult","pc100GetBloodPressureResult","pc100GetDeviceId","pc100GetDeviceInfo","pc100Handshake","Pc100Command","command","write","frame","withoutResponse","Pc100Sequencer","phase","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","undefined","nextCommand","response","recordedAt","now","Date","bloodOxygenParameters","result","content","onResult","caseType","RESULT","measurementTypeKey","bloodOxygenPulseRate","deviceInfo","bloodPressureResult","type","bloodPressure","systolic","diastolic","heartRate","irregularHeartbeat","onCommandTimeout","terminal"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.ts"],"mappings":";;AAAA,SAEEA,kBAAkB,QAEb,YAAY;AAEnB,SAASC,QAAQ,QAAQ,6BAA0B;AAKnD,SACEC,mBAAmB,EACnBC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,gBAAgB,EAChBC,kBAAkB,EAClBC,cAAc,EACdC,YAAY,QACP,4BAAyB;AAYhC,MAAMC,OAAO,GAAGA,CACdC,KAAmC,EACnCC,KAAwB,MACL;EAAE,GAAGD,KAAK;EAAEC,KAAK;EAAEC,eAAe,EAAE;AAAK,CAAC,CAAC;;AAEhE;AACA,OAAO,MAAMC,cAAc,CAA6B;EAC9CC,KAAK,GAAe,WAAW;EAEhCC,WAAWA,CAAkBC,MAA4B,EAAE;IAAA,KAA9BA,MAA4B,GAA5BA,MAA4B;EAAG;EAE5DC,eAAe,GAAGA,CAAA,KAAgC,CACvD,IAAI,CAACP,KAAK,CAACH,cAAc,CAAC,CAAC,CAAC,CAC7B;EAEMW,kBAAkB,GAAGA,CAAA,KAAe,IAAI,CAACJ,KAAK,KAAK,MAAM;EAEzDK,gBAAgB,GAAGA,CAAA,KACxB,IAAI,CAACL,KAAK,KAAK,MAAM,GAAGM,SAAS,GAAG,KAAK;EAEpCC,WAAW,GAChBV,KAAwB,IACiB;IACzC,MAAMW,QAAQ,GAAGrB,mBAAmB,CAACU,KAAK,CAAC;IAE3C,IAAI,CAACW,QAAQ,EAAE;MACb,OAAOF,SAAS;IAClB;IAEA,MAAMG,UAAU,GAAG,IAAI,CAACP,MAAM,CAACQ,GAAG,GAAG,CAAC,IAAI,IAAIC,IAAI,CAAC,CAA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AE9D,IAAID,MAAM,EAAE;QACV,IAAI,CAACX,MAAM,CAACa,QAAQ,CAAC;UACnBC,QAAQ,EAAE9B,QAAQ,CAAC+B,MAAM;UACzBC,kBAAkB,EAAEjC,kBAAkB,CAACsC,aAAa;UACpDC,QAAQ,EAAEX,MAAM,CAACW,QAAQ;UACzBC,SAAS,EAAEZ,MAAM,CAACY,SAAS;UAC3BC,SAAS,EAAEb,MAAM,CAACa,SAAS;UAC3BC,kBAAkB,EAAEd,MAAM,CAACc,kBAAkB;UAC7ClB;QACF,CAAC,CAAC;MACJ;MAEA,IAAI,CAACT,KAAK,GAAG,MAAM;IACrB;IAEA,OAAOM,SAAS;EAClB,CAAC;EAEMsB,gBAAgB,GAAGA,CAAA,KAAM;IAC9B,IAAI,CAAC5B,KAAK,GAAG,MAAM;IAEnB,OAAO;MAAE6B,QAAQ,EAAE;IAAK,CAAC;EAC3B,CAAC;EAEOjC,KAAK,GAAIC,KAAwB,IACvCF,OAAO,CAAC,IAAI,CAACO,MAAM,CAACN,KAAK,EAAEC,KAAK,CAAC;AACrC","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports */
4
+
5
+ import { BTManagedDevice } from "../bt-managed-device.js";
6
+ import { PC300_NOTIFY, PC300_SERVICE, PC300_WRITE, Pc300FrameReader } from "./viatom.pc300.protocol.js";
7
+ import { Pc300Sequencer } from "./viatom.pc300.sequencer.js";
8
+ const acceptNothing = {
9
+ caseValuePosition: [],
10
+ cases: []
11
+ };
12
+ export const pc300MainServices = [{
13
+ uuid: PC300_SERVICE,
14
+ monitorUuids: [{
15
+ uuid: PC300_NOTIFY,
16
+ parsingModel: acceptNothing
17
+ }],
18
+ writeUuid: {
19
+ uuid: PC300_WRITE,
20
+ mainCommandUuid: "aa55"
21
+ }
22
+ }];
23
+
24
+ /** Viatom PC-300/PC-200 spot-check family over the FFF0 AA55 protocol. */
25
+ export class Pc300Device extends BTManagedDevice {
26
+ mainServices = pc300MainServices;
27
+ stuckDataTimeout = 60_000;
28
+ onStreamStart = undefined;
29
+ preferredMtu = 247;
30
+ constructor(device, params) {
31
+ super(device, params);
32
+ this.frameReader = new Pc300FrameReader();
33
+ this.createCommandSequencer = () => new Pc300Sequencer({
34
+ write: {
35
+ serviceUuid: PC300_SERVICE,
36
+ characteristicUuid: PC300_WRITE
37
+ },
38
+ onResult: result => this.onResult?.(result)
39
+ });
40
+ }
41
+ handleSuccessResult() {
42
+ return;
43
+ }
44
+ }
45
+ //# sourceMappingURL=viatom.pc300.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BTManagedDevice","PC300_NOTIFY","PC300_SERVICE","PC300_WRITE","Pc300FrameReader","Pc300Sequencer","acceptNothing","caseValuePosition","cases","pc300MainServices","uuid","monitorUuids","parsingModel","writeUuid","mainCommandUuid","Pc300Device","mainServices","stuckDataTimeout","onStreamStart","undefined","preferredMtu","constructor","device","params","frameReader","createCommandSequencer","write","serviceUuid","characteristicUuid","onResult","result","handleSuccessResult"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.pc300.device.ts"],"mappings":";;AAAA;;AASA,SAASA,eAAe,QAAQ,yBAAsB;AAEtD,SACEC,YAAY,EACZC,aAAa,EACbC,WAAW,EACXC,gBAAgB,QACX,4BAAyB;AAChC,SAASC,cAAc,QAAQ,6BAA0B;AAEzD,MAAMC,aAAa,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAE1D,OAAO,MAAMC,iBAA6B,GAAG,CAC3C;EACEC,IAAI,EAAER,aAAa;EACnBS,YAAY,EAAE,CAAC;IAAED,IAAI,EAAET,YAAY;IAAEW,YAAY,EAAEN;EAAc,CAAC,CAAC;EACnEO,SAAS,EAAE;IACTH,IAAI,EAAEP,WAAW;IACjBW,eAAe,EAAE;EACnB;AACF,CAAC,CACF;;AAED;AACA,OAAO,MAAMC,WAAW,SAASf,eAAe,CAA0B;EAC9DgB,YAAY,GAAGP,iBAAiB;EAChCQ,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAChBC,YAAY,GAAG,GAAG;EAE9BC,WAAWA,CAChBC,MAAc,EACdC,MAAmD,EACnD;IACA,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIpB,gBAAgB,CAAC,CAAC;IACzC,IAAI,CAACqB,sBAAsB,GAAG,MAC5B,IAAIpB,cAAc,CAAC;MACjBqB,KAAK,EAAE;QACLC,WAAW,EAAEzB,aAAa;QAC1B0B,kBAAkB,EAAEzB;MACtB,CAAC;MACD0B,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/group-exports, max-lines */
4
+
5
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
6
+ import { calculateCrc8Pc } from "../../../utils/calculate-crc-8-pc.js";
7
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
8
+ export const PC300_SERVICE = "0000fff0-0000-1000-8000-00805f9b34fb";
9
+ export const PC300_WRITE = "0000fff2-0000-1000-8000-00805f9b34fb";
10
+ export const PC300_NOTIFY = "0000fff1-0000-1000-8000-00805f9b34fb";
11
+ export const Pc300Command = {
12
+ bloodPressureResult: 0x43,
13
+ temperatureResult: 0x72,
14
+ glucoseResult: 0x73,
15
+ baijieResult: 0xe2,
16
+ oxygenParameters: 0x53,
17
+ ecgWave: 0x32,
18
+ ecgResult: 0x33
19
+ };
20
+ const byte = value => (value & 0xff).toString(16).padStart(2, "0");
21
+
22
+ /** Builds the AA55 frame used by the ViHealth PC-300 family. */
23
+ export const pc300Command = (command, type, payload = []) => {
24
+ const frame = ["aa", "55", byte(command), byte(payload.length + 2), byte(type), ...payload, "00"];
25
+ frame[frame.length - 1] = byte(calculateCrc8Pc(frame));
26
+ return frame;
27
+ };
28
+ export const pc300GetBloodPressureResult = () => pc300Command(Pc300Command.bloodPressureResult, 1);
29
+ export const pc300GetTemperatureResult = () => pc300Command(Pc300Command.temperatureResult, 1);
30
+ export const pc300GetGlucoseResult = () => pc300Command(Pc300Command.glucoseResult, 1);
31
+ export const pc300GetBaijieGlucoseResult = () => pc300Command(Pc300Command.baijieResult, 1);
32
+ export const pc300GetBaijieUricAcidResult = () => pc300Command(Pc300Command.baijieResult, 2);
33
+ export const decodePc300Response = bytes => {
34
+ if (hexToByte(bytes[0] ?? "00") !== 0xaa || hexToByte(bytes[1] ?? "00") !== 0x55) {
35
+ return undefined;
36
+ }
37
+ const payloadLength = hexToByte(bytes[3] ?? "00");
38
+ const expectedLength = payloadLength + 4;
39
+ if (payloadLength < 2 || bytes.length < expectedLength) {
40
+ return undefined;
41
+ }
42
+ const frame = bytes.slice(0, expectedLength);
43
+ if (hexToByte(frame.at(-1) ?? "00") !== calculateCrc8Pc(frame)) {
44
+ return undefined;
45
+ }
46
+ return {
47
+ command: hexToByte(frame[2] ?? "00"),
48
+ type: hexToByte(frame[4] ?? "00"),
49
+ content: frame.slice(5, -1)
50
+ };
51
+ };
52
+ export const parsePc300BloodPressureResult = content => {
53
+ if (content.length < 5) {
54
+ return undefined;
55
+ }
56
+ const first = hexToByte(content[0] ?? "00");
57
+ const systolic = (first & 0x7f) << 8 | hexToByte(content[1] ?? "00");
58
+ const meanArterialPressure = hexToByte(content[2] ?? "00");
59
+ const diastolic = hexToByte(content[3] ?? "00");
60
+ const heartRate = hexToByte(content[4] ?? "00");
61
+ if (systolic < 20 || systolic > 300 || meanArterialPressure < 10 || meanArterialPressure > 250 || diastolic < 10 || diastolic > 200 || heartRate < 20 || heartRate > 300) {
62
+ return undefined;
63
+ }
64
+ return {
65
+ systolic,
66
+ diastolic,
67
+ meanArterialPressure,
68
+ heartRate,
69
+ irregularHeartbeat: (first & 0x80) !== 0
70
+ };
71
+ };
72
+ export const parsePc300TemperatureResult = content => {
73
+ if (content.length < 3) {
74
+ return undefined;
75
+ }
76
+ const first = hexToByte(content[0] ?? "00");
77
+ const bodyTemp = (hexToByte(content[1] ?? "00") << 8 | hexToByte(content[2] ?? "00")) / 100 + 30;
78
+ if (bodyTemp < 20 || bodyTemp > 50) {
79
+ return undefined;
80
+ }
81
+ return {
82
+ bodyTemp,
83
+ probeOff: (first & 0x10) !== 0
84
+ };
85
+ };
86
+ export const parsePc300GlucoseResult = content => {
87
+ if (content.length < 3) {
88
+ return undefined;
89
+ }
90
+ const unit = (hexToByte(content[0] ?? "00") & 0x01) === 1;
91
+ const raw = hexToByte(content[1] ?? "00") << 8 | hexToByte(content[2] ?? "00");
92
+ const bloodGlucose = unit ? raw : Number((raw / 10 * 18).toFixed(2));
93
+ if (bloodGlucose < 1 || bloodGlucose > 1_000) {
94
+ return undefined;
95
+ }
96
+ return {
97
+ bloodGlucose,
98
+ unit: unit ? "mg/dL" : "mmol/L"
99
+ };
100
+ };
101
+ export const parsePc300UricAcidResult = content => {
102
+ if (content.length < 3) {
103
+ return undefined;
104
+ }
105
+ const value = (hexToByte(content[1] ?? "00") << 8 | hexToByte(content[2] ?? "00")) / 10;
106
+ return value > 0 && value < 2_000 ? {
107
+ uricAcid: value
108
+ } : undefined;
109
+ };
110
+ export const parsePc300BloodOxygenResult = content => {
111
+ if (content.length < 5) {
112
+ return undefined;
113
+ }
114
+ const bloodOxygen = hexToByte(content[0] ?? "00");
115
+ const pulseRate = hexToByte(content[1] ?? "00") | hexToByte(content[2] ?? "00") << 8;
116
+ const perfusionIndex = hexToByte(content[3] ?? "00") / 10;
117
+ const state = hexToByte(content[4] ?? "00");
118
+ if (bloodOxygen < 50 || bloodOxygen > 100 || pulseRate < 20 || pulseRate > 300) {
119
+ return undefined;
120
+ }
121
+ return {
122
+ bloodOxygen,
123
+ pulseRate,
124
+ perfusionIndex,
125
+ probeOff: (state & 0x02) !== 0
126
+ };
127
+ };
128
+ export const parsePc300EcgWave = content => {
129
+ if (content.length < 53) {
130
+ return undefined;
131
+ }
132
+ const digit = (hexToByte(content[1] ?? "00") & 0x80) !== 0;
133
+ const diagramPoints = Array.from({
134
+ length: 25
135
+ }, (_, index) => {
136
+ const high = hexToByte(content[index * 2 + 1] ?? "00");
137
+ const low = hexToByte(content[index * 2 + 2] ?? "00");
138
+ const raw = low | (high & 0x0f) << 8;
139
+ return digit ? (raw - 2_048) * 0.002538071 : (raw - 128) * 0.03508772;
140
+ });
141
+ return {
142
+ sequence: hexToByte(content[0] ?? "00"),
143
+ diagramPoints,
144
+ probeOff: (hexToByte(content[52] ?? "00") & 0x80) !== 0
145
+ };
146
+ };
147
+ export const parsePc300EcgResult = content => {
148
+ if (content.length < 3) {
149
+ return undefined;
150
+ }
151
+ const heartRate = hexToByte(content[2] ?? "00");
152
+ return heartRate > 0 && heartRate <= 300 ? {
153
+ heartRate,
154
+ status: hexToByte(content[0] ?? "00")
155
+ } : undefined;
156
+ };
157
+
158
+ /** Reads split and concatenated PC-300 AA55 frames. */
159
+ export class Pc300FrameReader {
160
+ readFrame(buffer) {
161
+ const start = this.findStart(buffer);
162
+ if (start < 0) {
163
+ return {
164
+ status: FrameReadStatus.INCOMPLETE,
165
+ consumedBytes: Math.max(0, buffer.length - 1)
166
+ };
167
+ }
168
+ if (start + 4 > buffer.length) {
169
+ return {
170
+ status: FrameReadStatus.INCOMPLETE,
171
+ consumedBytes: start
172
+ };
173
+ }
174
+ const length = hexToByte(buffer[start + 3] ?? "00") + 4;
175
+ if (length < 6) {
176
+ return {
177
+ status: FrameReadStatus.CORRUPT,
178
+ consumedBytes: start + 1
179
+ };
180
+ }
181
+ if (start + length > buffer.length) {
182
+ return {
183
+ status: FrameReadStatus.INCOMPLETE,
184
+ consumedBytes: start
185
+ };
186
+ }
187
+ const frame = buffer.slice(start, start + length);
188
+ if (hexToByte(frame.at(-1) ?? "00") !== calculateCrc8Pc(frame)) {
189
+ return {
190
+ status: FrameReadStatus.CORRUPT,
191
+ consumedBytes: start + 1
192
+ };
193
+ }
194
+ return {
195
+ status: FrameReadStatus.COMPLETE,
196
+ consumedBytes: start + length,
197
+ frame
198
+ };
199
+ }
200
+ findStart = buffer => {
201
+ for (let index = 0; index + 1 < buffer.length; index += 1) {
202
+ if (hexToByte(buffer[index] ?? "00") === 0xaa && hexToByte(buffer[index + 1] ?? "00") === 0x55) {
203
+ return index;
204
+ }
205
+ }
206
+ return -1;
207
+ };
208
+ }
209
+ //# sourceMappingURL=viatom.pc300.protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","calculateCrc8Pc","hexToByte","PC300_SERVICE","PC300_WRITE","PC300_NOTIFY","Pc300Command","bloodPressureResult","temperatureResult","glucoseResult","baijieResult","oxygenParameters","ecgWave","ecgResult","byte","value","toString","padStart","pc300Command","command","type","payload","frame","length","pc300GetBloodPressureResult","pc300GetTemperatureResult","pc300GetGlucoseResult","pc300GetBaijieGlucoseResult","pc300GetBaijieUricAcidResult","decodePc300Response","bytes","undefined","payloadLength","expectedLength","slice","at","content","parsePc300BloodPressureResult","first","systolic","meanArterialPressure","diastolic","heartRate","irregularHeartbeat","parsePc300TemperatureResult","bodyTemp","probeOff","parsePc300GlucoseResult","unit","raw","bloodGlucose","Number","toFixed","parsePc300UricAcidResult","uricAcid","parsePc300BloodOxygenResult","bloodOxygen","pulseRate","perfusionIndex","state","parsePc300EcgWave","digit","diagramPoints","Array","from","_","index","high","low","sequence","parsePc300EcgResult","status","Pc300FrameReader","readFrame","buffer","start","findStart","INCOMPLETE","consumedBytes","Math","max","CORRUPT","COMPLETE"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.pc300.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,eAAe,QAAQ,sCAAmC;AACnE,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,OAAO,MAAMC,aAAa,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AAC;EACH;EAEQsD,SAAS,GAAIF,MAAyB,IAAa;IACzD,KAAK,IAAIR,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAG,CAAC,GAAGQ,MAAM,CAACnD,MAAM,EAAE2C,KAAK,IAAI,CAAC,EAAE;MACzD,IACEhE,SAAS,CAACwE,MAAM,CAACR,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,IACzChE,SAAS,CAACwE,MAAM,CAACR,KAAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,EAC7C;QACA,OAAOA,KAAK;MACd;IACF;IAEA,OAAO,CAAC,CAAC;EACX,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ import { EcgDiagnosticFlag, MeasurementTypeKey } from "@ovok/core";
4
+ import { CaseType } from "../../../types/case-type.js";
5
+ import { decodePc300Response, parsePc300BloodOxygenResult, parsePc300BloodPressureResult, parsePc300EcgResult, parsePc300EcgWave, parsePc300GlucoseResult, parsePc300TemperatureResult, pc300GetBloodPressureResult, pc300GetGlucoseResult, pc300GetTemperatureResult, Pc300Command } from "./viatom.pc300.protocol.js";
6
+ const command = (write, frame) => ({
7
+ ...write,
8
+ frame,
9
+ withoutResponse: true
10
+ });
11
+
12
+ /** Reads the last PC-300 family readings and accepts live oxygen/ECG frames. */
13
+ export class Pc300Sequencer {
14
+ phase = "blood-pressure";
15
+ ecgPoints = [];
16
+ constructor(params) {
17
+ this.params = params;
18
+ }
19
+ initialCommands = () => [this.write(pc300GetBloodPressureResult())];
20
+ isNormalDisconnect = () => this.phase === "done";
21
+ commandTimeoutMs = () => this.phase === "done" ? undefined : 5_000;
22
+ onCommandTimeout = () => {
23
+ this.phase = "done";
24
+ return {
25
+ terminal: true
26
+ };
27
+ };
28
+ nextCommand = frame => {
29
+ const response = decodePc300Response(frame);
30
+ if (!response) {
31
+ return undefined;
32
+ }
33
+ const recordedAt = this.params.now?.() ?? new Date();
34
+ if (response.command === Pc300Command.oxygenParameters) {
35
+ const result = parsePc300BloodOxygenResult(response.content);
36
+ if (result) {
37
+ this.params.onResult({
38
+ caseType: CaseType.RESULT,
39
+ measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
40
+ bloodOxygen: result.bloodOxygen,
41
+ pulseRate: result.pulseRate,
42
+ perfusionIndex: result.perfusionIndex,
43
+ recordedAt
44
+ });
45
+ }
46
+ return undefined;
47
+ }
48
+ if (response.command === Pc300Command.ecgWave) {
49
+ const result = parsePc300EcgWave(response.content);
50
+ if (result) {
51
+ this.ecgPoints.push(...result.diagramPoints);
52
+ }
53
+ return undefined;
54
+ }
55
+ if (response.command === Pc300Command.ecgResult) {
56
+ const result = parsePc300EcgResult(response.content);
57
+ if (result && this.ecgPoints.length > 0) {
58
+ this.params.onResult({
59
+ caseType: CaseType.RESULT,
60
+ measurementTypeKey: MeasurementTypeKey.ecg,
61
+ heartRate: result.heartRate,
62
+ diagramPoints: [...this.ecgPoints],
63
+ duration: this.ecgPoints.length / 250,
64
+ diagnosticResult: result.status === 0 ? EcgDiagnosticFlag.REGULAR : result.status === 0xff ? EcgDiagnosticFlag.POOR_WAVEFORM : EcgDiagnosticFlag.ERROR,
65
+ recordedAt
66
+ });
67
+ }
68
+ this.ecgPoints = [];
69
+ return undefined;
70
+ }
71
+ if (this.phase === "blood-pressure" && response.command === Pc300Command.bloodPressureResult && response.type === 1) {
72
+ const result = parsePc300BloodPressureResult(response.content);
73
+ if (result) {
74
+ this.params.onResult({
75
+ caseType: CaseType.RESULT,
76
+ measurementTypeKey: MeasurementTypeKey.bloodPressure,
77
+ systolic: result.systolic,
78
+ diastolic: result.diastolic,
79
+ meanArterialPressure: result.meanArterialPressure,
80
+ heartRate: result.heartRate,
81
+ irregularHeartbeat: result.irregularHeartbeat,
82
+ recordedAt
83
+ });
84
+ }
85
+ this.phase = "temperature";
86
+ return [this.write(pc300GetTemperatureResult())];
87
+ }
88
+ if (this.phase === "temperature" && response.command === Pc300Command.temperatureResult && response.type === 1) {
89
+ const result = parsePc300TemperatureResult(response.content);
90
+ if (result && !result.probeOff) {
91
+ this.params.onResult({
92
+ caseType: CaseType.RESULT,
93
+ measurementTypeKey: MeasurementTypeKey.temperature,
94
+ bodyTemp: result.bodyTemp,
95
+ recordedAt
96
+ });
97
+ }
98
+ this.phase = "glucose";
99
+ return [this.write(pc300GetGlucoseResult())];
100
+ }
101
+ if (this.phase === "glucose" && response.command === Pc300Command.glucoseResult && response.type === 1) {
102
+ const result = parsePc300GlucoseResult(response.content);
103
+ if (result) {
104
+ this.params.onResult({
105
+ caseType: CaseType.RESULT,
106
+ measurementTypeKey: MeasurementTypeKey.bloodGlucose,
107
+ bloodGlucose: result.bloodGlucose,
108
+ recordedAt
109
+ });
110
+ }
111
+ this.phase = "done";
112
+ }
113
+ return undefined;
114
+ };
115
+ write = frame => command(this.params.write, frame);
116
+ }
117
+ //# sourceMappingURL=viatom.pc300.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EcgDiagnosticFlag","MeasurementTypeKey","CaseType","decodePc300Response","parsePc300BloodOxygenResult","parsePc300BloodPressureResult","parsePc300EcgResult","parsePc300EcgWave","parsePc300GlucoseResult","parsePc300TemperatureResult","pc300GetBloodPressureResult","pc300GetGlucoseResult","pc300GetTemperatureResult","Pc300Command","command","write","frame","withoutResponse","Pc300Sequencer","phase","ecgPoints","constructor","params","initialCommands","isNormalDisconnect","commandTimeoutMs","undefined","onCommandTimeout","terminal","nextCommand","response","recordedAt","now","Date","oxygenParameters","result","content","onResult","caseType","RESULT","measurementTypeKey","bloodOxygenPulseRate","bloodOxygen","pulseRate","perfusionIndex","ecgWave","push","diagramPoints","ecgResult","length","ecg","heartRate","duration","diagnosticResult","status","REGULAR","POOR_WAVEFORM","ERROR","bloodPressureResult","type","bloodPressure","systolic","diastolic","meanArterialPressure","irregularHeartbeat","temperatureResult","probeOff","temperature","bodyTemp","glucoseResult","bloodGlucose"],"sourceRoot":"../../../../../../../src","sources":["mod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nB;MACA,MAAMxB,MAAM,GAAG1B,2BAA2B,CAACqB,QAAQ,CAACM,OAAO,CAAC;MAE5D,IAAID,MAAM,IAAI,CAACA,MAAM,CAAC+B,QAAQ,EAAE;QAC9B,IAAI,CAAC5C,MAAM,CAACe,QAAQ,CAAC;UACnBC,QAAQ,EAAEpC,QAAQ,CAACqC,MAAM;UACzBC,kBAAkB,EAAEvC,kBAAkB,CAACkE,WAAW;UAClDC,QAAQ,EAAEjC,MAAM,CAACiC,QAAQ;UACzBrC;QACF,CAAC,CAAC;MACJ;MAEA,IAAI,CAACZ,KAAK,GAAG,SAAS;MAEtB,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACJ,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAC9C;IAEA,IACE,IAAI,CAACQ,KAAK,KAAK,SAAS,IACxBW,QAAQ,CAAChB,OAAO,KAAKD,YAAY,CAACwD,aAAa,IAC/CvC,QAAQ,CAAC6B,IAAI,KAAK,CAAC,EACnB;MACA,MAAMxB,MAAM,GAAG3B,uBAAuB,CAACsB,QAAQ,CAACM,OAAO,CAAC;MAExD,IAAID,MAAM,EAAE;QACV,IAAI,CAACb,MAAM,CAACe,QAAQ,CAAC;UACnBC,QAAQ,EAAEpC,QAAQ,CAACqC,MAAM;UACzBC,kBAAkB,EAAEvC,kBAAkB,CAACqE,YAAY;UACnDA,YAAY,EAAEnC,MAAM,CAACmC,YAAY;UACjCvC;QACF,CAAC,CAAC;MACJ;MAEA,IAAI,CAACZ,KAAK,GAAG,MAAM;IACrB;IAEA,OAAOO,SAAS;EAClB,CAAC;EAEOX,KAAK,GAAIC,KAAwB,IACvCF,OAAO,CAAC,IAAI,CAACQ,MAAM,CAACP,KAAK,EAAEC,KAAK,CAAC;AACrC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAaA,SAASA,iBAAiB,QAAQ,yBAAsB;;AAwExD;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-measurement-map.ts"],"mappings":";;AAaA,SAASA,iBAAiB,QAAQ,yBAAsB;;AAwFxD;AACA;AACA;AACA","ignoreList":[]}
@@ -2,6 +2,8 @@
2
2
 
3
3
  export let IntegratedDevices = /*#__PURE__*/function (IntegratedDevices) {
4
4
  IntegratedDevices["F4"] = "F4";
5
+ IntegratedDevices["LEPU_F4_SCALE"] = "Lepu F4 scale";
6
+ IntegratedDevices["LEPU_F5_SCALE"] = "Lepu F5 scale";
5
7
  IntegratedDevices["BP2"] = "BP2";
6
8
  IntegratedDevices["SPO2"] = "Oxyfit";
7
9
  IntegratedDevices["MYSENSE"] = "mySense";
@@ -33,6 +35,11 @@ export let IntegratedDevices = /*#__PURE__*/function (IntegratedDevices) {
33
35
  IntegratedDevices["AP20"] = "AP-20";
34
36
  IntegratedDevices["AP20_WPS"] = "AP-20-WPS";
35
37
  IntegratedDevices["PC68B"] = "PC-68B";
38
+ IntegratedDevices["PC100"] = "PC-100";
39
+ IntegratedDevices["BPM188"] = "BPM-188";
40
+ IntegratedDevices["PC300"] = "PC300";
41
+ IntegratedDevices["POCTOR_M3102"] = "PoctorM3102";
42
+ IntegratedDevices["BIOLAND_BGM"] = "Bioland-BGM";
36
43
  return IntegratedDevices;
37
44
  }({});
38
45
  //# sourceMappingURL=integrated-devices.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["IntegratedDevices"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"device-instruction-pdfs.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/device-instruction-pdfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAOjF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAiCrE,CAAC"}
1
+ {"version":3,"file":"device-instruction-pdfs.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/device-instruction-pdfs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAOjF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAwCrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"supported-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/supported-devices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAyFhF,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,yBAAyB,GAAG,eAAe,GAAG;IAEjD,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,gBAAgB,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAeF;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qPA+MkC,CAAC;AAmZhD,+FAA+F;AAC/F,QAAA,MAAM,gBAAgB,EAAE,SAAS,yBAAyB,EAUH,CAAC;AAExD,QAAA,MAAM,iBAAiB,sCAAmB,CAAC;AAK3C,iFAAiF;AACjF,QAAA,MAAM,0BAA0B,EAAE,SAAS,cAAc,EAMxD,CAAC;AAEF,OAAO,EACL,OAAO,EACP,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,GACjB,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"supported-devices.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-device/constants/supported-devices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAyFhF,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,yBAAyB,GAAG,eAAe,GAAG;IAEjD,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,gBAAgB,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAeF;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qPA+MkC,CAAC;AAkdhD,+FAA+F;AAC/F,QAAA,MAAM,gBAAgB,EAAE,SAAS,yBAAyB,EAUH,CAAC;AAExD,QAAA,MAAM,iBAAiB,sCAAmB,CAAC;AAK3C,iFAAiF;AACjF,QAAA,MAAM,0BAA0B,EAAE,SAAS,cAAc,EAMxD,CAAC;AAEF,OAAO,EACL,OAAO,EACP,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,GACjB,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"integrated-devices-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/constants/integrated-devices-map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,eAAO,MAAM,oBAAoB,gCAgC/B,CAAC"}
1
+ {"version":3,"file":"integrated-devices-map.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/constants/integrated-devices-map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,eAAO,MAAM,oBAAoB,gCA6C/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"background-service-uuids.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-service-uuids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AA+B7D,eAAO,MAAM,yBAAyB,GACpC,iBAAiB,SAAS,cAAc,EAAE,EAC1C,yBAAwB,SAAS,MAAM,EAAO,KAC7C,MAAM,EAaR,CAAC"}
1
+ {"version":3,"file":"background-service-uuids.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/bt-management/services/background-sync/background-service-uuids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAoC7D,eAAO,MAAM,yBAAyB,GACpC,iBAAiB,SAAS,cAAc,EAAE,EAC1C,yBAAwB,SAAS,MAAM,EAAO,KAC7C,MAAM,EAaR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"device-creator.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/services/device-creator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAUrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAuF9D,qBAAa,aAAa,CAAC,CAAC,SAAS,SAAS,cAAc,EAAE;IAKhD,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAJhD,OAAO,CAAC,eAAe,CAAuC;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAO;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsC;gBAEvC,mBAAmB,EAAE,CAAC;IAI5C,aAAa,GAClB,WAAW,MAAM,EACjB,eAAc,SAAS,MAAM,EAAO,KACnC,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAwB3B;IAEK,YAAY,CAAC,CAAC,SAAS,SAAS,EACrC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC5B,eAAe,CAAC,CAAC,CAAC;IA4Cd,OAAO,aAEZ;IAEF;;;OAGG;IACH,OAAO,CAAC,eAAe,CAMP;IAEhB,OAAO,CAAC,eAAe;CAexB"}
1
+ {"version":3,"file":"device-creator.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/bt-management/services/device-creator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAUrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAqG9D,qBAAa,aAAa,CAAC,CAAC,SAAS,SAAS,cAAc,EAAE;IAKhD,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAJhD,OAAO,CAAC,eAAe,CAAuC;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAO;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsC;gBAEvC,mBAAmB,EAAE,CAAC;IAI5C,aAAa,GAClB,WAAW,MAAM,EACjB,eAAc,SAAS,MAAM,EAAO,KACnC,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAwB3B;IAEK,YAAY,CAAC,CAAC,SAAS,SAAS,EACrC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC5B,eAAe,CAAC,CAAC,CAAC;IA4Cd,OAAO,aAEZ;IAEF;;;OAGG;IACH,OAAO,CAAC,eAAe,CAMP;IAEhB,OAAO,CAAC,eAAe;CAexB"}
@@ -4,7 +4,8 @@ import { IntegratedDevices } from "../../../types/integrated-devices";
4
4
  import { MeasurementWithCaseType } from "../../../types/measurement-with-case-type";
5
5
  import { IService } from "../../../types/service.type";
6
6
  import { BTManagedDevice } from "../bt-managed-device";
7
- export declare class F4Device extends BTManagedDevice<IntegratedDevices.F4> {
7
+ type F4FamilyDevice = IntegratedDevices.F4 | IntegratedDevices.S5 | IntegratedDevices.LEPU_F4_SCALE;
8
+ export declare class F4Device extends BTManagedDevice<F4FamilyDevice> {
8
9
  protected mainServices: IService[];
9
10
  protected onStreamStart?: (() => void) | undefined;
10
11
  protected validatePackage: (pkg: string[], uuid: string) => boolean;
@@ -16,14 +17,15 @@ export declare class F4Device extends BTManagedDevice<IntegratedDevices.F4> {
16
17
  * @param data - The data to handle the result.
17
18
  * @returns The handled data.
18
19
  */
19
- protected handleDependentResult: (data: DependentResultHandlerParams<MeasurementTypeForDevices<[IntegratedDevices.F4]>>) => DependentResultHandlerParams<MeasurementTypeForDevices<[IntegratedDevices.F4]>>;
20
+ protected handleDependentResult: (data: DependentResultHandlerParams<MeasurementTypeForDevices<[F4FamilyDevice]>>) => DependentResultHandlerParams<MeasurementTypeForDevices<[F4FamilyDevice]>>;
20
21
  /**
21
22
  * This is too long on purpose to avoid the stuck data error.
22
23
  * This is because the F4 device can stop sending data when its sleeping but still connected to the device.
23
24
  */
24
25
  protected stuckDataTimeout: number;
25
- protected handleSuccessResult(successResult: MeasurementWithCaseType<MeasurementTypeForDevices<[IntegratedDevices.F4]>>): void | boolean;
26
+ protected handleSuccessResult(successResult: MeasurementWithCaseType<MeasurementTypeForDevices<[F4FamilyDevice]>>): void | boolean;
26
27
  private handleBodyWeightResult;
27
28
  private checkIfHasError;
28
29
  }
30
+ export {};
29
31
  //# sourceMappingURL=f4.device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"f4.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/f4/f4.device.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,qBAAa,QAAS,SAAQ,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC;IACjE,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAkB;IACpD,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAEnD,SAAS,CAAC,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAEjE;IAEF;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,EAAE,CAC/B,IAAI,EAAE,4BAA4B,CAChC,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAClD,KACE,4BAA4B,CAC/B,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAClD,CAYC;IAEF;;;OAGG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAa;IAE/C,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,uBAAuB,CACpC,yBAAyB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAClD,GACA,IAAI,GAAG,OAAO;IAkBjB,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,eAAe;CAiBxB"}
1
+ {"version":3,"file":"f4.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/f4/f4.device.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD,KAAK,cAAc,GACf,iBAAiB,CAAC,EAAE,GACpB,iBAAiB,CAAC,EAAE,GACpB,iBAAiB,CAAC,aAAa,CAAC;AAEpC,qBAAa,QAAS,SAAQ,eAAe,CAAC,cAAc,CAAC;IAC3D,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAkB;IACpD,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAEnD,SAAS,CAAC,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAEjE;IAEF;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,EAAE,CAC/B,IAAI,EAAE,4BAA4B,CAChC,yBAAyB,CAAC,CAAC,cAAc,CAAC,CAAC,CAC5C,KACE,4BAA4B,CAC/B,yBAAyB,CAAC,CAAC,cAAc,CAAC,CAAC,CAC5C,CAYC;IAEF;;;OAGG;IACH,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAa;IAE/C,SAAS,CAAC,mBAAmB,CAC3B,aAAa,EAAE,uBAAuB,CACpC,yBAAyB,CAAC,CAAC,cAAc,CAAC,CAAC,CAC5C,GACA,IAAI,GAAG,OAAO;IAkBjB,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,eAAe;CAiBxB"}
@@ -0,0 +1,16 @@
1
+ import { Device } from "react-native-ble-plx";
2
+ import { CreateDeviceParams } from "../../../types/create-device-params";
3
+ import { IntegratedDevices } from "../../../types/integrated-devices";
4
+ import { IService } from "../../../types/service.type";
5
+ import { BTManagedDevice } from "../bt-managed-device";
6
+ export declare const f5ScaleMainServices: IService[];
7
+ /** ViHealth F5/MY_SCALE body-scale history and live-reading driver. */
8
+ export declare class F5ScaleDevice extends BTManagedDevice<IntegratedDevices.LEPU_F5_SCALE> {
9
+ protected mainServices: IService[];
10
+ protected stuckDataTimeout: number;
11
+ protected onStreamStart: undefined;
12
+ protected preferredMtu: number;
13
+ constructor(device: Device, params: CreateDeviceParams<IntegratedDevices.LEPU_F5_SCALE>);
14
+ protected handleSuccessResult(): void;
15
+ }
16
+ //# sourceMappingURL=f5-scale.device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"f5-scale.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/f5/f5-scale.device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAYvD,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EASzC,CAAC;AAEF,uEAAuE;AACvE,qBAAa,aAAc,SAAQ,eAAe,CAAC,iBAAiB,CAAC,aAAa,CAAC;IACjF,SAAS,CAAC,YAAY,aAAuB;IAC7C,SAAS,CAAC,gBAAgB,SAAU;IACpC,SAAS,CAAC,aAAa,YAAa;IACpC,UAAmB,YAAY,SAAO;gBAGpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,aAAa,CAAC;IAe7D,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAGtC"}