UNPKG

@robotical/roboticaljs

Version:

Javascript/TS library for Robotical products

79 lines (78 loc) 2.62 kB
import { RaftOKFail, RaftMsgHandler } from "@robotical/raftjs"; import { RICConfiguredAddOns } from "./RICAddOn"; import RICAddOnManager from "./RICAddOnManager"; import { RICHWElem } from "./RICHWElem"; import { RICCalibInfo } from "./RICTypes"; export default class RICSystemUtils { private _msgHandler; private _addOnManager; private _hwElemsExcludingAddOns; private _connectedAddOns; private _calibInfo; /** * constructor * @param raftMsgHandler * @param addOnManager */ constructor(msgHandler: RaftMsgHandler, addOnManager: RICAddOnManager); /** * invalidate */ invalidate(): void; /** * getSystemInfo - get system info * @returns Promise<RICSystemInfo> * */ retrieveInfo(): Promise<boolean>; /** * Get information Marty system * * @return void * */ retrieveMartySystemInfo(): Promise<boolean>; calibrate(cmd: string, jointList: Array<string>, jointNames: { [key: string]: string; }): Promise<false | RaftOKFail>; /** * * getRICCalibInfo * @returns Promise<RICCalibInfo> * */ getRICCalibInfo(forceGetFromRIC?: boolean): Promise<RICCalibInfo>; /** * * getHWElemList - get the list of hardware elements connected to the robot * - the result (if successful) is processed as follows: * = if no filter is applied then all non-add-ons found are stored in * this._hwElemsExcludingAddOns and all addons are stored in this._connectedAddOns * = if a filter is applied and this filter is RSAddOns then this._connectedAddOns is * updated with the new list of addons * = in all cases the discovered list is returned * * @returns Promise<RICHWElemList> * */ getHWElemList(filterByType?: string): Promise<Array<RICHWElem>>; /** * * getAddOnConfigs - get list of add-ons configured on the robot * @returns Promise<RICConfiguredAddOns> * */ getAddOnConfigs(): Promise<RICConfiguredAddOns>; /** * * runCommand * @param commandName command API string * @param params parameters (simple name value pairs only) to parameterize trajectory * @returns Promise<RaftOKFail> * */ runCommand(commandName: string, params: object): Promise<RaftOKFail>; getCachedAddOnList(): Array<RICHWElem>; getCachedAllHWElems(): Array<RICHWElem>; getCachedCalibInfo(): RICCalibInfo | null; }