@cutos/device-thermometer
Version:
@cutos/device-thermometer is a JavaScript library that receive body heat data from cutos thermometer driver
21 lines (15 loc) • 421 B
JavaScript
import { CoreClass } from '@cutos/core';
// "version" = '1.0.0'
const TYPE = 'device-thermometer';
const CMD = {
CONNECT: 'connect', // 连接设备
};
class DeviceThermometer extends CoreClass.Device {
constructor(name) {
super(name, TYPE);
}
connect(path, callback) {
this.sendCommand({cmd: CMD.CONNECT, args: {path: path}}, callback);
}
}
export { DeviceThermometer };