@kuriousdesign/machine-sdk 1.0.107 → 1.0.109

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.
@@ -14,11 +14,14 @@ export declare enum PartStates {
14
14
  StartedPreWeighing = 29,
15
15
  PreWeighed = 30,
16
16
  StartedApplying = 31,
17
- Applied = 40,
17
+ LinerApplied = 40,
18
+ StartedLinerBrushing = 41,
19
+ LinerBrushed = 50,
18
20
  StartedPhotographing = 61,
19
21
  Photographed = 70,
20
22
  StartedPostWeighing = 71,
21
23
  PostWeighed = 80,
24
+ Scrapped = 900,
22
25
  Failed = 911,
23
26
  Passed = 1000
24
27
  }
@@ -35,6 +38,7 @@ export declare enum PartValidationStates {
35
38
  NONE = 0,
36
39
  Scrapped_Generic = 1,
37
40
  Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
41
+ Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED = 102,
38
42
  Scrapped_Failed_Weight_TOO_LIGHT = 701,
39
43
  Scrapped_Failed_Weight_TOO_HEAVY = 702,
40
44
  Scrapped_Failed_Image_Review_GENERAL = 800,
@@ -43,12 +47,13 @@ export declare enum PartValidationStates {
43
47
  PASSED = 1000
44
48
  }
45
49
  export interface PartValidationData {
46
- valState: PartValidationStates;
50
+ weightSts: PartValidationStates;
51
+ visionSts: PartValidationStates;
52
+ timestampVision_sec: number;
47
53
  statusMsg: string;
48
54
  preWeightKg: number;
49
55
  postWeightKg: number;
50
56
  linerWeightKg: number;
51
- videoReviewSts: number;
52
57
  }
53
58
  export declare const initialPartValidationData: PartValidationData;
54
59
  export declare const initialPartData: PartData;
@@ -41,42 +41,24 @@ function partLocationIdToString(locationId) {
41
41
  return "Unknown";
42
42
  }
43
43
  }
44
- // TYPE PartStates :
45
- // (
46
- // Empty:=0,//no part present
47
- // //BadSensorEmpty:=1, //used if sensors give false positive
48
- // UnvalidatedRaw:=10, //used if registered by sensor, but not approved by operator
49
- // Raw:=20,
50
- // //BadSensorRaw:=21, //used if loaded by sensor didn't work
51
- // StartedPreWeighing:=29,
52
- // PreWeighed:=30,
53
- // StartedApplying:=31,
54
- // Applied:=40,
55
- // StartedPhotographing:=61,
56
- // Photographed:=70,
57
- // StartedPostWeighing:=71,
58
- // PostWeighed:=80,
59
- // Failed:=911,
60
- // Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
61
- // );
62
- // END_TYPE
63
44
  var PartStates;
64
45
  (function (PartStates) {
65
46
  PartStates[PartStates["Empty"] = 0] = "Empty";
66
- //BadSensorEmpty = 1, //used if sensors give false positive
67
47
  PartStates[PartStates["UnvalidatedRaw"] = 10] = "UnvalidatedRaw";
68
48
  PartStates[PartStates["Raw"] = 20] = "Raw";
69
- //BadSensorRaw = 21, //used if loaded by sensor didn't work
70
49
  PartStates[PartStates["StartedPreWeighing"] = 29] = "StartedPreWeighing";
71
50
  PartStates[PartStates["PreWeighed"] = 30] = "PreWeighed";
72
51
  PartStates[PartStates["StartedApplying"] = 31] = "StartedApplying";
73
- PartStates[PartStates["Applied"] = 40] = "Applied";
52
+ PartStates[PartStates["LinerApplied"] = 40] = "LinerApplied";
53
+ PartStates[PartStates["StartedLinerBrushing"] = 41] = "StartedLinerBrushing";
54
+ PartStates[PartStates["LinerBrushed"] = 50] = "LinerBrushed";
74
55
  PartStates[PartStates["StartedPhotographing"] = 61] = "StartedPhotographing";
75
56
  PartStates[PartStates["Photographed"] = 70] = "Photographed";
76
57
  PartStates[PartStates["StartedPostWeighing"] = 71] = "StartedPostWeighing";
77
58
  PartStates[PartStates["PostWeighed"] = 80] = "PostWeighed";
59
+ PartStates[PartStates["Scrapped"] = 900] = "Scrapped";
78
60
  PartStates[PartStates["Failed"] = 911] = "Failed";
79
- PartStates[PartStates["Passed"] = 1000] = "Passed"; //ProessingDone, back in fixture and waiting to be unloaded
61
+ PartStates[PartStates["Passed"] = 1000] = "Passed"; //ProessingDone, back in fixture and waiting to be unloaded
80
62
  })(PartStates || (exports.PartStates = PartStates = {}));
81
63
  ;
82
64
  function partStateToString(state) {
@@ -87,11 +69,14 @@ function partStateToString(state) {
87
69
  case PartStates.StartedPreWeighing: return "Started Pre-Weighing";
88
70
  case PartStates.PreWeighed: return "Pre-Weighed";
89
71
  case PartStates.StartedApplying: return "Started Applying";
90
- case PartStates.Applied: return "Applied";
72
+ case PartStates.LinerApplied: return "Liner Applied";
73
+ case PartStates.StartedLinerBrushing: return "Started Liner Brushing";
74
+ case PartStates.LinerBrushed: return "Liner Brushed";
91
75
  case PartStates.StartedPhotographing: return "Started Photographing";
92
76
  case PartStates.Photographed: return "Photographed";
93
77
  case PartStates.StartedPostWeighing: return "Started Post-Weighing";
94
78
  case PartStates.PostWeighed: return "Post-Weighed";
79
+ case PartStates.Scrapped: return "Scrapped";
95
80
  case PartStates.Failed: return "Failed";
96
81
  case PartStates.Passed: return "Passed";
97
82
  }
@@ -101,6 +86,7 @@ var PartValidationStates;
101
86
  PartValidationStates[PartValidationStates["NONE"] = 0] = "NONE";
102
87
  PartValidationStates[PartValidationStates["Scrapped_Generic"] = 1] = "Scrapped_Generic";
103
88
  PartValidationStates[PartValidationStates["Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED"] = 101] = "Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED";
89
+ PartValidationStates[PartValidationStates["Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED"] = 102] = "Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED";
104
90
  PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_LIGHT"] = 701] = "Scrapped_Failed_Weight_TOO_LIGHT";
105
91
  PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_HEAVY"] = 702] = "Scrapped_Failed_Weight_TOO_HEAVY";
106
92
  PartValidationStates[PartValidationStates["Scrapped_Failed_Image_Review_GENERAL"] = 800] = "Scrapped_Failed_Image_Review_GENERAL";
@@ -109,12 +95,13 @@ var PartValidationStates;
109
95
  PartValidationStates[PartValidationStates["PASSED"] = 1000] = "PASSED";
110
96
  })(PartValidationStates || (exports.PartValidationStates = PartValidationStates = {}));
111
97
  exports.initialPartValidationData = {
112
- valState: PartValidationStates.NONE,
98
+ weightSts: PartValidationStates.NONE,
99
+ visionSts: PartValidationStates.NONE,
100
+ timestampVision_sec: 0,
113
101
  statusMsg: "",
114
102
  preWeightKg: 0,
115
103
  postWeightKg: 0,
116
104
  linerWeightKg: 0,
117
- videoReviewSts: 0,
118
105
  };
119
106
  exports.initialPartData = {
120
107
  processSts: PartStates.Empty,
@@ -6,6 +6,7 @@ export declare enum DeviceId {
6
6
  CON = 4,
7
7
  DIAG = 5,
8
8
  UDP = 6,//Robot Controller
9
+ FEED = 7,
9
10
  ROB = 10,
10
11
  ABB = 11,
11
12
  EOAT = 12,
@@ -11,6 +11,7 @@ var DeviceId;
11
11
  DeviceId[DeviceId["CON"] = 4] = "CON";
12
12
  DeviceId[DeviceId["DIAG"] = 5] = "DIAG";
13
13
  DeviceId[DeviceId["UDP"] = 6] = "UDP";
14
+ DeviceId[DeviceId["FEED"] = 7] = "FEED";
14
15
  // 0 - 9 ARE RESERVED FOR SYSTEM LEVEL STUFF
15
16
  DeviceId[DeviceId["ROB"] = 10] = "ROB";
16
17
  DeviceId[DeviceId["ABB"] = 11] = "ABB";
@@ -66,6 +67,7 @@ function deviceIdToString(deviceId) {
66
67
  case DeviceId.CON: return "CON";
67
68
  case DeviceId.DIAG: return "DIAG";
68
69
  case DeviceId.UDP: return "UDP";
70
+ case DeviceId.FEED: return "FEED";
69
71
  case DeviceId.ROB: return "ROB";
70
72
  case DeviceId.ABB: return "ABB";
71
73
  case DeviceId.EOAT: return "EOAT";
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.107",
3
+ "version": "1.0.109",
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",
7
+ "engines": {
8
+ "node": ">=22.16.0 <23"
9
+ },
7
10
  "scripts": {
8
11
  "build": "tsc && copyfiles -u 1 \"styles/**/*\" dist/styles",
9
12
  "prepublishOnly": "npm run build",
@@ -42,51 +42,33 @@ export function partLocationIdToString(locationId: PartLocationIds): string {
42
42
  return "Unknown";
43
43
  }
44
44
  }
45
- // TYPE PartStates :
46
- // (
47
- // Empty:=0,//no part present
48
- // //BadSensorEmpty:=1, //used if sensors give false positive
49
-
50
- // UnvalidatedRaw:=10, //used if registered by sensor, but not approved by operator
51
-
52
- // Raw:=20,
53
- // //BadSensorRaw:=21, //used if loaded by sensor didn't work
54
-
55
- // StartedPreWeighing:=29,
56
- // PreWeighed:=30,
57
-
58
- // StartedApplying:=31,
59
- // Applied:=40,
60
-
61
- // StartedPhotographing:=61,
62
- // Photographed:=70,
63
-
64
- // StartedPostWeighing:=71,
65
- // PostWeighed:=80,
66
-
67
- // Failed:=911,
68
- // Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
69
-
70
-
71
- // );
72
- // END_TYPE
45
+
73
46
 
74
47
  export enum PartStates {
75
48
  Empty = 0,//no part present
76
- //BadSensorEmpty = 1, //used if sensors give false positive
77
49
  UnvalidatedRaw = 10, //used if registered by sensor, but not approved by operator
50
+
78
51
  Raw = 20,
79
- //BadSensorRaw = 21, //used if loaded by sensor didn't work
52
+
80
53
  StartedPreWeighing = 29,
81
54
  PreWeighed = 30,
55
+
82
56
  StartedApplying = 31,
83
- Applied = 40,
57
+ LinerApplied = 40,
58
+
59
+ StartedLinerBrushing = 41,
60
+ LinerBrushed = 50,
61
+
84
62
  StartedPhotographing = 61,
85
63
  Photographed = 70,
64
+
86
65
  StartedPostWeighing = 71,
87
66
  PostWeighed = 80,
67
+
68
+ Scrapped = 900,
88
69
  Failed = 911,
89
- Passed = 1000 //ProessingDone, back in fixture and waiting to be unloaded
70
+ Passed = 1000 //ProessingDone, back in fixture and waiting to be unloaded
71
+
90
72
  };
91
73
 
92
74
  export function partStateToString(state: PartStates): string {
@@ -97,11 +79,14 @@ export function partStateToString(state: PartStates): string {
97
79
  case PartStates.StartedPreWeighing: return "Started Pre-Weighing";
98
80
  case PartStates.PreWeighed: return "Pre-Weighed";
99
81
  case PartStates.StartedApplying: return "Started Applying";
100
- case PartStates.Applied: return "Applied";
82
+ case PartStates.LinerApplied: return "Liner Applied";
83
+ case PartStates.StartedLinerBrushing: return "Started Liner Brushing";
84
+ case PartStates.LinerBrushed: return "Liner Brushed";
101
85
  case PartStates.StartedPhotographing: return "Started Photographing";
102
86
  case PartStates.Photographed: return "Photographed";
103
87
  case PartStates.StartedPostWeighing: return "Started Post-Weighing";
104
88
  case PartStates.PostWeighed: return "Post-Weighed";
89
+ case PartStates.Scrapped: return "Scrapped";
105
90
  case PartStates.Failed: return "Failed";
106
91
  case PartStates.Passed: return "Passed";
107
92
  }
@@ -116,10 +101,13 @@ export interface PartData {
116
101
  inFixture: boolean; // CurrentLocation = FixtureLocationWhenLoaded
117
102
  }
118
103
 
104
+
105
+
119
106
  export enum PartValidationStates {
120
107
  NONE = 0,
121
108
  Scrapped_Generic = 1,
122
109
  Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
110
+ Scrapped_LINER_BRUSHING_STARTED_BUT_NOT_FINISHED = 102,
123
111
  Scrapped_Failed_Weight_TOO_LIGHT = 701,
124
112
  Scrapped_Failed_Weight_TOO_HEAVY = 702,
125
113
  Scrapped_Failed_Image_Review_GENERAL = 800,
@@ -128,22 +116,25 @@ export enum PartValidationStates {
128
116
  PASSED = 1000
129
117
  }
130
118
 
119
+
131
120
  export interface PartValidationData {
132
- valState: PartValidationStates;
121
+ weightSts: PartValidationStates; //use PartValidationStates
122
+ visionSts: PartValidationStates; //use PartValidationStates
123
+ timestampVision_sec: number;
133
124
  statusMsg: string;
134
125
  preWeightKg: number;
135
126
  postWeightKg: number;
136
127
  linerWeightKg: number;
137
- videoReviewSts: number; //0: NOT REVIEWED, 911: FAILED, 1000: PASSED
138
128
  }
139
129
 
140
130
  export const initialPartValidationData: PartValidationData = {
141
- valState: PartValidationStates.NONE,
131
+ weightSts: PartValidationStates.NONE,
132
+ visionSts: PartValidationStates.NONE,
133
+ timestampVision_sec: 0,
142
134
  statusMsg: "",
143
135
  preWeightKg: 0,
144
136
  postWeightKg: 0,
145
137
  linerWeightKg: 0,
146
- videoReviewSts: 0,
147
138
  };
148
139
  export const initialPartData: PartData = {
149
140
  processSts: PartStates.Empty,
@@ -6,6 +6,7 @@ export enum DeviceId {
6
6
  CON = 4,
7
7
  DIAG = 5,
8
8
  UDP = 6, //Robot Controller
9
+ FEED = 7,
9
10
  // 0 - 9 ARE RESERVED FOR SYSTEM LEVEL STUFF
10
11
 
11
12
  ROB = 10,
@@ -68,6 +69,7 @@ export function deviceIdToString(deviceId: DeviceId | number): string {
68
69
  case DeviceId.CON: return "CON";
69
70
  case DeviceId.DIAG: return "DIAG";
70
71
  case DeviceId.UDP: return "UDP";
72
+ case DeviceId.FEED: return "FEED";
71
73
  case DeviceId.ROB: return "ROB";
72
74
  case DeviceId.ABB: return "ABB";
73
75
  case DeviceId.EOAT: return "EOAT";