@ovok/native 1.6.42 → 1.6.44

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 (228) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +9 -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 +61 -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/device-creator.js +16 -1
  8. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  9. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +1 -1
  10. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
  11. package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js +51 -0
  12. package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -0
  13. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +50 -0
  14. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
  15. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +115 -0
  16. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
  17. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +58 -0
  18. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
  19. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js +51 -0
  20. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -0
  21. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +41 -0
  22. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
  23. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +61 -0
  24. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +41 -0
  26. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
  27. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js +122 -0
  28. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js.map +1 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js +79 -0
  30. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js.map +1 -0
  31. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +9 -1
  32. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +50 -0
  34. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
  35. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +141 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +76 -0
  38. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +50 -0
  40. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
  41. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +149 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +81 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +50 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +228 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +122 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js +50 -0
  52. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.js +60 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.vtm20f.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +8 -0
  56. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-pc.js +22 -0
  58. package/lib/commonjs/modules/bt-management/utils/calculate-crc-8-pc.js.map +1 -0
  59. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +9 -1
  60. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  61. package/lib/module/modules/bt-device/constants/supported-devices.js +62 -1
  62. package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
  63. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  64. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  65. package/lib/module/modules/bt-management/services/device-creator.js +16 -1
  66. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  67. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +1 -1
  68. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -1
  69. package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js +46 -0
  70. package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -0
  71. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +45 -0
  72. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -0
  73. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js +106 -0
  74. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.js.map +1 -0
  75. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js +53 -0
  76. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.js.map +1 -0
  77. package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js +46 -0
  78. package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -0
  79. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +36 -0
  80. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -0
  81. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js +55 -0
  82. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.js.map +1 -0
  83. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js +36 -0
  84. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.js.map +1 -0
  85. package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js +113 -0
  86. package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.js.map +1 -0
  87. package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js +74 -0
  88. package/lib/module/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.js.map +1 -0
  89. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +7 -1
  90. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  91. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +45 -0
  92. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -0
  93. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js +130 -0
  94. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.js.map +1 -0
  95. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js +71 -0
  96. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.js.map +1 -0
  97. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +45 -0
  98. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -0
  99. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js +136 -0
  100. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.js.map +1 -0
  101. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js +76 -0
  102. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.js.map +1 -0
  103. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +45 -0
  104. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -0
  105. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js +209 -0
  106. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.js.map +1 -0
  107. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js +117 -0
  108. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.js.map +1 -0
  109. package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js +45 -0
  110. package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.js.map +1 -0
  111. package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.js +56 -0
  112. package/lib/module/modules/bt-management/services/devices/viatom/viatom.vtm20f.js.map +1 -0
  113. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  114. package/lib/module/modules/bt-management/types/integrated-devices.js +8 -0
  115. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  116. package/lib/module/modules/bt-management/utils/calculate-crc-8-pc.js +17 -0
  117. package/lib/module/modules/bt-management/utils/calculate-crc-8-pc.js.map +1 -0
  118. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +16 -0
  124. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
  126. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
  128. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
  130. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +16 -0
  132. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
  134. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
  136. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
  138. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts +33 -0
  140. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts +23 -0
  142. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +5 -1
  144. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
  146. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
  148. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
  150. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
  152. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
  154. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
  156. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
  158. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
  160. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
  162. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts +8 -0
  164. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts +7 -0
  166. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +8 -0
  168. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +9 -1
  170. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts +3 -0
  172. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts.map +1 -0
  173. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  174. package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
  175. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  176. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  177. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -1
  178. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +16 -0
  179. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -0
  180. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +16 -0
  181. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -0
  182. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts +26 -0
  183. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.d.ts.map +1 -0
  184. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts +24 -0
  185. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.sequencer.d.ts.map +1 -0
  186. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +16 -0
  187. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -0
  188. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +15 -0
  189. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -0
  190. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts +16 -0
  191. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.protocol.d.ts.map +1 -0
  192. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts +17 -0
  193. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.sequencer.d.ts.map +1 -0
  194. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts +33 -0
  195. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.protocol.d.ts.map +1 -0
  196. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts +23 -0
  197. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-aa55.sequencer.d.ts.map +1 -0
  198. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +5 -1
  199. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  200. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +16 -0
  201. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -0
  202. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts +36 -0
  203. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.protocol.d.ts.map +1 -0
  204. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts +26 -0
  205. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.sequencer.d.ts.map +1 -0
  206. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +16 -0
  207. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -0
  208. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts +43 -0
  209. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.protocol.d.ts.map +1 -0
  210. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts +26 -0
  211. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.sequencer.d.ts.map +1 -0
  212. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +16 -0
  213. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -0
  214. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts +73 -0
  215. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.protocol.d.ts.map +1 -0
  216. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts +25 -0
  217. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.d.ts.map +1 -0
  218. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts +8 -0
  219. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.d.ts.map +1 -0
  220. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts +7 -0
  221. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.d.ts.map +1 -0
  222. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +8 -0
  223. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  224. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +9 -1
  225. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  226. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts +3 -0
  227. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-8-pc.d.ts.map +1 -0
  228. package/package.json +1 -1
@@ -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,GAAG,sCAAsC;AACnE,OAAO,MAAMC,WAAW,GAAG,sCAAsC;AACjE,OAAO,MAAMC,YAAY,GAAG,sCAAsC;AAElE,OAAO,MAAMC,YAAY,GAAG;EAC1BC,mBAAmB,EAAE,IAAI;EACzBC,iBAAiB,EAAE,IAAI;EACvBC,aA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E,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":["modules/bt-management/services/devices/viatom/viatom.pc300.sequencer.ts"],"mappings":";;AAAA,SAIEA,iBAAiB,EAEjBC,kBAAkB,QAEb,YAAY;AAEnB,SAASC,QAAQ,QAAQ,6BAA0B;AAQnD,SACEC,mBAAmB,EACnBC,2BAA2B,EAC3BC,6BAA6B,EA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,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":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import { FrameReadStatus } from "../../../types/frame-read-status.js";
4
+ import { hexToByte } from "../../../utils/hex-to-byte.js";
5
+ const HEADER = "fe";
6
+ const LENGTH_INDEX = 1;
7
+ const MIN_FRAME_BYTES = 10;
8
+
9
+ /** Reads the length-prefixed VTM 20F notifications from ViHealth. */
10
+ export class Vtm20fFrameReader {
11
+ readFrame(buffer) {
12
+ const start = buffer.findIndex(byte => byte.toLowerCase() === HEADER);
13
+ if (start === -1) {
14
+ return {
15
+ status: FrameReadStatus.INCOMPLETE,
16
+ consumedBytes: Math.max(0, buffer.length - 1)
17
+ };
18
+ }
19
+ if (start + LENGTH_INDEX >= buffer.length) {
20
+ return {
21
+ status: FrameReadStatus.INCOMPLETE,
22
+ consumedBytes: start
23
+ };
24
+ }
25
+ const frameLength = hexToByte(buffer[start + LENGTH_INDEX] ?? "00");
26
+ if (frameLength < MIN_FRAME_BYTES) {
27
+ return {
28
+ status: FrameReadStatus.CORRUPT,
29
+ consumedBytes: start + 1
30
+ };
31
+ }
32
+ if (start + frameLength > buffer.length) {
33
+ return {
34
+ status: FrameReadStatus.INCOMPLETE,
35
+ consumedBytes: start
36
+ };
37
+ }
38
+ return {
39
+ status: FrameReadStatus.COMPLETE,
40
+ consumedBytes: start + frameLength,
41
+ frame: buffer.slice(start, start + frameLength)
42
+ };
43
+ }
44
+ }
45
+ //# sourceMappingURL=viatom.vtm20f.frame-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FrameReadStatus","hexToByte","HEADER","LENGTH_INDEX","MIN_FRAME_BYTES","Vtm20fFrameReader","readFrame","buffer","start","findIndex","byte","toLowerCase","status","INCOMPLETE","consumedBytes","Math","max","length","frameLength","CORRUPT","COMPLETE","frame","slice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.vtm20f.frame-reader.ts"],"mappings":";;AACA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,SAAS,QAAQ,+BAA4B;AAEtD,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,eAAe,GAAG,EAAE;;AAE1B;AACA,OAAO,MAAMC,iBAAiB,CAAwB;EAC7CC,SAASA,CAACC,MAAyB,EAAmB;IAC3D,MAAMC,KAAK,GAAGD,MAAM,CAACE,SAAS,CAAEC,IAAI,IAAKA,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKT,MAAM,CAAC;IAEvE,IAAIM,KAAK,KAAK,CAAC,CAAC,EAAE;MAChB,OAAO;QACLI,MAAM,EAAEZ,eAAe,CAACa,UAAU;QAClCC,aAAa,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAET,MAAM,CAACU,MAAM,GAAG,CAAC;MAC9C,CAAC;IACH;IAEA,IAAIT,KAAK,GAAGL,YAAY,IAAII,MAAM,CAACU,MAAM,EAAE;MACzC,OAAO;QAAEL,MAAM,EAAEZ,eAAe,CAACa,UAAU;QAAEC,aAAa,EAAEN;MAAM,CAAC;IACrE;IAEA,MAAMU,WAAW,GAAGjB,SAAS,CAC3BM,MAAM,CAACC,KAAK,GAAGL,YAAY,CAAC,IAAI,IAClC,CAAC;IAED,IAAIe,WAAW,GAAGd,eAAe,EAAE;MACjC,OAAO;QACLQ,MAAM,EAAEZ,eAAe,CAACmB,OAAO;QAC/BL,aAAa,EAAEN,KAAK,GAAG;MACzB,CAAC;IACH;IAEA,IAAIA,KAAK,GAAGU,WAAW,GAAGX,MAAM,CAACU,MAAM,EAAE;MACvC,OAAO;QAAEL,MAAM,EAAEZ,eAAe,CAACa,UAAU;QAAEC,aAAa,EAAEN;MAAM,CAAC;IACrE;IAEA,OAAO;MACLI,MAAM,EAAEZ,eAAe,CAACoB,QAAQ;MAChCN,aAAa,EAAEN,KAAK,GAAGU,WAAW;MAClCG,KAAK,EAAEd,MAAM,CAACe,KAAK,CAACd,KAAK,EAAEA,KAAK,GAAGU,WAAW;IAChD,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { defineCustomDevice } from "../../custom/define-custom-device.js";
5
+ import { lepuNameMatch } from "../lepu/lepu.name-match.js";
6
+ import { Vtm20fFrameReader } from "./viatom.vtm20f.frame-reader.js";
7
+ const SERVICE_UUID = "0000ffe0-0000-1000-8000-00805f9b34fb";
8
+ const NOTIFY_UUID = "0000ffe4-0000-1000-8000-00805f9b34fb";
9
+
10
+ /** Declares the FS20F/VTM 20F realtime oxygen parameters from ViHealth. */
11
+ const viatomVtm20fMonitor = (params = {}) => defineCustomDevice({
12
+ id: params.id ?? "viatom-vtm-20f",
13
+ nameMatch: params.nameMatch ?? lepuNameMatch("VTM 20F"),
14
+ stuckDataTimeoutMs: 30_000,
15
+ services: [{
16
+ uuid: SERVICE_UUID,
17
+ monitor: [{
18
+ uuid: NOTIFY_UUID,
19
+ frame: {
20
+ header: ["fe"],
21
+ minLengthBytes: 10,
22
+ length: {
23
+ index: 1,
24
+ widthBytes: 1,
25
+ byteOrder: "big",
26
+ overheadBytes: 0
27
+ }
28
+ },
29
+ caseSelectorBytes: [0, 2],
30
+ cases: [{
31
+ selector: "fe55",
32
+ kind: "result",
33
+ measurementTypeKey: MeasurementTypeKey.bloodOxygenPulseRate,
34
+ fields: [{
35
+ name: "pulseRate",
36
+ byteIndexes: [3, 4],
37
+ unit: "bpm"
38
+ }, {
39
+ name: "bloodOxygen",
40
+ byteIndexes: [5],
41
+ unit: "%"
42
+ }, {
43
+ name: "perfusionIndex",
44
+ byteIndexes: [6, 7],
45
+ scale: 0.001,
46
+ decimals: 3,
47
+ unit: "%"
48
+ }]
49
+ }]
50
+ }]
51
+ }]
52
+ }, {
53
+ frameReader: new Vtm20fFrameReader()
54
+ });
55
+ export { viatomVtm20fMonitor };
56
+ //# sourceMappingURL=viatom.vtm20f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","defineCustomDevice","lepuNameMatch","Vtm20fFrameReader","SERVICE_UUID","NOTIFY_UUID","viatomVtm20fMonitor","params","id","nameMatch","stuckDataTimeoutMs","services","uuid","monitor","frame","header","minLengthBytes","length","index","widthBytes","byteOrder","overheadBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","bloodOxygenPulseRate","fields","name","byteIndexes","unit","scale","decimals","frameReader"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.vtm20f.ts"],"mappings":";;AAAA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C;UACnBE,KAAK,EAAE,KAAK;UACZC,QAAQ,EAAE,CAAC;UACXF,IAAI,EAAE;QACR,CAAC;MAEL,CAAC;IAEL,CAAC;EAEL,CAAC;AAEL,CAAC,EACD;EAAEG,WAAW,EAAE,IAAI/B,iBAAiB,CAAC;AAAE,CACzC,CAAC;AAEH,SAASG,mBAAmB","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;;AAqExD;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;;AAsFxD;AACA;AACA;AACA","ignoreList":[]}
@@ -30,6 +30,14 @@ export let IntegratedDevices = /*#__PURE__*/function (IntegratedDevices) {
30
30
  IntegratedDevices["CHECKME"] = "Checkme";
31
31
  IntegratedDevices["CHECKME_POD"] = "Checkme Pod";
32
32
  IntegratedDevices["CHECKME_POD_WPS"] = "Checkme Pod-WPS";
33
+ IntegratedDevices["AP20"] = "AP-20";
34
+ IntegratedDevices["AP20_WPS"] = "AP-20-WPS";
35
+ IntegratedDevices["PC68B"] = "PC-68B";
36
+ IntegratedDevices["PC100"] = "PC-100";
37
+ IntegratedDevices["BPM188"] = "BPM-188";
38
+ IntegratedDevices["PC300"] = "PC300";
39
+ IntegratedDevices["POCTOR_M3102"] = "PoctorM3102";
40
+ IntegratedDevices["BIOLAND_BGM"] = "Bioland-BGM";
33
41
  return IntegratedDevices;
34
42
  }({});
35
43
  //# 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,iB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B;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { hexToByte } from "./hex-to-byte.js";
4
+ const POLYNOMIAL = 0x5e;
5
+
6
+ /** CRC-8/PC used by Viatom's AA55 interfaces, with an initial remainder of zero. */
7
+ export const calculateCrc8Pc = hex => {
8
+ let remainder = 0;
9
+ for (let index = 0; index < hex.length - 1; index += 1) {
10
+ remainder ^= hexToByte(hex[index] ?? "00");
11
+ for (let bit = 0; bit < 8; bit += 1) {
12
+ remainder = remainder & 0x80 ? (remainder << 1 ^ POLYNOMIAL) & 0xff : remainder << 1 & 0xff;
13
+ }
14
+ }
15
+ return remainder;
16
+ };
17
+ //# sourceMappingURL=calculate-crc-8-pc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["hexToByte","POLYNOMIAL","calculateCrc8Pc","hex","remainder","index","length","bit"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/calculate-crc-8-pc.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,kBAAe;AAEzC,MAAMC,UAAU,GAAG,IAAI;;AAEvB;AACA,OAAO,MAAMC,eAAe,GAAIC,GAAsB,IAAa;EACjE,IAAIC,SAAS,GAAG,CAAC;EAEjB,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,GAAG,CAACG,MAAM,GAAG,CAAC,EAAED,KAAK,IAAI,CAAC,EAAE;IACtDD,SAAS,IAAIJ,SAAS,CAACG,GAAG,CAACE,KAAK,CAAC,IAAI,IAAI,CAAC;IAE1C,KAAK,IAAIE,GAAG,GAAG,CAAC,EAAEA,GAAG,GAAG,CAAC,EAAEA,GAAG,IAAI,CAAC,EAAE;MACnCH,SAAS,GACPA,SAAS,GAAG,IAAI,GACZ,CAAEA,SAAS,IAAI,CAAC,GAAIH,UAAU,IAAI,IAAI,GACrCG,SAAS,IAAI,CAAC,GAAI,IAAI;IAC/B;EACF;EAEA,OAAOA,SAAS;AAClB,CAAC","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,CA8BrE,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,CAsCrE,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;AAsFhF,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;AAiXhD,+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;AAuchD,+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,gCA6B/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,gCAwC/B,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;A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,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 +1 @@
1
- {"version":3,"file":"lepu.device-names.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.device-names.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,iBAAiB,EAAE,SAAS,MAAM,EA2OvC,CAAC;AAEF,gFAAgF;AAChF,QAAA,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAqClD,CAAC;AAEF,gGAAgG;AAChG,QAAA,MAAM,kCAAkC,EAAE,SAAS,MAAM,EAGxD,CAAC;AAEF,OAAO,EACL,kCAAkC,EAClC,iBAAiB,EACjB,4BAA4B,GAC7B,CAAC"}
1
+ {"version":3,"file":"lepu.device-names.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/lepu/lepu.device-names.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,iBAAiB,EAAE,SAAS,MAAM,EA4OvC,CAAC;AAEF,gFAAgF;AAChF,QAAA,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAqClD,CAAC;AAEF,gGAAgG;AAChG,QAAA,MAAM,kCAAkC,EAAE,SAAS,MAAM,EAGxD,CAAC;AAEF,OAAO,EACL,kCAAkC,EAClC,iBAAiB,EACjB,4BAA4B,GAC7B,CAAC"}
@@ -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 ap20MainServices: IService[];
7
+ /** Viatom AP-20 and AP-20-WPS realtime oximeter driver. */
8
+ export declare class Ap20Device extends BTManagedDevice<IntegratedDevices.AP20> {
9
+ protected mainServices: IService[];
10
+ protected stuckDataTimeout: number;
11
+ protected onStreamStart: undefined;
12
+ protected preferredMtu: number;
13
+ constructor(device: Device, params: CreateDeviceParams<IntegratedDevices.AP20>);
14
+ protected handleSuccessResult(): void;
15
+ }
16
+ //# sourceMappingURL=ap20.device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ap20.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/ap20.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,gBAAgB,EAAE,QAAQ,EAStC,CAAC;AAEF,2DAA2D;AAC3D,qBAAa,UAAW,SAAQ,eAAe,CAAC,iBAAiB,CAAC,IAAI,CAAC;IACrE,SAAS,CAAC,YAAY,aAAoB;IAC1C,SAAS,CAAC,gBAAgB,SAAU;IACpC,SAAS,CAAC,aAAa,YAAa;IACpC,UAAmB,YAAY,SAAO;gBAGpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,IAAI,CAAC;IAoBpD,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAGtC"}
@@ -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 biolandBgmMainServices: IService[];
7
+ /** Bioland BGM glucose meter using the 5A length-prefixed protocol. */
8
+ export declare class BiolandBgmDevice extends BTManagedDevice<IntegratedDevices.BIOLAND_BGM> {
9
+ protected mainServices: IService[];
10
+ protected stuckDataTimeout: number;
11
+ protected onStreamStart: undefined;
12
+ protected preferredMtu: number;
13
+ constructor(device: Device, params: CreateDeviceParams<IntegratedDevices.BIOLAND_BGM>);
14
+ protected handleSuccessResult(): void;
15
+ }
16
+ //# sourceMappingURL=bioland.bgm.device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bioland.bgm.device.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/bioland.bgm.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,sBAAsB,EAAE,QAAQ,EAS5C,CAAC;AAEF,uEAAuE;AACvE,qBAAa,gBAAiB,SAAQ,eAAe,CAAC,iBAAiB,CAAC,WAAW,CAAC;IAClF,SAAS,CAAC,YAAY,aAA0B;IAChD,SAAS,CAAC,gBAAgB,SAAU;IACpC,SAAS,CAAC,aAAa,YAAa;IACpC,UAAmB,YAAY,SAAO;gBAGpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,WAAW,CAAC;IAmB3D,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAGtC"}
@@ -0,0 +1,26 @@
1
+ import { FrameReadResult } from "../../../types/frame-read-result";
2
+ import { FrameReader } from "../../../types/frame-reader";
3
+ export declare const BIOLAND_SERVICE = "00001000-0000-1000-8000-00805f9b34fb";
4
+ export declare const BIOLAND_WRITE = "00001001-0000-1000-8000-00805f9b34fb";
5
+ export declare const BIOLAND_NOTIFY = "00001002-0000-1000-8000-00805f9b34fb";
6
+ export declare const BiolandCommand: {
7
+ readonly info: 0;
8
+ readonly data: 3;
9
+ };
10
+ export declare const biolandGetInfo: (now?: Date) => string[];
11
+ export declare const biolandGetData: (now?: Date) => string[];
12
+ export interface BiolandResponse {
13
+ command: number;
14
+ content: string[];
15
+ }
16
+ export declare const decodeBiolandResponse: (bytes: readonly string[]) => BiolandResponse | undefined;
17
+ export interface BiolandGlucoseResult {
18
+ bloodGlucose: number;
19
+ recordedAt: Date;
20
+ }
21
+ export declare const parseBiolandGlucoseResult: (content: readonly string[]) => BiolandGlucoseResult | undefined;
22
+ /** Reads split and concatenated 5A length-prefixed Bioland frames. */
23
+ export declare class BiolandFrameReader implements FrameReader {
24
+ readFrame(buffer: readonly string[]): FrameReadResult;
25
+ }
26
+ //# sourceMappingURL=bioland.bgm.protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bioland.bgm.protocol.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/viatom/bioland.bgm.protocol.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,eAAO,MAAM,eAAe,yCAAyC,CAAC;AACtE,eAAO,MAAM,aAAa,yCAAyC,CAAC;AACpE,eAAO,MAAM,cAAc,yCAAyC,CAAC;AAErE,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAgCX,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAAM,EACf,CAAC;AAEpC,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAAM,EACf,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB,GAChC,OAAO,SAAS,MAAM,EAAE,KACvB,eAAe,GAAG,SAqBpB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC;CAClB;AAED,eAAO,MAAM,yBAAyB,GACpC,SAAS,SAAS,MAAM,EAAE,KACzB,oBAAoB,GAAG,SAiCzB,CAAC;AAEF,sEAAsE;AACtE,qBAAa,kBAAmB,YAAW,WAAW;IAC7C,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe;CAoC7D"}