incyclist-devices 3.0.0 → 3.0.1
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.
- package/lib/cjs/antv2/base/adapter.js +459 -0
- package/lib/cjs/antv2/base/binding.js +27 -0
- package/lib/cjs/antv2/base/interface.js +399 -0
- package/lib/cjs/antv2/cad/adapter.js +25 -0
- package/lib/cjs/antv2/cad/index.js +7 -0
- package/lib/cjs/antv2/consts.js +5 -0
- package/lib/cjs/antv2/factories/adapter-factory.js +75 -0
- package/lib/cjs/antv2/factories/index.js +17 -0
- package/lib/cjs/antv2/factories/sensor-factory.js +23 -0
- package/lib/cjs/antv2/fe/adapter.js +273 -0
- package/lib/cjs/antv2/fe/index.js +7 -0
- package/lib/cjs/antv2/hr/adapter.js +30 -0
- package/lib/cjs/antv2/hr/index.js +7 -0
- package/lib/cjs/antv2/index.js +33 -0
- package/lib/cjs/antv2/pwr/adapter.js +67 -0
- package/lib/cjs/antv2/pwr/index.js +7 -0
- package/lib/cjs/antv2/sc/adapter.js +30 -0
- package/lib/cjs/antv2/sc/index.js +7 -0
- package/lib/cjs/antv2/spd/adapter.js +25 -0
- package/lib/cjs/antv2/spd/index.js +7 -0
- package/lib/cjs/antv2/types.js +5 -0
- package/lib/cjs/antv2/utils.js +192 -0
- package/lib/cjs/base/adpater.js +316 -0
- package/lib/cjs/base/consts.js +9 -0
- package/lib/cjs/ble/base/adapter.js +404 -0
- package/lib/cjs/ble/base/interface.js +682 -0
- package/lib/cjs/ble/base/peripheral.js +412 -0
- package/lib/cjs/ble/base/sensor.js +147 -0
- package/lib/cjs/ble/base/types.js +9 -0
- package/lib/cjs/ble/bindings/index.js +8 -0
- package/lib/cjs/ble/bindings/linux.js +48 -0
- package/lib/cjs/ble/bindings/mock.js +113 -0
- package/lib/cjs/ble/bindings/types.js +105 -0
- package/lib/cjs/ble/characteristics/csc/features.js +19 -0
- package/lib/cjs/ble/characteristics/csc/measurement.js +112 -0
- package/lib/cjs/ble/characteristics/types.js +2 -0
- package/lib/cjs/ble/consts.js +18 -0
- package/lib/cjs/ble/cp/adapter.js +91 -0
- package/lib/cjs/ble/cp/index.js +10 -0
- package/lib/cjs/ble/cp/sensor.js +105 -0
- package/lib/cjs/ble/cp/types.js +2 -0
- package/lib/cjs/ble/csc/adapter.js +55 -0
- package/lib/cjs/ble/csc/index.js +19 -0
- package/lib/cjs/ble/csc/sensor.js +58 -0
- package/lib/cjs/ble/csc/types.js +2 -0
- package/lib/cjs/ble/factories/adapter-factory.js +140 -0
- package/lib/cjs/ble/factories/index.js +18 -0
- package/lib/cjs/ble/factories/interface-factory.js +17 -0
- package/lib/cjs/ble/factories/types.js +2 -0
- package/lib/cjs/ble/fm/adapter.js +355 -0
- package/lib/cjs/ble/fm/consts.js +64 -0
- package/lib/cjs/ble/fm/index.js +13 -0
- package/lib/cjs/ble/fm/sensor.js +494 -0
- package/lib/cjs/ble/fm/types.js +2 -0
- package/lib/cjs/ble/hr/adapter.js +40 -0
- package/lib/cjs/ble/hr/index.js +10 -0
- package/lib/cjs/ble/hr/mock.js +48 -0
- package/lib/cjs/ble/hr/sensor.js +55 -0
- package/lib/cjs/ble/hr/types.js +2 -0
- package/lib/cjs/ble/index.js +46 -0
- package/lib/cjs/ble/tacx/adapter.js +54 -0
- package/lib/cjs/ble/tacx/consts.js +27 -0
- package/lib/cjs/ble/tacx/index.js +10 -0
- package/lib/cjs/ble/tacx/sensor.js +582 -0
- package/lib/cjs/ble/tacx/types.js +2 -0
- package/lib/cjs/ble/types.js +2 -0
- package/lib/cjs/ble/utils.js +144 -0
- package/lib/cjs/ble/wahoo/adapter.js +36 -0
- package/lib/cjs/ble/wahoo/consts.js +7 -0
- package/lib/cjs/ble/wahoo/index.js +10 -0
- package/lib/cjs/ble/wahoo/sensor.js +345 -0
- package/lib/cjs/ble/wahoo/types.js +2 -0
- package/lib/cjs/ble/zwift/play/adapter.js +57 -0
- package/lib/cjs/ble/zwift/play/index.js +18 -0
- package/lib/cjs/ble/zwift/play/sensor.js +512 -0
- package/lib/cjs/ble/zwift/play/types.js +2 -0
- package/lib/cjs/direct-connect/base/interface.js +362 -0
- package/lib/cjs/direct-connect/base/peripheral.js +498 -0
- package/lib/cjs/direct-connect/bindings/index.js +17 -0
- package/lib/cjs/direct-connect/bindings/types.js +2 -0
- package/lib/cjs/direct-connect/consts.js +20 -0
- package/lib/cjs/direct-connect/index.js +22 -0
- package/lib/cjs/direct-connect/messages/CharacteristicNotification.js +23 -0
- package/lib/cjs/direct-connect/messages/DiscoverCharacteristics.js +44 -0
- package/lib/cjs/direct-connect/messages/DiscoverServices.js +35 -0
- package/lib/cjs/direct-connect/messages/EnableCharacteristicNotifications.js +35 -0
- package/lib/cjs/direct-connect/messages/ReadCharacteristic.js +34 -0
- package/lib/cjs/direct-connect/messages/WriteCharacteristic.js +36 -0
- package/lib/cjs/direct-connect/messages/error.js +19 -0
- package/lib/cjs/direct-connect/messages/factory.js +44 -0
- package/lib/cjs/direct-connect/messages/index.js +25 -0
- package/lib/cjs/direct-connect/messages/message.js +109 -0
- package/lib/cjs/direct-connect/types.js +13 -0
- package/lib/cjs/factories/adapters.js +56 -0
- package/lib/cjs/factories/interfaces.js +31 -0
- package/lib/cjs/features/features.js +31 -0
- package/lib/cjs/features/index.js +17 -0
- package/lib/cjs/index.js +51 -0
- package/lib/cjs/modes/ant-fe-adv-st-mode.js +83 -0
- package/lib/cjs/modes/antble-erg.js +28 -0
- package/lib/cjs/modes/antble-smarttrainer.js +479 -0
- package/lib/cjs/modes/base.js +104 -0
- package/lib/cjs/modes/daum-classic-standard.js +61 -0
- package/lib/cjs/modes/daum-erg.js +202 -0
- package/lib/cjs/modes/daum-power.js +12 -0
- package/lib/cjs/modes/daum-premium-standard.js +76 -0
- package/lib/cjs/modes/daum-smarttrainer.js +351 -0
- package/lib/cjs/modes/fm-resistance.js +140 -0
- package/lib/cjs/modes/kettler-erg.js +135 -0
- package/lib/cjs/modes/power-base.js +271 -0
- package/lib/cjs/modes/power-meter.js +39 -0
- package/lib/cjs/modes/simulator.js +113 -0
- package/lib/cjs/modes/types.js +74 -0
- package/lib/cjs/proto/zwift_hub.js +1234 -0
- package/lib/cjs/serial/base/adapter.js +57 -0
- package/lib/cjs/serial/base/comms.js +279 -0
- package/lib/cjs/serial/base/serial-interface.js +285 -0
- package/lib/cjs/serial/base/serial-scanner.js +89 -0
- package/lib/cjs/serial/base/serialport.js +79 -0
- package/lib/cjs/serial/bindings/tcp.js +298 -0
- package/lib/cjs/serial/daum/DaumAdapter.js +503 -0
- package/lib/cjs/serial/daum/classic/adapter.js +183 -0
- package/lib/cjs/serial/daum/classic/comms.js +216 -0
- package/lib/cjs/serial/daum/classic/consts.js +5 -0
- package/lib/cjs/serial/daum/classic/mock.js +398 -0
- package/lib/cjs/serial/daum/classic/types.js +2 -0
- package/lib/cjs/serial/daum/classic/utils.js +108 -0
- package/lib/cjs/serial/daum/premium/adapter.js +216 -0
- package/lib/cjs/serial/daum/premium/comms.js +542 -0
- package/lib/cjs/serial/daum/premium/consts.js +9 -0
- package/lib/cjs/serial/daum/premium/mock.js +405 -0
- package/lib/cjs/serial/daum/premium/types.js +31 -0
- package/lib/cjs/serial/daum/premium/utils.js +350 -0
- package/lib/cjs/serial/daum/types.js +14 -0
- package/lib/cjs/serial/factories/adapter-factory.js +32 -0
- package/lib/cjs/serial/index.js +59 -0
- package/lib/cjs/serial/kettler/comms.js +283 -0
- package/lib/cjs/serial/kettler/ergo-racer/adapter.js +529 -0
- package/lib/cjs/serial/kettler/ergo-racer/mock.js +201 -0
- package/lib/cjs/serial/kettler/types.js +2 -0
- package/lib/cjs/serial/types.js +9 -0
- package/lib/cjs/simulator/Simulator.js +193 -0
- package/lib/cjs/types/adapter.js +2 -0
- package/lib/cjs/types/capabilities.js +12 -0
- package/lib/cjs/types/data.js +2 -0
- package/lib/cjs/types/device.js +13 -0
- package/lib/cjs/types/index.js +22 -0
- package/lib/cjs/types/interface.js +2 -0
- package/lib/cjs/types/user.js +9 -0
- package/lib/cjs/utils/calculations.js +158 -0
- package/lib/cjs/utils/task.js +128 -0
- package/lib/cjs/utils/utils.js +180 -0
- package/lib/esm/antv2/base/adapter.js +453 -0
- package/lib/esm/antv2/base/binding.js +24 -0
- package/lib/esm/antv2/base/interface.js +393 -0
- package/lib/esm/antv2/cad/adapter.js +19 -0
- package/lib/esm/antv2/cad/index.js +2 -0
- package/{src/antv2/consts.ts → lib/esm/antv2/consts.js} +0 -3
- package/lib/esm/antv2/factories/adapter-factory.js +72 -0
- package/lib/esm/antv2/factories/index.js +1 -0
- package/lib/esm/antv2/factories/sensor-factory.js +20 -0
- package/lib/esm/antv2/fe/adapter.js +267 -0
- package/lib/esm/antv2/fe/index.js +2 -0
- package/lib/esm/antv2/hr/adapter.js +24 -0
- package/lib/esm/antv2/hr/index.js +2 -0
- package/lib/esm/antv2/index.js +19 -0
- package/lib/esm/antv2/pwr/adapter.js +61 -0
- package/lib/esm/antv2/pwr/index.js +2 -0
- package/lib/esm/antv2/sc/adapter.js +24 -0
- package/lib/esm/antv2/sc/index.js +2 -0
- package/lib/esm/antv2/spd/adapter.js +19 -0
- package/lib/esm/antv2/spd/index.js +2 -0
- package/lib/esm/antv2/types.js +1 -0
- package/{src/antv2/utils.ts → lib/esm/antv2/utils.js} +18 -26
- package/lib/esm/base/adpater.js +310 -0
- package/{src/base/consts.ts → lib/esm/base/consts.js} +1 -5
- package/lib/esm/ble/base/adapter.js +398 -0
- package/lib/esm/ble/base/interface.js +674 -0
- package/lib/esm/ble/base/peripheral.js +408 -0
- package/lib/esm/ble/base/sensor.js +143 -0
- package/lib/esm/ble/base/types.js +5 -0
- package/lib/esm/ble/bindings/index.js +2 -0
- package/lib/esm/ble/bindings/linux.js +41 -0
- package/lib/esm/ble/bindings/mock.js +108 -0
- package/lib/esm/ble/bindings/types.js +95 -0
- package/lib/esm/ble/characteristics/csc/features.js +15 -0
- package/lib/esm/ble/characteristics/csc/measurement.js +108 -0
- package/lib/esm/ble/characteristics/types.js +1 -0
- package/lib/esm/ble/consts.js +15 -0
- package/lib/esm/ble/cp/adapter.js +85 -0
- package/lib/esm/ble/cp/index.js +3 -0
- package/lib/esm/ble/cp/sensor.js +102 -0
- package/lib/esm/ble/cp/types.js +1 -0
- package/lib/esm/ble/csc/adapter.js +48 -0
- package/lib/esm/ble/csc/index.js +3 -0
- package/lib/esm/ble/csc/sensor.js +54 -0
- package/lib/esm/ble/csc/types.js +1 -0
- package/lib/esm/ble/factories/adapter-factory.js +136 -0
- package/lib/esm/ble/factories/index.js +2 -0
- package/lib/esm/ble/factories/interface-factory.js +13 -0
- package/lib/esm/ble/factories/types.js +1 -0
- package/lib/esm/ble/fm/adapter.js +349 -0
- package/lib/esm/ble/fm/consts.js +61 -0
- package/lib/esm/ble/fm/index.js +4 -0
- package/lib/esm/ble/fm/sensor.js +491 -0
- package/lib/esm/ble/fm/types.js +1 -0
- package/lib/esm/ble/hr/adapter.js +34 -0
- package/lib/esm/ble/hr/index.js +3 -0
- package/lib/esm/ble/hr/mock.js +45 -0
- package/lib/esm/ble/hr/sensor.js +52 -0
- package/lib/esm/ble/hr/types.js +1 -0
- package/lib/esm/ble/index.js +22 -0
- package/lib/esm/ble/tacx/adapter.js +48 -0
- package/lib/esm/ble/tacx/consts.js +24 -0
- package/lib/esm/ble/tacx/index.js +3 -0
- package/lib/esm/ble/tacx/sensor.js +576 -0
- package/lib/esm/ble/tacx/types.js +1 -0
- package/lib/esm/ble/types.js +1 -0
- package/lib/esm/ble/utils.js +130 -0
- package/lib/esm/ble/wahoo/adapter.js +30 -0
- package/lib/esm/ble/wahoo/consts.js +4 -0
- package/lib/esm/ble/wahoo/index.js +3 -0
- package/lib/esm/ble/wahoo/sensor.js +339 -0
- package/lib/esm/ble/wahoo/types.js +1 -0
- package/lib/esm/ble/zwift/play/adapter.js +50 -0
- package/lib/esm/ble/zwift/play/index.js +2 -0
- package/lib/esm/ble/zwift/play/sensor.js +508 -0
- package/lib/esm/ble/zwift/play/types.js +1 -0
- package/lib/esm/direct-connect/base/interface.js +354 -0
- package/lib/esm/direct-connect/base/peripheral.js +491 -0
- package/lib/esm/direct-connect/bindings/index.js +1 -0
- package/lib/esm/direct-connect/bindings/types.js +1 -0
- package/lib/esm/direct-connect/consts.js +17 -0
- package/lib/esm/direct-connect/index.js +6 -0
- package/lib/esm/direct-connect/messages/CharacteristicNotification.js +19 -0
- package/lib/esm/direct-connect/messages/DiscoverCharacteristics.js +40 -0
- package/lib/esm/direct-connect/messages/DiscoverServices.js +31 -0
- package/lib/esm/direct-connect/messages/EnableCharacteristicNotifications.js +31 -0
- package/lib/esm/direct-connect/messages/ReadCharacteristic.js +30 -0
- package/lib/esm/direct-connect/messages/WriteCharacteristic.js +32 -0
- package/{src/direct-connect/messages/error.ts → lib/esm/direct-connect/messages/error.js} +8 -12
- package/{src/direct-connect/messages/factory.ts → lib/esm/direct-connect/messages/factory.js} +10 -16
- package/lib/esm/direct-connect/messages/index.js +9 -0
- package/lib/esm/direct-connect/messages/message.js +103 -0
- package/lib/esm/direct-connect/types.js +8 -0
- package/lib/esm/factories/adapters.js +50 -0
- package/lib/esm/factories/interfaces.js +25 -0
- package/lib/esm/features/features.js +26 -0
- package/lib/esm/features/index.js +1 -0
- package/lib/esm/index.js +18 -0
- package/lib/esm/modes/ant-fe-adv-st-mode.js +77 -0
- package/lib/esm/modes/antble-erg.js +22 -0
- package/lib/esm/modes/antble-smarttrainer.js +440 -0
- package/lib/esm/modes/base.js +100 -0
- package/lib/esm/modes/daum-classic-standard.js +55 -0
- package/lib/esm/modes/daum-erg.js +196 -0
- package/lib/esm/modes/daum-power.js +6 -0
- package/lib/esm/modes/daum-premium-standard.js +70 -0
- package/lib/esm/modes/daum-smarttrainer.js +344 -0
- package/lib/esm/modes/fm-resistance.js +134 -0
- package/lib/esm/modes/kettler-erg.js +129 -0
- package/lib/esm/modes/power-base.js +265 -0
- package/lib/esm/modes/power-meter.js +33 -0
- package/lib/esm/modes/simulator.js +107 -0
- package/lib/esm/modes/types.js +70 -0
- package/{src/proto/zwift_hub.ts → lib/esm/proto/zwift_hub.js} +283 -929
- package/lib/esm/serial/base/adapter.js +50 -0
- package/lib/esm/serial/base/comms.js +276 -0
- package/lib/esm/serial/base/serial-interface.js +279 -0
- package/{src/serial/base/serial-scanner.ts → lib/esm/serial/base/serial-scanner.js} +18 -49
- package/lib/esm/serial/base/serialport.js +74 -0
- package/lib/esm/serial/bindings/tcp.js +287 -0
- package/lib/esm/serial/daum/DaumAdapter.js +497 -0
- package/lib/esm/serial/daum/classic/adapter.js +177 -0
- package/lib/esm/serial/daum/classic/comms.js +210 -0
- package/lib/esm/serial/daum/classic/mock.js +389 -0
- package/lib/esm/serial/daum/classic/types.js +1 -0
- package/lib/esm/serial/daum/classic/utils.js +96 -0
- package/lib/esm/serial/daum/premium/adapter.js +210 -0
- package/lib/esm/serial/daum/premium/comms.js +536 -0
- package/{src/serial/daum/premium/consts.ts → lib/esm/serial/daum/premium/consts.js} +0 -2
- package/lib/esm/serial/daum/premium/mock.js +398 -0
- package/lib/esm/serial/daum/premium/types.js +25 -0
- package/lib/esm/serial/daum/premium/utils.js +328 -0
- package/lib/esm/serial/daum/types.js +9 -0
- package/lib/esm/serial/factories/adapter-factory.js +29 -0
- package/lib/esm/serial/index.js +12 -0
- package/lib/esm/serial/kettler/comms.js +276 -0
- package/lib/esm/serial/kettler/ergo-racer/adapter.js +523 -0
- package/lib/esm/serial/kettler/ergo-racer/mock.js +195 -0
- package/lib/esm/serial/kettler/types.js +1 -0
- package/lib/esm/serial/types.js +6 -0
- package/lib/esm/simulator/Simulator.js +186 -0
- package/lib/esm/types/adapter.js +1 -0
- package/lib/esm/types/capabilities.js +9 -0
- package/lib/esm/types/data.js +1 -0
- package/lib/esm/types/device.js +10 -0
- package/lib/esm/types/index.js +6 -0
- package/lib/esm/types/interface.js +1 -0
- package/lib/esm/types/user.js +6 -0
- package/lib/esm/utils/calculations.js +151 -0
- package/lib/esm/utils/task.js +121 -0
- package/lib/esm/utils/utils.js +167 -0
- package/lib/types/antv2/base/adapter.d.ts +71 -0
- package/lib/types/antv2/base/binding.d.ts +12 -0
- package/lib/types/antv2/base/interface.d.ts +57 -0
- package/lib/types/antv2/cad/adapter.d.ts +10 -0
- package/lib/types/antv2/cad/index.d.ts +2 -0
- package/lib/types/antv2/consts.d.ts +2 -0
- package/lib/types/antv2/factories/adapter-factory.d.ts +14 -0
- package/lib/types/antv2/factories/index.d.ts +1 -0
- package/lib/types/antv2/factories/sensor-factory.d.ts +5 -0
- package/lib/types/antv2/fe/adapter.d.ts +40 -0
- package/lib/types/antv2/fe/index.d.ts +2 -0
- package/lib/types/antv2/hr/adapter.d.ts +11 -0
- package/lib/types/antv2/hr/index.d.ts +2 -0
- package/lib/types/antv2/index.d.ts +12 -0
- package/lib/types/antv2/pwr/adapter.d.ts +15 -0
- package/lib/types/antv2/pwr/index.d.ts +2 -0
- package/lib/types/antv2/sc/adapter.d.ts +11 -0
- package/lib/types/antv2/sc/index.d.ts +2 -0
- package/lib/types/antv2/spd/adapter.d.ts +11 -0
- package/lib/types/antv2/spd/index.d.ts +2 -0
- package/{src/antv2/types.ts → lib/types/antv2/types.d.ts} +19 -30
- package/lib/types/antv2/utils.d.ts +4 -0
- package/lib/types/base/adpater.d.ts +79 -0
- package/lib/types/base/consts.d.ts +4 -0
- package/lib/types/ble/base/adapter.d.ts +62 -0
- package/lib/types/ble/base/interface.d.ts +116 -0
- package/lib/types/ble/base/peripheral.d.ts +46 -0
- package/lib/types/ble/base/sensor.d.ts +36 -0
- package/{src/ble/base/types.ts → lib/types/ble/base/types.d.ts} +6 -11
- package/lib/types/ble/bindings/index.d.ts +2 -0
- package/lib/types/ble/bindings/linux.d.ts +17 -0
- package/lib/types/ble/bindings/mock.d.ts +9 -0
- package/lib/types/ble/bindings/types.d.ts +53 -0
- package/lib/types/ble/characteristics/csc/features.d.ts +10 -0
- package/lib/types/ble/characteristics/csc/measurement.d.ts +33 -0
- package/{src/ble/characteristics/types.ts → lib/types/ble/characteristics/types.d.ts} +3 -5
- package/lib/types/ble/consts.d.ts +15 -0
- package/lib/types/ble/cp/adapter.d.ts +21 -0
- package/lib/types/ble/cp/index.d.ts +4 -0
- package/lib/types/ble/cp/sensor.d.ts +27 -0
- package/{src/ble/cp/types.ts → lib/types/ble/cp/types.d.ts} +5 -8
- package/lib/types/ble/csc/adapter.d.ts +17 -0
- package/lib/types/ble/csc/index.d.ts +3 -0
- package/lib/types/ble/csc/sensor.d.ts +21 -0
- package/lib/types/ble/csc/types.d.ts +6 -0
- package/lib/types/ble/factories/adapter-factory.d.ts +34 -0
- package/lib/types/ble/factories/index.d.ts +2 -0
- package/lib/types/ble/factories/interface-factory.d.ts +7 -0
- package/{src/ble/factories/types.ts → lib/types/ble/factories/types.d.ts} +6 -4
- package/lib/types/ble/fm/adapter.d.ts +38 -0
- package/lib/types/ble/fm/consts.d.ts +100 -0
- package/{src/ble/fm/index.ts → lib/types/ble/fm/index.d.ts} +1 -3
- package/lib/types/ble/fm/sensor.d.ts +49 -0
- package/{src/ble/fm/types.ts → lib/types/ble/fm/types.d.ts} +4 -10
- package/lib/types/ble/hr/adapter.d.ts +15 -0
- package/lib/types/ble/hr/index.d.ts +4 -0
- package/lib/types/ble/hr/mock.d.ts +7 -0
- package/lib/types/ble/hr/sensor.d.ts +17 -0
- package/lib/types/ble/hr/types.d.ts +5 -0
- package/lib/types/ble/index.d.ts +10 -0
- package/lib/types/ble/tacx/adapter.d.ts +13 -0
- package/lib/types/ble/tacx/consts.d.ts +23 -0
- package/{src/ble/tacx/index.ts → lib/types/ble/tacx/index.d.ts} +1 -4
- package/lib/types/ble/tacx/sensor.d.ts +64 -0
- package/lib/types/ble/tacx/types.d.ts +26 -0
- package/{src/ble/types.ts → lib/types/ble/types.d.ts} +87 -155
- package/lib/types/ble/utils.d.ts +23 -0
- package/lib/types/ble/wahoo/adapter.d.ts +12 -0
- package/lib/types/ble/wahoo/consts.d.ts +16 -0
- package/{src/ble/wahoo/index.ts → lib/types/ble/wahoo/index.d.ts} +1 -3
- package/lib/types/ble/wahoo/sensor.d.ts +49 -0
- package/{src/ble/wahoo/types.ts → lib/types/ble/wahoo/types.d.ts} +1 -2
- package/lib/types/ble/zwift/play/adapter.d.ts +18 -0
- package/lib/types/ble/zwift/play/index.d.ts +2 -0
- package/lib/types/ble/zwift/play/sensor.d.ts +70 -0
- package/lib/types/ble/zwift/play/types.d.ts +6 -0
- package/lib/types/direct-connect/base/interface.d.ts +80 -0
- package/lib/types/direct-connect/base/peripheral.d.ts +54 -0
- package/lib/types/direct-connect/bindings/index.d.ts +1 -0
- package/lib/types/direct-connect/bindings/types.d.ts +37 -0
- package/lib/types/direct-connect/consts.d.ts +17 -0
- package/lib/types/direct-connect/index.d.ts +3 -0
- package/lib/types/direct-connect/messages/CharacteristicNotification.d.ts +12 -0
- package/lib/types/direct-connect/messages/DiscoverCharacteristics.d.ts +22 -0
- package/lib/types/direct-connect/messages/DiscoverServices.d.ts +15 -0
- package/lib/types/direct-connect/messages/EnableCharacteristicNotifications.d.ts +18 -0
- package/lib/types/direct-connect/messages/ReadCharacteristic.d.ts +18 -0
- package/lib/types/direct-connect/messages/WriteCharacteristic.d.ts +18 -0
- package/lib/types/direct-connect/messages/error.d.ts +5 -0
- package/lib/types/direct-connect/messages/factory.d.ts +6 -0
- package/lib/types/direct-connect/messages/index.d.ts +9 -0
- package/lib/types/direct-connect/messages/message.d.ts +21 -0
- package/lib/types/direct-connect/types.d.ts +24 -0
- package/lib/types/factories/adapters.d.ts +7 -0
- package/lib/types/factories/interfaces.d.ts +8 -0
- package/lib/types/features/features.d.ts +11 -0
- package/lib/types/features/index.d.ts +1 -0
- package/lib/types/index.d.ts +22 -0
- package/lib/types/modes/ant-fe-adv-st-mode.d.ts +19 -0
- package/lib/types/modes/antble-erg.d.ts +31 -0
- package/lib/types/modes/antble-smarttrainer.d.ts +63 -0
- package/lib/types/modes/base.d.ts +34 -0
- package/lib/types/modes/daum-classic-standard.d.ts +18 -0
- package/lib/types/modes/daum-erg.d.ts +50 -0
- package/{src/modes/daum-power.ts → lib/types/modes/daum-power.d.ts} +3 -11
- package/lib/types/modes/daum-premium-standard.d.ts +24 -0
- package/lib/types/modes/daum-smarttrainer.d.ts +83 -0
- package/lib/types/modes/fm-resistance.d.ts +39 -0
- package/lib/types/modes/kettler-erg.d.ts +43 -0
- package/lib/types/modes/power-base.d.ts +46 -0
- package/lib/types/modes/power-meter.d.ts +15 -0
- package/lib/types/modes/simulator.d.ts +54 -0
- package/lib/types/modes/types.d.ts +91 -0
- package/lib/types/proto/zwift_hub.d.ts +303 -0
- package/lib/types/serial/base/adapter.d.ts +17 -0
- package/lib/types/serial/base/comms.d.ts +65 -0
- package/lib/types/serial/base/serial-interface.d.ts +35 -0
- package/lib/types/serial/base/serial-scanner.d.ts +16 -0
- package/lib/types/serial/base/serialport.d.ts +16 -0
- package/lib/types/serial/bindings/tcp.d.ts +50 -0
- package/lib/types/serial/daum/DaumAdapter.d.ts +66 -0
- package/lib/types/serial/daum/classic/adapter.d.ts +20 -0
- package/lib/types/serial/daum/classic/comms.d.ts +43 -0
- package/lib/types/serial/daum/classic/consts.d.ts +2 -0
- package/lib/types/serial/daum/classic/mock.d.ts +102 -0
- package/{src/serial/daum/classic/types.ts → lib/types/serial/daum/classic/types.d.ts} +26 -46
- package/lib/types/serial/daum/classic/utils.d.ts +13 -0
- package/lib/types/serial/daum/premium/adapter.d.ts +28 -0
- package/lib/types/serial/daum/premium/comms.d.ts +49 -0
- package/lib/types/serial/daum/premium/consts.d.ts +6 -0
- package/lib/types/serial/daum/premium/mock.d.ts +108 -0
- package/{src/serial/daum/premium/types.ts → lib/types/serial/daum/premium/types.d.ts} +21 -46
- package/lib/types/serial/daum/premium/utils.d.ts +51 -0
- package/lib/types/serial/daum/types.d.ts +15 -0
- package/lib/types/serial/factories/adapter-factory.d.ts +14 -0
- package/lib/types/serial/index.d.ts +12 -0
- package/lib/types/serial/kettler/comms.d.ts +60 -0
- package/lib/types/serial/kettler/ergo-racer/adapter.d.ts +84 -0
- package/lib/types/serial/kettler/ergo-racer/mock.d.ts +65 -0
- package/{src/serial/types.ts → lib/types/serial/types.d.ts} +13 -25
- package/lib/types/simulator/Simulator.d.ts +52 -0
- package/lib/types/types/adapter.d.ts +55 -0
- package/lib/types/types/capabilities.d.ts +8 -0
- package/lib/types/types/data.d.ts +26 -0
- package/lib/types/types/device.d.ts +31 -0
- package/lib/types/types/index.d.ts +6 -0
- package/{src/types/interface.ts → lib/types/types/interface.d.ts} +8 -13
- package/lib/types/types/user.d.ts +11 -0
- package/lib/types/utils/calculations.d.ts +14 -0
- package/lib/types/utils/task.d.ts +47 -0
- package/lib/types/utils/utils.d.ts +18 -0
- package/package.json +4 -1
- package/.eslintrc.json +0 -23
- package/.github/workflows/PR.yml +0 -48
- package/.github/workflows/tag.yml +0 -23
- package/protos/zwift_hub.proto +0 -194
- package/samples/DaumClassic/index.js +0 -118
- package/samples/DaumClassic/package-lock.json +0 -960
- package/samples/DaumClassic/package.json +0 -26
- package/samples/DaumPremium/index.js +0 -117
- package/samples/DaumPremium/package-lock.json +0 -839
- package/samples/DaumPremium/package.json +0 -26
- package/samples/ant/index.js +0 -104
- package/samples/ant/package-lock.json +0 -131
- package/samples/ant/package.json +0 -22
- package/samples/ble/bindings.js +0 -376
- package/samples/ble/index.js +0 -239
- package/samples/ble/package-lock.json +0 -1852
- package/samples/ble/package.json +0 -24
- package/samples/ble/prebuilt/BLEServer.exe +0 -0
- package/samples/ble/prebuilt/README.txt +0 -4
- package/samples/direct-connect/index.js +0 -172
- package/samples/direct-connect/package-lock.json +0 -105
- package/samples/direct-connect/package.json +0 -22
- package/src/antv2/__snapshots__/utils.unit.test.ts.snap +0 -364
- package/src/antv2/base/adapter.ts +0 -635
- package/src/antv2/base/adapter.unit.test.ts +0 -424
- package/src/antv2/base/binding.ts +0 -34
- package/src/antv2/base/interface.ts +0 -532
- package/src/antv2/base/interface.unit.test.ts +0 -613
- package/src/antv2/cad/adapter.ts +0 -26
- package/src/antv2/cad/adpater.unit.test.ts +0 -191
- package/src/antv2/cad/index.ts +0 -4
- package/src/antv2/factories/adapter-factory.integration.test.ts +0 -193
- package/src/antv2/factories/adapter-factory.ts +0 -98
- package/src/antv2/factories/index.ts +0 -1
- package/src/antv2/factories/sensor-factory.ts +0 -28
- package/src/antv2/fe/adapter.ts +0 -371
- package/src/antv2/fe/adapter.unit.test.ts +0 -953
- package/src/antv2/fe/index.ts +0 -5
- package/src/antv2/hr/adapter.ts +0 -34
- package/src/antv2/hr/adpater.unit.test.ts +0 -443
- package/src/antv2/hr/index.ts +0 -4
- package/src/antv2/index.ts +0 -31
- package/src/antv2/pwr/adapter.ts +0 -87
- package/src/antv2/pwr/adapter.unit.test.ts +0 -321
- package/src/antv2/pwr/index.ts +0 -4
- package/src/antv2/sc/adapter.ts +0 -33
- package/src/antv2/sc/adpater.unit.test.ts +0 -230
- package/src/antv2/sc/index.ts +0 -4
- package/src/antv2/scan.e2e.test.ts +0 -80
- package/src/antv2/spd/adapter.ts +0 -26
- package/src/antv2/spd/adpater.unit.test.ts +0 -200
- package/src/antv2/spd/index.ts +0 -4
- package/src/antv2/utils.unit.test.ts +0 -42
- package/src/base/adpater.ts +0 -445
- package/src/ble/base/adapter.ts +0 -567
- package/src/ble/base/interface.ts +0 -1016
- package/src/ble/base/interface.unit.test.ts +0 -504
- package/src/ble/base/peripheral.ts +0 -520
- package/src/ble/base/sensor.ts +0 -195
- package/src/ble/bindings/index.ts +0 -3
- package/src/ble/bindings/linux.ts +0 -59
- package/src/ble/bindings/mock.ts +0 -153
- package/src/ble/bindings/types.ts +0 -145
- package/src/ble/characteristics/csc/features.ts +0 -29
- package/src/ble/characteristics/csc/measurement.ts +0 -143
- package/src/ble/characteristics/csc/measurement.unit.test.ts +0 -35
- package/src/ble/consts.ts +0 -20
- package/src/ble/cp/adapter.ts +0 -118
- package/src/ble/cp/adapter.unit.test.ts +0 -165
- package/src/ble/cp/index.ts +0 -6
- package/src/ble/cp/sensor.ts +0 -130
- package/src/ble/csc/adapter.ts +0 -73
- package/src/ble/csc/index.ts +0 -3
- package/src/ble/csc/sensor.ts +0 -74
- package/src/ble/csc/types.ts +0 -7
- package/src/ble/factories/adapter-factory.test.ts +0 -63
- package/src/ble/factories/adapter-factory.ts +0 -189
- package/src/ble/factories/index.ts +0 -2
- package/src/ble/factories/interface-factory.ts +0 -22
- package/src/ble/fm/adapter.e2e.test.ts +0 -131
- package/src/ble/fm/adapter.ts +0 -473
- package/src/ble/fm/adapter.unit.test.ts +0 -139
- package/src/ble/fm/consts.ts +0 -105
- package/src/ble/fm/sensor.ts +0 -614
- package/src/ble/fm/sensor.unit.test.ts +0 -225
- package/src/ble/hr/adapter.ts +0 -51
- package/src/ble/hr/adapter.unit.test.ts +0 -17
- package/src/ble/hr/index.ts +0 -6
- package/src/ble/hr/mock.ts +0 -63
- package/src/ble/hr/sensor.ts +0 -71
- package/src/ble/hr/types.ts +0 -5
- package/src/ble/index.ts +0 -41
- package/src/ble/tacx/adapter.ts +0 -76
- package/src/ble/tacx/consts.ts +0 -25
- package/src/ble/tacx/sensor.ts +0 -689
- package/src/ble/tacx/sensor.unit.test.ts +0 -122
- package/src/ble/tacx/types.ts +0 -35
- package/src/ble/utils.ts +0 -168
- package/src/ble/wahoo/adapter.ts +0 -48
- package/src/ble/wahoo/consts.ts +0 -18
- package/src/ble/wahoo/sensor.ts +0 -447
- package/src/ble/wahoo/sensor.unit.test.ts +0 -88
- package/src/ble/zwift/play/adapter.ts +0 -75
- package/src/ble/zwift/play/index.ts +0 -3
- package/src/ble/zwift/play/sensor.ts +0 -692
- package/src/ble/zwift/play/types.ts +0 -8
- package/src/direct-connect/base/interface.ts +0 -575
- package/src/direct-connect/base/interface.unit.test.ts +0 -155
- package/src/direct-connect/base/peripheral.ts +0 -641
- package/src/direct-connect/base/peripheral.unit.test.ts +0 -41
- package/src/direct-connect/bindings/index.ts +0 -2
- package/src/direct-connect/bindings/types.ts +0 -51
- package/src/direct-connect/consts.ts +0 -27
- package/src/direct-connect/index.ts +0 -8
- package/src/direct-connect/messages/CharacteristicNotification.ts +0 -38
- package/src/direct-connect/messages/DiscoverCharacteristics.ts +0 -75
- package/src/direct-connect/messages/DiscoverServices.ts +0 -54
- package/src/direct-connect/messages/EnableCharacteristicNotifications.ts +0 -55
- package/src/direct-connect/messages/EnableCharacteristicNotifications.unit.test.ts +0 -17
- package/src/direct-connect/messages/ReadCharacteristic.ts +0 -58
- package/src/direct-connect/messages/WriteCharacteristic.ts +0 -58
- package/src/direct-connect/messages/index.ts +0 -9
- package/src/direct-connect/messages/message.ts +0 -145
- package/src/direct-connect/types.ts +0 -33
- package/src/direct-connect/utils.unit.test.ts +0 -60
- package/src/factories/adapters.ts +0 -72
- package/src/factories/interfaces.ts +0 -37
- package/src/features/features.ts +0 -38
- package/src/features/index.ts +0 -1
- package/src/index.ts +0 -47
- package/src/modes/__snapshots__/ant-fe-adv-st-mode.test.ts.snap +0 -123
- package/src/modes/__snapshots__/antble-erg.test.ts.snap +0 -57
- package/src/modes/__snapshots__/antble-smarttrainer.test.ts.snap +0 -123
- package/src/modes/__snapshots__/daum-classic-standard.test.ts.snap +0 -43
- package/src/modes/__snapshots__/daum-power.test.ts.snap +0 -11
- package/src/modes/__snapshots__/daum-premium-standard.test.ts.snap +0 -43
- package/src/modes/__snapshots__/fm-resistance.unit.test.ts.snap +0 -5
- package/src/modes/__snapshots__/power-base.unit.test.ts.snap +0 -621
- package/src/modes/__snapshots__/power-meter.unit.test.ts.snap +0 -11
- package/src/modes/ant-fe-adv-st-mode.test.ts +0 -280
- package/src/modes/ant-fe-adv-st-mode.ts +0 -110
- package/src/modes/antble-erg.test.ts +0 -256
- package/src/modes/antble-erg.ts +0 -31
- package/src/modes/antble-smarttrainer.test.ts +0 -425
- package/src/modes/antble-smarttrainer.ts +0 -584
- package/src/modes/base.ts +0 -142
- package/src/modes/daum-classic-standard.test.ts +0 -205
- package/src/modes/daum-classic-standard.ts +0 -82
- package/src/modes/daum-erg.test.ts +0 -534
- package/src/modes/daum-erg.ts +0 -261
- package/src/modes/daum-erg.unit.test.ts +0 -30
- package/src/modes/daum-power.test.ts +0 -21
- package/src/modes/daum-premium-standard.test.ts +0 -205
- package/src/modes/daum-premium-standard.ts +0 -101
- package/src/modes/daum-smarttrainer.test.ts +0 -431
- package/src/modes/daum-smarttrainer.ts +0 -479
- package/src/modes/fm-resistance.ts +0 -181
- package/src/modes/fm-resistance.unit.test.ts +0 -117
- package/src/modes/kettler-erg.test.ts +0 -341
- package/src/modes/kettler-erg.ts +0 -180
- package/src/modes/power-base.ts +0 -368
- package/src/modes/power-base.unit.test.ts +0 -204
- package/src/modes/power-meter.ts +0 -52
- package/src/modes/power-meter.unit.test.ts +0 -125
- package/src/modes/simulator.ts +0 -157
- package/src/modes/types.ts +0 -156
- package/src/serial/base/adapter.ts +0 -70
- package/src/serial/base/comms.ts +0 -411
- package/src/serial/base/serial-interface.test.ts +0 -170
- package/src/serial/base/serial-interface.ts +0 -384
- package/src/serial/base/serialport.test.ts +0 -65
- package/src/serial/base/serialport.ts +0 -103
- package/src/serial/bindings/tcp.test.ts +0 -186
- package/src/serial/bindings/tcp.ts +0 -421
- package/src/serial/daum/DaumAdapter.test.ts +0 -1236
- package/src/serial/daum/DaumAdapter.ts +0 -667
- package/src/serial/daum/classic/__snapshots__/utils.unit.test.ts.snap +0 -559
- package/src/serial/daum/classic/adapter.integration.test.ts +0 -94
- package/src/serial/daum/classic/adapter.test.ts +0 -171
- package/src/serial/daum/classic/adapter.ts +0 -243
- package/src/serial/daum/classic/comms.test.ts +0 -913
- package/src/serial/daum/classic/comms.ts +0 -284
- package/src/serial/daum/classic/mock.ts +0 -542
- package/src/serial/daum/classic/utils.ts +0 -132
- package/src/serial/daum/classic/utils.unit.test.ts +0 -129
- package/src/serial/daum/premium/__snapshots__/utils.unit.test.ts.snap +0 -25
- package/src/serial/daum/premium/adapter.integration.test.ts +0 -90
- package/src/serial/daum/premium/adapter.ts +0 -297
- package/src/serial/daum/premium/adapter.unit.test.ts +0 -916
- package/src/serial/daum/premium/comms.test.ts +0 -1431
- package/src/serial/daum/premium/comms.ts +0 -699
- package/src/serial/daum/premium/mock.ts +0 -568
- package/src/serial/daum/premium/utils.ts +0 -389
- package/src/serial/daum/premium/utils.unit.test.ts +0 -397
- package/src/serial/daum/types.ts +0 -27
- package/src/serial/factories/adapter-factory.test.ts +0 -175
- package/src/serial/factories/adapter-factory.ts +0 -40
- package/src/serial/index.ts +0 -28
- package/src/serial/kettler/comms.test.ts +0 -140
- package/src/serial/kettler/comms.ts +0 -373
- package/src/serial/kettler/ergo-racer/adapter.test.ts +0 -101
- package/src/serial/kettler/ergo-racer/adapter.ts +0 -763
- package/src/serial/kettler/ergo-racer/mock.ts +0 -290
- package/src/simulator/Simulator.ts +0 -259
- package/src/simulator/Simulator.unit.test.ts +0 -238
- package/src/types/adapter.ts +0 -74
- package/src/types/capabilities.ts +0 -9
- package/src/types/data.ts +0 -27
- package/src/types/device.ts +0 -39
- package/src/types/index.ts +0 -6
- package/src/types/user.ts +0 -14
- package/src/utils/__snapshots__/calculation.test.ts.snap +0 -13851
- package/src/utils/calculation.test.ts +0 -298
- package/src/utils/calculations.ts +0 -243
- package/src/utils/task.ts +0 -204
- package/src/utils/utils.ts +0 -211
- package/src/utils/utils.unit.test.ts +0 -270
- package/test/logger.ts +0 -19
- package/test/mock-adapter.ts +0 -27
- package/tools/ble-forwarder/eslint.config.mjs +0 -12
- package/tools/ble-forwarder/package-lock.json +0 -7183
- package/tools/ble-forwarder/package.json +0 -44
- package/tools/ble-forwarder/src/index.ts +0 -193
- package/tools/ble-forwarder/src/parseArgs.ts +0 -50
- package/tools/ble-forwarder/tsconfig.json +0 -21
- package/tools/ble-simulator/eslint.config.mjs +0 -12
- package/tools/ble-simulator/package-lock.json +0 -6716
- package/tools/ble-simulator/package.json +0 -43
- package/tools/ble-simulator/src/emulator/characteristics/characteristic.ts +0 -111
- package/tools/ble-simulator/src/emulator/characteristics/cycling-power-measurement-characteristic.ts +0 -94
- package/tools/ble-simulator/src/emulator/characteristics/cycling-power-wahoo-extension-characteristic.ts +0 -57
- package/tools/ble-simulator/src/emulator/characteristics/read-characteristic.ts +0 -19
- package/tools/ble-simulator/src/emulator/services/csp.ts +0 -32
- package/tools/ble-simulator/src/emulator/services/service.ts +0 -41
- package/tools/ble-simulator/src/emulator/services/wahoo.ts +0 -23
- package/tools/ble-simulator/src/emulator/types.ts +0 -38
- package/tools/ble-simulator/src/index.ts +0 -21
- package/tools/ble-simulator/src/wahoo.ts +0 -131
- package/tools/ble-simulator/tsconfig.json +0 -21
- package/tools/dc-simulator/config/powermeter.json +0 -27
- package/tools/dc-simulator/config/smarttrainer-0W.json +0 -28
- package/tools/dc-simulator/config/smarttrainer-260W.json +0 -28
- package/tools/dc-simulator/config/smarttrainer-shifting.json +0 -27
- package/tools/dc-simulator/config/smarttrainer.json +0 -27
- package/tools/dc-simulator/eslint.config.mjs +0 -12
- package/tools/dc-simulator/package-lock.json +0 -5436
- package/tools/dc-simulator/package.json +0 -45
- package/tools/dc-simulator/protos/zwift_hub.proto +0 -181
- package/tools/dc-simulator/src/comms.ts +0 -324
- package/tools/dc-simulator/src/config.ts +0 -60
- package/tools/dc-simulator/src/emulator/characteristics/characteristic.ts +0 -83
- package/tools/dc-simulator/src/emulator/characteristics/cycling-power-measurement-characteristic.ts +0 -94
- package/tools/dc-simulator/src/emulator/characteristics/cycling-power-wahoo-extension-characteristic.ts +0 -57
- package/tools/dc-simulator/src/emulator/characteristics/fitness-machine-control-point-characteristic.ts +0 -188
- package/tools/dc-simulator/src/emulator/characteristics/fitness-machine-feature-characteristic.ts +0 -39
- package/tools/dc-simulator/src/emulator/characteristics/heart-rate-measurement-characteristic.ts +0 -34
- package/tools/dc-simulator/src/emulator/characteristics/index.ts +0 -2
- package/tools/dc-simulator/src/emulator/characteristics/indoor-bike-data-characteristic.ts +0 -86
- package/tools/dc-simulator/src/emulator/characteristics/read-characteristic.ts +0 -19
- package/tools/dc-simulator/src/emulator/characteristics/zwift-play-control-point.ts +0 -53
- package/tools/dc-simulator/src/emulator/characteristics/zwift-play-measurement.ts +0 -70
- package/tools/dc-simulator/src/emulator/characteristics/zwift-play-response.ts +0 -47
- package/tools/dc-simulator/src/emulator/index.ts +0 -190
- package/tools/dc-simulator/src/emulator/services/csp.ts +0 -32
- package/tools/dc-simulator/src/emulator/services/ftms.ts +0 -33
- package/tools/dc-simulator/src/emulator/services/hrs.ts +0 -18
- package/tools/dc-simulator/src/emulator/services/index.ts +0 -4
- package/tools/dc-simulator/src/emulator/services/service.ts +0 -39
- package/tools/dc-simulator/src/emulator/services/zwift-play.ts +0 -31
- package/tools/dc-simulator/src/emulator/types.ts +0 -46
- package/tools/dc-simulator/src/index.ts +0 -112
- package/tools/dc-simulator/src/net.ts +0 -37
- package/tools/dc-simulator/tsconfig.json +0 -21
- package/tsconfig.base.json +0 -28
- package/tsconfig.cjs.json +0 -9
- package/tsconfig.esm.json +0 -10
- package/tsconfig.test.json +0 -19
- package/vitest.config.js +0 -28
- package/vitest.setup.ts +0 -4
- /package/{src/serial/daum/classic/consts.ts → lib/esm/serial/daum/classic/consts.js} +0 -0
- /package/{src/serial/kettler/types.ts → lib/types/serial/kettler/types.d.ts} +0 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const interface_js_1 = __importDefault(require("./interface.js"));
|
|
7
|
+
const adpater_js_1 = __importDefault(require("../../base/adpater.js"));
|
|
8
|
+
const types_js_1 = require("../types.js");
|
|
9
|
+
const index_js_1 = require("../../types/index.js");
|
|
10
|
+
const utils_js_1 = require("../../utils/utils.js");
|
|
11
|
+
const utils_js_2 = require("../utils.js");
|
|
12
|
+
const consts_js_1 = require("../consts.js");
|
|
13
|
+
const sensor_factory_js_1 = __importDefault(require("../factories/sensor-factory.js"));
|
|
14
|
+
const gd_eventlog_1 = require("gd-eventlog");
|
|
15
|
+
const node_events_1 = __importDefault(require("node:events"));
|
|
16
|
+
const INTERFACE_NAME = 'ant';
|
|
17
|
+
const MAX_RETRIES = 3;
|
|
18
|
+
class AntAdapter extends adpater_js_1.default {
|
|
19
|
+
sensor;
|
|
20
|
+
deviceData;
|
|
21
|
+
channel;
|
|
22
|
+
ant;
|
|
23
|
+
userSettings;
|
|
24
|
+
bikeSettings;
|
|
25
|
+
ivDataTimeout;
|
|
26
|
+
lastDataTS;
|
|
27
|
+
dataMsgCount;
|
|
28
|
+
ivWaitForData;
|
|
29
|
+
promiseWaitForData;
|
|
30
|
+
sensorConnected;
|
|
31
|
+
startStatus;
|
|
32
|
+
startupRetryPause = 1000;
|
|
33
|
+
internalEmitter = new node_events_1.default();
|
|
34
|
+
constructor(settings, props) {
|
|
35
|
+
super(settings, props);
|
|
36
|
+
const profile = this.getProfileName();
|
|
37
|
+
if (settings.protocol && settings.profile !== this.getLegacyProfileName())
|
|
38
|
+
throw new Error('Incorrect Profile');
|
|
39
|
+
if (!settings.protocol && settings.profile !== this.getProfileName())
|
|
40
|
+
throw new Error('Incorrect Profile');
|
|
41
|
+
const antSettings = this.settings;
|
|
42
|
+
if ((0, types_js_1.isLegacyProfile)(antSettings.profile))
|
|
43
|
+
antSettings.profile = (0, utils_js_2.mapLegacyProfile)(antSettings.profile);
|
|
44
|
+
if (this.settings.interface !== 'ant')
|
|
45
|
+
throw new Error('Incorrect interface');
|
|
46
|
+
this.sensor = this.createSensor(settings);
|
|
47
|
+
this.sensorConnected = false;
|
|
48
|
+
this.deviceData = {
|
|
49
|
+
DeviceID: Number(settings.deviceID)
|
|
50
|
+
};
|
|
51
|
+
this.data = {};
|
|
52
|
+
this.dataMsgCount = 0;
|
|
53
|
+
this.logger = new gd_eventlog_1.EventLogger(`Ant+${profile}`);
|
|
54
|
+
this.updateFrequency = consts_js_1.DEFAULT_UPDATE_FREQUENCY;
|
|
55
|
+
this.channel = undefined;
|
|
56
|
+
this.ant = interface_js_1.default.getInstance();
|
|
57
|
+
if (this.isDebugEnabled()) {
|
|
58
|
+
this.ant.setLogger(this);
|
|
59
|
+
}
|
|
60
|
+
if (this.getStaticCapabilities())
|
|
61
|
+
this.capabilities = this.getStaticCapabilities();
|
|
62
|
+
}
|
|
63
|
+
getProfileName() {
|
|
64
|
+
const C = this.constructor;
|
|
65
|
+
return C['ANT_PROFILE_NAME'];
|
|
66
|
+
}
|
|
67
|
+
getLegacyProfileName() {
|
|
68
|
+
const C = this.constructor;
|
|
69
|
+
return C['INCYCLIST_PROFILE_NAME'];
|
|
70
|
+
}
|
|
71
|
+
getStaticCapabilities() {
|
|
72
|
+
const C = this.constructor;
|
|
73
|
+
return C['CAPABILITIES'];
|
|
74
|
+
}
|
|
75
|
+
createSensor(settings) {
|
|
76
|
+
return sensor_factory_js_1.default.create(this.getProfileName(), Number(settings.deviceID));
|
|
77
|
+
}
|
|
78
|
+
isEqual(settings) {
|
|
79
|
+
const as = this.settings;
|
|
80
|
+
if (as.interface !== settings.interface)
|
|
81
|
+
return false;
|
|
82
|
+
if (Number(as.deviceID) !== Number(settings.deviceID) || as.profile !== settings.profile)
|
|
83
|
+
return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
getDefaultReconnectDelay() {
|
|
87
|
+
return this.startupRetryPause;
|
|
88
|
+
}
|
|
89
|
+
async connect() {
|
|
90
|
+
const connected = await interface_js_1.default.getInstance().connect();
|
|
91
|
+
return connected;
|
|
92
|
+
}
|
|
93
|
+
async close() {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
resetData() {
|
|
97
|
+
this.dataMsgCount = 0;
|
|
98
|
+
const { DeviceID } = this.deviceData;
|
|
99
|
+
this.deviceData = { DeviceID };
|
|
100
|
+
this.data = {};
|
|
101
|
+
this.lastDataTS = undefined;
|
|
102
|
+
}
|
|
103
|
+
isSame(device) {
|
|
104
|
+
if (!(device instanceof AntAdapter))
|
|
105
|
+
return false;
|
|
106
|
+
const adapter = device;
|
|
107
|
+
return (adapter.getID() === this.getID() && adapter.getProfile() === this.getProfile());
|
|
108
|
+
}
|
|
109
|
+
hasData() {
|
|
110
|
+
return this.dataMsgCount > 0;
|
|
111
|
+
}
|
|
112
|
+
mapData(deviceData) {
|
|
113
|
+
throw new Error('message not implemented');
|
|
114
|
+
}
|
|
115
|
+
transformData(data, deviceData) {
|
|
116
|
+
throw new Error('message not implemented');
|
|
117
|
+
}
|
|
118
|
+
mapToAdapterData(deviceData) {
|
|
119
|
+
throw new Error('message not implemented');
|
|
120
|
+
}
|
|
121
|
+
refreshDeviceData() {
|
|
122
|
+
if (this.isStopped() || this.isPaused())
|
|
123
|
+
return;
|
|
124
|
+
const logData = this.getLogData(this.deviceData, ['PairedDevices', 'RawData', '_RawData']);
|
|
125
|
+
this.logEvent({ message: 'refreshDeviceData', data: logData, paused: this.paused, started: this.started, canEmit: this.canEmitData() });
|
|
126
|
+
if (this.isControllable()) {
|
|
127
|
+
let incyclistData = this.mapData(this.deviceData);
|
|
128
|
+
incyclistData = this.getCyclingMode().updateData(incyclistData);
|
|
129
|
+
this.transformData(incyclistData, this.deviceData);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.mapToAdapterData(this.deviceData);
|
|
133
|
+
}
|
|
134
|
+
this.emitData(this.data);
|
|
135
|
+
}
|
|
136
|
+
onDeviceData(deviceData) {
|
|
137
|
+
this.dataMsgCount++;
|
|
138
|
+
this.lastDataTS = Date.now();
|
|
139
|
+
try {
|
|
140
|
+
const { ManId } = this.deviceData;
|
|
141
|
+
this.deviceData = Object.assign({}, deviceData);
|
|
142
|
+
if (!ManId && deviceData.ManId) {
|
|
143
|
+
this.emit('device-info', this.getSettings(), { manufacturer: (0, utils_js_2.getBrand)(deviceData.ManId) });
|
|
144
|
+
}
|
|
145
|
+
const logData = this.getLogData(deviceData, ['PairedDevices', 'RawData', '_RawData']);
|
|
146
|
+
this.logEvent({ message: 'onDeviceData', device: this.getName(), interface: this.getInterface(), data: logData, paused: this.paused, started: this.started, canEmit: this.canEmitData() });
|
|
147
|
+
if (this.isStopped() || !this.canEmitData())
|
|
148
|
+
return;
|
|
149
|
+
if (this.isControllable()) {
|
|
150
|
+
let incyclistData = this.mapData(deviceData);
|
|
151
|
+
incyclistData = this.getCyclingMode().updateData(incyclistData);
|
|
152
|
+
this.transformData(incyclistData, deviceData);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.mapToAdapterData(deviceData);
|
|
156
|
+
}
|
|
157
|
+
this.emitData(this.data);
|
|
158
|
+
}
|
|
159
|
+
catch (err) {
|
|
160
|
+
this.logEvent({ message: 'error', fn: 'onDeviceData()', error: err.message || err, stack: err.stack });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
isWaitingForData() {
|
|
164
|
+
return this.promiseWaitForData !== undefined && this.promiseWaitForData !== null;
|
|
165
|
+
}
|
|
166
|
+
async _wait() {
|
|
167
|
+
const res = new Promise((resolve) => {
|
|
168
|
+
const iv = setInterval(() => {
|
|
169
|
+
if (this.hasData()) {
|
|
170
|
+
clearInterval(iv);
|
|
171
|
+
resolve(true);
|
|
172
|
+
}
|
|
173
|
+
if (this.promiseWaitForData === undefined || this.promiseWaitForData === null || this.stopped) {
|
|
174
|
+
resolve(false);
|
|
175
|
+
clearInterval(iv);
|
|
176
|
+
}
|
|
177
|
+
}, 10);
|
|
178
|
+
});
|
|
179
|
+
return res;
|
|
180
|
+
}
|
|
181
|
+
async waitForData(timeout) {
|
|
182
|
+
if (this.hasData()) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
const tsStart = Date.now();
|
|
186
|
+
if (this.promiseWaitForData !== undefined && this.promiseWaitForData !== null) {
|
|
187
|
+
let hasData = false;
|
|
188
|
+
try {
|
|
189
|
+
hasData = await this.promiseWaitForData;
|
|
190
|
+
}
|
|
191
|
+
catch { }
|
|
192
|
+
if (hasData || Date.now() > tsStart + timeout)
|
|
193
|
+
return hasData;
|
|
194
|
+
}
|
|
195
|
+
try {
|
|
196
|
+
this.promiseWaitForData = (0, utils_js_1.runWithTimeout)(this._wait(), timeout);
|
|
197
|
+
const hasData = await this.promiseWaitForData;
|
|
198
|
+
this.promiseWaitForData = null;
|
|
199
|
+
return hasData;
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
this.promiseWaitForData = null;
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
getID() {
|
|
207
|
+
const id = this.deviceData?.DeviceID ?? this.sensor?.getDeviceID();
|
|
208
|
+
return id?.toString();
|
|
209
|
+
}
|
|
210
|
+
getName() {
|
|
211
|
+
if (this.settings.name)
|
|
212
|
+
return this.settings.name;
|
|
213
|
+
const deviceID = this.getID();
|
|
214
|
+
const profile = this.getProfileName();
|
|
215
|
+
return `Ant+${profile} ${deviceID}`;
|
|
216
|
+
}
|
|
217
|
+
getUniqueName() {
|
|
218
|
+
if (this.settings.name)
|
|
219
|
+
return this.settings.name;
|
|
220
|
+
const { ManId } = this.deviceData;
|
|
221
|
+
const profile = this.getProfileName();
|
|
222
|
+
const brand = (0, utils_js_2.getBrand)(ManId);
|
|
223
|
+
const id = this.getID();
|
|
224
|
+
if (brand)
|
|
225
|
+
return `${brand} ${profile} ${id}`;
|
|
226
|
+
else
|
|
227
|
+
return `${this.getName()}`;
|
|
228
|
+
}
|
|
229
|
+
getDisplayName() {
|
|
230
|
+
return this.getUniqueName();
|
|
231
|
+
}
|
|
232
|
+
getInterface() {
|
|
233
|
+
return INTERFACE_NAME;
|
|
234
|
+
}
|
|
235
|
+
getProfile() {
|
|
236
|
+
const settings = this.settings;
|
|
237
|
+
if (settings.protocol === undefined)
|
|
238
|
+
return settings.profile;
|
|
239
|
+
else {
|
|
240
|
+
return (0, utils_js_2.mapLegacyProfile)(settings.profile);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
getLogData(data, excludeList) {
|
|
244
|
+
const logData = JSON.parse(JSON.stringify(data));
|
|
245
|
+
excludeList.forEach((key) => {
|
|
246
|
+
delete logData[key];
|
|
247
|
+
});
|
|
248
|
+
return logData;
|
|
249
|
+
}
|
|
250
|
+
async check() {
|
|
251
|
+
try {
|
|
252
|
+
return await this.start();
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
async checkCapabilities() {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
async initControl() {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
getDefaultStartupTimeout() {
|
|
265
|
+
return 20000;
|
|
266
|
+
}
|
|
267
|
+
async startPreChecks(props) {
|
|
268
|
+
const wasPaused = this.paused;
|
|
269
|
+
const wasStopped = this.stopped;
|
|
270
|
+
this.stopped = false;
|
|
271
|
+
if (wasPaused)
|
|
272
|
+
this.resume();
|
|
273
|
+
if (this.started && !wasPaused && !wasStopped) {
|
|
274
|
+
return 'done';
|
|
275
|
+
}
|
|
276
|
+
if (this.started && wasPaused) {
|
|
277
|
+
return 'done';
|
|
278
|
+
}
|
|
279
|
+
const connected = await this.connect();
|
|
280
|
+
if (!connected)
|
|
281
|
+
return 'connection-failed';
|
|
282
|
+
return 'connected';
|
|
283
|
+
}
|
|
284
|
+
resetStartStatus() {
|
|
285
|
+
this.startStatus = { timeout: false, hasData: false, sensorStarted: false };
|
|
286
|
+
}
|
|
287
|
+
isStartSuccess() {
|
|
288
|
+
const { timeout, hasData, sensorStarted, controlInitialized, userInitialized, interrupted } = this.startStatus;
|
|
289
|
+
if (interrupted)
|
|
290
|
+
return false;
|
|
291
|
+
if (this.hasCapability(index_js_1.IncyclistCapability.Control))
|
|
292
|
+
return sensorStarted && hasData && userInitialized && controlInitialized && !timeout;
|
|
293
|
+
else
|
|
294
|
+
return sensorStarted && hasData && !timeout;
|
|
295
|
+
}
|
|
296
|
+
reportStartStatus() {
|
|
297
|
+
const success = this.isStartSuccess();
|
|
298
|
+
if (success) {
|
|
299
|
+
this.logEvent({ message: 'start device success', device: this.getName() });
|
|
300
|
+
this.started = true;
|
|
301
|
+
this.paused = false;
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this.started = false;
|
|
306
|
+
const { sensorStarted, hasData, interrupted } = this.startStatus;
|
|
307
|
+
if (interrupted) {
|
|
308
|
+
this.logEvent({ message: 'start device interrupted', device: this.getName() });
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
if (!sensorStarted) {
|
|
312
|
+
this.logEvent({ message: 'start device failed', device: this.getName(), reason: 'could not connect' });
|
|
313
|
+
throw new Error('could not start device, reason:could not connect');
|
|
314
|
+
}
|
|
315
|
+
else if (!hasData) {
|
|
316
|
+
this.logEvent({ message: 'start device failed', device: this.getName(), reason: 'no data received' });
|
|
317
|
+
throw new Error('could not start device, reason:no data received');
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
this.logEvent({ message: 'start device failed', device: this.getName(), reason: 'could not send FE commands' });
|
|
321
|
+
throw new Error('could not start device, reason:could not send FE commands');
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
async waitForInitialData(startupTimeout) {
|
|
326
|
+
const { sensorStarted, hasData, timeout } = this.startStatus;
|
|
327
|
+
if ((sensorStarted && hasData) || !sensorStarted || timeout)
|
|
328
|
+
return;
|
|
329
|
+
this.logEvent({ message: 'wait for sensor data', device: this.getName() });
|
|
330
|
+
this.startStatus.hasData = await this.waitForData(startupTimeout);
|
|
331
|
+
if (this.startStatus.hasData)
|
|
332
|
+
this.logEvent({ message: 'sensor data received', device: this.getName() });
|
|
333
|
+
}
|
|
334
|
+
async initSensor(props) {
|
|
335
|
+
this.startStatus.sensorStarted = this.sensorConnected;
|
|
336
|
+
if (this.startStatus.sensorStarted)
|
|
337
|
+
return;
|
|
338
|
+
this.logEvent({ message: 'start sensor', device: this.getName(), props });
|
|
339
|
+
try {
|
|
340
|
+
this.sensorConnected = await this.startSensor();
|
|
341
|
+
if (this.sensorConnected) {
|
|
342
|
+
this.logEvent({ message: 'sensor started', device: this.getName(), channel: this.sensor?.getChannel()?.getChannelNo(), props });
|
|
343
|
+
this.startStatus.sensorStarted = true;
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
this.logEvent({ message: 'start sensor failed', device: this.getName(), reason: 'unknown', props });
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
catch (err) {
|
|
350
|
+
this.logEvent({ message: 'start sensor failed', device: this.getName(), reason: err.message, props });
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
getLogProps(startProps) {
|
|
354
|
+
const { user, userWeight, bikeWeight, startupTimeout, automaticReconnect } = startProps ?? {};
|
|
355
|
+
return { user, userWeight, bikeWeight, startupTimeout, automaticReconnect };
|
|
356
|
+
}
|
|
357
|
+
async start(startProps) {
|
|
358
|
+
const props = this.getStartProps(startProps);
|
|
359
|
+
const logProps = this.getLogProps(startProps);
|
|
360
|
+
const preCheckResult = await this.startPreChecks(props);
|
|
361
|
+
if (preCheckResult === 'done')
|
|
362
|
+
return this.started;
|
|
363
|
+
if (preCheckResult === 'connection-failed')
|
|
364
|
+
throw new Error(`could not start device, reason:could not connect`);
|
|
365
|
+
this.logEvent({ message: 'starting device', device: this.getName(), props: logProps, isStarted: this.started, isPaused: this.isPaused, isStopped: this.isStopped });
|
|
366
|
+
this.resetStartStatus();
|
|
367
|
+
this.resetData();
|
|
368
|
+
const { startupTimeout = this.getDefaultStartupTimeout() } = props;
|
|
369
|
+
const retryDelay = this.getDefaultReconnectDelay();
|
|
370
|
+
const totalTimeout = Math.min(startupTimeout + 10000, (startupTimeout + retryDelay) * MAX_RETRIES);
|
|
371
|
+
const doStart = async () => {
|
|
372
|
+
let success = false;
|
|
373
|
+
let retry = 0;
|
|
374
|
+
while (!success && retry < MAX_RETRIES && !this.startStatus.timeout && !this.startStatus.interrupted) {
|
|
375
|
+
try {
|
|
376
|
+
retry++;
|
|
377
|
+
await this.initSensor(props);
|
|
378
|
+
await this.waitForInitialData(startupTimeout);
|
|
379
|
+
await this.checkCapabilities();
|
|
380
|
+
if (this.hasCapability(index_js_1.IncyclistCapability.Control))
|
|
381
|
+
await this.initControl();
|
|
382
|
+
if (!this.startStatus.hasData && !this.startStatus.interrupted) {
|
|
383
|
+
await this.stopSensor();
|
|
384
|
+
await (0, utils_js_1.sleep)(retryDelay);
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
success = this.isStartSuccess();
|
|
388
|
+
}
|
|
389
|
+
catch (err) {
|
|
390
|
+
this.logEvent({ message: 'error', fn: 'start#doStart', device: this.getName(), error: err.message, stack: err.stack });
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
this.reportStartStatus();
|
|
394
|
+
return this.started;
|
|
395
|
+
};
|
|
396
|
+
const checkInterrupt = () => new Promise(done => {
|
|
397
|
+
this.internalEmitter.on('stop', () => {
|
|
398
|
+
this.started = false;
|
|
399
|
+
this.startStatus.interrupted = true;
|
|
400
|
+
done(false);
|
|
401
|
+
});
|
|
402
|
+
});
|
|
403
|
+
try {
|
|
404
|
+
await (0, utils_js_1.runWithTimeout)(Promise.race([doStart(), checkInterrupt()]), totalTimeout);
|
|
405
|
+
}
|
|
406
|
+
catch (err) {
|
|
407
|
+
if (err.message === 'Timeout') {
|
|
408
|
+
this.started = false;
|
|
409
|
+
this.startStatus.timeout = true;
|
|
410
|
+
this.logEvent({ message: 'start device failed', device: this.getName(), reason: 'timeout' });
|
|
411
|
+
throw new Error(`could not start device, reason:timeout`);
|
|
412
|
+
}
|
|
413
|
+
throw err;
|
|
414
|
+
}
|
|
415
|
+
return this.started;
|
|
416
|
+
}
|
|
417
|
+
async stop() {
|
|
418
|
+
let stopped;
|
|
419
|
+
this.internalEmitter.emit('stop');
|
|
420
|
+
if (this.stopped)
|
|
421
|
+
return;
|
|
422
|
+
this.logger.logEvent({ message: 'stopping device', device: this.getName() });
|
|
423
|
+
this.promiseWaitForData = null;
|
|
424
|
+
if (this.startStatus) {
|
|
425
|
+
this.startStatus.interrupted = true;
|
|
426
|
+
await (0, utils_js_1.sleep)(20);
|
|
427
|
+
}
|
|
428
|
+
try {
|
|
429
|
+
stopped = await (0, utils_js_1.runWithTimeout)(this.ant.stopSensor(this.sensor), 5000);
|
|
430
|
+
}
|
|
431
|
+
catch (err) {
|
|
432
|
+
this.logEvent({ message: 'stop sensor failed', reason: err.message });
|
|
433
|
+
}
|
|
434
|
+
this.sensorConnected = false;
|
|
435
|
+
this.started = false;
|
|
436
|
+
this.stopped = true;
|
|
437
|
+
this.paused = false;
|
|
438
|
+
this.removeAllListeners();
|
|
439
|
+
this.logEvent({ message: 'stopping device finished', device: this.getName(), stopped });
|
|
440
|
+
return stopped;
|
|
441
|
+
}
|
|
442
|
+
async startSensor() {
|
|
443
|
+
return await this.ant.startSensor(this.sensor, this.onDeviceData.bind(this));
|
|
444
|
+
}
|
|
445
|
+
async stopSensor() {
|
|
446
|
+
if (!this.sensorConnected)
|
|
447
|
+
return;
|
|
448
|
+
try {
|
|
449
|
+
await await this.ant.stopSensor(this.sensor);
|
|
450
|
+
this.sensorConnected = false;
|
|
451
|
+
}
|
|
452
|
+
catch { }
|
|
453
|
+
}
|
|
454
|
+
setCyclingMode(mode, settings, sendInitCommands) {
|
|
455
|
+
super.setCyclingMode(mode, settings, sendInitCommands);
|
|
456
|
+
this.refreshDeviceData();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
exports.default = AntAdapter;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class AntDeviceBinding {
|
|
4
|
+
constructor(_props) { }
|
|
5
|
+
open() {
|
|
6
|
+
throw new Error('Method not implemented.');
|
|
7
|
+
}
|
|
8
|
+
close() {
|
|
9
|
+
throw new Error('Method not implemented.');
|
|
10
|
+
}
|
|
11
|
+
getMaxChannels() {
|
|
12
|
+
throw new Error('Method not implemented.');
|
|
13
|
+
}
|
|
14
|
+
getChannel() {
|
|
15
|
+
throw new Error('Method not implemented.');
|
|
16
|
+
}
|
|
17
|
+
freeChannel(channel) {
|
|
18
|
+
throw new Error('Method not implemented.');
|
|
19
|
+
}
|
|
20
|
+
getDeviceNumber() {
|
|
21
|
+
throw new Error('Method not implemented.');
|
|
22
|
+
}
|
|
23
|
+
write(data) {
|
|
24
|
+
throw new Error('Method not implemented.');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AntDeviceBinding;
|