UNPKG

@robotical/roboticaljs

Version:

Javascript/TS library for Robotical products

75 lines 2.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RICStateInfo = void 0; const raftjs_1 = require("@robotical/raftjs"); const RICROSSerial_1 = require("./RICROSSerial"); class RICStateInfo { constructor() { this.smartServos = new RICROSSerial_1.ROSSerialSmartServos(); this.smartServosValidMs = 0; this.imuData = new RICROSSerial_1.ROSSerialIMU(); this.imuDataValidMs = 0; this.power = new RICROSSerial_1.ROSSerialPowerStatus(); this.powerValidMs = 0; this.addOnInfo = new RICROSSerial_1.ROSSerialAddOnStatusList(); this.addOnInfoValidMs = 0; this.robotStatus = new RICROSSerial_1.ROSSerialRobotStatus(); this.robotStatusValidMs = 0; this.cameraData = new RICROSSerial_1.ROSCameraData(); this.cameraDataValidMs = 0; } updateFromROSSerialMsg(rxMsg, commsStats, addOnManager, frameTimeMs) { return RICROSSerial_1.RICROSSerial.decode(rxMsg, raftjs_1.RICSERIAL_PAYLOAD_POS, commsStats, addOnManager, this, frameTimeMs); } getDevicesState() { // TODO - implement if RICStateInfo is to be used as a DeviceMgr return {}; } getDeviceState(deviceKey) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr return { deviceTypeInfo: undefined, deviceTimeline: { timestampsUs: [], lastReportTimestampUs: 0, reportTimestampOffsetUs: 0 }, deviceAttributes: {}, deviceIsNew: false, stateChanged: false, isOnline: false, deviceAddress: "", deviceType: "", busName: "" }; } setMaxDataPointsToStore(maxDataPointsToStore) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } addNewDeviceCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } removeNewDeviceCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } addNewAttributeCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } removeNewAttributeCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } addAttributeDataCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } removeAttributeDataCallback(callback) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } sendAction(deviceKey, action, data) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } sendCompoundAction(deviceKey, action, data) { // TODO - implement if RICStateInfo is to be used as a DeviceMgr } } exports.RICStateInfo = RICStateInfo; //# sourceMappingURL=RICStateInfo.js.map