@kuriousdesign/machine-sdk 1.0.78 → 1.0.80

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.
@@ -83,6 +83,7 @@ export interface Device {
83
83
  errors: DeviceFaultData;
84
84
  warnings: DeviceFaultData;
85
85
  registration: DeviceRegistration;
86
+ mutedChildrenArray: boolean[];
86
87
  cfg: DeviceCfg;
87
88
  execMethod: ProcessData;
88
89
  task: ProcessData;
@@ -95,6 +96,7 @@ export interface Device {
95
96
  inputs?: unknown;
96
97
  outputs?: unknown;
97
98
  }
99
+ export declare const initialMutedChildrenArray: boolean[];
98
100
  export declare const initialSts: unknown;
99
101
  export declare const initialDevice: Device;
100
102
  export interface DeviceLogData {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initialDevice = exports.initialSts = exports.initialDeviceStatus = exports.initialDeviceFaultData = exports.initialFaultData = exports.initialDeviceCfg = exports.initialDeviceRegistration = exports.initialDeviceLogData = exports.initialDebugLogData = void 0;
3
+ exports.initialDevice = exports.initialSts = exports.initialMutedChildrenArray = exports.initialDeviceStatus = exports.initialDeviceFaultData = exports.initialFaultData = exports.initialDeviceCfg = exports.initialDeviceRegistration = exports.initialDeviceLogData = exports.initialDebugLogData = void 0;
4
4
  const DeviceTypes_1 = require("./DeviceTypes");
5
5
  const Processes_1 = require("./Processes");
6
6
  const DeviceConstants_1 = require("./DeviceConstants");
@@ -76,12 +76,15 @@ exports.initialDeviceStatus = {
76
76
  commanderId: 0,
77
77
  recordingLogs: false
78
78
  };
79
+ // array of muted children, initialized to false of length DeviceConstants.DEVICE_CHILDREN_ARRAY_LEN
80
+ exports.initialMutedChildrenArray = new Array(DeviceConstants_1.DeviceConstants.DEVICE_CHILDREN_ARRAY_LEN).fill(false);
79
81
  exports.initialSts = null;
80
82
  exports.initialDevice = {
81
83
  is: exports.initialDeviceStatus,
82
84
  errors: exports.initialDeviceFaultData,
83
85
  warnings: exports.initialDeviceFaultData,
84
86
  registration: exports.initialDeviceRegistration,
87
+ mutedChildrenArray: exports.initialMutedChildrenArray,
85
88
  cfg: exports.initialDeviceCfg,
86
89
  connectionStatus: false,
87
90
  execMethod: Processes_1.initialProcessData,
@@ -22,24 +22,27 @@ export declare const exampleApplicatorSetpoints: ApplicatorSetpoint[];
22
22
  export declare const initialApplicatorSetpoints: ApplicatorSetpoint[];
23
23
  export interface RecipeData {
24
24
  index: number;
25
+ dbId: string;
25
26
  nickname: string;
27
+ linerPotPressure: number;
28
+ linerTypeString: string;
26
29
  tubeTypeId: number;
27
30
  tubeTypeString: string;
28
31
  tubeOuterDiameterMax: number;
29
32
  tubeHeightMax: number;
33
+ tubeMassKg: number;
30
34
  falseBottomStaysOpen: boolean;
31
- linerPotPressure: number;
32
- linerTypeString: string;
33
35
  applicatorSetpoints: ApplicatorSetpoint[];
34
- applicatorToolId: ApplicatorTools;
36
+ applicatorToolId: number;
35
37
  applicatorToolString: string;
38
+ applicatorCollisionPayloadOffset: number;
36
39
  cleanerId: number;
37
40
  cleanerString: string;
38
- weighingFingerId: WeighingFingers;
41
+ weighingFingerId: number;
39
42
  weighingFingerString: string;
40
- numCameras: number;
41
- cameraIds: number[];
42
- cameraSpeeds: number[];
43
+ cameraId: number;
44
+ cameraString: string;
45
+ cameraSpeed: number;
43
46
  }
44
47
  export declare enum CameraIds {
45
48
  NONE = 0,
@@ -133,10 +133,13 @@ exports.exampleRecipe = {
133
133
  nickname: "Example Recipe",
134
134
  linerTypeString: "CKU",
135
135
  linerPotPressure: 50,
136
+ dbId: "",
136
137
  tubeTypeId: TubeTypes.TYPE_1340_38,
137
138
  tubeTypeString: "1340-38",
138
139
  tubeOuterDiameterMax: 38.1,
139
140
  tubeHeightMax: 100, // example value in mm
141
+ tubeMassKg: 0.5,
142
+ applicatorCollisionPayloadOffset: 1.0,
140
143
  falseBottomStaysOpen: false,
141
144
  applicatorSetpoints: exports.exampleApplicatorSetpoints,
142
145
  applicatorToolId: ApplicatorTools.RED_37_INCH,
@@ -145,12 +148,14 @@ exports.exampleRecipe = {
145
148
  cleanerString: "Medium",
146
149
  weighingFingerId: WeighingFingers.RED_MEDIUM,
147
150
  weighingFingerString: "Red Medium",
148
- numCameras: 2,
149
- cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
150
- cameraSpeeds: [50, 75],
151
+ //numCameras: 2,
152
+ cameraId: CameraIds.CAMERA_1,
153
+ cameraString: "Camera 1",
154
+ cameraSpeed: 50,
151
155
  };
152
156
  exports.initialRecipe = {
153
157
  index: 0,
158
+ dbId: "",
154
159
  nickname: "",
155
160
  linerTypeString: "",
156
161
  tubeOuterDiameterMax: 0.0,
@@ -165,9 +170,12 @@ exports.initialRecipe = {
165
170
  cleanerString: "",
166
171
  weighingFingerId: WeighingFingers.NONE,
167
172
  weighingFingerString: "",
168
- numCameras: 0,
169
- cameraIds: Array(GlobalConstants_1.GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
170
- cameraSpeeds: Array(GlobalConstants_1.GCs.MAX_NUM_CAMERAS).fill(0),
173
+ //numCameras: 0,
174
+ cameraId: CameraIds.NONE,
175
+ cameraString: "",
176
+ cameraSpeed: 0,
177
+ tubeMassKg: 0,
178
+ applicatorCollisionPayloadOffset: 0,
171
179
  falseBottomStaysOpen: false,
172
180
  };
173
181
  exports.initialRecipeStore = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
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",
@@ -177,6 +177,7 @@ export interface Device {
177
177
  errors: DeviceFaultData;
178
178
  warnings: DeviceFaultData;
179
179
  registration: DeviceRegistration;
180
+ mutedChildrenArray: boolean[]; // array of muted child device ids
180
181
  cfg: DeviceCfg;
181
182
  //ignore--instants: DeviceInstants;
182
183
 
@@ -198,6 +199,9 @@ export interface Device {
198
199
  outputs?: unknown;
199
200
  }
200
201
 
202
+ // array of muted children, initialized to false of length DeviceConstants.DEVICE_CHILDREN_ARRAY_LEN
203
+ export const initialMutedChildrenArray: boolean[] = new Array(DeviceConstants.DEVICE_CHILDREN_ARRAY_LEN).fill(false);
204
+
201
205
  export const initialSts: unknown = null;
202
206
 
203
207
  export const initialDevice: Device = {
@@ -205,6 +209,7 @@ export const initialDevice: Device = {
205
209
  errors: initialDeviceFaultData,
206
210
  warnings: initialDeviceFaultData,
207
211
  registration: initialDeviceRegistration,
212
+ mutedChildrenArray: initialMutedChildrenArray,
208
213
  cfg: initialDeviceCfg,
209
214
  connectionStatus: false,
210
215
  execMethod: initialProcessData,
@@ -43,32 +43,43 @@ export const initialApplicatorSetpoints: ApplicatorSetpoint[] = Array(GCs.MAX_AP
43
43
  });
44
44
 
45
45
  export interface RecipeData {
46
- index: number; // index in RecipeStore.Recipes array
47
- nickname: string; // user defined nickname for recipe
48
-
49
- tubeTypeId: number;
50
- tubeTypeString: string; // display purposes only
51
- tubeOuterDiameterMax: number; // mm, used for robot offsets in fixture
52
- tubeHeightMax: number; // mm, used for approach to tubes and the pick position for weighing
53
- falseBottomStaysOpen: boolean; // this also determines if only the tall fixture is used or not
54
-
55
- linerPotPressure: number; // PSI
56
- linerTypeString: string; // display purposes only
57
-
58
- applicatorSetpoints: ApplicatorSetpoint[]; // speed robot uses while applying liner
59
- applicatorToolId: ApplicatorTools;
60
- applicatorToolString: string;
61
- cleanerId: number; // cleaner tool used before applying liner
62
- cleanerString: string;
63
-
64
- weighingFingerId: WeighingFingers;
65
- weighingFingerString: string;
66
-
67
- numCameras: number; // number of cameras needed to take photos of a tube
68
- cameraIds: number[]; // used with NumCameras to determine how photos are taken
69
- cameraSpeeds: number[]; // speed settings for robot for each camera
46
+ index: number;
47
+ dbId: string; // Added to match ST/MongoDB
48
+ nickname: string;
49
+
50
+ // LINER DATA
51
+ linerPotPressure: number;
52
+ linerTypeString: string;
53
+
54
+ // TUBE DATA
55
+ tubeTypeId: number;
56
+ tubeTypeString: string;
57
+ tubeOuterDiameterMax: number;
58
+ tubeHeightMax: number;
59
+ tubeMassKg: number; // Added: kg, used for payload adjustment
60
+ falseBottomStaysOpen: boolean;
61
+
62
+ // APPLICATOR SETPOINTS
63
+ applicatorSetpoints: ApplicatorSetpoint[];
64
+
65
+ // TOOLS
66
+ applicatorToolId: number; // Note: Ensure this matches your ApplicatorTools enum
67
+ applicatorToolString: string;
68
+ applicatorCollisionPayloadOffset: number; // Added: kg, for collision sensitivity
69
+
70
+ cleanerId: number;
71
+ cleanerString: string;
72
+
73
+ weighingFingerId: number; // Note: Ensure this matches your WeighingFingers enum
74
+ weighingFingerString: string;
75
+
76
+ // CAMERA DATA (New fields from ST)
77
+ cameraId: number;
78
+ cameraString: string;
79
+ cameraSpeed: number;
70
80
  }
71
81
 
82
+
72
83
  export enum CameraIds {
73
84
  NONE = 0,
74
85
  CAMERA_1 = 1,
@@ -198,11 +209,13 @@ export const exampleRecipe: RecipeData = {
198
209
  nickname: "Example Recipe",
199
210
  linerTypeString: "CKU",
200
211
  linerPotPressure: 50,
201
-
212
+ dbId: "",
202
213
  tubeTypeId: TubeTypes.TYPE_1340_38,
203
214
  tubeTypeString: "1340-38",
204
215
  tubeOuterDiameterMax: 38.1,
205
216
  tubeHeightMax: 100, // example value in mm
217
+ tubeMassKg: 0.5,
218
+ applicatorCollisionPayloadOffset: 1.0,
206
219
  falseBottomStaysOpen: false,
207
220
 
208
221
  applicatorSetpoints: exampleApplicatorSetpoints,
@@ -212,14 +225,16 @@ export const exampleRecipe: RecipeData = {
212
225
  cleanerString: "Medium",
213
226
  weighingFingerId: WeighingFingers.RED_MEDIUM,
214
227
  weighingFingerString: "Red Medium",
215
- numCameras: 2,
216
- cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
217
- cameraSpeeds: [50, 75],
228
+ //numCameras: 2,
229
+ cameraId: CameraIds.CAMERA_1,
230
+ cameraString: "Camera 1",
231
+ cameraSpeed: 50,
218
232
 
219
233
  };
220
234
 
221
235
  export const initialRecipe: RecipeData = {
222
236
  index: 0,
237
+ dbId: "",
223
238
  nickname: "",
224
239
  linerTypeString: "",
225
240
  tubeOuterDiameterMax: 0.0,
@@ -234,9 +249,12 @@ export const initialRecipe: RecipeData = {
234
249
  cleanerString: "",
235
250
  weighingFingerId: WeighingFingers.NONE,
236
251
  weighingFingerString: "",
237
- numCameras: 0,
238
- cameraIds: Array(GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
239
- cameraSpeeds: Array(GCs.MAX_NUM_CAMERAS).fill(0),
252
+ //numCameras: 0,
253
+ cameraId: CameraIds.NONE,
254
+ cameraString: "",
255
+ cameraSpeed: 0,
256
+ tubeMassKg: 0,
257
+ applicatorCollisionPayloadOffset: 0,
240
258
  falseBottomStaysOpen: false,
241
259
  };
242
260