@kuriousdesign/machine-sdk 1.0.107 → 1.0.108
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/Part.d.ts +8 -3
- package/dist/custom-types/Part.js +13 -26
- package/package.json +1 -1
- package/src/custom-types/Part.ts +28 -37
|
@@ -14,11 +14,14 @@ export declare enum PartStates {
|
|
|
14
14
|
StartedPreWeighing = 29,
|
|
15
15
|
PreWeighed = 30,
|
|
16
16
|
StartedApplying = 31,
|
|
17
|
-
|
|
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
|
-
|
|
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["
|
|
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.
|
|
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
|
-
|
|
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,
|
package/package.json
CHANGED
package/src/custom-types/Part.ts
CHANGED
|
@@ -42,51 +42,33 @@ export function partLocationIdToString(locationId: PartLocationIds): string {
|
|
|
42
42
|
return "Unknown";
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
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
|
-
|
|
52
|
+
|
|
80
53
|
StartedPreWeighing = 29,
|
|
81
54
|
PreWeighed = 30,
|
|
55
|
+
|
|
82
56
|
StartedApplying = 31,
|
|
83
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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,
|