incyclist-devices 2.0.38 → 2.1.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/adapters.d.ts +1 -1
- package/lib/antv2/adapter-factory.d.ts +4 -13
- package/lib/antv2/adapter.d.ts +16 -33
- package/lib/antv2/adapter.js +68 -112
- package/lib/antv2/ant-interface.d.ts +3 -11
- package/lib/antv2/ant-interface.js +1 -1
- package/lib/antv2/base/adapter.d.ts +62 -0
- package/lib/antv2/base/adapter.js +360 -0
- package/lib/antv2/base/ant-interface.d.ts +35 -0
- package/lib/antv2/base/ant-interface.js +285 -0
- package/lib/antv2/base/binding.d.ts +13 -0
- package/lib/antv2/base/binding.js +27 -0
- package/lib/antv2/cad/adapter.d.ts +10 -0
- package/lib/antv2/cad/adapter.js +25 -0
- package/lib/antv2/cad/index.d.ts +2 -0
- package/lib/antv2/cad/index.js +7 -0
- package/lib/antv2/consts.d.ts +2 -0
- package/lib/antv2/consts.js +5 -0
- package/lib/antv2/factories/adapter-factory.d.ts +14 -0
- package/lib/antv2/factories/adapter-factory.js +65 -0
- package/lib/antv2/factories/sensor-factory.d.ts +5 -0
- package/lib/antv2/factories/sensor-factory.js +22 -0
- package/lib/antv2/fe/adapter.d.ts +25 -26
- package/lib/antv2/fe/adapter.js +212 -218
- package/lib/antv2/hr/adapter.d.ts +6 -14
- package/lib/antv2/hr/adapter.js +7 -55
- package/lib/antv2/hr copy/adapter.d.ts +11 -0
- package/lib/antv2/hr copy/adapter.js +30 -0
- package/lib/antv2/hr copy/index.d.ts +2 -0
- package/lib/antv2/hr copy/index.js +7 -0
- package/lib/antv2/index.d.ts +5 -4
- package/lib/antv2/index.js +4 -2
- package/lib/antv2/pwr/adapter.d.ts +9 -29
- package/lib/antv2/pwr/adapter.js +20 -130
- package/lib/antv2/types.d.ts +23 -3
- package/lib/base/adpater.d.ts +42 -45
- package/lib/base/adpater.js +144 -110
- package/lib/base/consts.d.ts +4 -0
- package/lib/base/consts.js +9 -0
- package/lib/ble/adapter-factory.d.ts +4 -4
- package/lib/ble/base/adapter.d.ts +6 -24
- package/lib/ble/base/adapter.js +4 -94
- package/lib/ble/ble-interface.d.ts +2 -3
- package/lib/ble/cp/adapter.d.ts +6 -11
- package/lib/ble/cp/adapter.js +9 -12
- package/lib/ble/elite/adapter.d.ts +8 -8
- package/lib/ble/elite/adapter.js +6 -2
- package/lib/ble/fm/adapter.d.ts +11 -11
- package/lib/ble/fm/adapter.js +26 -20
- package/lib/ble/hr/adapter.d.ts +3 -4
- package/lib/ble/hr/adapter.js +2 -2
- package/lib/ble/tacx/adapter.d.ts +2 -3
- package/lib/ble/tacx/adapter.js +8 -8
- package/lib/ble/types.d.ts +1 -2
- package/lib/ble/wahoo/adapter.d.ts +2 -2
- package/lib/ble/wahoo/adapter.js +6 -6
- package/lib/ble/wahoo/comms.js +16 -16
- package/lib/factories/adapters.d.ts +7 -0
- package/lib/factories/adapters.js +49 -0
- package/lib/factories/index.d.ts +3 -0
- package/lib/factories/index.js +10 -0
- package/lib/factories/interfaces.d.ts +7 -0
- package/lib/factories/interfaces.js +27 -0
- package/lib/index.d.ts +8 -9
- package/lib/index.js +5 -8
- package/lib/interfaces.d.ts +1 -1
- package/lib/modes/ant-fe-adv-st-mode.d.ts +12 -0
- package/lib/modes/ant-fe-adv-st-mode.js +83 -0
- package/lib/modes/antble-erg.d.ts +31 -0
- package/lib/modes/antble-erg.js +28 -0
- package/lib/modes/antble-smarttrainer.d.ts +23 -0
- package/lib/modes/antble-smarttrainer.js +65 -0
- package/lib/modes/base.d.ts +29 -0
- package/lib/modes/{cycling-mode.js → base.js} +23 -26
- package/lib/modes/daum-classic-standard.d.ts +17 -0
- package/lib/modes/daum-classic-standard.js +54 -0
- package/lib/modes/daum-erg.d.ts +49 -0
- package/lib/{serial/daum/ERGCyclingMode.js → modes/daum-erg.js} +45 -73
- package/lib/modes/daum-power.d.ts +5 -0
- package/lib/{serial/daum/DaumPowerMeterCyclingMode.js → modes/daum-power.js} +1 -10
- package/lib/modes/daum-premium-standard.d.ts +24 -0
- package/lib/{serial/daum/premium/modes/daum-classic.js → modes/daum-premium-standard.js} +26 -38
- package/lib/modes/daum-smarttrainer.d.ts +83 -0
- package/lib/{serial/daum/SmartTrainerCyclingMode.js → modes/daum-smarttrainer.js} +23 -26
- package/lib/modes/kettler-erg.d.ts +44 -0
- package/lib/{serial/kettler/ergo-racer/modes/erg.js → modes/kettler-erg.js} +12 -23
- package/lib/modes/power-base.d.ts +28 -3
- package/lib/modes/power-base.js +184 -7
- package/lib/modes/power-meter.d.ts +11 -16
- package/lib/modes/power-meter.js +15 -54
- package/lib/modes/simulator.d.ts +38 -10
- package/lib/modes/simulator.js +14 -46
- package/lib/modes/{cycling-mode.d.ts → types.d.ts} +22 -30
- package/lib/modes/types.js +56 -0
- package/lib/serial/SinglePathScanner.d.ts +17 -0
- package/lib/serial/SinglePathScanner.js +87 -0
- package/lib/serial/adapter-factory.d.ts +8 -6
- package/lib/serial/adapter.d.ts +6 -11
- package/lib/serial/adapter.js +5 -2
- package/lib/serial/base/adapter.d.ts +17 -0
- package/lib/serial/base/adapter.js +67 -0
- package/lib/serial/base/comms.d.ts +62 -0
- package/lib/serial/base/comms.js +280 -0
- package/lib/serial/base/serial-interface.d.ts +36 -0
- package/lib/serial/base/serial-interface.js +288 -0
- package/lib/serial/base/serial-scanner.d.ts +16 -0
- package/lib/serial/base/serial-scanner.js +87 -0
- package/lib/serial/base/serialport.d.ts +17 -0
- package/lib/serial/base/serialport.js +87 -0
- package/lib/serial/comms.d.ts +2 -2
- package/lib/serial/daum/DaumAdapter.d.ts +26 -35
- package/lib/serial/daum/DaumAdapter.js +214 -161
- package/lib/serial/daum/classic/PROTOCOL_NAME.d.ts +2 -0
- package/lib/serial/daum/classic/PROTOCOL_NAME.js +5 -0
- package/lib/serial/daum/classic/adapter.d.ts +13 -26
- package/lib/serial/daum/classic/adapter.js +72 -176
- package/lib/serial/daum/classic/comms.d.ts +21 -17
- package/lib/serial/daum/classic/comms.js +41 -14
- package/lib/serial/daum/classic/consts.d.ts +2 -0
- package/lib/serial/daum/classic/consts.js +5 -0
- package/lib/serial/daum/classic/mock.d.ts +4 -0
- package/lib/serial/daum/classic/mock.js +18 -7
- package/lib/serial/daum/classic/types.d.ts +8 -10
- package/lib/serial/daum/classic/utils.d.ts +1 -2
- package/lib/serial/daum/consts.d.ts +0 -0
- package/lib/serial/daum/consts.js +0 -0
- package/lib/serial/daum/premium/adapter.d.ts +17 -15
- package/lib/serial/daum/premium/adapter.js +86 -109
- package/lib/serial/daum/premium/comms.d.ts +7 -7
- package/lib/serial/daum/premium/comms.js +25 -16
- package/lib/serial/daum/premium/mock.d.ts +5 -1
- package/lib/serial/daum/premium/mock.js +17 -7
- package/lib/serial/daum/premium/types.d.ts +32 -17
- package/lib/serial/daum/premium/types.js +8 -8
- package/lib/serial/daum/premium/utils.d.ts +2 -3
- package/lib/serial/daum/premium/utils.js +3 -3
- package/lib/serial/daum/types.d.ts +14 -0
- package/lib/serial/daum/types.js +13 -0
- package/lib/serial/factories/adapter-factory.d.ts +14 -0
- package/lib/serial/factories/adapter-factory.js +30 -0
- package/lib/serial/index.d.ts +8 -5
- package/lib/serial/index.js +15 -15
- package/lib/serial/kettler/comms.d.ts +1 -1
- package/lib/serial/kettler/ergo-racer/adapter.d.ts +11 -16
- package/lib/serial/kettler/ergo-racer/adapter.js +10 -12
- package/lib/serial/kettler/types.d.ts +8 -0
- package/lib/serial/kettler/types.js +2 -0
- package/lib/serial/serial-interface.d.ts +2 -32
- package/lib/serial/serial-interface.js +4 -78
- package/lib/serial/serial-scanner.d.ts +16 -0
- package/lib/serial/serial-scanner.js +87 -0
- package/lib/serial/serialport.d.ts +1 -13
- package/lib/serial/types.d.ts +45 -0
- package/lib/serial/types.js +9 -0
- package/lib/simulator/Simulator.d.ts +13 -19
- package/lib/simulator/Simulator.js +10 -51
- package/lib/types/Command.d.ts +8 -0
- package/lib/types/Command.js +2 -0
- package/lib/types/adapter.d.ts +34 -24
- package/lib/types/command.d.ts +0 -8
- package/lib/types/command.js +0 -2
- package/lib/types/data.d.ts +12 -1
- package/lib/types/device.d.ts +8 -23
- package/lib/types/device.js +9 -8
- package/lib/types/index.d.ts +6 -0
- package/lib/types/index.js +22 -0
- package/lib/types/route.d.ts +0 -19
- package/lib/types/route.js +0 -2
- package/lib/types/types.d.ts +8 -0
- package/lib/types/types.js +2 -0
- package/lib/utils/utils.d.ts +2 -1
- package/lib/utils/utils.js +22 -4
- package/package.json +3 -3
- package/lib/antv2/modes/ant-fe-adv-st-mode.d.ts +0 -9
- package/lib/antv2/modes/ant-fe-adv-st-mode.js +0 -51
- package/lib/antv2/modes/ant-fe-erg-mode.d.ts +0 -6
- package/lib/antv2/modes/ant-fe-erg-mode.js +0 -14
- package/lib/antv2/modes/ant-fe-st-mode.d.ts +0 -5
- package/lib/antv2/modes/ant-fe-st-mode.js +0 -13
- package/lib/modes/ble-erg-mode.d.ts +0 -18
- package/lib/modes/ble-erg-mode.js +0 -148
- package/lib/modes/ble-st-mode.d.ts +0 -15
- package/lib/modes/ble-st-mode.js +0 -96
- package/lib/serial/daum/DaumPowerMeterCyclingMode.d.ts +0 -8
- package/lib/serial/daum/ERGCyclingMode.d.ts +0 -26
- package/lib/serial/daum/SmartTrainerCyclingMode.d.ts +0 -42
- package/lib/serial/daum/classic/modes/daum-classic.d.ts +0 -13
- package/lib/serial/daum/classic/modes/daum-classic.js +0 -97
- package/lib/serial/daum/constants.d.ts +0 -19
- package/lib/serial/daum/constants.js +0 -22
- package/lib/serial/daum/premium/modes/daum-classic.d.ts +0 -14
- package/lib/serial/kettler/ergo-racer/modes/erg.d.ts +0 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ACTUAL_BIKE_TYPE = exports.BusyTimeout = exports.ACKTimeout = exports.CheckSumError = void 0;
|
|
4
4
|
class CheckSumError extends Error {
|
|
5
5
|
constructor() {
|
|
6
6
|
super();
|
|
@@ -22,10 +22,10 @@ class BusyTimeout extends Error {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
exports.BusyTimeout = BusyTimeout;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.
|
|
25
|
+
var ACTUAL_BIKE_TYPE;
|
|
26
|
+
(function (ACTUAL_BIKE_TYPE) {
|
|
27
|
+
ACTUAL_BIKE_TYPE["ALLROUND"] = "allround";
|
|
28
|
+
ACTUAL_BIKE_TYPE["RACE"] = "race";
|
|
29
|
+
ACTUAL_BIKE_TYPE["MOUNTAIN"] = "mountain";
|
|
30
|
+
ACTUAL_BIKE_TYPE["TRIATHLON"] = "triathlon";
|
|
31
|
+
})(ACTUAL_BIKE_TYPE || (exports.ACTUAL_BIKE_TYPE = ACTUAL_BIKE_TYPE = {}));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { IncyclistBikeData } from "
|
|
3
|
-
import { Route } from "
|
|
4
|
-
import { User } from "../../../types/user";
|
|
2
|
+
import { User, IncyclistBikeData } from "../../../types";
|
|
3
|
+
import { Route } from "./types";
|
|
5
4
|
export declare const DEBUG_LOGGER: {
|
|
6
5
|
log: (e: any, ...args: any[]) => void;
|
|
7
6
|
logEvent: (event: any) => void;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.parsePersonData = exports.getPersonData = exports.parseTrainingData = exports.routeToEpp = exports.FileTimeSupport = exports.getBikeType = exports.BikeType = exports.ReservedCommands = exports.getAsciiArrayFromStr = exports.ascii = exports.hexstr = exports.getMessageData = exports.buildMessage = exports.checkSum = exports.esc2bin = exports.bin2esc = exports.validatePath = exports.validateHost = exports.responseLog = exports.DEBUG_LOGGER = void 0;
|
|
7
|
-
const
|
|
7
|
+
const types_1 = require("../../../types");
|
|
8
8
|
const win32filetime_1 = __importDefault(require("win32filetime"));
|
|
9
9
|
const sum = (arr) => arr.reduce((a, b) => a + b, 0);
|
|
10
10
|
exports.DEBUG_LOGGER = {
|
|
@@ -323,7 +323,7 @@ function getPersonData(user) {
|
|
|
323
323
|
buffer.writeUInt8(0, offset);
|
|
324
324
|
offset += 1;
|
|
325
325
|
}
|
|
326
|
-
buffer.writeInt32LE(user && user.sex ===
|
|
326
|
+
buffer.writeInt32LE(user && user.sex === types_1.Gender.FEMALE ? 2 : 1, offset);
|
|
327
327
|
offset += 4;
|
|
328
328
|
buffer.writeInt32LE(user && user.age !== undefined ? user.age : 1, offset);
|
|
329
329
|
offset += 4;
|
|
@@ -344,7 +344,7 @@ function parsePersonData(buffer) {
|
|
|
344
344
|
const length = buffer.readInt32LE(120);
|
|
345
345
|
const weight = buffer.readFloatLE(124);
|
|
346
346
|
const age = valAge > 1 ? valAge : undefined;
|
|
347
|
-
const sex = valSex === 2 ?
|
|
347
|
+
const sex = valSex === 2 ? types_1.Gender.FEMALE : types_1.Gender.MALE;
|
|
348
348
|
return { length, weight, age, sex };
|
|
349
349
|
}
|
|
350
350
|
exports.parsePersonData = parsePersonData;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare abstract class DaumSerialComms {
|
|
2
|
+
serial: any;
|
|
3
|
+
abstract getPort(): string;
|
|
4
|
+
abstract pauseLogging(): void;
|
|
5
|
+
abstract resumeLogging(): void;
|
|
6
|
+
abstract isConnected(): boolean;
|
|
7
|
+
abstract connect(): Promise<boolean>;
|
|
8
|
+
abstract close(): Promise<boolean>;
|
|
9
|
+
abstract setTargetSlope(slope: number): Promise<void>;
|
|
10
|
+
abstract setTargetPower(power: number): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare class ResponseTimeout extends Error {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResponseTimeout = exports.DaumSerialComms = void 0;
|
|
4
|
+
class DaumSerialComms {
|
|
5
|
+
}
|
|
6
|
+
exports.DaumSerialComms = DaumSerialComms;
|
|
7
|
+
class ResponseTimeout extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.message = 'RESP timeout';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ResponseTimeout = ResponseTimeout;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeviceProperties } from '../../types';
|
|
2
|
+
import { SerialIncyclistDevice } from '../base/adapter';
|
|
3
|
+
import { SerialDeviceSettings } from "../types";
|
|
4
|
+
export default class SerialAdapterFactory {
|
|
5
|
+
static _instance: SerialAdapterFactory;
|
|
6
|
+
adapters: Array<{
|
|
7
|
+
protocol: string;
|
|
8
|
+
AdapterClass: typeof SerialIncyclistDevice<DeviceProperties>;
|
|
9
|
+
}>;
|
|
10
|
+
static getInstance(): SerialAdapterFactory;
|
|
11
|
+
constructor();
|
|
12
|
+
registerAdapter(protocol: string, AdapterClass: typeof SerialIncyclistDevice<DeviceProperties>): void;
|
|
13
|
+
createInstance(props: SerialDeviceSettings, settings?: any): SerialIncyclistDevice<DeviceProperties>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class SerialAdapterFactory {
|
|
4
|
+
static getInstance() {
|
|
5
|
+
if (!SerialAdapterFactory._instance)
|
|
6
|
+
SerialAdapterFactory._instance = new SerialAdapterFactory();
|
|
7
|
+
return SerialAdapterFactory._instance;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
this.adapters = [];
|
|
11
|
+
}
|
|
12
|
+
registerAdapter(protocol, AdapterClass) {
|
|
13
|
+
const existing = this.adapters.findIndex(a => a.protocol === protocol);
|
|
14
|
+
if (existing !== -1)
|
|
15
|
+
this.adapters[existing].AdapterClass = AdapterClass;
|
|
16
|
+
else
|
|
17
|
+
this.adapters.push({ protocol, AdapterClass });
|
|
18
|
+
}
|
|
19
|
+
createInstance(props, settings) {
|
|
20
|
+
const { protocol } = props;
|
|
21
|
+
if (!protocol)
|
|
22
|
+
return null;
|
|
23
|
+
const adapter = this.adapters.find(a => a.protocol === protocol);
|
|
24
|
+
if (!adapter)
|
|
25
|
+
return null;
|
|
26
|
+
const { AdapterClass } = adapter;
|
|
27
|
+
return new AdapterClass(props, settings);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.default = SerialAdapterFactory;
|
package/lib/serial/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import SerialPortProvider, { useSerialPortProvider } from './serialport';
|
|
2
|
-
import SerialInterface
|
|
3
|
-
import SerialAdapterFactory from './adapter-factory';
|
|
4
|
-
import { SerialIncyclistDevice, SerialDeviceSettings } from './adapter';
|
|
1
|
+
import SerialPortProvider, { useSerialPortProvider } from './base/serialport';
|
|
2
|
+
import SerialInterface from './base/serial-interface';
|
|
3
|
+
import SerialAdapterFactory from './factories/adapter-factory';
|
|
5
4
|
import DaumClassicAdapter from './daum/classic/adapter';
|
|
6
5
|
import DaumPremiumAdapter from './daum/premium/adapter';
|
|
7
6
|
import KettlerRacerAdapter from './kettler/ergo-racer/adapter';
|
|
7
|
+
export { SerialIncyclistDevice } from './base/adapter';
|
|
8
|
+
export { SerialInterfaceProps, SerialDeviceSettings, SerialScannerProps } from "./types";
|
|
8
9
|
export { TCPBinding } from './bindings/tcp';
|
|
9
|
-
export {
|
|
10
|
+
export { DaumPremiumDeviceProperties, Route, Point } from './daum/premium/types';
|
|
11
|
+
export { DaumClassicProperties } from './daum/classic/types';
|
|
12
|
+
export { SerialAdapterFactory, DaumClassicAdapter, DaumPremiumAdapter, KettlerRacerAdapter, SerialPortProvider, useSerialPortProvider, SerialInterface };
|
package/lib/serial/index.js
CHANGED
|
@@ -26,24 +26,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const serialport_1 = __importStar(require("./serialport"));
|
|
29
|
+
exports.SerialInterface = exports.useSerialPortProvider = exports.SerialPortProvider = exports.KettlerRacerAdapter = exports.DaumPremiumAdapter = exports.DaumClassicAdapter = exports.SerialAdapterFactory = exports.TCPBinding = exports.SerialIncyclistDevice = void 0;
|
|
30
|
+
const serialport_1 = __importStar(require("./base/serialport"));
|
|
31
31
|
exports.SerialPortProvider = serialport_1.default;
|
|
32
32
|
Object.defineProperty(exports, "useSerialPortProvider", { enumerable: true, get: function () { return serialport_1.useSerialPortProvider; } });
|
|
33
|
-
const serial_interface_1 = __importDefault(require("./serial-interface"));
|
|
33
|
+
const serial_interface_1 = __importDefault(require("./base/serial-interface"));
|
|
34
34
|
exports.SerialInterface = serial_interface_1.default;
|
|
35
|
-
const adapter_factory_1 = __importDefault(require("./adapter-factory"));
|
|
35
|
+
const adapter_factory_1 = __importDefault(require("./factories/adapter-factory"));
|
|
36
36
|
exports.SerialAdapterFactory = adapter_factory_1.default;
|
|
37
|
-
const adapter_1 = require("./adapter");
|
|
38
|
-
|
|
39
|
-
const adapter_2 = __importDefault(require("./daum/
|
|
40
|
-
exports.
|
|
41
|
-
const adapter_3 = __importDefault(require("./
|
|
42
|
-
exports.
|
|
43
|
-
|
|
44
|
-
exports
|
|
37
|
+
const adapter_1 = __importDefault(require("./daum/classic/adapter"));
|
|
38
|
+
exports.DaumClassicAdapter = adapter_1.default;
|
|
39
|
+
const adapter_2 = __importDefault(require("./daum/premium/adapter"));
|
|
40
|
+
exports.DaumPremiumAdapter = adapter_2.default;
|
|
41
|
+
const adapter_3 = __importDefault(require("./kettler/ergo-racer/adapter"));
|
|
42
|
+
exports.KettlerRacerAdapter = adapter_3.default;
|
|
43
|
+
var adapter_4 = require("./base/adapter");
|
|
44
|
+
Object.defineProperty(exports, "SerialIncyclistDevice", { enumerable: true, get: function () { return adapter_4.SerialIncyclistDevice; } });
|
|
45
45
|
var tcp_1 = require("./bindings/tcp");
|
|
46
46
|
Object.defineProperty(exports, "TCPBinding", { enumerable: true, get: function () { return tcp_1.TCPBinding; } });
|
|
47
|
-
adapter_factory_1.default.getInstance().registerAdapter('Daum Classic',
|
|
48
|
-
adapter_factory_1.default.getInstance().registerAdapter('Daum Premium',
|
|
49
|
-
adapter_factory_1.default.getInstance().registerAdapter('Kettler Racer',
|
|
47
|
+
adapter_factory_1.default.getInstance().registerAdapter('Daum Classic', adapter_1.default);
|
|
48
|
+
adapter_factory_1.default.getInstance().registerAdapter('Daum Premium', adapter_2.default);
|
|
49
|
+
adapter_factory_1.default.getInstance().registerAdapter('Kettler Racer', adapter_3.default);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { EventLogger } from "gd-eventlog";
|
|
4
|
-
import { Command } from "
|
|
4
|
+
import { Command } from "./types";
|
|
5
5
|
import EventEmitter from "events";
|
|
6
6
|
import { SerialInterface } from "..";
|
|
7
7
|
export type SerialCommsProps = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DeviceProperties } from "../../../types/device";
|
|
2
1
|
import { EventLogger } from "gd-eventlog";
|
|
3
2
|
import SerialComms from "../comms";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import SerialInterface from "../../serial-interface";
|
|
3
|
+
import { IncyclistBikeData } from "../../../types";
|
|
4
|
+
import { SerialDeviceSettings } from "../../types";
|
|
5
|
+
import { Command } from "../types";
|
|
6
|
+
import { SerialIncyclistDevice } from "../../base/adapter";
|
|
7
|
+
import SerialInterface from "../../base/serial-interface";
|
|
8
|
+
import { ControllerConfig, IAdapter, IncyclistAdapterData, DeviceProperties } from "../../../types";
|
|
9
9
|
export interface KettlerRacerCommand extends Command {
|
|
10
10
|
}
|
|
11
11
|
export interface KettlerExtendedBikeData {
|
|
@@ -21,26 +21,23 @@ export interface KettlerBikeData {
|
|
|
21
21
|
time: number;
|
|
22
22
|
power: number;
|
|
23
23
|
}
|
|
24
|
-
export default class KettlerRacerAdapter extends SerialIncyclistDevice {
|
|
24
|
+
export default class KettlerRacerAdapter extends SerialIncyclistDevice<DeviceProperties> {
|
|
25
25
|
private id;
|
|
26
|
-
private ignoreHrm;
|
|
27
|
-
private ignoreBike;
|
|
28
|
-
private ignorePower;
|
|
29
26
|
private iv;
|
|
30
27
|
private requests;
|
|
31
|
-
private data;
|
|
32
28
|
private internalData;
|
|
33
29
|
private kettlerData;
|
|
34
30
|
private updateBusy;
|
|
35
31
|
private requestBusy;
|
|
36
32
|
private comms;
|
|
37
33
|
private prevDistance;
|
|
34
|
+
protected static ontrollers: ControllerConfig;
|
|
38
35
|
constructor(settings: SerialDeviceSettings, props?: DeviceProperties);
|
|
39
36
|
isBike(): boolean;
|
|
40
37
|
isPower(): boolean;
|
|
41
38
|
isHrm(): boolean;
|
|
42
39
|
getProtocolName(): string;
|
|
43
|
-
isSame(device:
|
|
40
|
+
isSame(device: IAdapter): boolean;
|
|
44
41
|
setID(id: any): void;
|
|
45
42
|
getID(): string;
|
|
46
43
|
getName(): string;
|
|
@@ -69,10 +66,10 @@ export default class KettlerRacerAdapter extends SerialIncyclistDevice {
|
|
|
69
66
|
check(): Promise<boolean>;
|
|
70
67
|
start(props?: any): Promise<boolean>;
|
|
71
68
|
startUpdatePull(): void;
|
|
72
|
-
|
|
69
|
+
canEmitData(): boolean;
|
|
73
70
|
stop(): Promise<boolean>;
|
|
74
71
|
mapData(bikeData: KettlerBikeData): IncyclistBikeData;
|
|
75
|
-
transformData(internalData: IncyclistBikeData, bikeData: KettlerBikeData):
|
|
72
|
+
transformData(internalData: IncyclistBikeData, bikeData: KettlerBikeData): IncyclistAdapterData;
|
|
76
73
|
update(): Promise<void>;
|
|
77
74
|
sendRequest(request: any): Promise<any>;
|
|
78
75
|
sendRequests(): Promise<void>;
|
|
@@ -84,6 +81,4 @@ export default class KettlerRacerAdapter extends SerialIncyclistDevice {
|
|
|
84
81
|
close(): Promise<boolean>;
|
|
85
82
|
waitForOpened(retries?: boolean): Promise<boolean>;
|
|
86
83
|
waitForClosed(): Promise<boolean>;
|
|
87
|
-
getSupportedCyclingModes(): any[];
|
|
88
|
-
getDefaultCyclingMode(): CyclingMode;
|
|
89
84
|
}
|
|
@@ -16,9 +16,9 @@ const gd_eventlog_1 = require("gd-eventlog");
|
|
|
16
16
|
const comms_1 = __importDefault(require("../comms"));
|
|
17
17
|
const utils_1 = require("../../../utils/utils");
|
|
18
18
|
const power_meter_1 = __importDefault(require("../../../modes/power-meter"));
|
|
19
|
-
const
|
|
20
|
-
const adapter_1 = require("../../adapter");
|
|
21
|
-
const
|
|
19
|
+
const kettler_erg_1 = __importDefault(require("../../../modes/kettler-erg"));
|
|
20
|
+
const adapter_1 = require("../../base/adapter");
|
|
21
|
+
const types_1 = require("../../../types");
|
|
22
22
|
const PROTOCOL_NAME = 'Kettler Racer';
|
|
23
23
|
class KettlerRacerAdapter extends adapter_1.SerialIncyclistDevice {
|
|
24
24
|
constructor(settings, props) {
|
|
@@ -29,8 +29,8 @@ class KettlerRacerAdapter extends adapter_1.SerialIncyclistDevice {
|
|
|
29
29
|
this.iv = null;
|
|
30
30
|
this.comms = new comms_1.default({ interface: settings.interface, port: settings.port, logger: this.logger });
|
|
31
31
|
this.capabilities = [
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
types_1.IncyclistCapability.Power, types_1.IncyclistCapability.Speed, types_1.IncyclistCapability.Cadence, types_1.IncyclistCapability.Gear, types_1.IncyclistCapability.HeartRate,
|
|
33
|
+
types_1.IncyclistCapability.Control
|
|
34
34
|
];
|
|
35
35
|
}
|
|
36
36
|
isBike() { return true; }
|
|
@@ -333,7 +333,7 @@ class KettlerRacerAdapter extends adapter_1.SerialIncyclistDevice {
|
|
|
333
333
|
update: ivUpdate
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
canEmitData() {
|
|
337
337
|
return !this.isPaused();
|
|
338
338
|
}
|
|
339
339
|
stop() {
|
|
@@ -566,11 +566,9 @@ class KettlerRacerAdapter extends adapter_1.SerialIncyclistDevice {
|
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
-
getSupportedCyclingModes() {
|
|
570
|
-
return [power_meter_1.default, erg_1.default];
|
|
571
|
-
}
|
|
572
|
-
getDefaultCyclingMode() {
|
|
573
|
-
return new erg_1.default(this);
|
|
574
|
-
}
|
|
575
569
|
}
|
|
570
|
+
KettlerRacerAdapter.ontrollers = {
|
|
571
|
+
modes: [power_meter_1.default, kettler_erg_1.default],
|
|
572
|
+
default: kettler_erg_1.default
|
|
573
|
+
};
|
|
576
574
|
exports.default = KettlerRacerAdapter;
|
|
@@ -3,39 +3,9 @@
|
|
|
3
3
|
import EventEmitter from "events";
|
|
4
4
|
import { BindingInterface } from "@serialport/bindings-interface";
|
|
5
5
|
import { SerialPortStream } from '@serialport/stream';
|
|
6
|
-
import { SerialDeviceSettings } from
|
|
6
|
+
import { SerialDeviceSettings, SerialScannerProps, PortMapping, SerialInterfaceProps } from "./types";
|
|
7
|
+
import { IncyclistInterface } from "../types";
|
|
7
8
|
import { EventLogger } from "gd-eventlog";
|
|
8
|
-
import { IncyclistScanProps } from "../types/device";
|
|
9
|
-
import { IncyclistInterface, InterfaceProps } from "../types/interface";
|
|
10
|
-
export declare const SerialInterfaceType: {
|
|
11
|
-
SERIAL: string;
|
|
12
|
-
TCPIP: string;
|
|
13
|
-
};
|
|
14
|
-
export interface SerialInterfaceProps extends InterfaceProps {
|
|
15
|
-
ifaceName: string;
|
|
16
|
-
binding?: BindingInterface;
|
|
17
|
-
}
|
|
18
|
-
export type PortMapping = {
|
|
19
|
-
path: string;
|
|
20
|
-
port: SerialPortStream;
|
|
21
|
-
};
|
|
22
|
-
export interface SerialScannerProps extends IncyclistScanProps {
|
|
23
|
-
port?: string;
|
|
24
|
-
protocol: string;
|
|
25
|
-
}
|
|
26
|
-
export declare class SinglePathScanner {
|
|
27
|
-
path: string;
|
|
28
|
-
serial: SerialInterface;
|
|
29
|
-
result: SerialDeviceSettings;
|
|
30
|
-
isScanning: boolean;
|
|
31
|
-
props: SerialScannerProps;
|
|
32
|
-
logger: EventLogger;
|
|
33
|
-
isFound: boolean;
|
|
34
|
-
constructor(path: string, serial: SerialInterface, props: SerialScannerProps);
|
|
35
|
-
logEvent(event: any): void;
|
|
36
|
-
onStopRequest(resolve: any): Promise<void>;
|
|
37
|
-
scan(): Promise<SerialDeviceSettings | undefined>;
|
|
38
|
-
}
|
|
39
9
|
export default class SerialInterface extends EventEmitter implements IncyclistInterface {
|
|
40
10
|
ifaceName: string;
|
|
41
11
|
binding: BindingInterface;
|
|
@@ -12,87 +12,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.SinglePathScanner = exports.SerialInterfaceType = void 0;
|
|
16
15
|
const events_1 = __importDefault(require("events"));
|
|
17
16
|
const serialport_1 = __importDefault(require("./serialport"));
|
|
18
17
|
const gd_eventlog_1 = require("gd-eventlog");
|
|
19
18
|
const utils_1 = require("../utils/utils");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
19
|
+
const adapter_factory_1 = __importDefault(require("./factories/adapter-factory"));
|
|
20
|
+
const serial_scanner_1 = require("./serial-scanner");
|
|
22
21
|
const DEFAULT_SCAN_TIMEOUT = 10000;
|
|
23
|
-
exports.SerialInterfaceType = {
|
|
24
|
-
SERIAL: 'serial',
|
|
25
|
-
TCPIP: 'tcpip'
|
|
26
|
-
};
|
|
27
|
-
class SinglePathScanner {
|
|
28
|
-
constructor(path, serial, props) {
|
|
29
|
-
this.path = path;
|
|
30
|
-
this.serial = serial;
|
|
31
|
-
this.result = undefined;
|
|
32
|
-
this.isScanning = false;
|
|
33
|
-
this.isFound = false;
|
|
34
|
-
this.props = props;
|
|
35
|
-
this.logger = props.logger || new gd_eventlog_1.EventLogger('SerialScanner');
|
|
36
|
-
}
|
|
37
|
-
logEvent(event) {
|
|
38
|
-
if (this.logger) {
|
|
39
|
-
this.logger.logEvent(event);
|
|
40
|
-
}
|
|
41
|
-
const w = global.window;
|
|
42
|
-
if ((w === null || w === void 0 ? void 0 : w.DEVICE_DEBUG) || process.env.BLE_DEBUG) {
|
|
43
|
-
console.log('~~~ SerialScanner', event);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
onStopRequest(resolve) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
this.logEvent({ message: 'stopping scan', path: this.path });
|
|
49
|
-
if (!this.isFound)
|
|
50
|
-
yield this.serial.closePort(this.path);
|
|
51
|
-
this.isScanning = false;
|
|
52
|
-
resolve(this.result);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
scan() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
if (this.isScanning)
|
|
58
|
-
return;
|
|
59
|
-
this.isScanning = true;
|
|
60
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
this.logEvent({ message: 'starting scan', path: this.path, interface: this.serial.getName() });
|
|
62
|
-
this.serial.scanEvents.on('timeout', () => this.onStopRequest(resolve));
|
|
63
|
-
this.serial.scanEvents.on('stop', () => this.onStopRequest(resolve));
|
|
64
|
-
let found = false;
|
|
65
|
-
while (!found && this.isScanning) {
|
|
66
|
-
try {
|
|
67
|
-
const { protocol } = this.props;
|
|
68
|
-
let host, port;
|
|
69
|
-
if (this.serial.getName() === exports.SerialInterfaceType.TCPIP) {
|
|
70
|
-
[host, port] = this.path.split(':');
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
port = this.path;
|
|
74
|
-
}
|
|
75
|
-
const adapterSettings = { interface: this.serial.getName(), host, port, protocol };
|
|
76
|
-
const adapter = adapters_1.default.create(adapterSettings);
|
|
77
|
-
found = yield adapter.check();
|
|
78
|
-
if (found) {
|
|
79
|
-
this.isFound = true;
|
|
80
|
-
const name = adapter.getName();
|
|
81
|
-
yield adapter.close();
|
|
82
|
-
resolve(Object.assign(Object.assign({}, adapterSettings), { name }));
|
|
83
|
-
}
|
|
84
|
-
yield (0, utils_1.sleep)(100);
|
|
85
|
-
}
|
|
86
|
-
catch (err) {
|
|
87
|
-
this.logEvent({ message: 'error', fn: 'scan()', error: err.message || err, stack: err.stack });
|
|
88
|
-
yield (0, utils_1.sleep)(100);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}));
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.SinglePathScanner = SinglePathScanner;
|
|
96
22
|
class SerialInterface extends events_1.default {
|
|
97
23
|
static getInstance(props) {
|
|
98
24
|
const { ifaceName, binding, logger } = props;
|
|
@@ -313,7 +239,7 @@ class SerialInterface extends events_1.default {
|
|
|
313
239
|
return [];
|
|
314
240
|
}
|
|
315
241
|
this.logEvent({ message: 'scanning on ', interface: this.ifaceName, paths: paths.map(p => p.path).join(','), timeout });
|
|
316
|
-
const scanners = paths.map(p => new SinglePathScanner(p.path, this, Object.assign(Object.assign({}, props), { logger: this.logger })));
|
|
242
|
+
const scanners = paths.map(p => new serial_scanner_1.SinglePathScanner(p.path, this, Object.assign(Object.assign({}, props), { logger: this.logger })));
|
|
317
243
|
try {
|
|
318
244
|
yield Promise.all(scanners.map(s => s.scan()
|
|
319
245
|
.then((device) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -321,7 +247,7 @@ class SerialInterface extends events_1.default {
|
|
|
321
247
|
const adapter = adapter_factory_1.default.getInstance().createInstance(device);
|
|
322
248
|
const path = adapter.getPort();
|
|
323
249
|
this.inUse.push(path);
|
|
324
|
-
yield adapter.
|
|
250
|
+
yield adapter.pause();
|
|
325
251
|
detected.push(device);
|
|
326
252
|
this.emit('device', device);
|
|
327
253
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventLogger } from "gd-eventlog";
|
|
2
|
+
import SerialInterface from "./serial-interface";
|
|
3
|
+
import { SerialDeviceSettings, SerialScannerProps } from "./types";
|
|
4
|
+
export declare class SinglePathScanner {
|
|
5
|
+
path: string;
|
|
6
|
+
serial: SerialInterface;
|
|
7
|
+
result: SerialDeviceSettings;
|
|
8
|
+
isScanning: boolean;
|
|
9
|
+
props: SerialScannerProps;
|
|
10
|
+
logger: EventLogger;
|
|
11
|
+
isFound: boolean;
|
|
12
|
+
constructor(path: string, serial: SerialInterface, props: SerialScannerProps);
|
|
13
|
+
logEvent(event: any): void;
|
|
14
|
+
onStopRequest(resolve: any): Promise<void>;
|
|
15
|
+
scan(): Promise<SerialDeviceSettings | undefined>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.SinglePathScanner = void 0;
|
|
16
|
+
const gd_eventlog_1 = require("gd-eventlog");
|
|
17
|
+
const types_1 = require("./types");
|
|
18
|
+
const adapter_factory_1 = __importDefault(require("./factories/adapter-factory"));
|
|
19
|
+
const utils_1 = require("../utils/utils");
|
|
20
|
+
class SinglePathScanner {
|
|
21
|
+
constructor(path, serial, props) {
|
|
22
|
+
this.path = path;
|
|
23
|
+
this.serial = serial;
|
|
24
|
+
this.result = undefined;
|
|
25
|
+
this.isScanning = false;
|
|
26
|
+
this.isFound = false;
|
|
27
|
+
this.props = props;
|
|
28
|
+
this.logger = props.logger || new gd_eventlog_1.EventLogger('SerialScanner');
|
|
29
|
+
}
|
|
30
|
+
logEvent(event) {
|
|
31
|
+
if (this.logger) {
|
|
32
|
+
this.logger.logEvent(event);
|
|
33
|
+
}
|
|
34
|
+
const w = global.window;
|
|
35
|
+
if ((w === null || w === void 0 ? void 0 : w.DEVICE_DEBUG) || process.env.BLE_DEBUG) {
|
|
36
|
+
console.log('~~~ SerialScanner', event);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
onStopRequest(resolve) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
this.logEvent({ message: 'stopping scan', path: this.path });
|
|
42
|
+
if (!this.isFound)
|
|
43
|
+
yield this.serial.closePort(this.path);
|
|
44
|
+
this.isScanning = false;
|
|
45
|
+
resolve(this.result);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
scan() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
if (this.isScanning)
|
|
51
|
+
return;
|
|
52
|
+
this.isScanning = true;
|
|
53
|
+
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
this.logEvent({ message: 'starting scan', path: this.path, interface: this.serial.getName() });
|
|
55
|
+
this.serial.scanEvents.on('timeout', () => this.onStopRequest(resolve));
|
|
56
|
+
this.serial.scanEvents.on('stop', () => this.onStopRequest(resolve));
|
|
57
|
+
let found = false;
|
|
58
|
+
while (!found && this.isScanning) {
|
|
59
|
+
try {
|
|
60
|
+
const { protocol } = this.props;
|
|
61
|
+
let host, port;
|
|
62
|
+
if (this.serial.getName() === types_1.SerialInterfaceType.TCPIP) {
|
|
63
|
+
[host, port] = this.path.split(':');
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
port = this.path;
|
|
67
|
+
}
|
|
68
|
+
const adapterSettings = { interface: this.serial.getName(), host, port, protocol };
|
|
69
|
+
const adapter = adapter_factory_1.default.getInstance().createInstance(adapterSettings);
|
|
70
|
+
found = yield adapter.check();
|
|
71
|
+
if (found) {
|
|
72
|
+
this.isFound = true;
|
|
73
|
+
const name = adapter.getName();
|
|
74
|
+
resolve(Object.assign(Object.assign({}, adapterSettings), { name }));
|
|
75
|
+
}
|
|
76
|
+
yield (0, utils_1.sleep)(100);
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
this.logEvent({ message: 'error', fn: 'scan()', error: err.message || err, stack: err.stack });
|
|
80
|
+
yield (0, utils_1.sleep)(100);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.SinglePathScanner = SinglePathScanner;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { BindingInterface } from '@serialport/bindings-interface';
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
binding: BindingInterface;
|
|
5
|
-
};
|
|
6
|
-
export type InterfaceImplementation = {
|
|
7
|
-
name: string;
|
|
8
|
-
Serialport: any;
|
|
9
|
-
implementation?: any;
|
|
10
|
-
};
|
|
11
|
-
export type SerialPortProps = {
|
|
12
|
-
interface: string;
|
|
13
|
-
port?: string;
|
|
14
|
-
};
|
|
2
|
+
import { InterfaceBinding, InterfaceImplementation } from './types';
|
|
15
3
|
export default class SerialPortProvider {
|
|
16
4
|
static _instance: SerialPortProvider;
|
|
17
5
|
interfaces: InterfaceBinding[];
|