@kuriousdesign/machine-sdk 1.0.87 → 1.0.89

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.
@@ -9,6 +9,7 @@ export declare enum DeviceTypes {
9
9
  Robot = 8,
10
10
  Vision = 10,
11
11
  TwoPos = 11,
12
- TwoPosGantry = 12
12
+ TwoPosGantry = 12,
13
+ ExtService = 13
13
14
  }
14
15
  export declare function deviceTypeToString(deviceType: DeviceTypes): string;
@@ -32,6 +32,7 @@ var DeviceTypes;
32
32
  DeviceTypes[DeviceTypes["Vision"] = 10] = "Vision";
33
33
  DeviceTypes[DeviceTypes["TwoPos"] = 11] = "TwoPos";
34
34
  DeviceTypes[DeviceTypes["TwoPosGantry"] = 12] = "TwoPosGantry";
35
+ DeviceTypes[DeviceTypes["ExtService"] = 13] = "ExtService";
35
36
  })(DeviceTypes || (exports.DeviceTypes = DeviceTypes = {}));
36
37
  function deviceTypeToString(deviceType) {
37
38
  switch (deviceType) {
@@ -56,6 +57,9 @@ function deviceTypeToString(deviceType) {
56
57
  case DeviceTypes.TwoPos:
57
58
  return 'Two Position';
58
59
  case DeviceTypes.TwoPosGantry:
60
+ return 'Two Position Gantry';
61
+ case DeviceTypes.ExtService:
62
+ return 'External Service';
59
63
  default:
60
64
  return 'Unknown';
61
65
  }
@@ -31,11 +31,24 @@ export interface PartData {
31
31
  currentLocation: number;
32
32
  inFixture: boolean;
33
33
  }
34
+ export declare enum PartValidationStates {
35
+ NONE = 0,
36
+ Scrapped_Generic = 1,
37
+ Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
38
+ Scrapped_Failed_Weight_TOO_LIGHT = 701,
39
+ Scrapped_Failed_Weight_TOO_HEAVY = 702,
40
+ Scrapped_Failed_Image_Review_GENERAL = 800,
41
+ Scrapped_Failed_Image_Review_GAPS_IN_SMEAR = 801,
42
+ Scrapped_Failed_Image_Review_BUBBLES = 802,
43
+ PASSED = 1000
44
+ }
34
45
  export interface PartValidationData {
35
- state: number;
46
+ valState: PartValidationStates;
47
+ statusMsg: string;
36
48
  preWeightKg: number;
37
49
  postWeightKg: number;
38
50
  linerWeightKg: number;
51
+ videoReviewSts: number;
39
52
  }
40
53
  export declare const initialPartValidationData: PartValidationData;
41
54
  export declare const initialPartData: PartData;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initialPartDataStatus = exports.initialPartData = exports.initialPartValidationData = exports.PartStates = exports.PartLocationIds = void 0;
3
+ exports.initialPartDataStatus = exports.initialPartData = exports.initialPartValidationData = exports.PartValidationStates = exports.PartStates = exports.PartLocationIds = void 0;
4
4
  exports.partLocationIdToString = partLocationIdToString;
5
5
  exports.partStateToString = partStateToString;
6
6
  const GlobalConstants_1 = require("./GlobalConstants");
@@ -96,11 +96,25 @@ function partStateToString(state) {
96
96
  case PartStates.Passed: return "Passed";
97
97
  }
98
98
  }
99
+ var PartValidationStates;
100
+ (function (PartValidationStates) {
101
+ PartValidationStates[PartValidationStates["NONE"] = 0] = "NONE";
102
+ PartValidationStates[PartValidationStates["Scrapped_Generic"] = 1] = "Scrapped_Generic";
103
+ PartValidationStates[PartValidationStates["Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED"] = 101] = "Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED";
104
+ PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_LIGHT"] = 701] = "Scrapped_Failed_Weight_TOO_LIGHT";
105
+ PartValidationStates[PartValidationStates["Scrapped_Failed_Weight_TOO_HEAVY"] = 702] = "Scrapped_Failed_Weight_TOO_HEAVY";
106
+ PartValidationStates[PartValidationStates["Scrapped_Failed_Image_Review_GENERAL"] = 800] = "Scrapped_Failed_Image_Review_GENERAL";
107
+ PartValidationStates[PartValidationStates["Scrapped_Failed_Image_Review_GAPS_IN_SMEAR"] = 801] = "Scrapped_Failed_Image_Review_GAPS_IN_SMEAR";
108
+ PartValidationStates[PartValidationStates["Scrapped_Failed_Image_Review_BUBBLES"] = 802] = "Scrapped_Failed_Image_Review_BUBBLES";
109
+ PartValidationStates[PartValidationStates["PASSED"] = 1000] = "PASSED";
110
+ })(PartValidationStates || (exports.PartValidationStates = PartValidationStates = {}));
99
111
  exports.initialPartValidationData = {
100
- state: -1,
101
- preWeightKg: -1,
102
- postWeightKg: -1,
103
- linerWeightKg: -1,
112
+ valState: PartValidationStates.NONE,
113
+ statusMsg: "",
114
+ preWeightKg: 0,
115
+ postWeightKg: 0,
116
+ linerWeightKg: 0,
117
+ videoReviewSts: 0,
104
118
  };
105
119
  exports.initialPartData = {
106
120
  processSts: PartStates.Empty,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.87",
3
+ "version": "1.0.89",
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",
@@ -29,7 +29,8 @@ export enum DeviceTypes {
29
29
  Robot = 8,
30
30
  Vision = 10,
31
31
  TwoPos = 11,
32
- TwoPosGantry = 12
32
+ TwoPosGantry = 12,
33
+ ExtService = 13
33
34
  }
34
35
 
35
36
  export function deviceTypeToString(deviceType: DeviceTypes): string {
@@ -55,6 +56,9 @@ export function deviceTypeToString(deviceType: DeviceTypes): string {
55
56
  case DeviceTypes.TwoPos:
56
57
  return 'Two Position';
57
58
  case DeviceTypes.TwoPosGantry:
59
+ return 'Two Position Gantry';
60
+ case DeviceTypes.ExtService:
61
+ return 'External Service';
58
62
  default:
59
63
  return 'Unknown';
60
64
  }
@@ -116,18 +116,34 @@ export interface PartData {
116
116
  inFixture: boolean; // CurrentLocation = FixtureLocationWhenLoaded
117
117
  }
118
118
 
119
+ export enum PartValidationStates {
120
+ NONE = 0,
121
+ Scrapped_Generic = 1,
122
+ Scrapped_LINER_APPLICATION_STARTED_BUT_NOT_FINISHED = 101,
123
+ Scrapped_Failed_Weight_TOO_LIGHT = 701,
124
+ Scrapped_Failed_Weight_TOO_HEAVY = 702,
125
+ Scrapped_Failed_Image_Review_GENERAL = 800,
126
+ Scrapped_Failed_Image_Review_GAPS_IN_SMEAR = 801,
127
+ Scrapped_Failed_Image_Review_BUBBLES = 802,
128
+ PASSED = 1000
129
+ }
130
+
119
131
  export interface PartValidationData {
120
- state: number; // PartStates enum
121
- preWeightKg: number; // LREAL
122
- postWeightKg: number; // LREAL
123
- linerWeightKg: number; // LREAL
132
+ valState: PartValidationStates;
133
+ statusMsg: string;
134
+ preWeightKg: number;
135
+ postWeightKg: number;
136
+ linerWeightKg: number;
137
+ videoReviewSts: number; //0: NOT REVIEWED, 911: FAILED, 1000: PASSED
124
138
  }
125
139
 
126
140
  export const initialPartValidationData: PartValidationData = {
127
- state: -1,
128
- preWeightKg: -1,
129
- postWeightKg: -1,
130
- linerWeightKg: -1,
141
+ valState: PartValidationStates.NONE,
142
+ statusMsg: "",
143
+ preWeightKg: 0,
144
+ postWeightKg: 0,
145
+ linerWeightKg: 0,
146
+ videoReviewSts: 0,
131
147
  };
132
148
  export const initialPartData: PartData = {
133
149
  processSts: PartStates.Empty,
@@ -138,36 +154,6 @@ export const initialPartData: PartData = {
138
154
  inFixture: false,
139
155
  };
140
156
 
141
- // TYPE PartDataStatus :
142
- // STRUCT
143
- // Parts: ARRAY[0..GCs.PARTDATA_COUNT-1] OF PartData; //uses PartLocationIds, but lost parts get added to the end of known locations
144
- // AllStationsAreEmpty:BOOL;
145
- // RawShelfIsEmpty:BOOL;
146
- // DoneShelfIsEmpty:BOOL;
147
- // DoneShelfIsFull:BOOL;
148
- // DoneShelfSpacesLeftCnt:INT;
149
- // RawShelfPartsLeftCnt:INT;
150
- // AllFixturesAreEmpty:BOOL;
151
- // LeftFixtureIsEmpty:BOOL;
152
- // RightFixtureIsEmpty:BOOL;
153
-
154
- // RobotIsEmpty:BOOL;
155
- // RobotHasNoPostOpParts:BOOL; //robot isn't holding any parts that are machined or washing/dryed or finished
156
- // RobotHasMachinedParts:BOOL; //robot is holding at least one machined part
157
- // RobotHasOnePreTopDeburring:BOOL;
158
- // RobotHasOnePreMachining:BOOL;
159
- // RobotHasTwoPreMachining:BOOL;
160
- // RobotHasOneRaw:BOOL;
161
-
162
- // OneOrMoreRejectPartsInCell:BOOL;// there is a reject part in the robot, preop OR post op (doesn't look at cnc)
163
- // OneOrMoreRejectPartsInRobot:BOOL;
164
-
165
- // RobotHasOneFinishedPart:BOOL;
166
- // FinishedCnt:INT;//amount of finished parts either in post op or in robot
167
- // ActiveCnt:INT;//how many active parts are in the cell, cnc or robot (does not include raw or done rack)
168
- // BatchCntFlag:BOOL; //prevent more parts from being picked by raw
169
- // END_STRUCT
170
- // END_TYPE
171
157
  export interface PartDataStatus {
172
158
  parts: PartData[];
173
159
  allStationsAreEmpty: boolean;