@kuriousdesign/machine-sdk 1.0.47 → 1.0.49
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialApiOpcuaData = exports.initialApiOpcuaReqData = void 0;
|
|
3
|
+
exports.ApiReqRespStates = exports.initialApiOpcuaData = exports.initialApiOpcuaReqData = void 0;
|
|
4
4
|
exports.apiReqRespStateToString = apiReqRespStateToString;
|
|
5
5
|
const Actions_1 = require("./Actions");
|
|
6
6
|
exports.initialApiOpcuaReqData = {
|
|
@@ -19,6 +19,18 @@ exports.initialApiOpcuaData = {
|
|
|
19
19
|
internalReq: {},
|
|
20
20
|
internalResp: {}
|
|
21
21
|
};
|
|
22
|
+
var ApiReqRespStates;
|
|
23
|
+
(function (ApiReqRespStates) {
|
|
24
|
+
ApiReqRespStates[ApiReqRespStates["INACTIVE"] = 0] = "INACTIVE";
|
|
25
|
+
ApiReqRespStates[ApiReqRespStates["WRITING"] = 10] = "WRITING";
|
|
26
|
+
ApiReqRespStates[ApiReqRespStates["REQUEST_READY"] = 20] = "REQUEST_READY";
|
|
27
|
+
ApiReqRespStates[ApiReqRespStates["REJECTED_INVALID_CHECKSUM"] = 30] = "REJECTED_INVALID_CHECKSUM";
|
|
28
|
+
ApiReqRespStates[ApiReqRespStates["REJECTED_ACTION_NOT_ACCEPTED"] = 40] = "REJECTED_ACTION_NOT_ACCEPTED";
|
|
29
|
+
ApiReqRespStates[ApiReqRespStates["REJECTED_INVALID_SENDERID"] = 50] = "REJECTED_INVALID_SENDERID";
|
|
30
|
+
ApiReqRespStates[ApiReqRespStates["ACCEPTED"] = 1000] = "ACCEPTED";
|
|
31
|
+
// ERROR = 911,
|
|
32
|
+
// DONE = 1000
|
|
33
|
+
})(ApiReqRespStates || (exports.ApiReqRespStates = ApiReqRespStates = {}));
|
|
22
34
|
function apiReqRespStateToString(state) {
|
|
23
35
|
switch (state) {
|
|
24
36
|
case ApiReqRespStates.INACTIVE:
|
|
@@ -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";
|
package/package.json
CHANGED
package/src/custom-types/Part.ts
CHANGED
|
@@ -13,22 +13,36 @@ 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
|
+
}
|
|
45
|
+
|
|
32
46
|
// TYPE PartStates :
|
|
33
47
|
// (
|
|
34
48
|
// Empty:=0,//no part present
|
|
@@ -58,38 +72,6 @@ import { GCs } from "./GlobalConstants";
|
|
|
58
72
|
// );
|
|
59
73
|
// END_TYPE
|
|
60
74
|
|
|
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
75
|
export enum PartStates {
|
|
94
76
|
Empty = 0,//no part present
|
|
95
77
|
//BadSensorEmpty = 1, //used if sensors give false positive
|