incyclist-devices 1.5.38 → 2.0.0
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/README.MD +238 -0
- package/lib/adapters.d.ts +7 -0
- package/lib/adapters.js +49 -0
- package/lib/antv2/adapter-factory.d.ts +21 -10
- package/lib/antv2/adapter-factory.js +51 -33
- package/lib/antv2/adapter.d.ts +65 -0
- package/lib/antv2/adapter.js +310 -0
- package/lib/antv2/ant-interface.d.ts +17 -11
- package/lib/antv2/ant-interface.js +41 -31
- package/lib/antv2/{ant-binding.d.ts → binding.d.ts} +1 -1
- package/lib/antv2/{ant-binding.js → binding.js} +1 -1
- package/lib/antv2/fe/adapter.d.ts +28 -0
- package/lib/antv2/{fe.js → fe/adapter.js} +106 -90
- package/lib/antv2/fe/index.d.ts +2 -0
- package/lib/antv2/fe/index.js +7 -0
- package/lib/antv2/hr/adapter.d.ts +15 -0
- package/lib/antv2/hr/adapter.js +76 -0
- package/lib/antv2/hr/index.d.ts +2 -0
- package/lib/antv2/hr/index.js +7 -0
- package/lib/antv2/index.d.ts +7 -0
- package/lib/antv2/index.js +20 -0
- package/lib/antv2/modes/ant-fe-adv-st-mode.d.ts +9 -0
- package/lib/{ant/antfe → antv2/modes}/ant-fe-adv-st-mode.js +1 -1
- package/lib/antv2/modes/ant-fe-erg-mode.d.ts +6 -0
- package/lib/{ant/antfe → antv2/modes}/ant-fe-erg-mode.js +1 -1
- package/lib/antv2/modes/ant-fe-st-mode.d.ts +5 -0
- package/lib/{ant/antfe → antv2/modes}/ant-fe-st-mode.js +1 -1
- package/lib/antv2/pwr/adapter.d.ts +24 -0
- package/lib/antv2/pwr/adapter.js +141 -0
- package/lib/antv2/pwr/index.d.ts +2 -0
- package/lib/antv2/pwr/index.js +7 -0
- package/lib/antv2/sensor-factory.d.ts +2 -2
- package/lib/antv2/types.d.ts +22 -0
- package/lib/antv2/types.js +5 -0
- package/lib/antv2/utils.d.ts +4 -0
- package/lib/antv2/utils.js +192 -0
- package/lib/base/adpater.d.ts +68 -0
- package/lib/base/adpater.js +183 -0
- package/lib/ble/adapter-factory.d.ts +33 -0
- package/lib/ble/adapter-factory.js +105 -0
- package/lib/ble/base/adapter.d.ts +53 -0
- package/lib/ble/base/adapter.js +290 -0
- package/lib/ble/base/comms-utils.d.ts +7 -0
- package/lib/ble/base/comms-utils.js +91 -0
- package/lib/ble/{ble-device.d.ts → base/comms.d.ts} +31 -16
- package/lib/ble/{ble-device.js → base/comms.js} +193 -55
- package/lib/ble/bindings/index.d.ts +2 -0
- package/lib/ble/bindings/index.js +8 -0
- package/lib/ble/bindings/linux.d.ts +15 -0
- package/lib/ble/bindings/linux.js +39 -0
- package/lib/ble/bindings/mock.d.ts +9 -0
- package/lib/ble/bindings/mock.js +108 -0
- package/lib/ble/bindings/types.d.ts +57 -0
- package/lib/ble/bindings/types.js +96 -0
- package/lib/ble/ble-interface.d.ts +38 -59
- package/lib/ble/ble-interface.js +254 -462
- package/lib/ble/ble-peripheral.d.ts +7 -5
- package/lib/ble/ble-peripheral.js +52 -21
- package/lib/ble/consts.d.ts +3 -0
- package/lib/ble/consts.js +4 -1
- package/lib/ble/cp/adapter.d.ts +22 -0
- package/lib/ble/cp/adapter.js +111 -0
- package/lib/ble/cp/comm.d.ts +31 -0
- package/lib/ble/cp/comm.js +125 -0
- package/lib/ble/cp/index.d.ts +4 -0
- package/lib/ble/cp/index.js +10 -0
- package/lib/ble/cp/types.d.ts +13 -0
- package/lib/ble/cp/types.js +2 -0
- package/lib/ble/elite/adapter.d.ts +19 -0
- package/lib/ble/elite/adapter.js +120 -0
- package/lib/ble/elite/comms.d.ts +32 -0
- package/lib/ble/elite/comms.js +126 -0
- package/lib/ble/elite/index.d.ts +3 -0
- package/lib/ble/elite/index.js +10 -0
- package/lib/ble/fm/adapter.d.ts +22 -0
- package/lib/ble/fm/adapter.js +249 -0
- package/lib/ble/fm/comms.d.ts +50 -0
- package/lib/ble/{fm.js → fm/comms.js} +34 -277
- package/lib/ble/fm/consts.d.ts +6 -0
- package/lib/ble/fm/consts.js +9 -0
- package/lib/ble/fm/index.d.ts +5 -0
- package/lib/ble/fm/index.js +13 -0
- package/lib/ble/fm/types.d.ts +30 -0
- package/lib/ble/fm/types.js +2 -0
- package/lib/ble/hr/adapter.d.ts +14 -0
- package/lib/ble/hr/adapter.js +45 -0
- package/lib/ble/hr/comm.d.ts +19 -0
- package/lib/ble/hr/comm.js +56 -0
- package/lib/ble/hr/index.d.ts +4 -0
- package/lib/ble/hr/index.js +10 -0
- package/lib/ble/hr/mock.d.ts +7 -0
- package/lib/ble/hr/mock.js +47 -0
- package/lib/ble/hr/types.d.ts +5 -0
- package/lib/ble/hr/types.js +2 -0
- package/lib/ble/index.d.ts +9 -0
- package/lib/ble/index.js +26 -0
- package/lib/ble/peripheral-cache.d.ts +43 -0
- package/lib/ble/peripheral-cache.js +107 -0
- package/lib/ble/tacx/adapter.d.ts +10 -0
- package/lib/ble/tacx/adapter.js +99 -0
- package/lib/ble/{tacx.d.ts → tacx/comms.d.ts} +11 -43
- package/lib/ble/{tacx.js → tacx/comms.js} +23 -155
- package/lib/ble/tacx/index.d.ts +4 -0
- package/lib/ble/tacx/index.js +10 -0
- package/lib/ble/tacx/types.d.ts +25 -0
- package/lib/ble/tacx/types.js +2 -0
- package/lib/ble/types.d.ts +128 -0
- package/lib/ble/types.js +2 -0
- package/lib/ble/utils.d.ts +17 -0
- package/lib/ble/utils.js +54 -0
- package/lib/ble/wahoo/adapter.d.ts +9 -0
- package/lib/ble/wahoo/adapter.js +95 -0
- package/lib/ble/{wahoo-kickr.d.ts → wahoo/comms.d.ts} +11 -44
- package/lib/ble/{wahoo-kickr.js → wahoo/comms.js} +29 -129
- package/lib/ble/wahoo/index.d.ts +4 -0
- package/lib/ble/wahoo/index.js +10 -0
- package/lib/ble/wahoo/types.d.ts +19 -0
- package/lib/ble/wahoo/types.js +2 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +34 -0
- package/lib/interfaces.d.ts +7 -0
- package/lib/interfaces.js +27 -0
- package/lib/{ble → modes}/ble-erg-mode.d.ts +4 -4
- package/lib/{ble → modes}/ble-erg-mode.js +2 -2
- package/lib/{ble → modes}/ble-st-mode.d.ts +3 -3
- package/lib/{ble → modes}/ble-st-mode.js +1 -1
- package/lib/{cycling-mode.d.ts → modes/cycling-mode.d.ts} +8 -8
- package/lib/modes/power-base.d.ts +3 -3
- package/lib/modes/power-base.js +8 -4
- package/lib/modes/power-meter.d.ts +3 -3
- package/lib/modes/simulator.d.ts +2 -2
- package/lib/modes/simulator.js +1 -1
- package/lib/serial/adapter-factory.d.ts +12 -0
- package/lib/serial/adapter-factory.js +30 -0
- package/lib/serial/adapter.d.ts +21 -0
- package/lib/serial/adapter.js +61 -0
- package/lib/serial/bindings/tcp.d.ts +45 -0
- package/lib/serial/bindings/tcp.js +284 -0
- package/lib/serial/comm.d.ts +7 -0
- package/lib/serial/comm.js +2 -0
- package/lib/{daum → serial/daum}/DaumAdapter.d.ts +14 -23
- package/lib/{daum → serial/daum}/DaumAdapter.js +57 -97
- package/lib/{daum → serial/daum}/DaumPowerMeterCyclingMode.d.ts +2 -2
- package/lib/{daum → serial/daum}/DaumPowerMeterCyclingMode.js +1 -1
- package/lib/{daum → serial/daum}/ERGCyclingMode.d.ts +3 -3
- package/lib/{daum → serial/daum}/ERGCyclingMode.js +3 -3
- package/lib/{daum → serial/daum}/SmartTrainerCyclingMode.d.ts +3 -3
- package/lib/{daum → serial/daum}/SmartTrainerCyclingMode.js +4 -3
- package/lib/serial/daum/classic/adapter.d.ts +29 -0
- package/lib/{daum/classic/DaumClassicAdapter.js → serial/daum/classic/adapter.js} +77 -50
- package/lib/{daum/classic/bike.d.ts → serial/daum/classic/comms.d.ts} +14 -16
- package/lib/{daum/classic/bike.js → serial/daum/classic/comms.js} +68 -152
- package/lib/serial/daum/classic/mock.d.ts +96 -0
- package/lib/serial/daum/classic/mock.js +365 -0
- package/lib/{daum/classic/DaumClassicCyclingMode.d.ts → serial/daum/classic/modes/daum-classic.d.ts} +3 -3
- package/lib/{daum/classic/DaumClassicCyclingMode.js → serial/daum/classic/modes/daum-classic.js} +2 -2
- package/lib/{daum → serial/daum}/classic/utils.d.ts +1 -1
- package/lib/serial/daum/premium/adapter.d.ts +25 -0
- package/lib/{daum/premium/DaumPremiumAdapter.js → serial/daum/premium/adapter.js} +107 -47
- package/lib/{daum/premium/bike.d.ts → serial/daum/premium/comms.d.ts} +26 -54
- package/lib/{daum/premium/bike.js → serial/daum/premium/comms.js} +215 -420
- package/lib/serial/daum/premium/mock.d.ts +75 -0
- package/lib/serial/daum/premium/mock.js +289 -0
- package/lib/{daum/premium/DaumClassicCyclingMode.d.ts → serial/daum/premium/modes/daum-classic.d.ts} +3 -3
- package/lib/{daum/premium/DaumClassicCyclingMode.js → serial/daum/premium/modes/daum-classic.js} +2 -2
- package/lib/serial/daum/premium/types.d.ts +12 -0
- package/lib/serial/daum/premium/types.js +2 -0
- package/lib/{daum → serial/daum}/premium/utils.d.ts +8 -11
- package/lib/{daum → serial/daum}/premium/utils.js +22 -63
- package/lib/serial/index.d.ts +9 -0
- package/lib/serial/index.js +49 -0
- package/lib/{kettler → serial/kettler}/comms.d.ts +8 -6
- package/lib/{kettler → serial/kettler}/comms.js +71 -32
- package/lib/{kettler → serial/kettler}/ergo-racer/adapter.d.ts +14 -28
- package/lib/{kettler → serial/kettler}/ergo-racer/adapter.js +102 -169
- package/lib/serial/kettler/ergo-racer/mock.d.ts +66 -0
- package/lib/serial/kettler/ergo-racer/mock.js +216 -0
- package/lib/{kettler/ergo-racer/ERGCyclingMode.d.ts → serial/kettler/ergo-racer/modes/erg.d.ts} +4 -4
- package/lib/{kettler/ergo-racer/ERGCyclingMode.js → serial/kettler/ergo-racer/modes/erg.js} +2 -2
- package/lib/serial/serial-interface.d.ts +60 -0
- package/lib/serial/serial-interface.js +309 -0
- package/lib/simulator/Simulator.d.ts +12 -25
- package/lib/simulator/Simulator.js +26 -87
- package/lib/types/adapter.d.ts +39 -0
- package/lib/types/adapter.js +2 -0
- package/lib/types/capabilities.d.ts +8 -0
- package/lib/types/capabilities.js +12 -0
- package/lib/types/data.d.ts +12 -0
- package/lib/types/data.js +2 -0
- package/lib/types/device.d.ts +32 -0
- package/lib/types/device.js +11 -0
- package/lib/types/interface.d.ts +18 -0
- package/lib/types/interface.js +2 -0
- package/lib/types/route.d.ts +2 -2
- package/lib/types/user.d.ts +1 -1
- package/lib/{utils.d.ts → utils/utils.d.ts} +1 -0
- package/lib/{utils.js → utils/utils.js} +5 -1
- package/package.json +16 -14
- package/lib/DeviceSupport.d.ts +0 -36
- package/lib/DeviceSupport.js +0 -82
- package/lib/ant/AntAdapter.d.ts +0 -50
- package/lib/ant/AntAdapter.js +0 -109
- package/lib/ant/AntScanner.d.ts +0 -60
- package/lib/ant/AntScanner.js +0 -651
- package/lib/ant/antfe/AntFEAdapter.d.ts +0 -83
- package/lib/ant/antfe/AntFEAdapter.js +0 -652
- package/lib/ant/antfe/ant-fe-adv-st-mode.d.ts +0 -9
- package/lib/ant/antfe/ant-fe-erg-mode.d.ts +0 -6
- package/lib/ant/antfe/ant-fe-st-mode.d.ts +0 -5
- package/lib/ant/anthrm/AntHrmAdapter.d.ts +0 -16
- package/lib/ant/anthrm/AntHrmAdapter.js +0 -130
- package/lib/ant/antpwr/pwr-adapter.d.ts +0 -49
- package/lib/ant/antpwr/pwr-adapter.js +0 -251
- package/lib/ant/utils.d.ts +0 -1
- package/lib/ant/utils.js +0 -23
- package/lib/antv2/AntAdapter.d.ts +0 -48
- package/lib/antv2/AntAdapter.js +0 -104
- package/lib/antv2/ant-device.d.ts +0 -59
- package/lib/antv2/ant-device.js +0 -161
- package/lib/antv2/fe.d.ts +0 -32
- package/lib/antv2/hr.d.ts +0 -18
- package/lib/antv2/hr.js +0 -102
- package/lib/antv2/incyclist-protocol.d.ts +0 -37
- package/lib/antv2/incyclist-protocol.js +0 -126
- package/lib/antv2/pwr.d.ts +0 -28
- package/lib/antv2/pwr.js +0 -171
- package/lib/ble/ble.d.ts +0 -129
- package/lib/ble/ble.js +0 -86
- package/lib/ble/elite.d.ts +0 -90
- package/lib/ble/elite.js +0 -322
- package/lib/ble/fm.d.ts +0 -125
- package/lib/ble/hrm.d.ts +0 -48
- package/lib/ble/hrm.js +0 -134
- package/lib/ble/incyclist-protocol.d.ts +0 -31
- package/lib/ble/incyclist-protocol.js +0 -153
- package/lib/ble/pwr.d.ts +0 -89
- package/lib/ble/pwr.js +0 -322
- package/lib/daum/classic/DaumClassicAdapter.d.ts +0 -28
- package/lib/daum/classic/DaumClassicProtocol.d.ts +0 -27
- package/lib/daum/classic/DaumClassicProtocol.js +0 -185
- package/lib/daum/premium/DaumPremiumAdapter.d.ts +0 -16
- package/lib/daum/premium/DaumPremiumProtocol.d.ts +0 -32
- package/lib/daum/premium/DaumPremiumProtocol.js +0 -207
- package/lib/daum/premium/tcpserial.d.ts +0 -33
- package/lib/daum/premium/tcpserial.js +0 -123
- package/lib/device.d.ts +0 -94
- package/lib/device.js +0 -76
- package/lib/kettler/ergo-racer/protocol.d.ts +0 -41
- package/lib/kettler/ergo-racer/protocol.js +0 -203
- package/lib/protocol.d.ts +0 -74
- package/lib/protocol.js +0 -41
- package/lib/registry.d.ts +0 -8
- package/lib/registry.js +0 -33
- package/lib/serialport/bindings/tcp.d.ts +0 -20
- package/lib/serialport/bindings/tcp.js +0 -33
- package/lib/serialport/index.d.ts +0 -2
- package/lib/serialport/index.js +0 -29
- package/lib/serialport/serialport.d.ts +0 -29
- package/lib/serialport/serialport.js +0 -87
- /package/lib/{cycling-mode.js → modes/cycling-mode.js} +0 -0
- /package/lib/{daum → serial/daum}/classic/utils.js +0 -0
- /package/lib/{daum → serial/daum}/constants.d.ts +0 -0
- /package/lib/{daum → serial/daum}/constants.js +0 -0
- /package/lib/{serialport.d.ts → serial/serialport.d.ts} +0 -0
- /package/lib/{serialport.js → serial/serialport.js} +0 -0
- /package/lib/{calculations.d.ts → utils/calculations.d.ts} +0 -0
- /package/lib/{calculations.js → utils/calculations.js} +0 -0
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
const protocol_1 = __importStar(require("../../protocol"));
|
|
35
|
-
const registry_1 = __importDefault(require("../../registry"));
|
|
36
|
-
const bike_1 = require("../premium/bike");
|
|
37
|
-
const DaumPremiumAdapter_1 = __importDefault(require("./DaumPremiumAdapter"));
|
|
38
|
-
const gd_eventlog_1 = require("gd-eventlog");
|
|
39
|
-
const PROTOCOL_NAME = "Daum Premium";
|
|
40
|
-
const DefaultState = {
|
|
41
|
-
activeScans: [],
|
|
42
|
-
scanning: false,
|
|
43
|
-
stopScanning: false
|
|
44
|
-
};
|
|
45
|
-
class DaumPremiumProtocol extends protocol_1.default {
|
|
46
|
-
constructor() {
|
|
47
|
-
super();
|
|
48
|
-
this.state = DefaultState;
|
|
49
|
-
this.logger = new gd_eventlog_1.EventLogger('DaumPremium');
|
|
50
|
-
this.devices = [];
|
|
51
|
-
}
|
|
52
|
-
add(settings) {
|
|
53
|
-
if (settings.interface && settings.interface === protocol_1.INTERFACE.TCPIP) {
|
|
54
|
-
bike_1.Daum8iTcp.setNetImpl(protocol_1.default.getNetImpl());
|
|
55
|
-
const { host } = settings;
|
|
56
|
-
const portName = `${host}:51955`;
|
|
57
|
-
return this.addDevice(bike_1.Daum8iTcp, { host, port: 51955, interface: protocol_1.INTERFACE.TCPIP }, portName);
|
|
58
|
-
}
|
|
59
|
-
if (settings.interface && settings.interface === protocol_1.INTERFACE.SERIAL) {
|
|
60
|
-
bike_1.Daum8iSerial.setSerialPort(protocol_1.default.getSerialPort());
|
|
61
|
-
const { port } = settings;
|
|
62
|
-
return this.addDevice(bike_1.Daum8iSerial, { port, interface: protocol_1.INTERFACE.SERIAL }, port);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
getName() {
|
|
66
|
-
return PROTOCOL_NAME;
|
|
67
|
-
}
|
|
68
|
-
getInterfaces() {
|
|
69
|
-
return [protocol_1.INTERFACE.SERIAL, protocol_1.INTERFACE.TCPIP];
|
|
70
|
-
}
|
|
71
|
-
isBike() {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
isHrm() {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
isPower() {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
scan(props) {
|
|
81
|
-
const opts = props || {};
|
|
82
|
-
this.logger.logEvent({ message: 'start scan', opts });
|
|
83
|
-
this.state.scanning = true;
|
|
84
|
-
if (opts.interface === protocol_1.INTERFACE.TCPIP) {
|
|
85
|
-
this.scanTcpip(opts);
|
|
86
|
-
}
|
|
87
|
-
else if (opts.interface === protocol_1.INTERFACE.SERIAL) {
|
|
88
|
-
this.scanSerial(opts);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
addDevice(DeviceClass, opts, portName) {
|
|
92
|
-
let device;
|
|
93
|
-
if (this.devices.length === 0) {
|
|
94
|
-
const bike = new DeviceClass(opts);
|
|
95
|
-
device = new DaumPremiumAdapter_1.default(this, bike);
|
|
96
|
-
this.devices.push(device);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const devices = this.devices;
|
|
100
|
-
const idx = devices.findIndex(d => d.getBike().getPort() === portName);
|
|
101
|
-
if (idx === -1) {
|
|
102
|
-
const bike = new DeviceClass(opts);
|
|
103
|
-
device = new DaumPremiumAdapter_1.default(this, bike);
|
|
104
|
-
this.devices.push(device);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
device = this.devices[idx];
|
|
108
|
-
if (device.isSelected() || device.isDetected())
|
|
109
|
-
device = undefined;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return device;
|
|
113
|
-
}
|
|
114
|
-
scanTcpip(opts) {
|
|
115
|
-
bike_1.Daum8iTcp.setNetImpl(protocol_1.default.getNetImpl());
|
|
116
|
-
const { host, port } = opts;
|
|
117
|
-
let device = this.addDevice(bike_1.Daum8iTcp, opts, `${host}:${port || 51955}`);
|
|
118
|
-
if (device) {
|
|
119
|
-
const iv = setInterval(() => { this.scanCommand(device, opts); }, 500);
|
|
120
|
-
this.state.activeScans.push({ iv, device });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
scanSerial(opts) {
|
|
124
|
-
bike_1.Daum8iSerial.setSerialPort(protocol_1.default.getSerialPort());
|
|
125
|
-
let device = this.addDevice(bike_1.Daum8iSerial, opts, opts.port);
|
|
126
|
-
if (device) {
|
|
127
|
-
const iv = setInterval(() => { this.scanCommand(device, opts); }, 500);
|
|
128
|
-
this.state.activeScans.push({ iv, device });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
isScanning() {
|
|
132
|
-
return this.state.scanning;
|
|
133
|
-
}
|
|
134
|
-
stopScan() {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
this.logger.logEvent({ message: 'stop scan', activeScans: this.state.activeScans });
|
|
137
|
-
this.state.stopScanning = true;
|
|
138
|
-
if (this.state.activeScans.length > 0) {
|
|
139
|
-
this.state.activeScans.forEach(scan => {
|
|
140
|
-
clearInterval(scan.iv);
|
|
141
|
-
scan.iv = undefined;
|
|
142
|
-
scan.scanning = false;
|
|
143
|
-
});
|
|
144
|
-
this.state.activeScans = [];
|
|
145
|
-
}
|
|
146
|
-
const devices = this.devices;
|
|
147
|
-
for (let i = 0; i < devices.length; i++) {
|
|
148
|
-
const d = devices[i];
|
|
149
|
-
if (!d.isSelected() && !d.isDetected()) {
|
|
150
|
-
try {
|
|
151
|
-
yield d.getBike().saveClose(true);
|
|
152
|
-
}
|
|
153
|
-
catch (err) {
|
|
154
|
-
this.logger.logEvent({ message: 'stop scan error', error: err.message });
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
for (let i = 0; i < devices.length; i++) {
|
|
159
|
-
const d = devices[i];
|
|
160
|
-
if (!d.isSelected() && !d.isDetected()) {
|
|
161
|
-
try {
|
|
162
|
-
yield d.getBike().unblock();
|
|
163
|
-
}
|
|
164
|
-
catch (err) {
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
this.state.scanning = false;
|
|
169
|
-
this.state.stopScanning = false;
|
|
170
|
-
this.logger.logEvent({ message: 'stop scan completed' });
|
|
171
|
-
return true;
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
scanCommand(device, opts) {
|
|
175
|
-
const scan = this.state.activeScans.find(actScan => actScan.device.getBike().getPort() === device.getBike().getPort());
|
|
176
|
-
if (this.state.stopScanning || (scan && scan.scanning) || device.isDetected())
|
|
177
|
-
return;
|
|
178
|
-
scan.scanning = true;
|
|
179
|
-
device.check()
|
|
180
|
-
.then(() => __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
if (this.state.stopScanning)
|
|
182
|
-
return;
|
|
183
|
-
const { onDeviceFound, onScanFinished, id } = opts;
|
|
184
|
-
device.setDetected();
|
|
185
|
-
if (onDeviceFound)
|
|
186
|
-
onDeviceFound(device, device.getProtocol());
|
|
187
|
-
if (onScanFinished) {
|
|
188
|
-
onScanFinished(id);
|
|
189
|
-
}
|
|
190
|
-
try {
|
|
191
|
-
yield device.getBike().saveClose();
|
|
192
|
-
}
|
|
193
|
-
catch (err) {
|
|
194
|
-
this.logger.logEvent({ message: 'scanCommand warning: Could not close port', error: err.message });
|
|
195
|
-
}
|
|
196
|
-
clearInterval(scan.iv);
|
|
197
|
-
scan.iv = undefined;
|
|
198
|
-
scan.scanning = false;
|
|
199
|
-
}))
|
|
200
|
-
.catch(() => {
|
|
201
|
-
scan.scanning = false;
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
exports.default = DaumPremiumProtocol;
|
|
206
|
-
const premium = new DaumPremiumProtocol();
|
|
207
|
-
registry_1.default.register(premium);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { EventLogger } from 'gd-eventlog';
|
|
2
|
-
export default class TcpSocketPort {
|
|
3
|
-
callbacks: any;
|
|
4
|
-
enabled: boolean;
|
|
5
|
-
host: string;
|
|
6
|
-
port: number;
|
|
7
|
-
net: any;
|
|
8
|
-
props: any;
|
|
9
|
-
socket: any;
|
|
10
|
-
id: number;
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
isClosed: boolean;
|
|
13
|
-
path: string;
|
|
14
|
-
outputQueue: Array<any>;
|
|
15
|
-
iv: any;
|
|
16
|
-
logger: EventLogger;
|
|
17
|
-
constructor(props: any);
|
|
18
|
-
flush(): void;
|
|
19
|
-
open(retry?: boolean): void;
|
|
20
|
-
close(): void;
|
|
21
|
-
onTimeout(): void;
|
|
22
|
-
onConnect(): void;
|
|
23
|
-
onError(err: any): void;
|
|
24
|
-
on(event: any, callback: any): void;
|
|
25
|
-
removeAllListeners(): void;
|
|
26
|
-
emit(event: any, ...args: any[]): void;
|
|
27
|
-
write(message: any): void;
|
|
28
|
-
unpipe(): void;
|
|
29
|
-
pipe(transformer: any): any;
|
|
30
|
-
static setResponse(command: any, fn: any): void;
|
|
31
|
-
static getReponseHandler(command: any): any;
|
|
32
|
-
static reset(): void;
|
|
33
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
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 net_1 = __importDefault(require("net"));
|
|
7
|
-
const gd_eventlog_1 = require("gd-eventlog");
|
|
8
|
-
var __responses = {};
|
|
9
|
-
class TcpSocketPort {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
this.callbacks = {};
|
|
12
|
-
this.isOpen = false;
|
|
13
|
-
this.isClosed = false;
|
|
14
|
-
this.props = props || {};
|
|
15
|
-
this.logger = new gd_eventlog_1.EventLogger('TCPSocket') || props.logger;
|
|
16
|
-
this.enabled = this.props.enabled || true;
|
|
17
|
-
this.host = this.props.host || '127.0.0.1';
|
|
18
|
-
this.port = this.props.port || 10000;
|
|
19
|
-
this.net = this.props.net || net_1.default;
|
|
20
|
-
this.path = `${this.host}:${this.port}`;
|
|
21
|
-
if (this.enabled)
|
|
22
|
-
this.socket = new this.net.Socket();
|
|
23
|
-
this.outputQueue = [];
|
|
24
|
-
this.iv = undefined;
|
|
25
|
-
}
|
|
26
|
-
flush() {
|
|
27
|
-
}
|
|
28
|
-
open(retry = false) {
|
|
29
|
-
try {
|
|
30
|
-
if (!retry) {
|
|
31
|
-
this.id = Date.now();
|
|
32
|
-
this.socket.on('timeout', () => { this.onTimeout(); });
|
|
33
|
-
this.socket.on('connect', () => { this.onConnect(); });
|
|
34
|
-
this.socket.on('error', (err) => { this.onError(err); });
|
|
35
|
-
this.socket.on('ready', () => {
|
|
36
|
-
this.logger.logEvent({ message: 'ready' });
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
this.logger.logEvent({ message: 'opening', id: this.id, retry });
|
|
40
|
-
this.socket.connect(this.port, this.host);
|
|
41
|
-
}
|
|
42
|
-
catch (err) {
|
|
43
|
-
this.logger.logEvent({ message: 'opening error', id: this.id, error: err.message, stack: err.stack });
|
|
44
|
-
this.emit('error', err);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
close() {
|
|
48
|
-
this.logger.logEvent({ message: 'closing', id: this.id });
|
|
49
|
-
this.isOpen = false;
|
|
50
|
-
this.isClosed = true;
|
|
51
|
-
try {
|
|
52
|
-
this.socket.removeAllListeners();
|
|
53
|
-
this.socket.destroy();
|
|
54
|
-
this.socket.on('error', () => { });
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
console.log(err);
|
|
58
|
-
}
|
|
59
|
-
this.emit('close');
|
|
60
|
-
setTimeout(() => { this.removeAllListeners(); }, 100);
|
|
61
|
-
}
|
|
62
|
-
onTimeout() {
|
|
63
|
-
if (this.isOpen)
|
|
64
|
-
return;
|
|
65
|
-
this.logger.logEvent({ message: 'timeout', id: this.id });
|
|
66
|
-
try {
|
|
67
|
-
this.socket.end();
|
|
68
|
-
}
|
|
69
|
-
catch (_a) { }
|
|
70
|
-
if (this.isClosed)
|
|
71
|
-
return;
|
|
72
|
-
this.emit('error', new Error('timeout'));
|
|
73
|
-
}
|
|
74
|
-
onConnect() {
|
|
75
|
-
this.logger.logEvent({ message: 'connected', id: this.id });
|
|
76
|
-
this.isOpen = true;
|
|
77
|
-
this.isClosed = false;
|
|
78
|
-
this.emit('open');
|
|
79
|
-
}
|
|
80
|
-
onError(err) {
|
|
81
|
-
this.logger.logEvent({ message: 'error', error: err.message });
|
|
82
|
-
if (this.callbacks['error'])
|
|
83
|
-
this.callbacks['error'](err);
|
|
84
|
-
}
|
|
85
|
-
on(event, callback) {
|
|
86
|
-
if (event === 'open' || event === 'close' || event === 'error') {
|
|
87
|
-
this.callbacks[event] = callback;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
this.socket.on(event, callback);
|
|
91
|
-
}
|
|
92
|
-
removeAllListeners() {
|
|
93
|
-
this.callbacks = {};
|
|
94
|
-
}
|
|
95
|
-
emit(event, ...args) {
|
|
96
|
-
if (event === 'open' || event === 'close' || event === 'error') {
|
|
97
|
-
if (this.callbacks[event])
|
|
98
|
-
this.callbacks[event](...args);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
write(message) {
|
|
102
|
-
this.socket.write(new Uint8Array(message));
|
|
103
|
-
}
|
|
104
|
-
unpipe() {
|
|
105
|
-
delete this.callbacks['data'];
|
|
106
|
-
this.socket.unpipe();
|
|
107
|
-
}
|
|
108
|
-
pipe(transformer) {
|
|
109
|
-
return this.socket.pipe(transformer);
|
|
110
|
-
}
|
|
111
|
-
static setResponse(command, fn) {
|
|
112
|
-
if (!__responses)
|
|
113
|
-
this.reset();
|
|
114
|
-
__responses[command] = fn;
|
|
115
|
-
}
|
|
116
|
-
static getReponseHandler(command) {
|
|
117
|
-
return __responses[command];
|
|
118
|
-
}
|
|
119
|
-
static reset() {
|
|
120
|
-
__responses = {};
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.default = TcpSocketPort;
|
package/lib/device.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { DeviceProtocol, Device } from './protocol';
|
|
3
|
-
import CyclingMode from './cycling-mode';
|
|
4
|
-
import EventEmitter from 'events';
|
|
5
|
-
export declare const DEFAULT_BIKE_WEIGHT = 10;
|
|
6
|
-
export declare const DEFAULT_USER_WEIGHT = 75;
|
|
7
|
-
export declare type DeviceData = {
|
|
8
|
-
speed?: number;
|
|
9
|
-
slope?: number;
|
|
10
|
-
power?: number;
|
|
11
|
-
cadence?: number;
|
|
12
|
-
heartrate?: number;
|
|
13
|
-
distance?: number;
|
|
14
|
-
timestamp?: number;
|
|
15
|
-
deviceTime?: number;
|
|
16
|
-
deviceDistanceCounter?: number;
|
|
17
|
-
internalDistanceCounter?: number;
|
|
18
|
-
};
|
|
19
|
-
export declare type OnDeviceDataCallback = (data: DeviceData) => void;
|
|
20
|
-
export declare type OnDeviceStartCallback = (completed: number, total: number) => void;
|
|
21
|
-
export interface Bike {
|
|
22
|
-
setCyclingMode(mode: CyclingMode | string, settings?: any): void;
|
|
23
|
-
getSupportedCyclingModes(): Array<any>;
|
|
24
|
-
getCyclingMode(): CyclingMode;
|
|
25
|
-
getDefaultCyclingMode(): CyclingMode;
|
|
26
|
-
setUserSettings(userSettings: any): void;
|
|
27
|
-
setBikeSettings(bikeSettings: any): void;
|
|
28
|
-
}
|
|
29
|
-
export interface DeviceAdapter extends Device {
|
|
30
|
-
isBike(): boolean;
|
|
31
|
-
isPower(): boolean;
|
|
32
|
-
isHrm(): boolean;
|
|
33
|
-
isSame(device: DeviceAdapter): boolean;
|
|
34
|
-
getID(): string;
|
|
35
|
-
getDisplayName(): string;
|
|
36
|
-
getName(): string;
|
|
37
|
-
getPort(): string;
|
|
38
|
-
getProtocol(): DeviceProtocol;
|
|
39
|
-
getProtocolName(): string;
|
|
40
|
-
setIgnoreHrm(ignore: boolean): void;
|
|
41
|
-
setIgnorePower(ignore: boolean): void;
|
|
42
|
-
setIgnoreBike(ignore: boolean): void;
|
|
43
|
-
select(): void;
|
|
44
|
-
unselect(): void;
|
|
45
|
-
isSelected(): boolean;
|
|
46
|
-
setDetected(detected?: boolean): void;
|
|
47
|
-
isDetected(): boolean;
|
|
48
|
-
start(props?: any): Promise<any>;
|
|
49
|
-
stop(): Promise<boolean>;
|
|
50
|
-
pause(): Promise<boolean>;
|
|
51
|
-
resume(): Promise<boolean>;
|
|
52
|
-
sendUpdate(request: any): void;
|
|
53
|
-
onData(callback: OnDeviceDataCallback): void;
|
|
54
|
-
}
|
|
55
|
-
export default class IncyclistDevice extends EventEmitter implements DeviceAdapter {
|
|
56
|
-
protocol: DeviceProtocol;
|
|
57
|
-
detected: boolean;
|
|
58
|
-
selected: boolean;
|
|
59
|
-
onDataFn: OnDeviceDataCallback;
|
|
60
|
-
settings: any;
|
|
61
|
-
constructor(proto: DeviceProtocol, settings?: any);
|
|
62
|
-
isBike(): boolean;
|
|
63
|
-
isPower(): boolean;
|
|
64
|
-
isHrm(): boolean;
|
|
65
|
-
isSame(device: DeviceAdapter): boolean;
|
|
66
|
-
getID(): string;
|
|
67
|
-
getDisplayName(): string;
|
|
68
|
-
getName(): string;
|
|
69
|
-
getPort(): string;
|
|
70
|
-
getProtocol(): DeviceProtocol;
|
|
71
|
-
getProtocolName(): string;
|
|
72
|
-
getSupportedCyclingModes(): any[];
|
|
73
|
-
getDefaultCyclingMode(): CyclingMode;
|
|
74
|
-
setCyclingMode(mode: CyclingMode | string, settings?: any): void;
|
|
75
|
-
getCyclingMode(): CyclingMode;
|
|
76
|
-
setIgnoreHrm(ignore: any): void;
|
|
77
|
-
setIgnorePower(ignore: any): void;
|
|
78
|
-
setIgnoreBike(ignore: any): void;
|
|
79
|
-
select(): void;
|
|
80
|
-
unselect(): void;
|
|
81
|
-
isSelected(): boolean;
|
|
82
|
-
setDetected(detected?: boolean): void;
|
|
83
|
-
isDetected(): boolean;
|
|
84
|
-
update(): void;
|
|
85
|
-
check(): void;
|
|
86
|
-
connect(): void;
|
|
87
|
-
close(): void;
|
|
88
|
-
start(props?: any): Promise<any>;
|
|
89
|
-
stop(): Promise<boolean>;
|
|
90
|
-
pause(): Promise<boolean>;
|
|
91
|
-
resume(): Promise<boolean>;
|
|
92
|
-
sendUpdate(request: any): void;
|
|
93
|
-
onData(callback: OnDeviceDataCallback): void;
|
|
94
|
-
}
|
package/lib/device.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
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
|
-
exports.DEFAULT_USER_WEIGHT = exports.DEFAULT_BIKE_WEIGHT = void 0;
|
|
7
|
-
const events_1 = __importDefault(require("events"));
|
|
8
|
-
exports.DEFAULT_BIKE_WEIGHT = 10;
|
|
9
|
-
exports.DEFAULT_USER_WEIGHT = 75;
|
|
10
|
-
class IncyclistDevice extends events_1.default {
|
|
11
|
-
constructor(proto, settings) {
|
|
12
|
-
super();
|
|
13
|
-
this.protocol = proto;
|
|
14
|
-
this.detected = false;
|
|
15
|
-
this.selected = false;
|
|
16
|
-
this.onDataFn = undefined;
|
|
17
|
-
this.settings = settings || {};
|
|
18
|
-
}
|
|
19
|
-
isBike() { throw new Error('not implemented'); }
|
|
20
|
-
isPower() { throw new Error('not implemented'); }
|
|
21
|
-
isHrm() { throw new Error('not implemented'); }
|
|
22
|
-
isSame(device) { throw new Error('not implemented'); }
|
|
23
|
-
getID() { throw new Error('not implemented'); }
|
|
24
|
-
getDisplayName() { return this.getName(); }
|
|
25
|
-
getName() { throw new Error('not implemented'); }
|
|
26
|
-
getPort() { throw new Error('not implemented'); }
|
|
27
|
-
getProtocol() { return this.protocol; }
|
|
28
|
-
getProtocolName() {
|
|
29
|
-
return this.protocol ? this.protocol.getName() : undefined;
|
|
30
|
-
}
|
|
31
|
-
getSupportedCyclingModes() { throw new Error('not implemented'); }
|
|
32
|
-
getDefaultCyclingMode() { throw new Error('not implemented'); }
|
|
33
|
-
setCyclingMode(mode, settings) {
|
|
34
|
-
let selectedMode;
|
|
35
|
-
if (typeof mode === 'string') {
|
|
36
|
-
const supported = this.getSupportedCyclingModes();
|
|
37
|
-
const CyclingModeClass = supported.find(M => { const m = new M(this); return m.getName() === mode; });
|
|
38
|
-
if (CyclingModeClass) {
|
|
39
|
-
this.settings.cyclingMode = new CyclingModeClass(this, settings);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
selectedMode = this.getDefaultCyclingMode();
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
selectedMode = mode;
|
|
46
|
-
}
|
|
47
|
-
this.settings.cyclingMode = selectedMode;
|
|
48
|
-
this.settings.cyclingMode.setSettings(settings);
|
|
49
|
-
}
|
|
50
|
-
getCyclingMode() {
|
|
51
|
-
if (!this.settings.cyclingMode)
|
|
52
|
-
this.setCyclingMode(this.getDefaultCyclingMode());
|
|
53
|
-
return this.settings.cyclingMode;
|
|
54
|
-
}
|
|
55
|
-
setIgnoreHrm(ignore) { }
|
|
56
|
-
setIgnorePower(ignore) { }
|
|
57
|
-
setIgnoreBike(ignore) { }
|
|
58
|
-
select() { this.selected = true; }
|
|
59
|
-
unselect() { this.selected = false; }
|
|
60
|
-
isSelected() { return this.selected; }
|
|
61
|
-
setDetected(detected = true) { this.detected = detected; }
|
|
62
|
-
isDetected() { return this.detected; }
|
|
63
|
-
update() { }
|
|
64
|
-
check() { }
|
|
65
|
-
connect() { }
|
|
66
|
-
close() { }
|
|
67
|
-
start(props) { throw new Error('not implemented'); }
|
|
68
|
-
stop() { throw new Error('not implemented'); }
|
|
69
|
-
pause() { throw new Error('not implemented'); }
|
|
70
|
-
resume() { throw new Error('not implemented'); }
|
|
71
|
-
sendUpdate(request) { }
|
|
72
|
-
onData(callback) {
|
|
73
|
-
this.onDataFn = callback;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.default = IncyclistDevice;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import DeviceProtocolBase, { DeviceProtocol, DeviceSettings, ScanProps } from '../../protocol';
|
|
3
|
-
import KettlerRacerAdapter from './adapter';
|
|
4
|
-
export interface KettlerRacerScanProps extends ScanProps {
|
|
5
|
-
port: string;
|
|
6
|
-
}
|
|
7
|
-
declare enum ScanState {
|
|
8
|
-
IDLE = 0,
|
|
9
|
-
SCANNING = 1,
|
|
10
|
-
STOPPING = 2,
|
|
11
|
-
STOPPED = 3
|
|
12
|
-
}
|
|
13
|
-
export interface ScanDescription {
|
|
14
|
-
device: KettlerRacerAdapter;
|
|
15
|
-
port: string;
|
|
16
|
-
iv: NodeJS.Timeout;
|
|
17
|
-
state: ScanState;
|
|
18
|
-
props: KettlerRacerScanProps;
|
|
19
|
-
}
|
|
20
|
-
export default class KettlerRacerProtocol extends DeviceProtocolBase implements DeviceProtocol {
|
|
21
|
-
private state;
|
|
22
|
-
private logger;
|
|
23
|
-
private activeScans;
|
|
24
|
-
constructor();
|
|
25
|
-
getSerialPort(): any;
|
|
26
|
-
getInterfaces(): string[];
|
|
27
|
-
getName(): string;
|
|
28
|
-
isBike(): boolean;
|
|
29
|
-
isHrm(): boolean;
|
|
30
|
-
isPower(): boolean;
|
|
31
|
-
add(settings: DeviceSettings): any;
|
|
32
|
-
scan(props: KettlerRacerScanProps): void;
|
|
33
|
-
checkDevice(port: string): boolean;
|
|
34
|
-
doScan(port: string): Promise<void>;
|
|
35
|
-
doStopScan(job: ScanDescription): Promise<void>;
|
|
36
|
-
isJobStopped(job: ScanDescription): boolean;
|
|
37
|
-
waitForStop(timeout?: number): Promise<boolean>;
|
|
38
|
-
stopScan(): Promise<boolean>;
|
|
39
|
-
isScanning(): boolean;
|
|
40
|
-
}
|
|
41
|
-
export {};
|