@kuriousdesign/machine-sdk 1.0.21 → 1.0.23
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/README.md +4 -0
- package/dist/custom-types/BaseDevice/ApiOpcua.d.ts +8 -8
- package/dist/custom-types/BaseDevice/ApiOpcua.js +8 -8
- package/dist/custom-types/BaseDevice/Device.d.ts +17 -17
- package/dist/custom-types/BaseDevice/Device.js +17 -17
- package/dist/custom-types/BaseDevice/Processes.d.ts +11 -11
- package/dist/custom-types/BaseDevice/Processes.js +11 -11
- package/dist/enums/DeviceId.d.ts +47 -8
- package/dist/enums/DeviceId.js +47 -8
- package/dist/enums/index.d.ts +0 -2
- package/dist/enums/index.js +0 -2
- package/package.json +1 -1
- package/src/custom-types/BaseDevice/ApiOpcua.ts +16 -16
- package/src/custom-types/BaseDevice/Device.ts +34 -34
- package/src/custom-types/BaseDevice/Processes.ts +23 -23
- package/src/enums/DeviceId.ts +53 -8
- package/src/enums/index.ts +1 -2
- package/src/enums/Errors.ts +0 -30
- package/src/enums/Warnings.ts +0 -20
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@ import { DeviceActionRequestData } from "./Actions";
|
|
|
2
2
|
export interface ApiOpcuaReqData {
|
|
3
3
|
id: number;
|
|
4
4
|
checkSum: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
actionRequestData: DeviceActionRequestData;
|
|
6
|
+
sts: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const initialApiOpcuaReqData: ApiOpcuaReqData;
|
|
9
9
|
export interface ApiOpcuaData {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
hmiReq: ApiOpcuaReqData;
|
|
11
|
+
hmiResp: ApiOpcuaReqData;
|
|
12
|
+
orchReq: ApiOpcuaReqData;
|
|
13
|
+
orchResp: ApiOpcuaReqData;
|
|
14
|
+
req: ApiOpcuaReqData;
|
|
15
|
+
resp: ApiOpcuaReqData;
|
|
16
16
|
}
|
|
17
17
|
export declare const initialApiOpcuaData: ApiOpcuaData;
|
|
@@ -5,14 +5,14 @@ const Actions_1 = require("./Actions");
|
|
|
5
5
|
exports.initialApiOpcuaReqData = {
|
|
6
6
|
id: 0,
|
|
7
7
|
checkSum: 0,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
actionRequestData: Actions_1.initialDeviceActionRequestData,
|
|
9
|
+
sts: 0
|
|
10
10
|
};
|
|
11
11
|
exports.initialApiOpcuaData = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
hmiReq: {},
|
|
13
|
+
hmiResp: {},
|
|
14
|
+
orchReq: {},
|
|
15
|
+
orchResp: {},
|
|
16
|
+
req: {},
|
|
17
|
+
resp: {}
|
|
18
18
|
};
|
|
@@ -2,14 +2,14 @@ import { DeviceTypes } from '../Devices/DeviceTypes';
|
|
|
2
2
|
import { ProcessData } from './Processes';
|
|
3
3
|
import { ApiOpcuaData } from './ApiOpcua';
|
|
4
4
|
export interface DebugLogData {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
msg: string;
|
|
6
|
+
timeStamp: Date;
|
|
7
|
+
id: number;
|
|
8
8
|
}
|
|
9
9
|
export declare const initialDebugLogData: DebugLogData;
|
|
10
10
|
export interface DeviceLogData {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
list: DebugLogData[];
|
|
12
|
+
lastIndex: number;
|
|
13
13
|
}
|
|
14
14
|
export declare const initialDeviceLogData: DeviceLogData;
|
|
15
15
|
export interface DeviceRegistration {
|
|
@@ -28,21 +28,21 @@ export interface DeviceCfg {
|
|
|
28
28
|
}
|
|
29
29
|
export declare const initialDeviceCfg: DeviceCfg;
|
|
30
30
|
export interface FaultData {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
deviceId: number;
|
|
32
|
+
code: number;
|
|
33
|
+
msg: string;
|
|
34
|
+
autoReset: boolean;
|
|
35
|
+
resetFlag: boolean;
|
|
36
|
+
logFlag: boolean;
|
|
37
|
+
timeStamp: Date;
|
|
38
|
+
stepNum: number;
|
|
39
|
+
parentStepNum: number;
|
|
40
40
|
}
|
|
41
41
|
export declare const initialFaultData: FaultData;
|
|
42
42
|
export interface DeviceFaultData {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
list: FaultData[];
|
|
44
|
+
present: boolean;
|
|
45
|
+
childrenPresent: boolean;
|
|
46
46
|
}
|
|
47
47
|
export declare const initialDeviceFaultData: DeviceFaultData;
|
|
48
48
|
export interface DeviceStatus {
|
|
@@ -6,13 +6,13 @@ const Processes_1 = require("./Processes");
|
|
|
6
6
|
const DeviceConstants_1 = require("./DeviceConstants");
|
|
7
7
|
const ApiOpcua_1 = require("./ApiOpcua");
|
|
8
8
|
exports.initialDebugLogData = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
msg: '',
|
|
10
|
+
timeStamp: new Date(),
|
|
11
|
+
id: 0
|
|
12
12
|
};
|
|
13
13
|
exports.initialDeviceLogData = {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
list: new Array(DeviceConstants_1.DeviceConstants.NUM_LOG_ENTRIES).fill(null),
|
|
15
|
+
lastIndex: 0
|
|
16
16
|
};
|
|
17
17
|
;
|
|
18
18
|
exports.initialDeviceRegistration = {
|
|
@@ -29,20 +29,20 @@ exports.initialDeviceCfg = {
|
|
|
29
29
|
ignore: false
|
|
30
30
|
};
|
|
31
31
|
exports.initialFaultData = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
deviceId: 0,
|
|
33
|
+
code: 0,
|
|
34
|
+
msg: '',
|
|
35
|
+
autoReset: false,
|
|
36
|
+
resetFlag: false,
|
|
37
|
+
logFlag: false,
|
|
38
|
+
timeStamp: new Date(),
|
|
39
|
+
stepNum: 0,
|
|
40
|
+
parentStepNum: 0
|
|
41
41
|
};
|
|
42
42
|
exports.initialDeviceFaultData = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
list: [],
|
|
44
|
+
present: false,
|
|
45
|
+
childrenPresent: false
|
|
46
46
|
};
|
|
47
47
|
exports.initialDeviceStatus = {
|
|
48
48
|
state: 0,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export interface ProcessData {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
requestId: number;
|
|
3
|
+
requestParamArray: number[];
|
|
4
|
+
senderId: number;
|
|
5
|
+
activeId: number;
|
|
6
|
+
activeName: string;
|
|
7
|
+
lastId: number;
|
|
8
8
|
firstScan: boolean;
|
|
9
9
|
isStepNum: number;
|
|
10
|
-
|
|
10
|
+
stepDescription: string;
|
|
11
11
|
isDone: boolean;
|
|
12
12
|
isError: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
nextStepNum: number;
|
|
14
|
+
deviceStateThatCalled: number;
|
|
15
|
+
deviceStepThatCalled: number;
|
|
16
|
+
paramArray: number[];
|
|
17
17
|
}
|
|
18
18
|
export declare const initialProcessData: ProcessData;
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initialProcessData = void 0;
|
|
4
4
|
exports.initialProcessData = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
requestId: 0,
|
|
6
|
+
requestParamArray: new Array(10).fill(0),
|
|
7
|
+
senderId: 0,
|
|
8
|
+
activeId: 0,
|
|
9
|
+
activeName: '',
|
|
10
|
+
lastId: 0,
|
|
11
11
|
firstScan: false,
|
|
12
12
|
isStepNum: 0,
|
|
13
|
-
|
|
13
|
+
stepDescription: '',
|
|
14
14
|
isDone: false,
|
|
15
15
|
isError: false,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
nextStepNum: 0,
|
|
17
|
+
deviceStateThatCalled: 0,
|
|
18
|
+
deviceStepThatCalled: 0,
|
|
19
|
+
paramArray: new Array(10).fill(0)
|
|
20
20
|
};
|
package/dist/enums/DeviceId.d.ts
CHANGED
|
@@ -1,10 +1,49 @@
|
|
|
1
1
|
export declare enum DeviceId {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
NONE = 0,
|
|
3
|
+
SYS = 1,
|
|
4
|
+
HMI = 2,
|
|
5
|
+
SFTY = 3,
|
|
6
|
+
CON = 4,
|
|
7
|
+
DIAG = 5,
|
|
8
|
+
RC = 6,
|
|
9
|
+
LROB = 10,
|
|
10
|
+
ABB = 11,
|
|
11
|
+
EOAT = 12,
|
|
12
|
+
VIS = 13,
|
|
13
|
+
FIX_T = 14,
|
|
14
|
+
FIX_S = 15,
|
|
15
|
+
CLAMP_T = 16,
|
|
16
|
+
CLAMP_S = 17,
|
|
17
|
+
FLSB_T = 18,
|
|
18
|
+
FLSB_S = 19,
|
|
19
|
+
LNR = 21,
|
|
20
|
+
GCNV1 = 22,
|
|
21
|
+
GCNV2 = 23,
|
|
22
|
+
ORCH = 24,
|
|
23
|
+
XFER = 25,
|
|
24
|
+
SWARM1 = 26,
|
|
25
|
+
SWARM2 = 27,
|
|
26
|
+
SCARA = 29,
|
|
27
|
+
REOR = 30,
|
|
28
|
+
BAM = 31,
|
|
29
|
+
MTAC = 32,
|
|
30
|
+
IB = 33,
|
|
31
|
+
STW = 34,
|
|
32
|
+
RG = 35,
|
|
33
|
+
RY = 36,
|
|
34
|
+
RZ = 37,
|
|
35
|
+
BSG = 38,
|
|
36
|
+
BSX = 39,
|
|
37
|
+
BSY = 40,
|
|
38
|
+
BSZ = 41,
|
|
39
|
+
IBG = 45,
|
|
40
|
+
IBZ = 46,
|
|
41
|
+
IBX = 47,
|
|
42
|
+
IBZ1 = 48,
|
|
43
|
+
IBZ2 = 49,
|
|
44
|
+
WASH = 50,
|
|
45
|
+
ROB = 51,
|
|
46
|
+
DBRR = 52,
|
|
47
|
+
CNC = 53,
|
|
48
|
+
RACK = 54
|
|
10
49
|
}
|
package/dist/enums/DeviceId.js
CHANGED
|
@@ -3,12 +3,51 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeviceId = void 0;
|
|
4
4
|
var DeviceId;
|
|
5
5
|
(function (DeviceId) {
|
|
6
|
-
DeviceId[DeviceId["
|
|
7
|
-
DeviceId[DeviceId["
|
|
8
|
-
DeviceId[DeviceId["
|
|
9
|
-
DeviceId[DeviceId["
|
|
10
|
-
DeviceId[DeviceId["
|
|
11
|
-
DeviceId[DeviceId["
|
|
12
|
-
DeviceId[DeviceId["
|
|
13
|
-
DeviceId[DeviceId["
|
|
6
|
+
DeviceId[DeviceId["NONE"] = 0] = "NONE";
|
|
7
|
+
DeviceId[DeviceId["SYS"] = 1] = "SYS";
|
|
8
|
+
DeviceId[DeviceId["HMI"] = 2] = "HMI";
|
|
9
|
+
DeviceId[DeviceId["SFTY"] = 3] = "SFTY";
|
|
10
|
+
DeviceId[DeviceId["CON"] = 4] = "CON";
|
|
11
|
+
DeviceId[DeviceId["DIAG"] = 5] = "DIAG";
|
|
12
|
+
DeviceId[DeviceId["RC"] = 6] = "RC";
|
|
13
|
+
DeviceId[DeviceId["LROB"] = 10] = "LROB";
|
|
14
|
+
DeviceId[DeviceId["ABB"] = 11] = "ABB";
|
|
15
|
+
DeviceId[DeviceId["EOAT"] = 12] = "EOAT";
|
|
16
|
+
DeviceId[DeviceId["VIS"] = 13] = "VIS";
|
|
17
|
+
DeviceId[DeviceId["FIX_T"] = 14] = "FIX_T";
|
|
18
|
+
DeviceId[DeviceId["FIX_S"] = 15] = "FIX_S";
|
|
19
|
+
DeviceId[DeviceId["CLAMP_T"] = 16] = "CLAMP_T";
|
|
20
|
+
DeviceId[DeviceId["CLAMP_S"] = 17] = "CLAMP_S";
|
|
21
|
+
DeviceId[DeviceId["FLSB_T"] = 18] = "FLSB_T";
|
|
22
|
+
DeviceId[DeviceId["FLSB_S"] = 19] = "FLSB_S";
|
|
23
|
+
DeviceId[DeviceId["LNR"] = 21] = "LNR";
|
|
24
|
+
DeviceId[DeviceId["GCNV1"] = 22] = "GCNV1";
|
|
25
|
+
DeviceId[DeviceId["GCNV2"] = 23] = "GCNV2";
|
|
26
|
+
DeviceId[DeviceId["ORCH"] = 24] = "ORCH";
|
|
27
|
+
DeviceId[DeviceId["XFER"] = 25] = "XFER";
|
|
28
|
+
DeviceId[DeviceId["SWARM1"] = 26] = "SWARM1";
|
|
29
|
+
DeviceId[DeviceId["SWARM2"] = 27] = "SWARM2";
|
|
30
|
+
DeviceId[DeviceId["SCARA"] = 29] = "SCARA";
|
|
31
|
+
DeviceId[DeviceId["REOR"] = 30] = "REOR";
|
|
32
|
+
DeviceId[DeviceId["BAM"] = 31] = "BAM";
|
|
33
|
+
DeviceId[DeviceId["MTAC"] = 32] = "MTAC";
|
|
34
|
+
DeviceId[DeviceId["IB"] = 33] = "IB";
|
|
35
|
+
DeviceId[DeviceId["STW"] = 34] = "STW";
|
|
36
|
+
DeviceId[DeviceId["RG"] = 35] = "RG";
|
|
37
|
+
DeviceId[DeviceId["RY"] = 36] = "RY";
|
|
38
|
+
DeviceId[DeviceId["RZ"] = 37] = "RZ";
|
|
39
|
+
DeviceId[DeviceId["BSG"] = 38] = "BSG";
|
|
40
|
+
DeviceId[DeviceId["BSX"] = 39] = "BSX";
|
|
41
|
+
DeviceId[DeviceId["BSY"] = 40] = "BSY";
|
|
42
|
+
DeviceId[DeviceId["BSZ"] = 41] = "BSZ";
|
|
43
|
+
DeviceId[DeviceId["IBG"] = 45] = "IBG";
|
|
44
|
+
DeviceId[DeviceId["IBZ"] = 46] = "IBZ";
|
|
45
|
+
DeviceId[DeviceId["IBX"] = 47] = "IBX";
|
|
46
|
+
DeviceId[DeviceId["IBZ1"] = 48] = "IBZ1";
|
|
47
|
+
DeviceId[DeviceId["IBZ2"] = 49] = "IBZ2";
|
|
48
|
+
DeviceId[DeviceId["WASH"] = 50] = "WASH";
|
|
49
|
+
DeviceId[DeviceId["ROB"] = 51] = "ROB";
|
|
50
|
+
DeviceId[DeviceId["DBRR"] = 52] = "DBRR";
|
|
51
|
+
DeviceId[DeviceId["CNC"] = 53] = "CNC";
|
|
52
|
+
DeviceId[DeviceId["RACK"] = 54] = "RACK";
|
|
14
53
|
})(DeviceId || (exports.DeviceId = DeviceId = {}));
|
package/dist/enums/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ export * from "./Colors";
|
|
|
2
2
|
export * from "./States";
|
|
3
3
|
export * from "./OpcuaDatatype";
|
|
4
4
|
export * from "./ExtrusionType";
|
|
5
|
-
export * from "./Warnings";
|
|
6
|
-
export * from "./Errors";
|
|
7
5
|
export * from "./DeviceId";
|
|
8
6
|
export * from "./TaskId";
|
|
9
7
|
export * from "./Priorities";
|
package/dist/enums/index.js
CHANGED
|
@@ -18,8 +18,6 @@ __exportStar(require("./Colors"), exports);
|
|
|
18
18
|
__exportStar(require("./States"), exports);
|
|
19
19
|
__exportStar(require("./OpcuaDatatype"), exports);
|
|
20
20
|
__exportStar(require("./ExtrusionType"), exports);
|
|
21
|
-
__exportStar(require("./Warnings"), exports);
|
|
22
|
-
__exportStar(require("./Errors"), exports);
|
|
23
21
|
__exportStar(require("./DeviceId"), exports);
|
|
24
22
|
__exportStar(require("./TaskId"), exports);
|
|
25
23
|
__exportStar(require("./Priorities"), exports);
|
package/package.json
CHANGED
|
@@ -3,31 +3,31 @@ import { DeviceActionRequestData, initialDeviceActionRequestData } from "./Actio
|
|
|
3
3
|
export interface ApiOpcuaReqData {
|
|
4
4
|
id: number; // likely use timestamp ms after epoch
|
|
5
5
|
checkSum: number;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
actionRequestData: DeviceActionRequestData;
|
|
7
|
+
sts: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const initialApiOpcuaReqData: ApiOpcuaReqData = {
|
|
11
11
|
id: 0,
|
|
12
12
|
checkSum: 0,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
actionRequestData: initialDeviceActionRequestData,
|
|
14
|
+
sts: 0
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export interface ApiOpcuaData {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
hmiReq: ApiOpcuaReqData; // read by PLC
|
|
19
|
+
hmiResp: ApiOpcuaReqData; // written by PLC
|
|
20
|
+
orchReq: ApiOpcuaReqData; // read by PLC
|
|
21
|
+
orchResp: ApiOpcuaReqData; // written by PLC
|
|
22
|
+
req: ApiOpcuaReqData; // written by mtac, read by plc
|
|
23
|
+
resp: ApiOpcuaReqData; // written by plc, read by testand
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export const initialApiOpcuaData: ApiOpcuaData = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
hmiReq: {} as ApiOpcuaReqData,
|
|
28
|
+
hmiResp: {} as ApiOpcuaReqData,
|
|
29
|
+
orchReq: {} as ApiOpcuaReqData,
|
|
30
|
+
orchResp: {} as ApiOpcuaReqData,
|
|
31
|
+
req: {} as ApiOpcuaReqData,
|
|
32
|
+
resp: {} as ApiOpcuaReqData
|
|
33
33
|
};
|
|
@@ -6,26 +6,26 @@ import { ApiOpcuaData, initialApiOpcuaData } from './ApiOpcua';
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export interface DebugLogData {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
msg: string;
|
|
10
|
+
timeStamp: Date;
|
|
11
|
+
id: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const initialDebugLogData: DebugLogData = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
msg: '',
|
|
16
|
+
timeStamp: new Date(),
|
|
17
|
+
id: 0
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export interface DeviceLogData {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
list: DebugLogData[];
|
|
23
|
+
lastIndex: number; // index of the most recent recorded entries
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export const initialDeviceLogData: DeviceLogData = {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
list: new Array(DeviceConstants.NUM_LOG_ENTRIES).fill(null),
|
|
28
|
+
lastIndex: 0
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
|
|
@@ -63,39 +63,39 @@ export const initialDeviceCfg: DeviceCfg = {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
export interface FaultData {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
66
|
+
deviceId: number;
|
|
67
|
+
code: number; // this is deprecated
|
|
68
|
+
msg: string;
|
|
69
|
+
autoReset: boolean; // if this is true, the code will be reset by the fault monitor
|
|
70
|
+
resetFlag: boolean; // used by the fault monitor to know whether to clear an fault or not
|
|
71
|
+
logFlag: boolean; // when true, this fault hasn't been logged yet
|
|
72
|
+
timeStamp: Date;
|
|
73
|
+
stepNum: number; // of this device
|
|
74
|
+
parentStepNum: number;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export const initialFaultData: FaultData = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
deviceId: 0,
|
|
79
|
+
code: 0,
|
|
80
|
+
msg: '',
|
|
81
|
+
autoReset: false,
|
|
82
|
+
resetFlag: false,
|
|
83
|
+
logFlag: false,
|
|
84
|
+
timeStamp: new Date(),
|
|
85
|
+
stepNum: 0,
|
|
86
|
+
parentStepNum: 0
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
export interface DeviceFaultData {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
list: FaultData[]; // Array of fault data
|
|
91
|
+
present: boolean; // status
|
|
92
|
+
childrenPresent: boolean; // status that children have errors
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
export const initialDeviceFaultData: DeviceFaultData = {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
list: [],
|
|
97
|
+
present: false,
|
|
98
|
+
childrenPresent: false
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
export interface DeviceStatus {
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
export interface ProcessData {
|
|
2
2
|
// THESE PARAMETERS MUST ONLY BE WRITTEN OUTSIDE THIS FB BY method: SendProcessRequest()
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
requestId: number; // processId that is being requested
|
|
4
|
+
requestParamArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
5
|
+
senderId: number; // use DeviceIds enum
|
|
6
|
+
|
|
7
7
|
// THESE PARAMETERS ARE SET INTERNALLY
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
activeId: number; // active right now and not already DONE
|
|
9
|
+
activeName: string;
|
|
10
|
+
lastId: number; // last id to be active (it could have ended successfully or with error)
|
|
11
11
|
firstScan: boolean;
|
|
12
12
|
isStepNum: number; // read-only
|
|
13
|
-
|
|
13
|
+
stepDescription: string;
|
|
14
14
|
isDone: boolean;
|
|
15
15
|
isError: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
nextStepNum: number;
|
|
17
|
+
deviceStateThatCalled: number;
|
|
18
|
+
deviceStepThatCalled: number; // the step number that called the process, which determines where the process returns to after completion
|
|
19
|
+
paramArray: number[]; // passable parameter for the RPC Call (MAX_NUM_PARAMS length)
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const initialProcessData: ProcessData = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
requestId: 0,
|
|
24
|
+
requestParamArray: new Array(10).fill(0),
|
|
25
|
+
senderId: 0,
|
|
26
|
+
activeId: 0,
|
|
27
|
+
activeName: '',
|
|
28
|
+
lastId: 0,
|
|
29
29
|
firstScan: false,
|
|
30
30
|
isStepNum: 0,
|
|
31
|
-
|
|
31
|
+
stepDescription: '',
|
|
32
32
|
isDone: false,
|
|
33
33
|
isError: false,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
nextStepNum: 0,
|
|
35
|
+
deviceStateThatCalled: 0,
|
|
36
|
+
deviceStepThatCalled: 0,
|
|
37
|
+
paramArray: new Array(10).fill(0)
|
|
38
38
|
};
|
package/src/enums/DeviceId.ts
CHANGED
|
@@ -1,10 +1,55 @@
|
|
|
1
1
|
export enum DeviceId {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
NONE = 0,
|
|
3
|
+
SYS = 1,
|
|
4
|
+
HMI = 2,
|
|
5
|
+
SFTY = 3,
|
|
6
|
+
CON = 4,
|
|
7
|
+
DIAG = 5,
|
|
8
|
+
RC = 6,
|
|
9
|
+
|
|
10
|
+
LROB = 10,
|
|
11
|
+
ABB = 11,
|
|
12
|
+
EOAT = 12,
|
|
13
|
+
VIS = 13,
|
|
14
|
+
FIX_T = 14,
|
|
15
|
+
FIX_S = 15,
|
|
16
|
+
CLAMP_T = 16,
|
|
17
|
+
CLAMP_S = 17,
|
|
18
|
+
FLSB_T = 18,
|
|
19
|
+
FLSB_S = 19,
|
|
20
|
+
|
|
21
|
+
LNR = 21,
|
|
22
|
+
GCNV1 = 22,
|
|
23
|
+
GCNV2 = 23,
|
|
24
|
+
ORCH = 24,
|
|
25
|
+
XFER = 25,
|
|
26
|
+
SWARM1 = 26,
|
|
27
|
+
SWARM2 = 27,
|
|
28
|
+
|
|
29
|
+
SCARA = 29,
|
|
30
|
+
REOR = 30,
|
|
31
|
+
|
|
32
|
+
BAM = 31,
|
|
33
|
+
MTAC = 32,
|
|
34
|
+
|
|
35
|
+
IB = 33,
|
|
36
|
+
STW = 34,
|
|
37
|
+
RG = 35,
|
|
38
|
+
RY = 36,
|
|
39
|
+
RZ = 37,
|
|
40
|
+
BSG = 38,
|
|
41
|
+
BSX = 39,
|
|
42
|
+
BSY = 40,
|
|
43
|
+
BSZ = 41,
|
|
44
|
+
|
|
45
|
+
IBG = 45,
|
|
46
|
+
IBZ = 46,
|
|
47
|
+
IBX = 47,
|
|
48
|
+
IBZ1 = 48,
|
|
49
|
+
IBZ2 = 49,
|
|
50
|
+
WASH = 50,
|
|
51
|
+
ROB = 51,
|
|
52
|
+
DBRR = 52,
|
|
53
|
+
CNC = 53,
|
|
54
|
+
RACK = 54,
|
|
10
55
|
}
|
package/src/enums/index.ts
CHANGED
|
@@ -2,8 +2,7 @@ export * from "./Colors";
|
|
|
2
2
|
export * from "./States";
|
|
3
3
|
export * from "./OpcuaDatatype";
|
|
4
4
|
export * from "./ExtrusionType";
|
|
5
|
-
|
|
6
|
-
export * from "./Errors";
|
|
5
|
+
|
|
7
6
|
export * from "./DeviceId";
|
|
8
7
|
export * from "./TaskId";
|
|
9
8
|
export * from "./Priorities";
|
package/src/enums/Errors.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DeviceId } from "./DeviceId";
|
|
2
|
-
|
|
3
|
-
export const ErrorsMap: {
|
|
4
|
-
[key in DeviceId]: {
|
|
5
|
-
[key: number]: string;
|
|
6
|
-
};
|
|
7
|
-
} = {
|
|
8
|
-
[DeviceId.SFTY]: {
|
|
9
|
-
0: "NoError",
|
|
10
|
-
1: "EstopDumpValveCh1Off",
|
|
11
|
-
2: "EstopDumpValveCh2Off",
|
|
12
|
-
3: "EstopDumpValveCh1On",
|
|
13
|
-
4: "EstopDumpValveCh2On",
|
|
14
|
-
5: "FenceDumpValveCh1Off",
|
|
15
|
-
6: "FenceDumpValveCh2Off",
|
|
16
|
-
7: "FenceDumpValveCh1On",
|
|
17
|
-
8: "FenceDumpValveCh2On",
|
|
18
|
-
},
|
|
19
|
-
[DeviceId.CNC]: {},
|
|
20
|
-
[DeviceId.CON]: {},
|
|
21
|
-
[DeviceId.DBRR]: {},
|
|
22
|
-
[DeviceId.ROB]: {
|
|
23
|
-
0: "NoError",
|
|
24
|
-
1: "ControllerFault",
|
|
25
|
-
2: "RobotStartedWrongTask",
|
|
26
|
-
},
|
|
27
|
-
[DeviceId.SYS]: {},
|
|
28
|
-
[DeviceId.WASH]: {},
|
|
29
|
-
[DeviceId.RACK]: {},
|
|
30
|
-
};
|
package/src/enums/Warnings.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { DeviceId } from "./DeviceId";
|
|
2
|
-
|
|
3
|
-
export const WarningsMap: {
|
|
4
|
-
[key in DeviceId]: {
|
|
5
|
-
[key: number]: string;
|
|
6
|
-
};
|
|
7
|
-
} = {
|
|
8
|
-
[DeviceId.SYS]: {
|
|
9
|
-
//refer to SysWarnings enum in CoDeSys for mapping
|
|
10
|
-
},
|
|
11
|
-
[DeviceId.RACK]: {
|
|
12
|
-
//refer to RackWarnings enum in CoDeSys for mapping
|
|
13
|
-
},
|
|
14
|
-
[DeviceId.CNC]: {},
|
|
15
|
-
[DeviceId.CON]: {},
|
|
16
|
-
[DeviceId.DBRR]: {},
|
|
17
|
-
[DeviceId.ROB]: {},
|
|
18
|
-
[DeviceId.SFTY]: {},
|
|
19
|
-
[DeviceId.WASH]: {},
|
|
20
|
-
};
|