@kuriousdesign/machine-sdk 1.0.48 → 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,9 +1,9 @@
1
1
  import { PartStateDeprecated as PartStateDeprecated } from "../enums";
2
2
  export declare enum PartLocationIds {
3
3
  None = 0,
4
- RobotGripper = 1,
5
- LeftFixture_P1 = 2,
6
- RightFixture_P1,
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 PartData :
16
- // STRUCT
17
- // ProcessSts:INT;//PartStates enum
18
- // Validation:PartValidationData;
19
- // LoadedBadSensor:BOOL; //marks if loaded into system with bad part present sensor
20
- // FixtureLocationWhenLoaded:INT; //LocationIds enum, where this part was loaced
21
- // CurrentLocation:INT; //LocationIds enum, this is also the same as the partIndex of the Machine.PartData[partIndex]
22
- // InFixture:BOOL; //CurrentLocation = FixtureLocationWhenLoaded
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
- // {attribute 'qualified_only'}
27
- // {attribute 'strict'}
28
- // //Just subtract 5 from a discrete part state that, this corresponds to processing
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
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",
@@ -13,22 +13,36 @@ import { GCs } from "./GlobalConstants";
13
13
  // END_TYPE
14
14
 
15
15
 
16
- // TYPE PartData :
17
- // STRUCT
18
- // ProcessSts:INT;//PartStates enum
19
- // Validation:PartValidationData;
20
- // LoadedBadSensor:BOOL; //marks if loaded into system with bad part present sensor
21
- // FixtureLocationWhenLoaded:INT; //LocationIds enum, where this part was loaced
22
- // CurrentLocation:INT; //LocationIds enum, this is also the same as the partIndex of the Machine.PartData[partIndex]
23
- // InFixture:BOOL; //CurrentLocation = FixtureLocationWhenLoaded
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
- // {attribute 'qualified_only'}
30
- // {attribute 'strict'}
31
- // //Just subtract 5 from a discrete part state that, this corresponds to processing
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