@kuriousdesign/machine-sdk 1.0.91 → 1.0.97

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.
@@ -25,6 +25,22 @@ export interface MachineCfg {
25
25
  ethernetAdapterList: number[];
26
26
  }
27
27
  export declare const initialMachineCfg: MachineCfg;
28
+ export interface SettingsExpert {
29
+ overridesEnabled: boolean;
30
+ autoLogoutTime: number;
31
+ expertStaysLoggedIn: boolean;
32
+ dryCycle: boolean;
33
+ }
34
+ export declare const initialSettingsExpert: SettingsExpert;
35
+ export interface SettingsAllUsers {
36
+ placeholderBool: boolean;
37
+ }
38
+ export declare const initialSettingsAllUsers: SettingsAllUsers;
39
+ export interface Settings {
40
+ allUsers: SettingsAllUsers;
41
+ expert: SettingsExpert;
42
+ }
43
+ export declare const initialSettings: Settings;
28
44
  export interface Machine {
29
45
  estopCircuit_OK: boolean;
30
46
  estopCircuitDelayed_OK: boolean;
@@ -49,6 +65,7 @@ export interface Machine {
49
65
  currentTimeMs: number;
50
66
  activeUserId: number;
51
67
  activeRecipe: RecipeData;
68
+ settings: Settings;
52
69
  }
53
70
  export interface LogRecordData {
54
71
  list: DebugLogData[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initialMachine = exports.initialLogRecordData = exports.initialMachineCfg = exports.initialSystemFaultData = exports.initialFaultCodeData = void 0;
3
+ exports.initialMachine = exports.initialLogRecordData = exports.initialSettings = exports.initialSettingsAllUsers = exports.initialSettingsExpert = exports.initialMachineCfg = exports.initialSystemFaultData = exports.initialFaultCodeData = void 0;
4
4
  const _1 = require(".");
5
5
  const Part_1 = require("./Part");
6
6
  const GlobalConstants_1 = require("./GlobalConstants");
@@ -21,6 +21,21 @@ exports.initialMachineCfg = {
21
21
  apiOpcuaDeviceId: -1,
22
22
  ethernetAdapterList: [],
23
23
  };
24
+ exports.initialSettingsExpert = {
25
+ overridesEnabled: false,
26
+ autoLogoutTime: 15, // default to 15 minutes
27
+ //skipDeburrBottom: false,
28
+ //skipDeburrTop: false,
29
+ expertStaysLoggedIn: false,
30
+ dryCycle: false,
31
+ };
32
+ exports.initialSettingsAllUsers = {
33
+ placeholderBool: false,
34
+ };
35
+ exports.initialSettings = {
36
+ allUsers: { ...exports.initialSettingsAllUsers },
37
+ expert: { ...exports.initialSettingsExpert },
38
+ };
24
39
  exports.initialLogRecordData = {
25
40
  list: Array(GlobalConstants_1.GCs.NUM_ENTRIES_MACHINE_LOG).fill(null).map(() => ({ ..._1.initialDebugLogData })),
26
41
  lastIndex: 0,
@@ -50,4 +65,5 @@ exports.initialMachine = ({
50
65
  currentTimeMs: 0,
51
66
  activeUserId: 0,
52
67
  activeRecipe: { ..._1.initialRecipe },
68
+ settings: { ...exports.initialSettings },
53
69
  });
@@ -1,11 +1,11 @@
1
1
  export declare enum DeviceId {
2
- NONE = 0,
2
+ NONE = 0,// Represents no device selected or invalid state
3
3
  SYS = 1,
4
4
  HMI = 2,
5
5
  SFTY = 3,
6
6
  CON = 4,
7
7
  DIAG = 5,
8
- RC = 6,
8
+ UDP = 6,//Robot Controller
9
9
  ROB = 10,
10
10
  ABB = 11,
11
11
  EOAT = 12,
@@ -10,7 +10,8 @@ var DeviceId;
10
10
  DeviceId[DeviceId["SFTY"] = 3] = "SFTY";
11
11
  DeviceId[DeviceId["CON"] = 4] = "CON";
12
12
  DeviceId[DeviceId["DIAG"] = 5] = "DIAG";
13
- DeviceId[DeviceId["RC"] = 6] = "RC";
13
+ DeviceId[DeviceId["UDP"] = 6] = "UDP";
14
+ // 0 - 9 ARE RESERVED FOR SYSTEM LEVEL STUFF
14
15
  DeviceId[DeviceId["ROB"] = 10] = "ROB";
15
16
  DeviceId[DeviceId["ABB"] = 11] = "ABB";
16
17
  DeviceId[DeviceId["EOAT"] = 12] = "EOAT";
@@ -64,7 +65,7 @@ function deviceIdToString(deviceId) {
64
65
  case DeviceId.SFTY: return "SFTY";
65
66
  case DeviceId.CON: return "CON";
66
67
  case DeviceId.DIAG: return "DIAG";
67
- case DeviceId.RC: return "RC";
68
+ case DeviceId.UDP: return "UDP";
68
69
  case DeviceId.ROB: return "ROB";
69
70
  case DeviceId.ABB: return "ABB";
70
71
  case DeviceId.EOAT: return "EOAT";
@@ -25,6 +25,7 @@ export declare const MachineTags: {
25
25
  ethercatMaster_OK: string;
26
26
  ethercatSlaves_OK: string;
27
27
  currentTimeMs: string;
28
+ settings: string;
28
29
  };
29
30
  export declare const DeviceTags: {
30
31
  Cfg: string;
@@ -45,6 +45,7 @@ exports.MachineTags = {
45
45
  ethercatMaster_OK: 'EthercatMaster_OK',
46
46
  ethercatSlaves_OK: 'EthercatSlaves_OK',
47
47
  currentTimeMs: 'CurrentTimeMs',
48
+ settings: 'Settings',
48
49
  };
49
50
  exports.DeviceTags = {
50
51
  Cfg: 'Cfg',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.91",
3
+ "version": "1.0.97",
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",
@@ -68,6 +68,45 @@ export const initialMachineCfg: MachineCfg = {
68
68
  ethernetAdapterList: [],
69
69
  };
70
70
 
71
+
72
+
73
+ export interface SettingsExpert {
74
+ overridesEnabled: boolean;
75
+ autoLogoutTime: number; // expert user will be automatically logged-out after this time
76
+ //skipDeburrBottom: boolean; // skip deburr bottom
77
+ //skipDeburrTop: boolean; // skip deburr top
78
+ expertStaysLoggedIn: boolean;
79
+ dryCycle: boolean; // when true, this will run the machine through the cycle without dispensing or curing to allow for testing and setup
80
+ }
81
+
82
+ export const initialSettingsExpert: SettingsExpert = {
83
+ overridesEnabled: false,
84
+ autoLogoutTime: 15, // default to 15 minutes
85
+ //skipDeburrBottom: false,
86
+ //skipDeburrTop: false,
87
+ expertStaysLoggedIn: false,
88
+ dryCycle: false,
89
+ };
90
+
91
+
92
+
93
+ export interface SettingsAllUsers {
94
+ placeholderBool: boolean;
95
+ }
96
+ export const initialSettingsAllUsers: SettingsAllUsers = {
97
+ placeholderBool: false,
98
+ };
99
+
100
+ export interface Settings {
101
+ allUsers: SettingsAllUsers;
102
+ expert: SettingsExpert;
103
+ }
104
+
105
+ export const initialSettings: Settings = {
106
+ allUsers: { ...initialSettingsAllUsers },
107
+ expert: { ...initialSettingsExpert },
108
+ };
109
+
71
110
  export interface Machine {
72
111
  estopCircuit_OK: boolean;
73
112
  estopCircuitDelayed_OK: boolean;
@@ -93,6 +132,7 @@ export interface Machine {
93
132
  currentTimeMs: number;
94
133
  activeUserId: number;
95
134
  activeRecipe: RecipeData;
135
+ settings: Settings;
96
136
  }
97
137
 
98
138
  // TYPE LogRecordData :
@@ -137,4 +177,5 @@ export const initialMachine: Machine = ({
137
177
  currentTimeMs: 0,
138
178
  activeUserId: 0,
139
179
  activeRecipe: { ...initialRecipe},
180
+ settings: { ...initialSettings },
140
181
  });
@@ -1,24 +1,25 @@
1
1
  export enum DeviceId {
2
- NONE = 0,
3
- SYS = 1,
4
- HMI = 2,
5
- SFTY = 3,
6
- CON = 4,
7
- DIAG = 5,
8
- RC = 6,
9
-
10
- ROB = 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
- POT = 20,
21
- SQUEE = 21,
2
+ NONE = 0, // Represents no device selected or invalid state
3
+ SYS = 1,
4
+ HMI = 2,
5
+ SFTY = 3,
6
+ CON = 4,
7
+ DIAG = 5,
8
+ UDP = 6, //Robot Controller
9
+ // 0 - 9 ARE RESERVED FOR SYSTEM LEVEL STUFF
10
+
11
+ ROB = 10,
12
+ ABB = 11,
13
+ EOAT = 12,
14
+ VIS = 13,
15
+ FIX_T = 14,
16
+ FIX_S = 15,
17
+ CLAMP_T = 16,
18
+ CLAMP_S = 17,
19
+ FLSB_T = 18,
20
+ FLSB_S = 19,
21
+ POT = 20,
22
+ SQUEE = 21,
22
23
  GRIP = 22,
23
24
  WEIGH = 23,
24
25
 
@@ -66,7 +67,7 @@ export function deviceIdToString(deviceId: DeviceId | number): string {
66
67
  case DeviceId.SFTY: return "SFTY";
67
68
  case DeviceId.CON: return "CON";
68
69
  case DeviceId.DIAG: return "DIAG";
69
- case DeviceId.RC: return "RC";
70
+ case DeviceId.UDP: return "UDP";
70
71
  case DeviceId.ROB: return "ROB";
71
72
  case DeviceId.ABB: return "ABB";
72
73
  case DeviceId.EOAT: return "EOAT";
@@ -30,6 +30,7 @@ export const MachineTags = {
30
30
  ethercatMaster_OK: 'EthercatMaster_OK',
31
31
  ethercatSlaves_OK: 'EthercatSlaves_OK',
32
32
  currentTimeMs: 'CurrentTimeMs',
33
+ settings: 'Settings',
33
34
  }
34
35
 
35
36
  export const DeviceTags = {