@kuriousdesign/machine-sdk 1.0.39 → 1.0.41
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/dist/custom-types/BaseDevice/Device.d.ts +4 -0
- package/dist/custom-types/GlobalConstants.d.ts +1 -0
- package/dist/custom-types/GlobalConstants.js +1 -0
- package/dist/custom-types/Machine.d.ts +8 -1
- package/dist/custom-types/Machine.js +7 -1
- package/dist/plc-tags/index.d.ts +2 -0
- package/dist/plc-tags/index.js +3 -0
- package/package.json +1 -1
- package/src/custom-types/BaseDevice/Device.ts +19 -6
- package/src/custom-types/GlobalConstants.ts +1 -0
- package/src/custom-types/Machine.ts +22 -1
- package/src/custom-types/index.ts +1 -1
- package/src/plc-tags/index.ts +3 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentAnimation, DeviceRegistration, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DebugLogData, DeviceLogData, DeviceRegistration, TaskQueue } from ".";
|
|
2
2
|
import { PartDataStatus } from "./Part";
|
|
3
3
|
export interface UserData {
|
|
4
4
|
activeUser: number;
|
|
@@ -42,5 +42,12 @@ export interface Machine {
|
|
|
42
42
|
registeredDevices: DeviceRegistration[];
|
|
43
43
|
heartbeatPlc: number;
|
|
44
44
|
heartbeatHmi: number;
|
|
45
|
+
machineLog: LogRecordData;
|
|
46
|
+
deviceLogs: DeviceLogData[];
|
|
45
47
|
}
|
|
48
|
+
export interface LogRecordData {
|
|
49
|
+
list: DebugLogData[];
|
|
50
|
+
lastIndex: number;
|
|
51
|
+
}
|
|
52
|
+
export declare const initialLogRecordData: LogRecordData;
|
|
46
53
|
export declare const initialMachine: Machine;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialMachine = exports.initialMachineCfg = exports.initialSystemFaultData = exports.initialFaultCodeData = void 0;
|
|
3
|
+
exports.initialMachine = exports.initialLogRecordData = exports.initialMachineCfg = exports.initialSystemFaultData = exports.initialFaultCodeData = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
5
|
const Part_1 = require("./Part");
|
|
6
6
|
exports.initialFaultCodeData = {
|
|
@@ -20,6 +20,10 @@ exports.initialMachineCfg = {
|
|
|
20
20
|
apiOpcuaDeviceId: -1,
|
|
21
21
|
ethernetAdapterList: [],
|
|
22
22
|
};
|
|
23
|
+
exports.initialLogRecordData = {
|
|
24
|
+
list: Array(_1.GCs.NUM_ENTRIES_MACHINE_LOG).fill(null).map(() => ({ ..._1.initialDebugLogData })),
|
|
25
|
+
lastIndex: 0,
|
|
26
|
+
};
|
|
23
27
|
exports.initialMachine = ({
|
|
24
28
|
estopCircuit_OK: false,
|
|
25
29
|
estopCircuitDelayed_OK: false,
|
|
@@ -37,4 +41,6 @@ exports.initialMachine = ({
|
|
|
37
41
|
registeredDevices: [],
|
|
38
42
|
heartbeatPlc: 0,
|
|
39
43
|
heartbeatHmi: 0,
|
|
44
|
+
machineLog: { ...exports.initialLogRecordData },
|
|
45
|
+
deviceLogs: Array(_1.GCs.NUM_DEVICES).fill(null).map(() => ({ ..._1.initialDeviceLogData })),
|
|
40
46
|
});
|
package/dist/plc-tags/index.d.ts
CHANGED
package/dist/plc-tags/index.js
CHANGED
package/package.json
CHANGED
|
@@ -102,10 +102,10 @@ export interface DeviceStatus {
|
|
|
102
102
|
state: number; // enum for States enum, same as the boolean states in the data structure
|
|
103
103
|
stepNum: number;
|
|
104
104
|
stepDescription: string;
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
colorCode: number; // color to indicate the current status for HMI purposes
|
|
107
107
|
statusMsg: string; // status string
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
error: boolean; // state, device or child has an error
|
|
110
110
|
killed: boolean; // device is de-energized
|
|
111
111
|
inactive: boolean; // waiting to be reset
|
|
@@ -124,15 +124,15 @@ export interface DeviceStatus {
|
|
|
124
124
|
ipr: boolean; // IdleOrPausedOrRunning
|
|
125
125
|
kei: boolean; // KilledErrorOrInactive
|
|
126
126
|
runningOrStopping: boolean;
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
// Children Status
|
|
129
129
|
allChildrenIdle: boolean;
|
|
130
130
|
allChildrenKilled: boolean;
|
|
131
131
|
allChildrenInactive: boolean;
|
|
132
132
|
allChildrenIdleOrError: boolean;
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
commanderId: number; // used for external control
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
recordingLogs: boolean;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -202,4 +202,17 @@ export const initialDevice: Device = {
|
|
|
202
202
|
process: initialProcessData,
|
|
203
203
|
script: initialProcessData,
|
|
204
204
|
apiOpcua: initialApiOpcuaData
|
|
205
|
-
};
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
// TYPE DeviceLogData :
|
|
209
|
+
// STRUCT
|
|
210
|
+
// List: ARRAY[0..DeviceConstants.NUM_LOG_ENTRIES-1] OF DebugLogData;
|
|
211
|
+
// LastIndex:INT; //index of the most recent recorde entries
|
|
212
|
+
// END_STRUCT
|
|
213
|
+
// END_TYPE
|
|
214
|
+
|
|
215
|
+
export interface DeviceLogData {
|
|
216
|
+
list: DebugLogData[];
|
|
217
|
+
lastIndex: number; // index of the most recent recorded entries
|
|
218
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentAnimation, DeviceConstants, DeviceRegistration, GCs, initialDeviceRegistration, initialTaskQueue, TaskQueue } from ".";
|
|
1
|
+
import { ComponentAnimation, DebugLogData, DeviceConstants, DeviceLogData, DeviceRegistration, GCs, initialDebugLogData, initialDeviceLogData, initialDeviceRegistration, initialTaskQueue, TaskQueue } from ".";
|
|
2
2
|
import { initialPartDataStatus, PartData, PartDataStatus } from "./Part";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -84,8 +84,27 @@ export interface Machine {
|
|
|
84
84
|
registeredDevices: DeviceRegistration[];
|
|
85
85
|
heartbeatPlc: number;
|
|
86
86
|
heartbeatHmi: number;
|
|
87
|
+
machineLog: LogRecordData;
|
|
88
|
+
deviceLogs: DeviceLogData[]; //ARRAY[0..(GCs.NUM_DEVICES-1)] OF DeviceLogData;
|
|
87
89
|
}
|
|
88
90
|
|
|
91
|
+
// TYPE LogRecordData :
|
|
92
|
+
// STRUCT
|
|
93
|
+
// List: ARRAY[0..DiagConstants.NUM_ENTRIES_RECORDED_LOG-1] OF DebugLogData;
|
|
94
|
+
// LastIndex:USINT; //index of the most recent recorde entries
|
|
95
|
+
// END_STRUCT
|
|
96
|
+
// END_TYPE
|
|
97
|
+
|
|
98
|
+
export interface LogRecordData {
|
|
99
|
+
list: DebugLogData[];
|
|
100
|
+
lastIndex: number; // index of the most recent recorded entries
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const initialLogRecordData: LogRecordData = {
|
|
104
|
+
list: Array(GCs.NUM_ENTRIES_MACHINE_LOG).fill(null).map(() => ({ ...initialDebugLogData })),
|
|
105
|
+
lastIndex: 0,
|
|
106
|
+
};
|
|
107
|
+
|
|
89
108
|
export const initialMachine: Machine = ({
|
|
90
109
|
estopCircuit_OK: false,
|
|
91
110
|
estopCircuitDelayed_OK: false,
|
|
@@ -103,4 +122,6 @@ export const initialMachine: Machine = ({
|
|
|
103
122
|
registeredDevices: [],
|
|
104
123
|
heartbeatPlc: 0,
|
|
105
124
|
heartbeatHmi: 0,
|
|
125
|
+
machineLog: { ...initialLogRecordData },
|
|
126
|
+
deviceLogs: Array(GCs.NUM_DEVICES).fill(null).map(() => ({ ...initialDeviceLogData })),
|
|
106
127
|
});
|
package/src/plc-tags/index.ts
CHANGED