@kuriousdesign/machine-sdk 1.0.21 → 1.0.22

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.
@@ -2,16 +2,16 @@ import { DeviceActionRequestData } from "./Actions";
2
2
  export interface ApiOpcuaReqData {
3
3
  id: number;
4
4
  checkSum: number;
5
- ActionRequestData: DeviceActionRequestData;
6
- Sts: number;
5
+ actionRequestData: DeviceActionRequestData;
6
+ sts: number;
7
7
  }
8
8
  export declare const initialApiOpcuaReqData: ApiOpcuaReqData;
9
9
  export interface ApiOpcuaData {
10
- HmiReq: ApiOpcuaReqData;
11
- HmiResp: ApiOpcuaReqData;
12
- OrchReq: ApiOpcuaReqData;
13
- OrchResp: ApiOpcuaReqData;
14
- Req: ApiOpcuaReqData;
15
- Resp: ApiOpcuaReqData;
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
- ActionRequestData: Actions_1.initialDeviceActionRequestData,
9
- Sts: 0
8
+ actionRequestData: Actions_1.initialDeviceActionRequestData,
9
+ sts: 0
10
10
  };
11
11
  exports.initialApiOpcuaData = {
12
- HmiReq: {},
13
- HmiResp: {},
14
- OrchReq: {},
15
- OrchResp: {},
16
- Req: {},
17
- Resp: {}
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
- Msg: string;
6
- TimeStamp: Date;
7
- Id: number;
5
+ msg: string;
6
+ timeStamp: Date;
7
+ id: number;
8
8
  }
9
9
  export declare const initialDebugLogData: DebugLogData;
10
10
  export interface DeviceLogData {
11
- List: DebugLogData[];
12
- LastIndex: number;
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
- 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;
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
- List: FaultData[];
44
- Present: boolean;
45
- ChildrenPresent: boolean;
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
- Msg: '',
10
- TimeStamp: new Date(),
11
- Id: 0
9
+ msg: '',
10
+ timeStamp: new Date(),
11
+ id: 0
12
12
  };
13
13
  exports.initialDeviceLogData = {
14
- List: new Array(DeviceConstants_1.DeviceConstants.NUM_LOG_ENTRIES).fill(null),
15
- LastIndex: 0
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
- 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
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
- List: [],
44
- Present: false,
45
- ChildrenPresent: false
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
- RequestId: number;
3
- RequestParamArray: number[];
4
- SenderId: number;
5
- ActiveId: number;
6
- ActiveName: string;
7
- LastId: number;
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
- StepDescription: string;
10
+ stepDescription: string;
11
11
  isDone: boolean;
12
12
  isError: boolean;
13
- NextStepNum: number;
14
- DeviceStateThatCalled: number;
15
- DeviceStepThatCalled: number;
16
- ParamArray: number[];
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
- RequestId: 0,
6
- RequestParamArray: new Array(10).fill(0),
7
- SenderId: 0,
8
- ActiveId: 0,
9
- ActiveName: '',
10
- LastId: 0,
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
- StepDescription: '',
13
+ stepDescription: '',
14
14
  isDone: false,
15
15
  isError: false,
16
- NextStepNum: 0,
17
- DeviceStateThatCalled: 0,
18
- DeviceStepThatCalled: 0,
19
- ParamArray: new Array(10).fill(0)
16
+ nextStepNum: 0,
17
+ deviceStateThatCalled: 0,
18
+ deviceStepThatCalled: 0,
19
+ paramArray: new Array(10).fill(0)
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Shared data types and helpers for machine-related repositories",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- ActionRequestData: DeviceActionRequestData;
7
- Sts: number;
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
- ActionRequestData: initialDeviceActionRequestData,
14
- Sts: 0
13
+ actionRequestData: initialDeviceActionRequestData,
14
+ sts: 0
15
15
  };
16
16
 
17
17
  export interface ApiOpcuaData {
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
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
- HmiReq: {} as ApiOpcuaReqData,
28
- HmiResp: {} as ApiOpcuaReqData,
29
- OrchReq: {} as ApiOpcuaReqData,
30
- OrchResp: {} as ApiOpcuaReqData,
31
- Req: {} as ApiOpcuaReqData,
32
- Resp: {} as ApiOpcuaReqData
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
- Msg: string;
10
- TimeStamp: Date;
11
- Id: number;
9
+ msg: string;
10
+ timeStamp: Date;
11
+ id: number;
12
12
  }
13
13
 
14
14
  export const initialDebugLogData: DebugLogData = {
15
- Msg: '',
16
- TimeStamp: new Date(),
17
- Id: 0
15
+ msg: '',
16
+ timeStamp: new Date(),
17
+ id: 0
18
18
  };
19
19
 
20
20
 
21
21
  export interface DeviceLogData {
22
- List: DebugLogData[];
23
- LastIndex: number; // index of the most recent recorded entries
22
+ list: DebugLogData[];
23
+ lastIndex: number; // index of the most recent recorded entries
24
24
  }
25
25
 
26
26
  export const initialDeviceLogData: DeviceLogData = {
27
- List: new Array(DeviceConstants.NUM_LOG_ENTRIES).fill(null),
28
- LastIndex: 0
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
- 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;
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
- 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
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
- List: FaultData[]; // Array of fault data
91
- Present: boolean; // status
92
- ChildrenPresent: boolean; // status that children have errors
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
- List: [],
97
- Present: false,
98
- ChildrenPresent: false
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
- 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
-
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
- 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)
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
- StepDescription: string;
13
+ stepDescription: string;
14
14
  isDone: boolean;
15
15
  isError: boolean;
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)
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
- RequestId: 0,
24
- RequestParamArray: new Array(10).fill(0),
25
- SenderId: 0,
26
- ActiveId: 0,
27
- ActiveName: '',
28
- LastId: 0,
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
- StepDescription: '',
31
+ stepDescription: '',
32
32
  isDone: false,
33
33
  isError: false,
34
- NextStepNum: 0,
35
- DeviceStateThatCalled: 0,
36
- DeviceStepThatCalled: 0,
37
- ParamArray: new Array(10).fill(0)
34
+ nextStepNum: 0,
35
+ deviceStateThatCalled: 0,
36
+ deviceStepThatCalled: 0,
37
+ paramArray: new Array(10).fill(0)
38
38
  };