@kuriousdesign/machine-sdk 1.0.48 → 1.0.50
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 +3 -3
- package/dist/custom-types/Part.js +28 -43
- package/dist/custom-types/TaskQueue.d.ts +4 -3
- package/dist/custom-types/TaskQueue.js +23 -7
- package/dist/enums/DeviceId.d.ts +1 -0
- package/dist/enums/DeviceId.js +1 -0
- package/package.json +1 -1
- package/src/custom-types/Part.ts +27 -46
- package/src/custom-types/TaskQueue.ts +24 -7
- package/src/enums/DeviceId.ts +1 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PartStateDeprecated as PartStateDeprecated } from "../enums";
|
|
2
2
|
export declare enum PartLocationIds {
|
|
3
3
|
None = 0,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
LeftFixture_P1 = 1,
|
|
5
|
+
RightFixture_P9,
|
|
6
|
+
RobotGripper,
|
|
7
7
|
Lost
|
|
8
8
|
}
|
|
9
9
|
export declare function partLocationIdToString(locationId: PartLocationIds): string;
|
|
@@ -12,20 +12,35 @@ const GlobalConstants_1 = require("./GlobalConstants");
|
|
|
12
12
|
// LinerWeightKg:LREAL;
|
|
13
13
|
// END_STRUCT
|
|
14
14
|
// END_TYPE
|
|
15
|
-
// TYPE
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
// //RecipeData:PartRecipeData;
|
|
24
|
-
// END_STRUCT
|
|
15
|
+
// TYPE PartLocationIds :
|
|
16
|
+
// (
|
|
17
|
+
// None:=0,
|
|
18
|
+
// LeftFixture_P1 :=1,
|
|
19
|
+
// RightFixture_P9:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
20
|
+
// RobotGripper:=RightFixture_P9 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
21
|
+
// Lost:=RobotGripper + 1
|
|
22
|
+
// );
|
|
25
23
|
// END_TYPE
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
var PartLocationIds;
|
|
25
|
+
(function (PartLocationIds) {
|
|
26
|
+
PartLocationIds[PartLocationIds["None"] = 0] = "None";
|
|
27
|
+
PartLocationIds[PartLocationIds["LeftFixture_P1"] = 1] = "LeftFixture_P1";
|
|
28
|
+
PartLocationIds[PartLocationIds["RightFixture_P9"] = PartLocationIds.LeftFixture_P1 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "RightFixture_P9";
|
|
29
|
+
PartLocationIds[PartLocationIds["RobotGripper"] = PartLocationIds.RightFixture_P9 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "RobotGripper";
|
|
30
|
+
PartLocationIds[PartLocationIds["Lost"] = PartLocationIds.RobotGripper + 1] = "Lost";
|
|
31
|
+
})(PartLocationIds || (exports.PartLocationIds = PartLocationIds = {}));
|
|
32
|
+
;
|
|
33
|
+
function partLocationIdToString(locationId) {
|
|
34
|
+
switch (locationId) {
|
|
35
|
+
case PartLocationIds.None: return "None";
|
|
36
|
+
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
37
|
+
case PartLocationIds.LeftFixture_P1: return "Left Fixture - P" + locationId.toString();
|
|
38
|
+
case PartLocationIds.RightFixture_P9: return "Right Fixture - P" + locationId.toString();
|
|
39
|
+
case PartLocationIds.Lost: return "Lost";
|
|
40
|
+
default:
|
|
41
|
+
return "Unknown";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
29
44
|
// TYPE PartStates :
|
|
30
45
|
// (
|
|
31
46
|
// Empty:=0,//no part present
|
|
@@ -45,36 +60,6 @@ const GlobalConstants_1 = require("./GlobalConstants");
|
|
|
45
60
|
// Passed:=1000 //ProessingDone, back in fixture and waiting to be unloaded
|
|
46
61
|
// );
|
|
47
62
|
// END_TYPE
|
|
48
|
-
// {attribute 'qualified_only'}
|
|
49
|
-
// //{attribute 'strict'}
|
|
50
|
-
// TYPE PartLocationIds :
|
|
51
|
-
// (
|
|
52
|
-
// None:=0,
|
|
53
|
-
// RobotGripper:=1,
|
|
54
|
-
// LeftFixture_P1 :=2,
|
|
55
|
-
// RightFixture_P1:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
56
|
-
// Lost:=RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
57
|
-
// );
|
|
58
|
-
// END_TYPE
|
|
59
|
-
var PartLocationIds;
|
|
60
|
-
(function (PartLocationIds) {
|
|
61
|
-
PartLocationIds[PartLocationIds["None"] = 0] = "None";
|
|
62
|
-
PartLocationIds[PartLocationIds["RobotGripper"] = 1] = "RobotGripper";
|
|
63
|
-
PartLocationIds[PartLocationIds["LeftFixture_P1"] = 2] = "LeftFixture_P1";
|
|
64
|
-
PartLocationIds[PartLocationIds["RightFixture_P1"] = PartLocationIds.LeftFixture_P1 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "RightFixture_P1";
|
|
65
|
-
PartLocationIds[PartLocationIds["Lost"] = PartLocationIds.RightFixture_P1 + GlobalConstants_1.GCs.NUM_PARTS_PER_FIXTURE] = "Lost";
|
|
66
|
-
})(PartLocationIds || (exports.PartLocationIds = PartLocationIds = {}));
|
|
67
|
-
;
|
|
68
|
-
function partLocationIdToString(locationId) {
|
|
69
|
-
switch (locationId) {
|
|
70
|
-
case PartLocationIds.None: return "None";
|
|
71
|
-
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
72
|
-
case PartLocationIds.LeftFixture_P1: return "Left Fixture P1";
|
|
73
|
-
case PartLocationIds.RightFixture_P1: return "Right Fixture P1";
|
|
74
|
-
case PartLocationIds.Lost: return "Lost";
|
|
75
|
-
default: return "Unknown";
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
63
|
var PartStates;
|
|
79
64
|
(function (PartStates) {
|
|
80
65
|
PartStates[PartStates["Empty"] = 0] = "Empty";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export declare enum Priorities {
|
|
2
2
|
NONE = 0,// do not remove or change this
|
|
3
3
|
LOAD_PARTS = 2,
|
|
4
|
-
|
|
4
|
+
START_POT_PRESSURIZATION = 10,
|
|
5
5
|
PRE_WEIGH_TUBES = 20,
|
|
6
6
|
APPLY_LINER = 30,
|
|
7
7
|
PHOTOGRAPH_TUBES = 40,
|
|
8
8
|
POST_WEIGH_TUBES = 50,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
START_POT_DEPRESSURIZATION = 60,
|
|
10
|
+
WAIT_IMAGE_INSPECTION = 70,
|
|
11
|
+
UNLOAD_PARTS = 80
|
|
11
12
|
}
|
|
12
13
|
export declare function priorityToString(priority: Priorities): string;
|
|
13
14
|
export interface TaskData {
|
|
@@ -3,17 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initialTaskQueue = exports.initialTaskData = exports.Priorities = void 0;
|
|
4
4
|
exports.priorityToString = priorityToString;
|
|
5
5
|
const BaseDevice_1 = require("./BaseDevice");
|
|
6
|
+
// TYPE Priorities :
|
|
7
|
+
// (
|
|
8
|
+
// NONE := 0, //do not remove or change this
|
|
9
|
+
// RECOVER_ROBOT :=1,
|
|
10
|
+
// LOAD_PARTS:=2,
|
|
11
|
+
// START_POT_PRESSURIZATION:=10, //param0: explain what the parameters do here, param1: continue to explain each of them
|
|
12
|
+
// PRE_WEIGH_TUBES:=20, //no params:
|
|
13
|
+
// APPLY_LINER :=30,
|
|
14
|
+
// PHOTOGRAPH_TUBES :=40,
|
|
15
|
+
// POST_WEIGH_TUBES:=50,
|
|
16
|
+
// START_POT_DEPRESSURIZATION:=60,
|
|
17
|
+
// WAIT_IMAGE_INSPECTION:=70,
|
|
18
|
+
// UNLOAD_PARTS:=80
|
|
19
|
+
// );
|
|
20
|
+
// END_TYPE
|
|
6
21
|
var Priorities;
|
|
7
22
|
(function (Priorities) {
|
|
8
23
|
Priorities[Priorities["NONE"] = 0] = "NONE";
|
|
9
24
|
Priorities[Priorities["LOAD_PARTS"] = 2] = "LOAD_PARTS";
|
|
10
|
-
Priorities[Priorities["
|
|
25
|
+
Priorities[Priorities["START_POT_PRESSURIZATION"] = 10] = "START_POT_PRESSURIZATION";
|
|
11
26
|
Priorities[Priorities["PRE_WEIGH_TUBES"] = 20] = "PRE_WEIGH_TUBES";
|
|
12
27
|
Priorities[Priorities["APPLY_LINER"] = 30] = "APPLY_LINER";
|
|
13
28
|
Priorities[Priorities["PHOTOGRAPH_TUBES"] = 40] = "PHOTOGRAPH_TUBES";
|
|
14
29
|
Priorities[Priorities["POST_WEIGH_TUBES"] = 50] = "POST_WEIGH_TUBES";
|
|
15
|
-
Priorities[Priorities["
|
|
16
|
-
Priorities[Priorities["
|
|
30
|
+
Priorities[Priorities["START_POT_DEPRESSURIZATION"] = 60] = "START_POT_DEPRESSURIZATION";
|
|
31
|
+
Priorities[Priorities["WAIT_IMAGE_INSPECTION"] = 70] = "WAIT_IMAGE_INSPECTION";
|
|
32
|
+
Priorities[Priorities["UNLOAD_PARTS"] = 80] = "UNLOAD_PARTS";
|
|
17
33
|
})(Priorities || (exports.Priorities = Priorities = {}));
|
|
18
34
|
function priorityToString(priority) {
|
|
19
35
|
switch (priority) {
|
|
@@ -21,8 +37,8 @@ function priorityToString(priority) {
|
|
|
21
37
|
return "None";
|
|
22
38
|
case Priorities.LOAD_PARTS:
|
|
23
39
|
return "Load Parts";
|
|
24
|
-
case Priorities.
|
|
25
|
-
return "Start
|
|
40
|
+
case Priorities.START_POT_PRESSURIZATION:
|
|
41
|
+
return "Start Pot Pressurization";
|
|
26
42
|
case Priorities.PRE_WEIGH_TUBES:
|
|
27
43
|
return "Pre Weigh Tubes";
|
|
28
44
|
case Priorities.APPLY_LINER:
|
|
@@ -31,8 +47,8 @@ function priorityToString(priority) {
|
|
|
31
47
|
return "Photograph Tubes";
|
|
32
48
|
case Priorities.POST_WEIGH_TUBES:
|
|
33
49
|
return "Post Weigh Tubes";
|
|
34
|
-
case Priorities.
|
|
35
|
-
return "
|
|
50
|
+
case Priorities.START_POT_DEPRESSURIZATION:
|
|
51
|
+
return "Start Pot Depressurization";
|
|
36
52
|
case Priorities.UNLOAD_PARTS:
|
|
37
53
|
return "Unload Parts";
|
|
38
54
|
default:
|
package/dist/enums/DeviceId.d.ts
CHANGED
package/dist/enums/DeviceId.js
CHANGED
|
@@ -20,6 +20,7 @@ var DeviceId;
|
|
|
20
20
|
DeviceId[DeviceId["CLAMP_S"] = 17] = "CLAMP_S";
|
|
21
21
|
DeviceId[DeviceId["FLSB_T"] = 18] = "FLSB_T";
|
|
22
22
|
DeviceId[DeviceId["FLSB_S"] = 19] = "FLSB_S";
|
|
23
|
+
DeviceId[DeviceId["POT"] = 20] = "POT";
|
|
23
24
|
DeviceId[DeviceId["LNR"] = 21] = "LNR";
|
|
24
25
|
DeviceId[DeviceId["GCNV1"] = 22] = "GCNV1";
|
|
25
26
|
DeviceId[DeviceId["GCNV2"] = 23] = "GCNV2";
|
package/package.json
CHANGED
package/src/custom-types/Part.ts
CHANGED
|
@@ -13,22 +13,35 @@ import { GCs } from "./GlobalConstants";
|
|
|
13
13
|
// END_TYPE
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
// TYPE
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
// //RecipeData:PartRecipeData;
|
|
26
|
-
// END_STRUCT
|
|
16
|
+
// TYPE PartLocationIds :
|
|
17
|
+
// (
|
|
18
|
+
// None:=0,
|
|
19
|
+
// LeftFixture_P1 :=1,
|
|
20
|
+
// RightFixture_P9:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
21
|
+
// RobotGripper:=RightFixture_P9 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
22
|
+
// Lost:=RobotGripper + 1
|
|
23
|
+
// );
|
|
27
24
|
// END_TYPE
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export enum PartLocationIds {
|
|
27
|
+
None = 0,
|
|
28
|
+
LeftFixture_P1 = 1,
|
|
29
|
+
RightFixture_P9 = LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
30
|
+
RobotGripper = RightFixture_P9 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
31
|
+
Lost = RobotGripper + 1
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export function partLocationIdToString(locationId: PartLocationIds): string {
|
|
35
|
+
switch (locationId) {
|
|
36
|
+
case PartLocationIds.None: return "None";
|
|
37
|
+
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
38
|
+
case PartLocationIds.LeftFixture_P1: return "Left Fixture - P" + locationId.toString();
|
|
39
|
+
case PartLocationIds.RightFixture_P9: return "Right Fixture - P" + locationId.toString();
|
|
40
|
+
case PartLocationIds.Lost: return "Lost";
|
|
41
|
+
default:
|
|
42
|
+
return "Unknown";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
32
45
|
// TYPE PartStates :
|
|
33
46
|
// (
|
|
34
47
|
// Empty:=0,//no part present
|
|
@@ -58,38 +71,6 @@ import { GCs } from "./GlobalConstants";
|
|
|
58
71
|
// );
|
|
59
72
|
// END_TYPE
|
|
60
73
|
|
|
61
|
-
|
|
62
|
-
// {attribute 'qualified_only'}
|
|
63
|
-
// //{attribute 'strict'}
|
|
64
|
-
// TYPE PartLocationIds :
|
|
65
|
-
// (
|
|
66
|
-
// None:=0,
|
|
67
|
-
// RobotGripper:=1,
|
|
68
|
-
// LeftFixture_P1 :=2,
|
|
69
|
-
// RightFixture_P1:=LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
70
|
-
// Lost:=RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
71
|
-
// );
|
|
72
|
-
// END_TYPE
|
|
73
|
-
|
|
74
|
-
export enum PartLocationIds {
|
|
75
|
-
None = 0,
|
|
76
|
-
RobotGripper = 1,
|
|
77
|
-
LeftFixture_P1 = 2,
|
|
78
|
-
RightFixture_P1 = LeftFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE,
|
|
79
|
-
Lost = RightFixture_P1 + GCs.NUM_PARTS_PER_FIXTURE
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export function partLocationIdToString(locationId: PartLocationIds): string {
|
|
83
|
-
switch (locationId) {
|
|
84
|
-
case PartLocationIds.None: return "None";
|
|
85
|
-
case PartLocationIds.RobotGripper: return "Robot Gripper";
|
|
86
|
-
case PartLocationIds.LeftFixture_P1: return "Left Fixture P1";
|
|
87
|
-
case PartLocationIds.RightFixture_P1: return "Right Fixture P1";
|
|
88
|
-
case PartLocationIds.Lost: return "Lost";
|
|
89
|
-
default: return "Unknown";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
74
|
export enum PartStates {
|
|
94
75
|
Empty = 0,//no part present
|
|
95
76
|
//BadSensorEmpty = 1, //used if sensors give false positive
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
import { DeviceConstants } from "./BaseDevice";
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
// TYPE Priorities :
|
|
5
|
+
// (
|
|
6
|
+
// NONE := 0, //do not remove or change this
|
|
7
|
+
// RECOVER_ROBOT :=1,
|
|
8
|
+
// LOAD_PARTS:=2,
|
|
9
|
+
// START_POT_PRESSURIZATION:=10, //param0: explain what the parameters do here, param1: continue to explain each of them
|
|
10
|
+
// PRE_WEIGH_TUBES:=20, //no params:
|
|
11
|
+
// APPLY_LINER :=30,
|
|
12
|
+
// PHOTOGRAPH_TUBES :=40,
|
|
13
|
+
// POST_WEIGH_TUBES:=50,
|
|
14
|
+
// START_POT_DEPRESSURIZATION:=60,
|
|
15
|
+
// WAIT_IMAGE_INSPECTION:=70,
|
|
16
|
+
// UNLOAD_PARTS:=80
|
|
17
|
+
// );
|
|
18
|
+
// END_TYPE
|
|
3
19
|
export enum Priorities {
|
|
4
20
|
NONE = 0, // do not remove or change this
|
|
5
21
|
LOAD_PARTS = 2,
|
|
6
|
-
|
|
22
|
+
START_POT_PRESSURIZATION = 10,
|
|
7
23
|
PRE_WEIGH_TUBES = 20,
|
|
8
24
|
APPLY_LINER = 30,
|
|
9
25
|
PHOTOGRAPH_TUBES = 40,
|
|
10
26
|
POST_WEIGH_TUBES = 50,
|
|
11
|
-
|
|
12
|
-
|
|
27
|
+
START_POT_DEPRESSURIZATION = 60,
|
|
28
|
+
WAIT_IMAGE_INSPECTION = 70,
|
|
29
|
+
UNLOAD_PARTS = 80
|
|
13
30
|
}
|
|
14
31
|
|
|
15
32
|
export function priorityToString(priority: Priorities): string {
|
|
@@ -18,8 +35,8 @@ export function priorityToString(priority: Priorities): string {
|
|
|
18
35
|
return "None";
|
|
19
36
|
case Priorities.LOAD_PARTS:
|
|
20
37
|
return "Load Parts";
|
|
21
|
-
case Priorities.
|
|
22
|
-
return "Start
|
|
38
|
+
case Priorities.START_POT_PRESSURIZATION:
|
|
39
|
+
return "Start Pot Pressurization";
|
|
23
40
|
case Priorities.PRE_WEIGH_TUBES:
|
|
24
41
|
return "Pre Weigh Tubes";
|
|
25
42
|
case Priorities.APPLY_LINER:
|
|
@@ -28,8 +45,8 @@ export function priorityToString(priority: Priorities): string {
|
|
|
28
45
|
return "Photograph Tubes";
|
|
29
46
|
case Priorities.POST_WEIGH_TUBES:
|
|
30
47
|
return "Post Weigh Tubes";
|
|
31
|
-
case Priorities.
|
|
32
|
-
return "
|
|
48
|
+
case Priorities.START_POT_DEPRESSURIZATION:
|
|
49
|
+
return "Start Pot Depressurization";
|
|
33
50
|
case Priorities.UNLOAD_PARTS:
|
|
34
51
|
return "Unload Parts";
|
|
35
52
|
default:
|