@ovok/native 1.10.12 → 1.10.14

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 (592) hide show
  1. package/lib/commonjs/modules/bt-device/components/btdevice-instruction.js +1 -1
  2. package/lib/commonjs/modules/bt-device/components/btdevice-instruction.js.map +1 -1
  3. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +4 -78
  4. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  5. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js +577 -0
  6. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js.map +1 -0
  7. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +2 -0
  8. package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
  9. package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js +1 -0
  10. package/lib/commonjs/modules/bt-management/constants/built-in-measurement-types.js.map +1 -1
  11. package/lib/commonjs/modules/bt-management/constants/device-variants.js +2 -1
  12. package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -1
  13. package/lib/commonjs/modules/bt-management/constants/no-parsing-cases.js +12 -0
  14. package/lib/commonjs/modules/bt-management/constants/no-parsing-cases.js.map +1 -0
  15. package/lib/commonjs/modules/bt-management/constants/transtek-a6-bp-device-variants.js +478 -0
  16. package/lib/commonjs/modules/bt-management/constants/transtek-a6-bp-device-variants.js.map +1 -0
  17. package/lib/commonjs/modules/bt-management/core/resolve-device-key.js +8 -1
  18. package/lib/commonjs/modules/bt-management/core/resolve-device-key.js.map +1 -1
  19. package/lib/commonjs/modules/bt-management/services/device-classes.js +3 -2
  20. package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js +0 -4
  22. package/lib/commonjs/modules/bt-management/services/devices/a606/a606.device.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js +3 -10
  24. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -1
  25. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +12 -12
  26. package/lib/commonjs/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +2 -8
  28. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js +2 -9
  30. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +12 -11
  32. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.device.js +0 -1
  34. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.device.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +1 -3
  36. package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  37. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  38. package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.device.js +0 -4
  39. package/lib/commonjs/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +5 -0
  41. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  42. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-ecg.device.js +2 -13
  43. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-ecg.device.js.map +1 -1
  44. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-pod.device.js +0 -4
  45. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme-pod.device.js.map +1 -1
  46. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js +0 -4
  47. package/lib/commonjs/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -1
  48. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js +2 -9
  49. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -1
  50. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +14 -17
  51. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -1
  52. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -2
  53. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  54. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  56. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js +2 -9
  57. package/lib/commonjs/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -1
  58. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js +3 -9
  59. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -1
  60. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +10 -9
  61. package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -1
  62. package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +0 -1
  63. package/lib/commonjs/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -1
  64. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js +2 -8
  65. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -1
  66. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js +10 -9
  67. package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -1
  68. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +2 -9
  69. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
  70. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js +10 -12
  71. package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -1
  72. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +5 -4
  73. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  74. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +4 -6
  75. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  76. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js +3 -9
  77. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -1
  78. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +4 -3
  79. package/lib/commonjs/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -1
  80. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js +103 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js.map +1 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js +97 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js.map +1 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +7 -1
  85. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -1
  86. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +5 -53
  87. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -1
  88. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.device.js +53 -0
  89. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.device.js.map +1 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.sequencer.js +70 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6.sequencer.js.map +1 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js +3 -10
  93. package/lib/commonjs/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -1
  94. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js +4 -10
  95. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -1
  96. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +21 -21
  97. package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -1
  98. package/lib/commonjs/modules/bt-management/services/devices/trasense/s9.device.js +0 -4
  99. package/lib/commonjs/modules/bt-management/services/devices/trasense/s9.device.js.map +1 -1
  100. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.activity-device.js +0 -4
  101. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.activity-device.js.map +1 -1
  102. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +2 -1
  103. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -1
  104. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +0 -6
  105. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
  106. package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js +2 -9
  107. package/lib/commonjs/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -1
  108. package/lib/commonjs/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js +2 -9
  109. package/lib/commonjs/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js.map +1 -1
  110. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +2 -9
  111. package/lib/commonjs/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -1
  112. package/lib/commonjs/modules/bt-management/services/devices/viatom/oxy-s3.device.js +3 -10
  113. package/lib/commonjs/modules/bt-management/services/devices/viatom/oxy-s3.device.js.map +1 -1
  114. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js +2 -9
  115. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -1
  116. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc80b.device.js +2 -9
  117. package/lib/commonjs/modules/bt-management/services/devices/viatom/pc80b.device.js.map +1 -1
  118. package/lib/commonjs/modules/bt-management/services/devices/viatom/pf10aw1.device.js +2 -9
  119. package/lib/commonjs/modules/bt-management/services/devices/viatom/pf10aw1.device.js.map +1 -1
  120. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +2 -9
  121. package/lib/commonjs/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -1
  122. package/lib/commonjs/modules/bt-management/services/devices/viatom/sp20.device.js +2 -9
  123. package/lib/commonjs/modules/bt-management/services/devices/viatom/sp20.device.js.map +1 -1
  124. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-r20.device.js +2 -9
  125. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom-r20.device.js.map +1 -1
  126. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +2 -9
  127. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -1
  128. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +2 -9
  129. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -1
  130. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +2 -9
  131. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -1
  132. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pm10.device.js +3 -10
  133. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.pm10.device.js.map +1 -1
  134. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js +3 -10
  135. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js.map +1 -1
  136. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js +2 -9
  137. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -1
  138. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js +16 -16
  139. package/lib/commonjs/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -1
  140. package/lib/commonjs/modules/bt-management/types/clock-sync.js +1 -0
  141. package/lib/commonjs/modules/bt-management/types/clock-sync.js.map +1 -1
  142. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +1 -0
  143. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  144. package/lib/commonjs/modules/bt-management/utils/bytes-to-hex.js +10 -0
  145. package/lib/commonjs/modules/bt-management/utils/bytes-to-hex.js.map +1 -0
  146. package/lib/commonjs/modules/bt-management/utils/frame-bytes.js +11 -0
  147. package/lib/commonjs/modules/bt-management/utils/frame-bytes.js.map +1 -0
  148. package/lib/commonjs/modules/bt-management/utils/sig-uuid.js +10 -0
  149. package/lib/commonjs/modules/bt-management/utils/sig-uuid.js.map +1 -0
  150. package/lib/module/modules/bt-device/components/btdevice-instruction.js +1 -1
  151. package/lib/module/modules/bt-device/components/btdevice-instruction.js.map +1 -1
  152. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +4 -78
  153. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  154. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js +575 -0
  155. package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.js.map +1 -0
  156. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +2 -0
  157. package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -1
  158. package/lib/module/modules/bt-management/constants/built-in-measurement-types.js +1 -0
  159. package/lib/module/modules/bt-management/constants/built-in-measurement-types.js.map +1 -1
  160. package/lib/module/modules/bt-management/constants/device-variants.js +2 -1
  161. package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -1
  162. package/lib/module/modules/bt-management/constants/no-parsing-cases.js +8 -0
  163. package/lib/module/modules/bt-management/constants/no-parsing-cases.js.map +1 -0
  164. package/lib/module/modules/bt-management/constants/transtek-a6-bp-device-variants.js +476 -0
  165. package/lib/module/modules/bt-management/constants/transtek-a6-bp-device-variants.js.map +1 -0
  166. package/lib/module/modules/bt-management/core/resolve-device-key.js +7 -1
  167. package/lib/module/modules/bt-management/core/resolve-device-key.js.map +1 -1
  168. package/lib/module/modules/bt-management/services/device-classes.js +3 -2
  169. package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
  170. package/lib/module/modules/bt-management/services/devices/a606/a606.device.js +0 -4
  171. package/lib/module/modules/bt-management/services/devices/a606/a606.device.js.map +1 -1
  172. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js +3 -10
  173. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.device.js.map +1 -1
  174. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js +12 -12
  175. package/lib/module/modules/bt-management/services/devices/and-medical/and-medical.protocol.js.map +1 -1
  176. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +2 -8
  177. package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -1
  178. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js +2 -9
  179. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -1
  180. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +12 -11
  181. package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -1
  182. package/lib/module/modules/bt-management/services/devices/aoj/aoj.device.js +0 -1
  183. package/lib/module/modules/bt-management/services/devices/aoj/aoj.device.js.map +1 -1
  184. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +1 -3
  185. package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
  186. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  187. package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.device.js +0 -4
  188. package/lib/module/modules/bt-management/services/devices/bpw1/bpw1.device.js.map +1 -1
  189. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +5 -0
  190. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  191. package/lib/module/modules/bt-management/services/devices/checkme/checkme-ecg.device.js +2 -13
  192. package/lib/module/modules/bt-management/services/devices/checkme/checkme-ecg.device.js.map +1 -1
  193. package/lib/module/modules/bt-management/services/devices/checkme/checkme-pod.device.js +0 -4
  194. package/lib/module/modules/bt-management/services/devices/checkme/checkme-pod.device.js.map +1 -1
  195. package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js +0 -4
  196. package/lib/module/modules/bt-management/services/devices/checkme/checkme.device.js.map +1 -1
  197. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js +2 -9
  198. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.device.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js +13 -15
  200. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.protocol.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -2
  202. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  203. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  204. package/lib/module/modules/bt-management/services/devices/f4/f4.device.js.map +1 -1
  205. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js +2 -9
  206. package/lib/module/modules/bt-management/services/devices/f5/f5-scale.device.js.map +1 -1
  207. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js +3 -9
  208. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -1
  209. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +10 -9
  210. package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -1
  211. package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js +0 -1
  212. package/lib/module/modules/bt-management/services/devices/genial-t31/genial-t31.device.js.map +1 -1
  213. package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js +2 -8
  214. package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -1
  215. package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js +10 -9
  216. package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -1
  217. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +2 -9
  218. package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -1
  219. package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js +10 -12
  220. package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -1
  221. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +2 -1
  222. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -1
  223. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +2 -3
  224. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -1
  225. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js +3 -9
  226. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.device.js.map +1 -1
  227. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js +4 -3
  228. package/lib/module/modules/bt-management/services/devices/taidoc/taidoc.protocol.js.map +1 -1
  229. package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js +98 -0
  230. package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.js.map +1 -0
  231. package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js +92 -0
  232. package/lib/module/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.js.map +1 -0
  233. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js +6 -0
  234. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.protocol.js.map +1 -1
  235. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js +6 -54
  236. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.sequencer.js.map +1 -1
  237. package/lib/module/modules/bt-management/services/devices/transtek/a6.device.js +48 -0
  238. package/lib/module/modules/bt-management/services/devices/transtek/a6.device.js.map +1 -0
  239. package/lib/module/modules/bt-management/services/devices/transtek/a6.sequencer.js +66 -0
  240. package/lib/module/modules/bt-management/services/devices/transtek/a6.sequencer.js.map +1 -0
  241. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js +3 -10
  242. package/lib/module/modules/bt-management/services/devices/transtek/mambo-a5.device.js.map +1 -1
  243. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js +4 -10
  244. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -1
  245. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +21 -21
  246. package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -1
  247. package/lib/module/modules/bt-management/services/devices/trasense/s9.device.js +0 -4
  248. package/lib/module/modules/bt-management/services/devices/trasense/s9.device.js.map +1 -1
  249. package/lib/module/modules/bt-management/services/devices/veroval/veroval.activity-device.js +0 -4
  250. package/lib/module/modules/bt-management/services/devices/veroval/veroval.activity-device.js.map +1 -1
  251. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +2 -1
  252. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -1
  253. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +0 -6
  254. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -1
  255. package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js +2 -9
  256. package/lib/module/modules/bt-management/services/devices/viatom/ap20.device.js.map +1 -1
  257. package/lib/module/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js +2 -9
  258. package/lib/module/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.js.map +1 -1
  259. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js +2 -9
  260. package/lib/module/modules/bt-management/services/devices/viatom/bioland.bgm.device.js.map +1 -1
  261. package/lib/module/modules/bt-management/services/devices/viatom/oxy-s3.device.js +3 -10
  262. package/lib/module/modules/bt-management/services/devices/viatom/oxy-s3.device.js.map +1 -1
  263. package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js +2 -9
  264. package/lib/module/modules/bt-management/services/devices/viatom/pc68b.device.js.map +1 -1
  265. package/lib/module/modules/bt-management/services/devices/viatom/pc80b.device.js +2 -9
  266. package/lib/module/modules/bt-management/services/devices/viatom/pc80b.device.js.map +1 -1
  267. package/lib/module/modules/bt-management/services/devices/viatom/pf10aw1.device.js +2 -9
  268. package/lib/module/modules/bt-management/services/devices/viatom/pf10aw1.device.js.map +1 -1
  269. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js +2 -9
  270. package/lib/module/modules/bt-management/services/devices/viatom/poctor.m3102.device.js.map +1 -1
  271. package/lib/module/modules/bt-management/services/devices/viatom/sp20.device.js +2 -9
  272. package/lib/module/modules/bt-management/services/devices/viatom/sp20.device.js.map +1 -1
  273. package/lib/module/modules/bt-management/services/devices/viatom/viatom-r20.device.js +2 -9
  274. package/lib/module/modules/bt-management/services/devices/viatom/viatom-r20.device.js.map +1 -1
  275. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js +2 -9
  276. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bpm188.device.js.map +1 -1
  277. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js +2 -9
  278. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc100.device.js.map +1 -1
  279. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js +2 -9
  280. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pc300.device.js.map +1 -1
  281. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pm10.device.js +3 -10
  282. package/lib/module/modules/bt-management/services/devices/viatom/viatom.pm10.device.js.map +1 -1
  283. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js +3 -10
  284. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.device.js.map +1 -1
  285. package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js +2 -9
  286. package/lib/module/modules/bt-management/services/devices/yonker/yonker.device.js.map +1 -1
  287. package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js +16 -16
  288. package/lib/module/modules/bt-management/services/devices/yonker/yonker.protocol.js.map +1 -1
  289. package/lib/module/modules/bt-management/types/clock-sync.js +1 -0
  290. package/lib/module/modules/bt-management/types/clock-sync.js.map +1 -1
  291. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  292. package/lib/module/modules/bt-management/types/integrated-devices.js +1 -0
  293. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  294. package/lib/module/modules/bt-management/utils/bytes-to-hex.js +5 -0
  295. package/lib/module/modules/bt-management/utils/bytes-to-hex.js.map +1 -0
  296. package/lib/module/modules/bt-management/utils/frame-bytes.js +7 -0
  297. package/lib/module/modules/bt-management/utils/frame-bytes.js.map +1 -0
  298. package/lib/module/modules/bt-management/utils/sig-uuid.js +5 -0
  299. package/lib/module/modules/bt-management/utils/sig-uuid.js.map +1 -0
  300. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +2 -1
  301. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.d.ts +5 -0
  303. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/src/modules/bt-management/constants/no-parsing-cases.d.ts +4 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/constants/no-parsing-cases.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts +5 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts.map +1 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/core/resolve-device-key.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts +3 -2
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.device.d.ts +0 -2
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +0 -2
  317. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +9 -0
  319. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +0 -2
  321. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +0 -2
  323. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +7 -0
  325. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -1
  326. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts +0 -1
  327. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts.map +1 -1
  328. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +0 -1
  329. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +0 -1
  331. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +0 -2
  333. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -2
  335. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts +0 -4
  337. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts +0 -2
  339. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +0 -2
  341. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +0 -2
  343. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +0 -1
  345. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +0 -1
  347. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts +0 -1
  349. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +0 -2
  351. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +0 -2
  353. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +8 -0
  355. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +0 -1
  357. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +0 -2
  359. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -1
  360. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +8 -0
  361. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +0 -2
  363. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +4 -0
  365. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +1 -2
  368. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  369. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +0 -2
  370. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts +19 -0
  373. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts +27 -0
  375. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +6 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +3 -9
  379. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.device.d.ts +14 -0
  381. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.device.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts +23 -0
  383. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +0 -2
  385. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +0 -2
  387. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +10 -0
  389. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/trasense/s9.device.d.ts +0 -2
  391. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/trasense/s9.device.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts +0 -2
  393. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +0 -3
  396. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
  397. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +0 -2
  398. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -1
  399. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts +0 -2
  400. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +0 -2
  402. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -1
  403. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts +0 -2
  404. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +0 -2
  406. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts +0 -2
  408. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts +0 -2
  410. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +0 -2
  412. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts +0 -2
  414. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts +0 -2
  416. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +0 -2
  418. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -1
  419. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +0 -2
  420. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -1
  421. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +0 -2
  422. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts +0 -2
  424. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts +0 -2
  426. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +0 -2
  428. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +8 -0
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +1 -0
  433. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  435. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/modules/bt-management/utils/bytes-to-hex.d.ts +3 -0
  437. package/lib/typescript/commonjs/src/modules/bt-management/utils/bytes-to-hex.d.ts.map +1 -0
  438. package/lib/typescript/commonjs/src/modules/bt-management/utils/frame-bytes.d.ts +3 -0
  439. package/lib/typescript/commonjs/src/modules/bt-management/utils/frame-bytes.d.ts.map +1 -0
  440. package/lib/typescript/commonjs/src/modules/bt-management/utils/sig-uuid.d.ts +3 -0
  441. package/lib/typescript/commonjs/src/modules/bt-management/utils/sig-uuid.d.ts.map +1 -0
  442. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts +2 -1
  443. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  444. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.d.ts +5 -0
  445. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-a6-bp-variants.d.ts.map +1 -0
  446. package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -1
  447. package/lib/typescript/module/src/modules/bt-management/constants/built-in-measurement-types.d.ts.map +1 -1
  448. package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts.map +1 -1
  449. package/lib/typescript/module/src/modules/bt-management/constants/no-parsing-cases.d.ts +4 -0
  450. package/lib/typescript/module/src/modules/bt-management/constants/no-parsing-cases.d.ts.map +1 -0
  451. package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts +5 -0
  452. package/lib/typescript/module/src/modules/bt-management/constants/transtek-a6-bp-device-variants.d.ts.map +1 -0
  453. package/lib/typescript/module/src/modules/bt-management/core/resolve-device-key.d.ts.map +1 -1
  454. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts +3 -2
  455. package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
  456. package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.device.d.ts +0 -2
  457. package/lib/typescript/module/src/modules/bt-management/services/devices/a606/a606.device.d.ts.map +1 -1
  458. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts +0 -2
  459. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.device.d.ts.map +1 -1
  460. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts +9 -0
  461. package/lib/typescript/module/src/modules/bt-management/services/devices/and-medical/and-medical.protocol.d.ts.map +1 -1
  462. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +0 -2
  463. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -1
  464. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +0 -2
  465. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -1
  466. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +7 -0
  467. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -1
  468. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts +0 -1
  469. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.device.d.ts.map +1 -1
  470. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +0 -1
  471. package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
  472. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +0 -1
  473. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  474. package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts +0 -2
  475. package/lib/typescript/module/src/modules/bt-management/services/devices/bpw1/bpw1.device.d.ts.map +1 -1
  476. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +3 -2
  477. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  478. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts +0 -4
  479. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-ecg.device.d.ts.map +1 -1
  480. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts +0 -2
  481. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme-pod.device.d.ts.map +1 -1
  482. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts +0 -2
  483. package/lib/typescript/module/src/modules/bt-management/services/devices/checkme/checkme.device.d.ts.map +1 -1
  484. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts +0 -2
  485. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.device.d.ts.map +1 -1
  486. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts +0 -1
  487. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.protocol.d.ts.map +1 -1
  488. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +0 -1
  489. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  490. package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts +0 -1
  491. package/lib/typescript/module/src/modules/bt-management/services/devices/f4/f4.device.d.ts.map +1 -1
  492. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts +0 -2
  493. package/lib/typescript/module/src/modules/bt-management/services/devices/f5/f5-scale.device.d.ts.map +1 -1
  494. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +0 -2
  495. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -1
  496. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +8 -0
  497. package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -1
  498. package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts +0 -1
  499. package/lib/typescript/module/src/modules/bt-management/services/devices/genial-t31/genial-t31.device.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +0 -2
  501. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -1
  502. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +8 -0
  503. package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -1
  504. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +0 -2
  505. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -1
  506. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +4 -0
  507. package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -1
  508. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -1
  509. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +1 -2
  510. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -1
  511. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts +0 -2
  512. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.device.d.ts.map +1 -1
  513. package/lib/typescript/module/src/modules/bt-management/services/devices/taidoc/taidoc.protocol.d.ts.map +1 -1
  514. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts +19 -0
  515. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.d.ts.map +1 -0
  516. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts +27 -0
  517. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.d.ts.map +1 -0
  518. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts +6 -0
  519. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.protocol.d.ts.map +1 -1
  520. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts +3 -9
  521. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.sequencer.d.ts.map +1 -1
  522. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.device.d.ts +14 -0
  523. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.device.d.ts.map +1 -0
  524. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts +23 -0
  525. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6.sequencer.d.ts.map +1 -0
  526. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts +0 -2
  527. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/mambo-a5.device.d.ts.map +1 -1
  528. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +0 -2
  529. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -1
  530. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +10 -0
  531. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -1
  532. package/lib/typescript/module/src/modules/bt-management/services/devices/trasense/s9.device.d.ts +0 -2
  533. package/lib/typescript/module/src/modules/bt-management/services/devices/trasense/s9.device.d.ts.map +1 -1
  534. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts +0 -2
  535. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.activity-device.d.ts.map +1 -1
  536. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -1
  537. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +0 -3
  538. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -1
  539. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts +0 -2
  540. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/ap20.device.d.ts.map +1 -1
  541. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts +0 -2
  542. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/baby-sleep-clip.device.d.ts.map +1 -1
  543. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts +0 -2
  544. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/bioland.bgm.device.d.ts.map +1 -1
  545. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts +0 -2
  546. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/oxy-s3.device.d.ts.map +1 -1
  547. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts +0 -2
  548. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc68b.device.d.ts.map +1 -1
  549. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts +0 -2
  550. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pc80b.device.d.ts.map +1 -1
  551. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts +0 -2
  552. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/pf10aw1.device.d.ts.map +1 -1
  553. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts +0 -2
  554. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/poctor.m3102.device.d.ts.map +1 -1
  555. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts +0 -2
  556. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/sp20.device.d.ts.map +1 -1
  557. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts +0 -2
  558. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom-r20.device.d.ts.map +1 -1
  559. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts +0 -2
  560. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bpm188.device.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts +0 -2
  562. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc100.device.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts +0 -2
  564. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pc300.device.d.ts.map +1 -1
  565. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts +0 -2
  566. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.pm10.device.d.ts.map +1 -1
  567. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts +0 -2
  568. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.device.d.ts.map +1 -1
  569. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts +0 -2
  570. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.device.d.ts.map +1 -1
  571. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts +8 -0
  572. package/lib/typescript/module/src/modules/bt-management/services/devices/yonker/yonker.protocol.d.ts.map +1 -1
  573. package/lib/typescript/module/src/modules/bt-management/types/clock-sync.d.ts.map +1 -1
  574. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +1 -0
  575. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  576. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +1 -0
  577. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  578. package/lib/typescript/module/src/modules/bt-management/utils/bytes-to-hex.d.ts +3 -0
  579. package/lib/typescript/module/src/modules/bt-management/utils/bytes-to-hex.d.ts.map +1 -0
  580. package/lib/typescript/module/src/modules/bt-management/utils/frame-bytes.d.ts +3 -0
  581. package/lib/typescript/module/src/modules/bt-management/utils/frame-bytes.d.ts.map +1 -0
  582. package/lib/typescript/module/src/modules/bt-management/utils/sig-uuid.d.ts +3 -0
  583. package/lib/typescript/module/src/modules/bt-management/utils/sig-uuid.d.ts.map +1 -0
  584. package/package.json +1 -1
  585. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js +0 -50
  586. package/lib/commonjs/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +0 -1
  587. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js +0 -45
  588. package/lib/module/modules/bt-management/services/devices/transtek/a6-scale.device.js.map +0 -1
  589. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +0 -16
  590. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +0 -1
  591. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts +0 -16
  592. package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/a6-scale.device.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["IntegratedDevices","BTManagedDevice","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","TaidocFrameReader","TaidocSequencer","KIND","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","passThrough","caseValuePosition","cases","taidocMainServices","uuid","monitorUuids","parsingModel","TaidocDeviceClass","mainServices","stuckDataTimeout","onStreamStart","undefined","constructor","device","params","frameReader","createCommandSequencer","kind","deviceName","onResult","result","handleSuccessResult","TaidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.device.ts"],"mappings":";;AAIA,SAASA,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,sBAAmB;AAE5F,SAASC,eAAe,QAAQ,uBAAoB;AASpD,MAAMC,IAAsC,GAAG;EAC7C,CAACN,iBAAiB,CAACO,YAAY,GAAG,OAAO;EACzC,CAACP,iBAAiB,CAACQ,UAAU,GAAG,KAAK;EACrC,CAACR,iBAAiB,CAACS,kBAAkB,GAAG,aAAa;EACrD,CAACT,iBAAiB,CAACU,eAAe,GAAG,UAAU;EAC/C,CAACV,iBAAiB,CAACW,YAAY,GAAG;AACpC,CAAC;;AAED;AACA,MAAMC,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEb,cAAc;EACpBc,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEd,qBAAqB;IAAEgB,YAAY,EAAEN;EAAY,CAAC;AAC3E,CAAC,CACF;;AAED;AACA,MAAMO,iBAAiB,SAASlB,eAAe,CAAe;EAClDmB,YAAY,GAAGL,kBAAkB;EACjCM,gBAAgB,GAAG,MAAM;EACzBC,aAAa,GAAGC,SAAS;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIvB,iBAAiB,CAAC,CAAC;IAC1C,IAAI,CAACwB,sBAAsB,GAAG,MAC5B,IAAIvB,eAAe,CAAC;MAClBwB,IAAI,EAAEvB,IAAI,CAACoB,MAAM,CAACI,UAAU,CAAC;MAC7BC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;EAEUC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAEA,SAASd,iBAAiB,IAAIe,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["NO_PARSING_CASES","IntegratedDevices","BTManagedDevice","TAIDOC_CHARACTERISTIC","TAIDOC_SERVICE","TaidocFrameReader","TaidocSequencer","KIND","TAIDOC_MULTI","TAIDOC_BPM","TAIDOC_THERMOMETER","TAIDOC_OXIMETER","TAIDOC_SCALE","taidocMainServices","uuid","monitorUuids","parsingModel","TaidocDeviceClass","mainServices","stuckDataTimeout","constructor","device","params","frameReader","createCommandSequencer","kind","deviceName","onResult","result","TaidocDevice"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.device.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,wCAAqC;AAGtE,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,sBAAmB;AAE5F,SAASC,eAAe,QAAQ,uBAAoB;AASpD,MAAMC,IAAsC,GAAG;EAC7C,CAACN,iBAAiB,CAACO,YAAY,GAAG,OAAO;EACzC,CAACP,iBAAiB,CAACQ,UAAU,GAAG,KAAK;EACrC,CAACR,iBAAiB,CAACS,kBAAkB,GAAG,aAAa;EACrD,CAACT,iBAAiB,CAACU,eAAe,GAAG,UAAU;EAC/C,CAACV,iBAAiB,CAACW,YAAY,GAAG;AACpC,CAAC;;AAED;;AAEA,MAAMC,kBAA8B,GAAG,CACrC;EACEC,IAAI,EAAEV,cAAc;EACpBW,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEX,qBAAqB;IAAEa,YAAY,EAAEhB;EAAiB,CAAC;AAChF,CAAC,CACF;;AAED;AACA,MAAMiB,iBAAiB,SAASf,eAAe,CAAe;EAClDgB,YAAY,GAAGL,kBAAkB;EACjCM,gBAAgB,GAAG,MAAM;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAwC,EAAE;IAC3E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IACrB,IAAI,CAACC,WAAW,GAAG,IAAIlB,iBAAiB,CAAC,CAAC;IAC1C,IAAI,CAACmB,sBAAsB,GAAG,MAC5B,IAAIlB,eAAe,CAAC;MAClBmB,IAAI,EAAElB,IAAI,CAACe,MAAM,CAACI,UAAU,CAAC;MAC7BC,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF;IACJ,CAAC,CAAC;EACN;AAEF;AAEA,SAASX,iBAAiB,IAAIY,YAAY","ignoreList":[]}
@@ -3,6 +3,8 @@
3
3
  /* eslint-disable import/group-exports */
4
4
 
5
5
  import { FrameReadStatus } from "../../../types/frame-read-status.js";
6
+ import { bytesToHex } from "../../../utils/bytes-to-hex.js";
7
+ import { frameBytes } from "../../../utils/frame-bytes.js";
6
8
  import { hexToByte } from "../../../utils/hex-to-byte.js";
7
9
 
8
10
  /**
@@ -39,10 +41,9 @@ const HOST_END = 0xa3;
39
41
  const DEVICE_END = 0xa5;
40
42
  const FIXED_FRAME_BYTES = 8;
41
43
  const VARIABLE_COMMANDS = [TAIDOC.weightRecord, TAIDOC.setUser];
42
- const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
43
44
  const byteAt = (frame, index) => hexToByte(frame[index] ?? "00");
44
45
  const sum = bytes => bytes.reduce((total, value) => total + value, 0) & 0xff;
45
- const withChecksum = bytes => toHex([...bytes, sum(bytes)]);
46
+ const withChecksum = bytes => bytesToHex([...bytes, sum(bytes)]);
46
47
  export const commandOf = frame => byteAt(frame, 1);
47
48
 
48
49
  /** `51 cmd a b c d A3 cs`. */
@@ -86,7 +87,7 @@ export class TaidocFrameReader {
86
87
  };
87
88
  }
88
89
  const received = buffer.slice(start, start + length);
89
- const bytes = received.map(byte => hexToByte(byte));
90
+ const bytes = frameBytes(received);
90
91
  const end = bytes[length - 2];
91
92
  if (end !== HOST_END && end !== DEVICE_END || sum(bytes.slice(0, -1)) !== bytes[length - 1]) {
92
93
  return {
@@ -1 +1 @@
1
- {"version":3,"names":["FrameReadStatus","hexToByte","TAIDOC_SERVICE","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","toHex","bytes","map","value","toString","padStart","byteAt","frame","index","sum","reduce","total","withChecksum","commandOf","taidocCommand","command","a","b","c","d","readingCountCommand","user","readingCommand","setTimeCommand","now","date","getFullYear","getMonth","getDate","getMinutes","getHours","weightRecordCommand","isHostFrame","length","TaidocFrameReader","readFrame","buffer","start","findIndex","byte","status","INCOMPLETE","consumedBytes","includes","received","slice","end","CORRUPT","COMPLETE","MULTI_USER_CODES","Set","usersFor","has","readCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.protocol.ts"],"mappings":";;AAAA;;AAGA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te","TAIDOC_SERVICE","TAIDOC_CHARACTERISTIC","TAIDOC","wakeUp","deviceTime","model","readingTime","readingResult","serial1","serial2","oximeterAfterTime","readingCount","setTime","shutdown","wakeNotice","weightRecord","setUser","busy","START","HOST_END","DEVICE_END","FIXED_FRAME_BYTES","VARIABLE_COMMANDS","byteAt","frame","index","sum","bytes","reduce","total","value","withChecksum","commandOf","taidocCommand","command","a","b","c","d","readingCountCommand","user","readingCommand","setTimeCommand","now","date","getFullYear","getMonth","getDate","getMinutes","getHours","weightRecordCommand","isHostFrame","length","TaidocFrameReader","readFrame","buffer","start","findIndex","byte","status","INCOMPLETE","consumedBytes","includes","received","slice","end","CORRUPT","COMPLETE","MULTI_USER_CODES","Set","usersFor","has","readCount"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/taidoc/taidoc.protocol.ts"],"mappings":";;AAAA;;AAGA,SAASA,eAAe,QAAQ,qCAAkC;AAElE,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,UAAU,QAAQ,+BAA4B;AACvD,SAASC,SAAS,QAAQ,+BAA4B;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,qBAAqB,GAAG,sCAAsC;AAE3E,OAAO,MAAMC,MAAM,GAAG;EACpBC,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,IAAI;EAChBC,KAAK,EAAE,IAAI;EACXC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,OAAO,EAAE,IAAI;EACbC,OAAO,EAAE,IAAI;EACbC,iBAAiB,EAAE,IAAI;EACvBC,YAAY,EAAE,IAAI;EAClBC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,UAAU,EAAE,IAAI;EAChBC,YAAY,EAAE,IAAI;EAClBC,OAAO,EAAE,IAAI;EACbC,IAAI,EAAE;AACR,CAAU;AAEV,MAAMC,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C+D,gBAAgB,CAACG,GAAG,CAAChD,MAAM,CAAClB,KAAK,EAAE,CAAC,CAAC,GAAIkB,MAAM,CAAClB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,GAAG,CAAC;;AAE1E;AACA,OAAO,MAAMmE,SAAS,GAAIhD,KAAwB,IAChDD,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,GAAID,MAAM,CAACC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAE","ignoreList":[]}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ import { readA6Uint } from "./a6-scale.protocol.js";
4
+ const A6_BPM_EPOCH_MS = Date.UTC(2009, 11, 31, 16, 0, 0);
5
+ const KPA_TO_MMHG = 7.500617;
6
+ const RECORD_FLAGS = 0x0000030f;
7
+ const readA6Int16 = (bytes, offset) => {
8
+ const value = readA6Uint(bytes, offset, 2);
9
+ return value > 0x7fff ? value - 0x10000 : value;
10
+ };
11
+
12
+ /**
13
+ * Reads the A6 BPM MeasureDataBpm body from Transtek Health 2.0.5's
14
+ * LSBloodPressure(byte[]) parser.
15
+ * Fixed prefix: remaining count, flags, systolic, diastolic, mean pressure, status. Optional
16
+ * fields follow in pulse, user, vendor UTC, timezone, local-time order. The APK ignores the
17
+ * timezone and seven local-time bytes; only the vendor UTC value is exposed as a timestamp.
18
+ */
19
+ export const parseA6BloodPressure = body => {
20
+ if (body.length < 14) {
21
+ return undefined;
22
+ }
23
+ const bytes = body.map(value => (value & 0xff).toString(16).padStart(2, "0"));
24
+ const flags = readA6Uint(bytes, 2, 4);
25
+ if ((flags & ~RECORD_FLAGS) !== 0) {
26
+ return undefined;
27
+ }
28
+ const rawSystolic = readA6Int16(bytes, 6);
29
+ const rawDiastolic = readA6Int16(bytes, 8);
30
+ const rawMeanPressure = readA6Int16(bytes, 10);
31
+ const status = readA6Uint(bytes, 12, 2);
32
+ const multiplier = (flags & 0x01) !== 0 ? KPA_TO_MMHG : 1;
33
+ const systolic = Math.round(rawSystolic * multiplier);
34
+ const diastolic = Math.round(rawDiastolic * multiplier);
35
+ const meanArterialPressure = rawMeanPressure > 0 ? Math.round(rawMeanPressure * multiplier) : undefined;
36
+ if (systolic <= 0 || diastolic <= 0) {
37
+ return undefined;
38
+ }
39
+ let offset = 14;
40
+ let heartRate;
41
+ let memorySlot;
42
+ let recordedAt;
43
+ if ((flags & 0x02) !== 0) {
44
+ if (body.length < offset + 2) {
45
+ return undefined;
46
+ }
47
+ heartRate = readA6Int16(bytes, offset);
48
+ offset += 2;
49
+ }
50
+ if ((flags & 0x04) !== 0) {
51
+ if (body.length < offset + 1) {
52
+ return undefined;
53
+ }
54
+ memorySlot = body[offset] ?? 0;
55
+ offset += 1;
56
+ }
57
+ if ((flags & 0x08) !== 0) {
58
+ if (body.length < offset + 4) {
59
+ return undefined;
60
+ }
61
+ const vendorSeconds = readA6Uint(bytes, offset, 4);
62
+ recordedAt = new Date(A6_BPM_EPOCH_MS + vendorSeconds * 1000);
63
+ offset += 4;
64
+ }
65
+ if ((flags & 0x100) !== 0) {
66
+ if (body.length < offset + 1) {
67
+ return undefined;
68
+ }
69
+ offset += 1;
70
+ }
71
+ if ((flags & 0x200) !== 0) {
72
+ if (body.length < offset + 7) {
73
+ return undefined;
74
+ }
75
+ offset += 7;
76
+ }
77
+ if (body.length < offset) {
78
+ return undefined;
79
+ }
80
+ return {
81
+ systolic,
82
+ diastolic,
83
+ ...(meanArterialPressure !== undefined ? {
84
+ meanArterialPressure
85
+ } : {}),
86
+ ...(heartRate !== undefined && heartRate > 0 ? {
87
+ heartRate
88
+ } : {}),
89
+ ...(memorySlot !== undefined ? {
90
+ memorySlot
91
+ } : {}),
92
+ irregularHeartbeat: (status & 0x04) !== 0,
93
+ ...(recordedAt ? {
94
+ recordedAt
95
+ } : {})
96
+ };
97
+ };
98
+ //# sourceMappingURL=a6-blood-pressure.measurements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["readA6Uint","A6_BPM_EPOCH_MS","Date","UTC","KPA_TO_MMHG","RECORD_FLAGS","readA6Int16","bytes","offset","value","parseA6BloodPressure","body","length","undefined","map","toString","padStart","flags","rawSystolic","rawDiastolic","rawMeanPressure","status","multiplier","systolic","Math","round","diastolic","meanArterialPressure","heartRate","memorySlot","recordedAt","vendorSeconds","irregularHeartbeat"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-blood-pressure.measurements.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,wBAAqB;AAEhD,MAAMC,eAAe,GAAGC,IAAI,CAACC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,MAAMC,WAAW,GAAG,QAAQ;AAC5B,MAAMC,YAAY,GAAG,UAAU;AAY/B,MAAMC,WAAW,GAAGA,CAACC,KAAwB,EAAEC,MAAc,KAAa;EACxE,MAAMC,KAAK,GAAGT,UAAU,CAACO,KAAK,EAAEC,MAAM,EAAE,CAAC,CAAC;EAE1C,OAAOC,KAAK,GAAG,MAAM,GAAGA,KAAK,GAAG,OAAO,GAAGA,KAAK;AACjD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAC/BC,IAAuB,IACoB;EAC3C,IAAIA,IAAI,CAACC,MAAM,GAAG,EAAE,EAAE;IACpB,OAAOC,SAAS;EAClB;EAEA,MAAMN,KAAK,GAAGI,IAAI,CAACG,GAAG,CAAEL,KAAK,IAC3B,CAACA,KAAK,GAAG,IAAI,EAAEM,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAC7C,CAAC;EAED,MAAMC,KAAK,GAAGjB,UAAU,CAACO,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;EAErC,IAAI,CAACU,KAAK,GAAG,CAACZ,YAAY,MAAM,CAAC,EAAE;IACjC,OAAOQ,SAAS;EAClB;EAEA,MAAMK,WAA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,CAAC","ignoreList":[]}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ import { MeasurementTypeKey } from "@ovok/core";
4
+ import { CaseType } from "../../../types/case-type.js";
5
+ import { getClockParts, isClockSyncEnabled } from "../../../types/clock-sync.js";
6
+ import { parseA6BloodPressure } from "./a6-blood-pressure.measurements.js";
7
+ import { A6_BPM_MEASUREMENT, A6_BPM_SERVICE, A6_BPM_SETTING_RESPONSE, A6_BPM_START_MEASURING_RESPONSE, A6_BPM_SYNC, A6_BPM_TIME, A6_SCALE_WRITE, decodeA6Command, encodeA6Command, readA6Uint } from "./a6-scale.protocol.js";
8
+ import { A6Sequencer } from "./a6.sequencer.js";
9
+ const vendorEpochSeconds = Date.UTC(2010, 0, 1) / 1000;
10
+ const byte = value => (value & 0xff).toString(16).padStart(2, "0");
11
+
12
+ /** Vendor BP time is wall-clock seconds from 2010-01-01, encoded big-endian. */
13
+ const buildA6BloodPressureTimeBody = (now, timezone = "local") => {
14
+ const parts = getClockParts(now, timezone);
15
+ const seconds = Date.UTC(parts.year, parts.month - 1, parts.day, parts.hours, parts.minutes, parts.seconds) / 1000 - vendorEpochSeconds;
16
+ const encoded = Math.floor(seconds) >>> 0;
17
+ return [0x01, encoded >>> 24 & 0xff, encoded >>> 16 & 0xff, encoded >>> 8 & 0xff, encoded & 0xff];
18
+ };
19
+
20
+ /** Answers A6 BP login/settings requests, then fetches the cuff's BP history. */
21
+ class A6BloodPressureSequencer extends A6Sequencer {
22
+ userNumber = 0;
23
+ waitingForClockSettingResponse = false;
24
+ historySyncSent = false;
25
+ constructor(options) {
26
+ super(A6_BPM_SERVICE, options);
27
+ this.options = options;
28
+ }
29
+ processMessage = content => {
30
+ const message = decodeA6Command(content, this.key);
31
+ if (!message) {
32
+ return [];
33
+ }
34
+ if (message.command === 0x0007) {
35
+ if (message.body.length < 8) {
36
+ return [];
37
+ }
38
+ this.userNumber = message.body[6] ?? 0;
39
+ const response = encodeA6Command(0x0008, [0x01, ...message.body.slice(0, 6), 0x00, 0x02], this.key);
40
+ if (!response) {
41
+ return [];
42
+ }
43
+ const replies = [this.command(A6_SCALE_WRITE, response)];
44
+ if (isClockSyncEnabled(this.options.clockSync)) {
45
+ const now = this.options.clockSync?.now?.() ?? new Date();
46
+ const time = encodeA6Command(A6_BPM_TIME, buildA6BloodPressureTimeBody(now, this.options.clockSync?.timezone), this.key);
47
+ if (time) {
48
+ this.waitingForClockSettingResponse = true;
49
+ replies.push(this.command(A6_SCALE_WRITE, time, 500));
50
+ }
51
+ } else {
52
+ replies.push(...this.startHistorySync(500));
53
+ }
54
+ return replies;
55
+ }
56
+ if (message.command === A6_BPM_SETTING_RESPONSE) {
57
+ if (!this.waitingForClockSettingResponse) {
58
+ return [];
59
+ }
60
+ this.waitingForClockSettingResponse = false;
61
+ return this.startHistorySync(500);
62
+ }
63
+ if (message.command === A6_BPM_MEASUREMENT || message.command === A6_BPM_START_MEASURING_RESPONSE) {
64
+ if (message.command === A6_BPM_START_MEASURING_RESPONSE && readA6Uint(message.body.map(byte), 0, 2) === 1) {
65
+ return [];
66
+ }
67
+ const reading = parseA6BloodPressure(message.body);
68
+ if (reading) {
69
+ this.options.onResult({
70
+ caseType: CaseType.RESULT,
71
+ measurementTypeKey: MeasurementTypeKey.bloodPressure,
72
+ ...reading,
73
+ memorySlot: reading.memorySlot ?? this.userNumber
74
+ });
75
+ }
76
+ }
77
+ return [];
78
+ };
79
+ startHistorySync = delayBeforeWriteMs => {
80
+ if (this.historySyncSent) {
81
+ return [];
82
+ }
83
+ const sync = encodeA6Command(A6_BPM_SYNC, [this.userNumber, 0x01], this.key);
84
+ if (!sync) {
85
+ return [];
86
+ }
87
+ this.historySyncSent = true;
88
+ return [this.command(A6_SCALE_WRITE, sync, delayBeforeWriteMs)];
89
+ };
90
+ }
91
+ export { A6BloodPressureSequencer, buildA6BloodPressureTimeBody };
92
+ //# sourceMappingURL=a6-blood-pressure.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","getClockParts","isClockSyncEnabled","parseA6BloodPressure","A6_BPM_MEASUREMENT","A6_BPM_SERVICE","A6_BPM_SETTING_RESPONSE","A6_BPM_START_MEASURING_RESPONSE","A6_BPM_SYNC","A6_BPM_TIME","A6_SCALE_WRITE","decodeA6Command","encodeA6Command","readA6Uint","A6Sequencer","vendorEpochSeconds","Date","UTC","byte","value","toString","padStart","buildA6BloodPressureTimeBody","now","timezone","parts","seconds","year","month","day","hours","minutes","encoded","Math","floor","A6BloodPressureSequencer","userNumber","waitingForClockSettingResponse","historySyncSent","constructor","options","processMessage","content","message","key","command","body","length","response","slice","replies","clockSync","time","push","startHistorySync","map","reading","onResult","caseType","RESULT","measurementTypeKey","bloodPressure","memorySlot","delayBeforeWriteMs","sync"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-blood-pressure.sequencer.ts"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,YAAY;AAE/C,SAASC,QAAQ,QAAQ,6BAA0B;AACnD,SAEEC,aAAa,EACbC,kBAAkB,QACb,8BAA2B;AAMlC,SAASC,oBAAoB,QAAQ,qCAAkC;AACvE,SACEC,kBAAkB,EAClBC,cAAc,EACdC,uBAAuB,EACvBC,+BAA+B,EAC/BC,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,UAAU,QACL,wBAAqB;AAC5B,SAASC,WAAW,QAAQ,mBAAgB;AAa5C,MAAMC,kBAAkB,GAAGC,IAAI,CAACC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;AAEtD,MAAMC,IAAI,GAAIC,KAAa,IACzB,CAACA,KAAK,GAAG,IAAI,EAAEC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;;AAG9C;AACA,MAAMC,4BAA4B,GAAGA,CACnCC,GAAS,EACTC,QAAsC,GAAG,OAAO,KACnC;EACb,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,OAAO,KAAKtC,+BAA+B,EACnD;MACA,IACEoC,OAAO,CAACE,OAAO,KAAKtC,+BAA+B,IACnDM,UAAU,CAAC8B,OAAO,CAACG,IAAI,CAACS,GAAG,CAACrC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,EAC9C;QACA,OAAO,EAAE;MACX;MAEA,MAAMsC,OAAO,GAAGrD,oBAAoB,CAACwC,OAAO,CAACG,IAAI,CAAC;MAElD,IAAIU,OAAO,EAAE;QACX,IAAI,CAAChB,OAAO,CAACiB,QAAQ,CAAC;UACpBC,QAAQ,EAAE1D,QAAQ,CAAC2D,MAAM;UACzBC,kBAAkB,EAAE7D,kBAAkB,CAAC8D,aAAa;UACpD,GAAGL,OAAO;UACVM,UAAU,EAAEN,OAAO,CAACM,UAAU,IAAI,IAAI,CAAC1B;QACzC,CAA0B,CAAC;MAC7B;IACF;IAEA,OAAO,EAAE;EACX,CAAC;EAEOkB,gBAAgB,GAAIS,kBAA0B,IAAsB;IAC1E,IAAI,IAAI,CAACzB,eAAe,EAAE;MACxB,OAAO,EAAE;IACX;IAEA,MAAM0B,IAAI,GAAGpD,eAAe,CAC1BJ,WAAW,EACX,CAAC,IAAI,CAAC4B,UAAU,EAAE,IAAI,CAAC,EACvB,IAAI,CAACQ,GACP,CAAC;IAED,IAAI,CAACoB,IAAI,EAAE;MACT,OAAO,EAAE;IACX;IAEA,IAAI,CAAC1B,eAAe,GAAG,IAAI;IAE3B,OAAO,CAAC,IAAI,CAACO,OAAO,CAACnC,cAAc,EAAEsD,IAAI,EAAED,kBAAkB,CAAC,CAAC;EACjE,CAAC;AACH;AAEA,SAAS5B,wBAAwB,EAAEb,4BAA4B","ignoreList":[]}
@@ -6,10 +6,16 @@ import CryptoJS from "crypto-js";
6
6
  import { FrameReadStatus } from "../../../types/frame-read-status.js";
7
7
  import { base64ToHex } from "../../../utils/base-64-to-hex.js";
8
8
  export const A6_SCALE_SERVICE = "0000a602-0000-1000-8000-00805f9b34fb";
9
+ export const A6_BPM_SERVICE = "0000a610-0000-1000-8000-00805f9b34fb";
9
10
  export const A6_SCALE_NOTIFY = "0000a621-0000-1000-8000-00805f9b34fb";
10
11
  export const A6_SCALE_WRITE = "0000a624-0000-1000-8000-00805f9b34fb";
11
12
  export const A6_SCALE_ACK = "0000a622-0000-1000-8000-00805f9b34fb";
12
13
  export const A6_SCALE_WEIGHT = 0x4802;
14
+ export const A6_BPM_SYNC = 0x4901;
15
+ export const A6_BPM_MEASUREMENT = 0x4902;
16
+ export const A6_BPM_START_MEASURING_RESPONSE = 0x4906;
17
+ export const A6_BPM_TIME = 0x1102;
18
+ export const A6_BPM_SETTING_RESPONSE = 0x1100;
13
19
  const byte = value => Number.parseInt(value ?? "00", 16) || 0;
14
20
  export const readA6Uint = (bytes, offset, length) => bytes.slice(offset, offset + length).reduce((value, current) => value * 256 + byte(current), 0);
15
21
  const bytesToHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0")).join("");
@@ -1 +1 @@
1
- {"version":3,"names":["CryptoJS","FrameReadStatus","base64ToHex","A6_SCALE_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_WRITE","A6_SCALE_ACK","A6_SCALE_WEIGHT","byte","value","Number","parseInt","readA6Uint","bytes","offset","length","slice","reduce","current","bytesToHex","map","toString","padStart","join","hexToBytes","hex","match","a6EncryptionKey","deviceId","manufacturerData","mac","replace","toLowerCase","manufacturer","test","startsWith","undefined","prefix","Array","from","character","charCodeAt","encryptA6Body","body","key","padded","fill","encrypted","AES","encrypt","enc","Hex","parse","mode","ECB","padding","pad","NoPadding","stringify","ciphertext","decryptA6Body","lib","CipherParams","create","decrypted","decrypt","encodeA6Command","command","encodedBody","content","A6ScaleFrameReader","readFrame","buffer","status","INCOMPLETE","consumedBytes","control","frameCount","frameIndex","contentLength","CORRUPT","COMPLETE","frame","decodeA6Command","a6CommandBody"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.protocol.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ptoJS","FrameReadStatus","base64ToHex","A6_SCALE_SERVICE","A6_BPM_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_WRITE","A6_SCALE_ACK","A6_SCALE_WEIGHT","A6_BPM_SYNC","A6_BPM_MEASUREMENT","A6_BPM_START_MEASURING_RESPONSE","A6_BPM_TIME","A6_BPM_SETTING_RESPONSE","byte","value","Number","parseInt","readA6Uint","bytes","offset","length","slice","reduce","current","bytesToHex","map","toString","padStart","join","hexToBytes","hex","match","a6EncryptionKey","deviceId","manufacturerData","mac","replace","toLowerCase","manufacturer","test","startsWith","undefined","prefix","Array","from","character","charCodeAt","encryptA6Body","body","key","padded","fill","encrypted","AES","encrypt","enc","Hex","parse","mode","ECB","padding","pad","NoPadding","stringify","ciphertext","decryptA6Body","lib","CipherParams","create","decrypted","decrypt","encodeA6Command","command","encodedBody","content","A6ScaleFrameReader","readFrame","buffer","status","INCOMPLETE","consumedBytes","control","frameCount","frameIndex","contentLength","CORRUPT","COMPLETE","frame","decodeA6Command","a6CommandBody"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.protocol.ts"],"mappings":";;AAAA;;AAEA,OAAOA,QAAQ,MAAM,WAAW;AAGhC,SAASC,eAAe,QAAQ,qCAAkC;AAElE,SAASC,WAAW,QAAQ,kCAA+B;AAE3D,OAAO,MAAMC,gBAAgB,GAAG,sCAAsC;AACtE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,eAAe,GAAG,sCAAsC;AACrE,OAAO,MAAMC,cAAc,GAAG,sCAAsC;AACpE,OAAO,MAAMC,YAAY,GAAG,sCAAsC;AAClE,OAAO,MAAMC,eAAe,GAAG,MAAM;AACrC,OAAO,MAAMC,WAAW,GAAG,MAAM;AACjC,OAAO,MAAMC,kBAAkB,GAAG,MAAM;AACxC,OAAO,MAAMC,+BAA+B,GAAG,MAAM;AACrD,OAAO,MAAMC,WAAW,GAAG,MAAM;AACjC,OAAO,MAAMC,uB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AC,EAAE;MACrC,OAAO;QAAEN,MAAM,EAAE9E,eAAe,CAAC+E,UAAU;QAAEC,aAAa,EAAE;MAAE,CAAC;IACjE;IAEA,OAAO;MACLF,MAAM,EAAE9E,eAAe,CAACsF,QAAQ;MAChCN,aAAa,EAAEI,aAAa,GAAG,CAAC;MAChCG,KAAK,EAAEV,MAAM,CAACxD,KAAK,CAAC,CAAC,EAAE+D,aAAa,GAAG,CAAC;IAC1C,CAAC;EACH;AACF;AAEA,OAAO,MAAMI,eAAe,GAAGA,CAC7Bd,OAA0B,EAC1BzB,GAAY,KACwC;EACpD,IAAIyB,OAAO,CAACtD,MAAM,GAAG,CAAC,EAAE;IACtB,OAAOqB,SAAS;EAClB;EAEA,MAAM+B,OAAO,GAAGvD,UAAU,CAACyD,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;EACzC,MAAM1B,IAAI,GAAGiB,aAAa,CAACS,OAAO,CAACrD,KAAK,CAAC,CAAC,CAAC,EAAE4B,GAAG,CAAC;EAEjD,OAAOD,IAAI,GAAG;IAAEwB,OAAO;IAAExB;EAAK,CAAC,GAAGP,SAAS;AAC7C,CAAC;AAED,OAAO,MAAMgD,aAAa,GAAIF,KAAwB,IAAe;EACnE,MAAMH,aAAa,GAAGvE,IAAI,CAAC0E,KAAK,CAAC,CAAC,CAAC,CAAC;EAEpC,OAAOA,KAAK,CAAClE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG+D,aAAa,CAAC;AAC1C,CAAC","ignoreList":[]}
@@ -3,63 +3,15 @@
3
3
  import { MeasurementTypeKey } from "@ovok/core";
4
4
  import { CaseType } from "../../../types/case-type.js";
5
5
  import { parseA6Weight } from "./a6-scale.measurements.js";
6
- import { A6_SCALE_ACK, A6_SCALE_SERVICE, A6_SCALE_WEIGHT, A6_SCALE_WRITE, a6CommandBody, a6EncryptionKey, decodeA6Command, encodeA6Command } from "./a6-scale.protocol.js";
7
- const command = (characteristicUuid, frame, delayBeforeWriteMs) => ({
8
- serviceUuid: A6_SCALE_SERVICE,
9
- characteristicUuid,
10
- frame,
11
- ...(delayBeforeWriteMs ? {
12
- delayBeforeWriteMs
13
- } : {})
14
- });
15
-
6
+ import { A6_SCALE_SERVICE, A6_SCALE_WEIGHT, A6_SCALE_WRITE, decodeA6Command, encodeA6Command } from "./a6-scale.protocol.js";
7
+ import { A6Sequencer } from "./a6.sequencer.js";
16
8
  /** Answers A6 authentication/init requests and decodes the scale's weight records. */
17
- export class A6ScaleSequencer {
18
- expectedFragmentCount = 0;
9
+ export class A6ScaleSequencer extends A6Sequencer {
19
10
  userNumber = 0;
20
11
  constructor(options) {
12
+ super(A6_SCALE_SERVICE, options);
21
13
  this.options = options;
22
- this.key = a6EncryptionKey(options.deviceId, options.manufacturerData);
23
14
  }
24
- initialCommands = () => [];
25
- isHistoryTransfer = () => true;
26
- nextCommand = frame => {
27
- const content = a6CommandBody(frame);
28
- const control = Number.parseInt(frame[0] ?? "00", 16) || 0;
29
- const count = control >> 4;
30
- const index = control & 0x0f;
31
- const replies = [];
32
- if (count === 0) {
33
- return replies;
34
- }
35
- if (!(count === 1 && content.length === 1 && content[0] === "01")) {
36
- replies.push(command(A6_SCALE_ACK, ["00", "01", "01"]));
37
- }
38
- if (count === 1) {
39
- replies.push(...this.processMessage(content));
40
- return replies;
41
- }
42
- if (index === 0) {
43
- this.fragments = Array.from({
44
- length: count
45
- }, () => []);
46
- this.expectedFragmentCount = count;
47
- }
48
- if (!this.fragments || this.expectedFragmentCount !== count) {
49
- this.fragments = undefined;
50
- this.expectedFragmentCount = 0;
51
- return replies;
52
- }
53
- this.fragments[index] = content;
54
- if (this.fragments.some(part => part.length === 0)) {
55
- return replies;
56
- }
57
- const assembled = this.fragments.flat();
58
- this.fragments = undefined;
59
- this.expectedFragmentCount = 0;
60
- replies.push(...this.processMessage(assembled));
61
- return replies;
62
- };
63
15
  processMessage = content => {
64
16
  const message = decodeA6Command(content, this.key);
65
17
  if (!message) {
@@ -71,7 +23,7 @@ export class A6ScaleSequencer {
71
23
  }
72
24
  this.userNumber = message.body[6] ?? 0;
73
25
  const response = encodeA6Command(0x0008, [0x01, ...message.body.slice(0, 6), 0x00, 0x02], this.key);
74
- return response ? [command(A6_SCALE_WRITE, response)] : [];
26
+ return response ? [this.command(A6_SCALE_WRITE, response)] : [];
75
27
  }
76
28
  if (message.command === 0x0009) {
77
29
  const now = this.options.clockSync?.now?.() ?? new Date();
@@ -79,7 +31,7 @@ export class A6ScaleSequencer {
79
31
  const timezone = this.options.clockSync?.timezone === "utc" ? 48 : 48 - Math.round(now.getTimezoneOffset() / 15);
80
32
  const response = encodeA6Command(0x000a, [0x18, seconds >>> 24 & 0xff, seconds >>> 16 & 0xff, seconds >>> 8 & 0xff, seconds & 0xff, timezone], this.key);
81
33
  const sync = encodeA6Command(0x4801, [this.userNumber, 1], this.key);
82
- return [...(response ? [command(A6_SCALE_WRITE, response)] : []), ...(sync ? [command(A6_SCALE_WRITE, sync, 500)] : [])];
34
+ return [...(response ? [this.command(A6_SCALE_WRITE, response)] : []), ...(sync ? [this.command(A6_SCALE_WRITE, sync, 500)] : [])];
83
35
  }
84
36
  if (message.command === A6_SCALE_WEIGHT) {
85
37
  const weight = parseA6Weight(message.body);
@@ -1 +1 @@
1
- {"version":3,"names":["MeasurementTypeKey","CaseType","parseA6Weight","A6_SCALE_ACK","A6_SCALE_SERVICE","A6_SCALE_WEIGHT","A6_SCALE_WRITE","a6CommandBody","a6EncryptionKey","decodeA6Command","encodeA6Command","command","characteristicUuid","frame","delayBeforeWriteMs","serviceUuid","A6ScaleSequencer","expectedFragmentCount","userNumber","constructor","options","key","deviceId","manufacturerData","initialCommands","isHistoryTransfer","nextCommand","content","control","Number","parseInt","count","index","replies","length","push","processMessage","fragments","Array","from","undefined","some","part","assembled","flat","message","body","response","slice","now","clockSync","Date","seconds","Math","floor","getTime","timezone","round","getTimezoneOffset","sync","weight","onResult","caseType","RESULT","measurementTypeKey","bodyWeight"],"sourceRoot":"../../../../../../../src","sources":["modules/b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GAAI,IAAI,EACtBA,OAAO,KAAK,EAAE,GAAI,IAAI,EACtBA,OAAO,KAAK,CAAC,GAAI,IAAI,EACtBA,OAAO,GAAG,IAAI,EACdI,QAAQ,CACT,EACD,IAAI,CAACnC,GACP,CAAC;MAED,MAAMsC,IAAI,GAAGjD,eAAe,CAAC,MAAM,EAAE,CAAC,IAAI,CAACQ,UAAU,EAAE,CAAC,CAAC,EAAE,IAAI,CAACG,GAAG,CAAC;MAEpE,OAAO,CACL,IAAI0B,QAAQ,GAAG,CAACpC,OAAO,CAACL,cAAc,EAAEyC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,EACxD,IAAIY,IAAI,GAAG,CAAChD,OAAO,CAACL,cAAc,EAAEqD,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CACtD;IACH;IAEA,IAAId,OAAO,CAAClC,OAAO,KAAKN,eAAe,EAAE;MACvC,MAAMuD,MAAM,GAAG1D,aAAa,CAAC2C,OAAO,CAACC,IAAI,CAAC;MAE1C,IAAIc,MAAM,EAAE;QACV,IAAI,CAACxC,OAAO,CAACyC,QAAQ,CAAC;UACpBC,QAAQ,EAAE7D,QAAQ,CAAC8D,MAAM;UACzBC,kBAAkB,EAAEhE,kBAAkB,CAACiE,UAAU;UACjD,GAAGL;QACL,CAAa,CAAC;MAChB;IACF;IAEA,OAAO,EAAE;EACX,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["MeasurementTypeKey","CaseType","parseA6Weight","A6_SCALE_SERVICE","A6_SCALE_WEIGHT","A6_SCALE_WRITE","decodeA6Command","encodeA6Command","A6Sequencer","A6ScaleSequencer","userNumber","constructor","options","processMessage","content","message","key","command","body","length","response","slice","now","clockSync","Date","seconds","Math","floor","getTime","timezone","round","getTimezoneOffset","sync","weight","onResult","caseType","RESULT","measurementTypeKey","bodyWeight"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6-scale.sequencer.ts"],"mappings":";;AAAA,SAASA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a,CAAC;MAChB;IACF;IAEA,OAAO,EAAE;EACX,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ import { NO_PARSING_CASES } from "../../../constants/no-parsing-cases.js";
4
+ import { IntegratedDevices } from "../../../types/integrated-devices.js";
5
+ import { BTManagedDevice } from "../bt-managed-device.js";
6
+ import { A6BloodPressureSequencer } from "./a6-blood-pressure.sequencer.js";
7
+ import { A6_BPM_SERVICE, A6_SCALE_NOTIFY, A6_SCALE_SERVICE, A6_SCALE_WRITE, A6ScaleFrameReader } from "./a6-scale.protocol.js";
8
+ import { A6ScaleSequencer } from "./a6-scale.sequencer.js";
9
+ /** What differs between the A6 scale (A602) and the A6 blood-pressure monitor (A610). */
10
+ const A6_DEVICES = {
11
+ [IntegratedDevices.RPM_SCALE]: {
12
+ service: A6_SCALE_SERVICE,
13
+ sequencer: options => new A6ScaleSequencer(options)
14
+ },
15
+ [IntegratedDevices.TRANSTEK_A6_BPM]: {
16
+ service: A6_BPM_SERVICE,
17
+ sequencer: options => new A6BloodPressureSequencer(options)
18
+ }
19
+ };
20
+ const servicesFor = service => [{
21
+ uuid: service,
22
+ monitorUuids: [{
23
+ uuid: A6_SCALE_NOTIFY,
24
+ parsingModel: NO_PARSING_CASES
25
+ }],
26
+ writeUuid: {
27
+ uuid: A6_SCALE_WRITE,
28
+ mainCommandUuid: "0007"
29
+ }
30
+ }];
31
+
32
+ /** Transtek A6-generation devices: the GBS-2012-B scale family and the A6 blood-pressure monitors. */
33
+ export class TranstekA6Device extends BTManagedDevice {
34
+ stuckDataTimeout = 60_000;
35
+ constructor(device, params) {
36
+ super(device, params);
37
+ const a6 = A6_DEVICES[params.deviceName];
38
+ this.mainServices = servicesFor(a6.service);
39
+ this.frameReader = new A6ScaleFrameReader();
40
+ this.createCommandSequencer = () => a6.sequencer({
41
+ deviceId: device.id,
42
+ manufacturerData: device.manufacturerData,
43
+ clockSync: params.clockSync,
44
+ onResult: result => this.onResult?.(result)
45
+ });
46
+ }
47
+ }
48
+ //# sourceMappingURL=a6.device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NO_PARSING_CASES","IntegratedDevices","BTManagedDevice","A6BloodPressureSequencer","A6_BPM_SERVICE","A6_SCALE_NOTIFY","A6_SCALE_SERVICE","A6_SCALE_WRITE","A6ScaleFrameReader","A6ScaleSequencer","A6_DEVICES","RPM_SCALE","service","sequencer","options","TRANSTEK_A6_BPM","servicesFor","uuid","monitorUuids","parsingModel","writeUuid","mainCommandUuid","TranstekA6Device","stuckDataTimeout","constructor","device","params","a6","deviceName","mainServices","frameReader","createCommandSequencer","deviceId","id","manufacturerData","clockSync","onResult","result"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6.device.ts"],"mappings":";;AAEA,SAASA,gBAAgB,QAAQ,wCAAqC;AAKtE,SAASC,iBAAiB,QAAQ,sCAAmC;AAGrE,SAASC,eAAe,QAAQ,yBAAsB;AAEtD,SAASC,wBAAwB,QAAQ,kCAA+B;AACxE,SACEC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,kBAAkB,QACb,wBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,yBAAsB;AAWvD;AACA,MAAMC,UAAkH,GAAG;EACzH,CAACT,iBAAiB,CAACU,SAAS,GAAG;IAC7BC,OAAO,EAAEN,gBAAgB;IACzBO,SAAS,EAAGC,OAAO,IAAK,IAAIL,gBAAgB,CAACK,OAAO;EACtD,CAAC;EACD,CAACb,iBAAiB,CAACc,eAAe,GAAG;IACnCH,OAAO,EAAER,cAAc;IACvBS,SAAS,EAAGC,OAAO,IAAK,IAAIX,wBAAwB,CAACW,OAAO;EAC9D;AACF,CAAC;AAED,MAAME,WAAW,GAAIJ,OAAe,IAAiB,CACnD;EACEK,IAAI,EAAEL,OAAO;EACbM,YAAY,EAAE,CAAC;IAAED,IAAI,EAAEZ,eAAe;IAAEc,YAAY,EAAEnB;EAAiB,CAAC,CAAC;EACzEoB,SAAS,EAAE;IAAEH,IAAI,EAAEV,cAAc;IAAEc,eAAe,EAAE;EAAO;AAC7D,CAAC,CACF;;AAED;AACA,OAAO,MAAMC,gBAAgB,SAASpB,eAAe,CAAgB;EAEzDqB,gBAAgB,GAAG,MAAM;EAE5BC,WAAWA,CAACC,MAAc,EAAEC,MAAyC,EAAE;IAC5E,KAAK,CAACD,MAAM,EAAEC,MAAM,CAAC;IAErB,MAAMC,EAAE,GAAGjB,UAAU,CAACgB,MAAM,CAACE,UAAU,CAAC;IAExC,IAAI,CAACC,YAAY,GAAGb,WAAW,CAACW,EAAE,CAACf,OAAO,CAAC;IAC3C,IAAI,CAACkB,WAAW,GAAG,IAAItB,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACuB,sBAAsB,GAAG,MAC5BJ,EAAE,CAACd,SAAS,CAAC;MACXmB,QAAQ,EAAEP,MAAM,CAACQ,EAAE;MACnBC,gBAAgB,EAAET,MAAM,CAACS,gBAAgB;MACzCC,SAAS,EAAET,MAAM,CAACS,SAAS;MAC3BC,QAAQ,EAAGC,MAAM,IAAK,IAAI,CAACD,QAAQ,GAAGC,MAAM;IAC9C,CAAC,CAAC;EACN;AACF","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ import { A6_SCALE_ACK, a6CommandBody, a6EncryptionKey } from "./a6-scale.protocol.js";
4
+
5
+ /**
6
+ * The A6 session both Transtek A6 devices share: control-byte framing, fragment reassembly, the
7
+ * acknowledgement of each frame, and the device's encryption key. Subclasses handle only the
8
+ * decoded messages of their own service.
9
+ */
10
+ export class A6Sequencer {
11
+ expectedFragmentCount = 0;
12
+ constructor(serviceUuid, device) {
13
+ this.serviceUuid = serviceUuid;
14
+ this.key = a6EncryptionKey(device.deviceId, device.manufacturerData);
15
+ }
16
+ initialCommands = () => [];
17
+ isHistoryTransfer = () => true;
18
+ nextCommand = frame => {
19
+ const content = a6CommandBody(frame);
20
+ const control = Number.parseInt(frame[0] ?? "00", 16) || 0;
21
+ const count = control >> 4;
22
+ const index = control & 0x0f;
23
+ const replies = [];
24
+ if (count === 0) {
25
+ return replies;
26
+ }
27
+ if (!(count === 1 && content.length === 1 && content[0] === "01")) {
28
+ replies.push(this.command(A6_SCALE_ACK, ["00", "01", "01"]));
29
+ }
30
+ if (count === 1) {
31
+ replies.push(...this.processMessage(content));
32
+ return replies;
33
+ }
34
+ if (index === 0) {
35
+ this.fragments = Array.from({
36
+ length: count
37
+ }, () => []);
38
+ this.expectedFragmentCount = count;
39
+ }
40
+ if (!this.fragments || this.expectedFragmentCount !== count) {
41
+ this.fragments = undefined;
42
+ this.expectedFragmentCount = 0;
43
+ return replies;
44
+ }
45
+ this.fragments[index] = content;
46
+ if (this.fragments.some(part => part.length === 0)) {
47
+ return replies;
48
+ }
49
+ const assembled = this.fragments.flat();
50
+ this.fragments = undefined;
51
+ this.expectedFragmentCount = 0;
52
+ replies.push(...this.processMessage(assembled));
53
+ return replies;
54
+ };
55
+ command(characteristicUuid, frame, delayBeforeWriteMs) {
56
+ return {
57
+ serviceUuid: this.serviceUuid,
58
+ characteristicUuid,
59
+ frame,
60
+ ...(delayBeforeWriteMs ? {
61
+ delayBeforeWriteMs
62
+ } : {})
63
+ };
64
+ }
65
+ }
66
+ //# sourceMappingURL=a6.sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["A6_SCALE_ACK","a6CommandBody","a6EncryptionKey","A6Sequencer","expectedFragmentCount","constructor","serviceUuid","device","key","deviceId","manufacturerData","initialCommands","isHistoryTransfer","nextCommand","frame","content","control","Number","parseInt","count","index","replies","length","push","command","processMessage","fragments","Array","from","undefined","some","part","assembled","flat","characteristicUuid","delayBeforeWriteMs"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/a6.sequencer.ts"],"mappings":";;AAGA,SAASA,YAAY,EAAEC,aAAa,EAAEC,eAAe,QAAQ,wBAAqB;;AAElF;AACA;AACA;AACA;AACA;AACA,OAAO,MAA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,CAAC,EAAE,MAAM,EAAE,CAAC;MACxD,IAAI,CAACf,qBAAqB,GAAGe,KAAK;IACpC;IACA,IAAI,CAAC,IAAI,CAACO,SAAS,IAAI,IAAI,CAACtB,qBAAqB,KAAKe,KAAK,EAAE;MAC3D,IAAI,CAACO,SAAS,GAAGG,SAAS;MAC1B,IAAI,CAACzB,qBAAqB,GAAG,CAAC;MAE9B,OAAOiB,OAAO;IAChB;IAEA,IAAI,CAACK,SAAS,CAACN,KAAK,CAAC,GAAGL,OAAO;IAC/B,IAAI,IAAI,CAACW,SAAS,CAACI,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACT,MAAM,KAAK,CAAC,CAAC,EAAE;MACpD,OAAOD,OAAO;IAChB;IAEA,MAAMW,SAAS,GAAG,IAAI,CAACN,SAAS,CAACO,IAAI,CAAC,CAAC;IAEvC,IAAI,CAACP,SAAS,GAAGG,SAAS;IAC1B,IAAI,CAACzB,qBAAqB,GAAG,CAAC;IAC9BiB,OAAO,CAACE,IAAI,CAAC,GAAG,IAAI,CAACE,cAAc,CAACO,SAAS,CAAC,CAAC;IAE/C,OAAOX,OAAO;EAChB,CAAC;EAISG,OAAOA,CACfU,kBAA0B,EAC1BpB,KAAwB,EACxBqB,kBAA2B,EACZ;IACf,OAAO;MACL7B,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7B4B,kBAAkB;MAClBpB,KAAK;MACL,IAAIqB,kBAAkB,GAAG;QAAEA;MAAmB,CAAC,GAAG,CAAC,CAAC;IACtD,CAAC;EACH;AACF","ignoreList":[]}
@@ -1,21 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  import { MeasurementTypeKey } from "@ovok/core";
4
+ import { NO_PARSING_CASES } from "../../../constants/no-parsing-cases.js";
4
5
  import { BTManagedDevice } from "../bt-managed-device.js";
5
6
  import { MAMBO_A5_LOGIN, MAMBO_A5_NOTIFY, MAMBO_A5_SERVICE, MAMBO_A5_WRITE, MamboA5FrameReader } from "./mambo-a5.protocol.js";
6
7
  import { MamboA5Sequencer } from "./mambo-a5.sequencer.js";
7
- const acceptNothing = {
8
- caseValuePosition: [],
9
- cases: []
10
- };
11
8
  const mainServices = [{
12
9
  uuid: MAMBO_A5_SERVICE,
13
10
  monitorUuids: [{
14
11
  uuid: MAMBO_A5_LOGIN,
15
- parsingModel: acceptNothing
12
+ parsingModel: NO_PARSING_CASES
16
13
  }, {
17
14
  uuid: MAMBO_A5_NOTIFY,
18
- parsingModel: acceptNothing
15
+ parsingModel: NO_PARSING_CASES
19
16
  }],
20
17
  writeUuid: {
21
18
  uuid: MAMBO_A5_WRITE,
@@ -27,7 +24,6 @@ const mainServices = [{
27
24
  export class MamboA5Device extends BTManagedDevice {
28
25
  mainServices = mainServices;
29
26
  stuckDataTimeout = 60_000;
30
- onStreamStart = undefined;
31
27
  getSupportedMeasurementTypeKeys() {
32
28
  return [MeasurementTypeKey.bloodOxygenPulseRate];
33
29
  }
@@ -39,8 +35,5 @@ export class MamboA5Device extends BTManagedDevice {
39
35
  onResult: result => this.onResult?.(result)
40
36
  });
41
37
  }
42
- handleSuccessResult() {
43
- return;
44
- }
45
38
  }
46
39
  //# sourceMappingURL=mambo-a5.device.js.map