@kuriousdesign/machine-sdk
Version:
Shared data types and helpers for machine-related repositories
75 lines (74 loc) • 1.91 kB
TypeScript
import { DeviceTypes } from './DeviceTypes';
export interface DeviceRegistration {
mnemonic: string;
id: number;
childIdArray: number[];
parentId: number;
deviceType: DeviceTypes;
}
export declare const initialDeviceRegistration: DeviceRegistration;
export interface DeviceCfg {
safetyZoneId: number;
controllableByHmi: boolean;
autoReset: boolean;
ignore: boolean;
}
export declare const initialDeviceCfg: DeviceCfg;
export interface FaultData {
DeviceId: number;
Code: number;
Msg: string;
AutoReset: boolean;
ResetFlag: boolean;
LogFlag: boolean;
TimeStamp: Date;
StepNum: number;
ParentStepNum: number;
}
export declare const initialFaultData: FaultData;
export interface DeviceFaultData {
List: FaultData[];
Present: boolean;
ChildrenPresent: boolean;
}
export declare const initialDeviceFaultData: DeviceFaultData;
export interface DeviceStatus {
state: number;
stepNum: number;
stepDescription: string;
colorCode: number;
statusMsg: string;
error: boolean;
killed: boolean;
inactive: boolean;
resetting: boolean;
idle: boolean;
running: boolean;
stopping: boolean;
paused: boolean;
aborting: boolean;
done: boolean;
manual: boolean;
idleOrError: boolean;
iifkm: boolean;
rri: boolean;
ipr: boolean;
kei: boolean;
runningOrStopping: boolean;
allChildrenIdle: boolean;
allChildrenKilled: boolean;
allChildrenInactive: boolean;
allChildrenIdleOrError: boolean;
commanderId: number;
recordingLogs: boolean;
}
export declare const initialDeviceStatus: DeviceStatus;
export interface Device {
is: DeviceStatus;
errors: DeviceFaultData;
warnings: DeviceFaultData;
registration: DeviceRegistration;
cfg: DeviceCfg;
connectionStatus: boolean;
}
export declare const initialDevice: Device;