@zaber/motion 9.1.0 → 9.2.1
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/LICENSE +87 -8
- package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
- package/dist/lib/ascii/axis_settings.d.ts +22 -1
- package/dist/lib/ascii/axis_settings.d.ts.map +1 -1
- package/dist/lib/ascii/axis_settings.js +48 -1
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +55 -1
- package/dist/lib/ascii/device_settings.d.ts.map +1 -1
- package/dist/lib/ascii/device_settings.js +74 -1
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/get_axis_setting_typed_result.d.ts +29 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.js +52 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_bool_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_bool_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_bool_result.js +39 -0
- package/dist/lib/ascii/get_setting_bool_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_int_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_int_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_int_result.js +39 -0
- package/dist/lib/ascii/get_setting_int_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_string_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_string_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_string_result.js +39 -0
- package/dist/lib/ascii/get_setting_string_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_typed_result.d.ts +29 -0
- package/dist/lib/ascii/get_setting_typed_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_typed_result.js +52 -0
- package/dist/lib/ascii/get_setting_typed_result.js.map +1 -0
- package/dist/lib/ascii/get_settings_by_type_result.d.ts +35 -0
- package/dist/lib/ascii/get_settings_by_type_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_settings_by_type_result.js +50 -0
- package/dist/lib/ascii/get_settings_by_type_result.js.map +1 -0
- package/dist/lib/ascii/index.d.ts +8 -0
- package/dist/lib/ascii/index.d.ts.map +1 -1
- package/dist/lib/ascii/index.js +8 -0
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/pvt_buffer.d.ts +22 -1
- package/dist/lib/ascii/pvt_buffer.d.ts.map +1 -1
- package/dist/lib/ascii/pvt_buffer.js +9 -1
- package/dist/lib/ascii/pvt_buffer.js.map +1 -1
- package/dist/lib/ascii/pvt_buffer_axis_units.d.ts +29 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.d.ts.map +1 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.js +44 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.js.map +1 -0
- package/dist/lib/ascii/pvt_csv_data.js.map +1 -1
- package/dist/lib/ascii/pvt_partial_csv_data.js.map +1 -1
- package/dist/lib/ascii/typed_setting.d.ts +20 -0
- package/dist/lib/ascii/typed_setting.d.ts.map +1 -0
- package/dist/lib/ascii/typed_setting.js +84 -0
- package/dist/lib/ascii/typed_setting.js.map +1 -0
- package/dist/lib/gateway/constants.js +1 -1
- package/dist/lib/gateway/constants.js.map +1 -1
- package/dist/lib/product/ge_1_x_gripper.d.ts +4 -9
- package/dist/lib/product/ge_1_x_gripper.d.ts.map +1 -1
- package/dist/lib/product/ge_1_x_gripper.js +6 -7
- package/dist/lib/product/ge_1_x_gripper.js.map +1 -1
- package/dist/lib/requests/device_convert_setting_request.d.ts +1 -0
- package/dist/lib/requests/device_convert_setting_request.d.ts.map +1 -1
- package/dist/lib/requests/device_convert_setting_request.js +5 -1
- package/dist/lib/requests/device_convert_setting_request.js.map +1 -1
- package/dist/lib/requests/device_get_many_by_type_request.d.ts +19 -0
- package/dist/lib/requests/device_get_many_by_type_request.d.ts.map +1 -0
- package/dist/lib/requests/device_get_many_by_type_request.js +56 -0
- package/dist/lib/requests/device_get_many_by_type_request.js.map +1 -0
- package/dist/lib/requests/get_axis_settings_typed_response.d.ts +14 -0
- package/dist/lib/requests/get_axis_settings_typed_response.d.ts.map +1 -0
- package/dist/lib/requests/get_axis_settings_typed_response.js +35 -0
- package/dist/lib/requests/get_axis_settings_typed_response.js.map +1 -0
- package/dist/lib/requests/get_settings_typed_response.d.ts +14 -0
- package/dist/lib/requests/get_settings_typed_response.d.ts.map +1 -0
- package/dist/lib/requests/get_settings_typed_response.js +35 -0
- package/dist/lib/requests/get_settings_typed_response.js.map +1 -0
- package/dist/lib/requests/index.d.ts +4 -1
- package/dist/lib/requests/index.d.ts.map +1 -1
- package/dist/lib/requests/index.js +4 -1
- package/dist/lib/requests/index.js.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.d.ts +4 -0
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.d.ts.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.js +11 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.js.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_response.js.map +1 -1
- package/dist/lib/requests/pvt_convert_time_request.js.map +1 -1
- package/dist/lib/requests/pvt_convert_time_response.js.map +1 -1
- package/dist/lib/requests/pvt_generate_positions_request.js.map +1 -1
- package/dist/lib/requests/pvt_generate_sequence_response.js.map +1 -1
- package/dist/lib/requests/pvt_generate_velocities_and_times_request.js.map +1 -1
- package/dist/lib/requests/pvt_generate_velocities_request.js.map +1 -1
- package/dist/lib/requests/pvt_items_request.js.map +1 -1
- package/dist/lib/requests/pvt_partial_convert_time_request.js.map +1 -1
- package/dist/lib/requests/pvt_partial_convert_time_response.js.map +1 -1
- package/dist/lib/requests/pvt_save_csv_request.js.map +1 -1
- package/dist/lib/requests/pvt_submit_sequence_data_request.js.map +1 -1
- package/dist/lib/requests/test_dto_with_variants.js.map +1 -1
- package/dist/lib/requests/typed_setting_response.d.ts +14 -0
- package/dist/lib/requests/typed_setting_response.d.ts.map +1 -0
- package/dist/lib/requests/typed_setting_response.js +40 -0
- package/dist/lib/requests/typed_setting_response.js.map +1 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts +1 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts.map +1 -1
- package/dist/lib/requests/unit_convert_native_request.js +5 -1
- package/dist/lib/requests/unit_convert_native_request.js.map +1 -1
- package/dist/lib/unit_conversion_descriptor.d.ts +4 -0
- package/dist/lib/unit_conversion_descriptor.d.ts.map +1 -1
- package/dist/lib/unit_conversion_descriptor.js +5 -1
- package/dist/lib/unit_conversion_descriptor.js.map +1 -1
- package/dist/lib/unit_table.d.ts +4 -2
- package/dist/lib/unit_table.d.ts.map +1 -1
- package/dist/lib/unit_table.js +6 -2
- package/dist/lib/unit_table.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/requests/ge_1_x_gripper_calibrate_request.d.ts +0 -14
- package/dist/lib/requests/ge_1_x_gripper_calibrate_request.d.ts.map +0 -1
- package/dist/lib/requests/ge_1_x_gripper_calibrate_request.js +0 -39
- package/dist/lib/requests/ge_1_x_gripper_calibrate_request.js.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypedSetting = void 0;
|
|
4
|
+
const sanitizer_1 = require("../gateway/sanitizer");
|
|
5
|
+
exports.TypedSetting = {
|
|
6
|
+
sanitize: (value) => {
|
|
7
|
+
const typeName = exports.TypedSetting.typeName(value);
|
|
8
|
+
switch (typeName) {
|
|
9
|
+
case 'double':
|
|
10
|
+
value = sanitizer_1.sanitizer.sanitizeNumber(value, 'items of variant TypedSetting member type number');
|
|
11
|
+
break;
|
|
12
|
+
case 'int64':
|
|
13
|
+
value = sanitizer_1.sanitizer.sanitizeInt64(value, 'items of variant TypedSetting member type bigint');
|
|
14
|
+
break;
|
|
15
|
+
case 'bool':
|
|
16
|
+
value = sanitizer_1.sanitizer.sanitizeBool(value, 'items of variant TypedSetting member type boolean');
|
|
17
|
+
break;
|
|
18
|
+
case 'string':
|
|
19
|
+
value = sanitizer_1.sanitizer.sanitizeString(value, 'items of variant TypedSetting member type string');
|
|
20
|
+
break;
|
|
21
|
+
default:
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
},
|
|
26
|
+
convert: (value) => {
|
|
27
|
+
switch (value.variantValueType) {
|
|
28
|
+
case 'double':
|
|
29
|
+
return value.doubleValue;
|
|
30
|
+
case 'int64':
|
|
31
|
+
return value.int64Value;
|
|
32
|
+
case 'bool':
|
|
33
|
+
return value.boolValue;
|
|
34
|
+
case 'string':
|
|
35
|
+
return value.stringValue;
|
|
36
|
+
default:
|
|
37
|
+
throw new TypeError(`Variant type tag '${value.variantValueType}' is not valid for variant type TypedSetting.`);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
convertBack: (value) => {
|
|
41
|
+
const typeName = exports.TypedSetting.typeName(value);
|
|
42
|
+
return {
|
|
43
|
+
variantValueType: typeName,
|
|
44
|
+
doubleValue: typeName === 'double' ? value : undefined,
|
|
45
|
+
int64Value: typeName === 'int64' ? value : undefined,
|
|
46
|
+
boolValue: typeName === 'bool' ? value : undefined,
|
|
47
|
+
stringValue: typeName === 'string' ? value : undefined,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Attempts to determine which member type is present in a variable.
|
|
52
|
+
*/
|
|
53
|
+
typeName: (value) => {
|
|
54
|
+
if (typeof value === 'number') {
|
|
55
|
+
return 'double';
|
|
56
|
+
}
|
|
57
|
+
else if (typeof value === 'bigint') {
|
|
58
|
+
return 'int64';
|
|
59
|
+
}
|
|
60
|
+
else if (typeof value === 'boolean') {
|
|
61
|
+
return 'bool';
|
|
62
|
+
}
|
|
63
|
+
else if (typeof value === 'string') {
|
|
64
|
+
return 'string';
|
|
65
|
+
}
|
|
66
|
+
else if (value == null) {
|
|
67
|
+
throw new RangeError('Null or undefined values are not valid values for type TypedSetting');
|
|
68
|
+
}
|
|
69
|
+
throw new TypeError(`Unrecognized type for TypedSetting: ${typeof value} (JSON.stringify(value, NULL, 2))`);
|
|
70
|
+
},
|
|
71
|
+
isA: (value) => {
|
|
72
|
+
try {
|
|
73
|
+
exports.TypedSetting.typeName(value); // Throws if the type is not recognized.
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
if (err instanceof TypeError) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=typed_setting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed_setting.js","sourceRoot":"","sources":["../../../src/ascii/typed_setting.ts"],"names":[],"mappings":";;;AAGA,oDAAiD;AAapC,QAAA,YAAY,GAAG;IAC1B,QAAQ,EAAE,CAAC,KAAmB,EAAgB,EAAE;QAC9C,MAAM,QAAQ,GAAG,oBAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC9C,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,QAAQ;gBACX,KAAK,GAAG,qBAAS,CAAC,cAAc,CAAC,KAAe,EAAE,kDAAkD,CAAC,CAAC;gBACtG,MAAM;YAER,KAAK,OAAO;gBACV,KAAK,GAAG,qBAAS,CAAC,aAAa,CAAC,KAAe,EAAE,kDAAkD,CAAC,CAAC;gBACrG,MAAM;YAER,KAAK,MAAM;gBACT,KAAK,GAAG,qBAAS,CAAC,YAAY,CAAC,KAAgB,EAAE,mDAAmD,CAAC,CAAC;gBACtG,MAAM;YAER,KAAK,QAAQ;gBACX,KAAK,GAAG,qBAAS,CAAC,cAAc,CAAC,KAAe,EAAE,kDAAkD,CAAC,CAAC;gBACtG,MAAM;YAER;gBACE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aAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;YACtC,OAAO,MAAM,CAAC;QAChB,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,OAAO,QAAQ,CAAC;QAClB,CAAC;aAAM,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,IAAI,UAAU,CAAC,qEAAqE,CAAC,CAAC;QAC9F,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,uCAAuC,OAAO,KAAK,mCAAmC,CAAC,CAAC;IAC9G,CAAC;IAED,GAAG,EAAE,CAAC,KAAU,EAAyB,EAAE;QACzC,IAAI,CAAC;YACH,oBAAY,CAAC,QAAQ,CAAC,KAAqB,CAAC,CAAC,CAAC,wCAAwC;YACtF,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,SAAS,EAAE,CAAC;gBAC7B,OAAO,KAAK,CAAC;YACf,CAAC;YAED,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\n\n/**\n * The value of a setting, which can be of various types.\n */\nexport type TypedSetting =\n number | bigint | boolean | string;\n\n/**\n * Constants for the possible return values of TypedSetting.typeName().\n */\nexport type TypedSettingTypeTags = 'double' | 'int64' | 'bool' | 'string';\n\nexport const TypedSetting = {\n sanitize: (value: TypedSetting): TypedSetting => {\n const typeName = TypedSetting.typeName(value);\n switch (typeName) {\n case 'double':\n value = sanitizer.sanitizeNumber(value as number, 'items of variant TypedSetting member type number');\n break;\n\n case 'int64':\n value = sanitizer.sanitizeInt64(value as bigint, 'items of variant TypedSetting member type bigint');\n break;\n\n case 'bool':\n value = sanitizer.sanitizeBool(value as boolean, 'items of variant TypedSetting member type boolean');\n break;\n\n case 'string':\n value = sanitizer.sanitizeString(value as string, 'items of variant TypedSetting member type string');\n break;\n\n default:\n break;\n }\n\n return value;\n },\n\n convert: (value: BSON.Document): TypedSetting => {\n switch (value.variantValueType as TypedSettingTypeTags) {\n case 'double':\n return value.doubleValue as number;\n\n case 'int64':\n return value.int64Value as bigint;\n\n case 'bool':\n return value.boolValue as boolean;\n\n case 'string':\n return value.stringValue as string;\n\n default:\n throw new TypeError(`Variant type tag '${value.variantValueType}' is not valid for variant type TypedSetting.`);\n }\n },\n\n convertBack: (value: TypedSetting): BSON.Document => {\n const typeName = TypedSetting.typeName(value);\n return {\n variantValueType: typeName,\n doubleValue: typeName === 'double' ? value as number : undefined,\n int64Value: typeName === 'int64' ? value as bigint : undefined,\n boolValue: typeName === 'bool' ? value as boolean : undefined,\n stringValue: typeName === 'string' ? value as string : undefined,\n };\n },\n\n /**\n * Attempts to determine which member type is present in a variable.\n */\n typeName: (value: TypedSetting): TypedSettingTypeTags => {\n if (typeof value === 'number') {\n return 'double';\n } else if (typeof value === 'bigint') {\n return 'int64';\n } else if (typeof value === 'boolean') {\n return 'bool';\n } else if (typeof value === 'string') {\n return 'string';\n } else if (value == null) {\n throw new RangeError('Null or undefined values are not valid values for type TypedSetting');\n }\n\n throw new TypeError(`Unrecognized type for TypedSetting: ${typeof value} (JSON.stringify(value, NULL, 2))`);\n },\n\n isA: (value: any): value is TypedSetting => {\n try {\n TypedSetting.typeName(value as TypedSetting); // Throws if the type is not recognized.\n return true;\n } catch (err) {\n if (err instanceof TypeError) {\n return false;\n }\n\n throw err;\n }\n }\n};\n"]}
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Constants = void 0;
|
|
4
4
|
// The version string is updated automatically with `npx gulp set_version`. Do not edit manually.
|
|
5
5
|
exports.Constants = {
|
|
6
|
-
version: '9.1
|
|
6
|
+
version: '9.2.1',
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/gateway/constants.ts"],"names":[],"mappings":";;;AAAA,iGAAiG;AACpF,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,OAAO;CACjB,CAAC","sourcesContent":["// The version string is updated automatically with `npx gulp set_version`. Do not edit manually.\nexport const Constants = {\n version: '9.1
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/gateway/constants.ts"],"names":[],"mappings":";;;AAAA,iGAAiG;AACpF,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,OAAO;CACjB,CAAC","sourcesContent":["// The version string is updated automatically with `npx gulp set_version`. Do not edit manually.\nexport const Constants = {\n version: '9.2.1',\n};\n"]}
|
|
@@ -89,9 +89,8 @@ export declare class Ge1xGripper {
|
|
|
89
89
|
driverDisable(): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Performs a calibration of the travel range by moving to the fully open and fully closed positions.
|
|
92
|
-
* @param [options.saveToFlash=true] Save the calibration results to flash memory so they are retained on power cycle.
|
|
93
92
|
*/
|
|
94
|
-
calibrate(
|
|
93
|
+
calibrate(): Promise<void>;
|
|
95
94
|
/**
|
|
96
95
|
* Gets the current state of the gripper.
|
|
97
96
|
* @returns The current state of the gripper.
|
|
@@ -135,6 +134,7 @@ export declare class Ge1xGripper {
|
|
|
135
134
|
setAutoHome(enabled: boolean, options?: Ge1xGripper.SetAutoHomeOptions): Promise<void>;
|
|
136
135
|
/**
|
|
137
136
|
* Enables or disables IO control for the gripper.
|
|
137
|
+
* When enabled, the gripper will not move to a preset position until the IO input changes.
|
|
138
138
|
* @param enabled True to enable IO control, false to disable.
|
|
139
139
|
* @param [options.saveToFlash=true] Save the IO enabled setting to flash memory so it is retained on power cycle.
|
|
140
140
|
*/
|
|
@@ -146,7 +146,8 @@ export declare class Ge1xGripper {
|
|
|
146
146
|
*/
|
|
147
147
|
setIoInputFilter(duration: number, options?: Ge1xGripper.SetIoInputFilterOptions): Promise<void>;
|
|
148
148
|
/**
|
|
149
|
-
* Saves a position, force, and speed as a preset.
|
|
149
|
+
* Saves a position, force, and speed as a preset that can be enabled using I/O or the activatePreset() method.
|
|
150
|
+
* Note that presets are only activated by I/O when the I/O input changes to that preset number.
|
|
150
151
|
* @param presetNumber The preset number to save the preset to, from 1 to 4.
|
|
151
152
|
* @param position The target position for the preset as a percentage, where 0 is closed and 100 is open.
|
|
152
153
|
* @param [options.force=100] The gripping force for the preset as a percentage from 20 to 100.
|
|
@@ -218,12 +219,6 @@ declare namespace Ge1xGripper {
|
|
|
218
219
|
*/
|
|
219
220
|
waitUntilIdle?: boolean;
|
|
220
221
|
}
|
|
221
|
-
interface CalibrateOptions {
|
|
222
|
-
/**
|
|
223
|
-
* Save the calibration results to flash memory so they are retained on power cycle.
|
|
224
|
-
*/
|
|
225
|
-
saveToFlash?: boolean;
|
|
226
|
-
}
|
|
227
222
|
interface SetHomeDirectionOptions {
|
|
228
223
|
/**
|
|
229
224
|
* Save the home direction setting to flash memory so it is retained on power cycle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ge_1_x_gripper.d.ts","sourceRoot":"","sources":["../../../src/product/ge_1_x_gripper.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;GAEG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,gBAAuB,sBAAsB,EAAE,MAAM,CAAK;IAE1D;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,OAAO,CAAC,aAAa,CAAS;gBAElB,YAAY,EAAE,MAAM;IAKhC;;;;;;OAMG;WACiB,cAAc,CAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAW,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;IACD,UAAiB,gBAAgB;QAC7B;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACzB;IACD,UAAiB,qBAAqB;QAClC;;WAEG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KAC3B;CACF"}
|
|
@@ -266,16 +266,13 @@ class Ge1xGripper {
|
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
268
|
* Performs a calibration of the travel range by moving to the fully open and fully closed positions.
|
|
269
|
-
* @param [options.saveToFlash=true] Save the calibration results to flash memory so they are retained on power cycle.
|
|
270
269
|
*/
|
|
271
|
-
async calibrate(
|
|
272
|
-
const { saveToFlash = true, } = options;
|
|
270
|
+
async calibrate() {
|
|
273
271
|
const request = {
|
|
274
|
-
...requests.
|
|
272
|
+
...requests.Ge1xGripperEmptyRequest.DEFAULT,
|
|
275
273
|
connectionId: this.connectionId,
|
|
276
|
-
saveToFlash: saveToFlash,
|
|
277
274
|
toBinary() {
|
|
278
|
-
return requests.
|
|
275
|
+
return requests.Ge1xGripperEmptyRequest.toBinary(this);
|
|
279
276
|
},
|
|
280
277
|
};
|
|
281
278
|
await gateway.callAsync('ge1x_gripper/calibrate', request);
|
|
@@ -406,6 +403,7 @@ class Ge1xGripper {
|
|
|
406
403
|
}
|
|
407
404
|
/**
|
|
408
405
|
* Enables or disables IO control for the gripper.
|
|
406
|
+
* When enabled, the gripper will not move to a preset position until the IO input changes.
|
|
409
407
|
* @param enabled True to enable IO control, false to disable.
|
|
410
408
|
* @param [options.saveToFlash=true] Save the IO enabled setting to flash memory so it is retained on power cycle.
|
|
411
409
|
*/
|
|
@@ -441,7 +439,8 @@ class Ge1xGripper {
|
|
|
441
439
|
await gateway.callAsync('ge1x_gripper/set_io_input_filter', request);
|
|
442
440
|
}
|
|
443
441
|
/**
|
|
444
|
-
* Saves a position, force, and speed as a preset.
|
|
442
|
+
* Saves a position, force, and speed as a preset that can be enabled using I/O or the activatePreset() method.
|
|
443
|
+
* Note that presets are only activated by I/O when the I/O input changes to that preset number.
|
|
445
444
|
* @param presetNumber The preset number to save the preset to, from 1 to 4.
|
|
446
445
|
* @param position The target position for the preset as a percentage, where 0 is closed and 100 is open.
|
|
447
446
|
* @param [options.force=100] The gripping force for the preset as a percentage from 20 to 100.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ge_1_x_gripper.js","sourceRoot":"","sources":["../../../src/product/ge_1_x_gripper.ts"],"names":[],"mappings":";AAAA,wDAAwD;AACxD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,oDAAsC;AACtC,sDAAwC;AACxC,4CAAuD;AAKvD;;GAEG;AACH,MAAa,WAAW;IAMtB;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAGD,YAAY,YAAoB;QAC9B,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAA,mCAAuB,EAAC,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,KAAK,CAAC,cAAc,CAChC,QAAgB,EAChB,UAA6C,EAAE;QAE/C,MAAM,EACJ,aAAa,GAAG,WAAW,CAAC,sBAAsB,EAClD,OAAO,GAAG,GAAG,GACd,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAgE;YAC3E,GAAG,QAAQ,CAAC,gCAAgC,CAAC,OAAO;YACpD,QAAQ,EAAE,QAAQ;YAClB,aAAa,EAAE,aAAa;YAC5B,OAAO,EAAE,OAAO;YAChB,QAAQ;gBACN,OAAO,QAAQ,CAAC,gCAAgC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAClE,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,M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Y ============== //\n\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { registerForFinalization } from '../finalizer';\nimport { Ge1xGripperState } from './ge_1_x_gripper_state';\nimport { Ge1xGripperError } from './ge_1_x_gripper_error';\nimport { Ge1xGripperDirection } from './ge_1_x_gripper_direction';\n\n/**\n * Class representing a gripper in the GE1x series.\n */\nexport class Ge1xGripper {\n /**\n * The default device address for a gripper in the GE1x series.\n */\n public static readonly DEFAULT_DEVICE_ADDRESS: number = 1;\n\n /**\n * The identifier for the connection.\n */\n public get connectionId(): number {\n return this._connectionId;\n }\n private _connectionId: number;\n\n constructor(connectionId: number) {\n this._connectionId = connectionId;\n registerForFinalization(this, Ge1xGripper._free.bind(null, connectionId));\n }\n\n /**\n * Opens a serial connection to a gripper.\n * @param portName The name of the serial port to connect to.\n * @param [options.deviceAddress=Ge1xGripper.DEFAULT_DEVICE_ADDRESS] The address of the gripper to connect to.\n * @param [options.timeout=500] The timeout in milliseconds for any request sent using this connection.\n * @returns A Ge1xGripper instance representing the connection to the gripper.\n */\n public static async openConnection(\n portName: string,\n options: Ge1xGripper.OpenConnectionOptions = {}\n ): Promise<Ge1xGripper> {\n const {\n deviceAddress = Ge1xGripper.DEFAULT_DEVICE_ADDRESS,\n timeout = 500,\n } = options;\n const request: requests.Ge1xGripperOpenConnectionRequest & gateway.Message = {\n ...requests.Ge1xGripperOpenConnectionRequest.DEFAULT,\n portName: portName,\n deviceAddress: deviceAddress,\n timeout: timeout,\n toBinary() {\n return requests.Ge1xGripperOpenConnectionRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/open_connection',\n request,\n requests.IntResponse.fromBinary);\n return new Ge1xGripper(response.value);\n }\n\n /**\n * Closes the connection to the gripper.\n */\n public async close(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/close_connection', request);\n }\n\n /**\n * Reads a single register value from the gripper.\n * @param registerAddress The address of the register to read.\n * @returns The data at the specified register address.\n */\n public async readRegister(\n registerAddress: number\n ): Promise<number> {\n const request: requests.Ge1xGripperReadRegisterRequest & gateway.Message = {\n ...requests.Ge1xGripperReadRegisterRequest.DEFAULT,\n connectionId: this.connectionId,\n registerAddress: registerAddress,\n toBinary() {\n return requests.Ge1xGripperReadRegisterRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/read_register',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Writes a single register value to the gripper.\n * @param registerAddress The address of the register to write.\n * @param data The data to write to the specified register address.\n */\n public async writeRegister(\n registerAddress: number,\n data: number\n ): Promise<void> {\n const request: requests.Ge1xGripperWriteRegisterRequest & gateway.Message = {\n ...requests.Ge1xGripperWriteRegisterRequest.DEFAULT,\n connectionId: this.connectionId,\n registerAddress: registerAddress,\n data: data,\n toBinary() {\n return requests.Ge1xGripperWriteRegisterRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/write_register', request);\n }\n\n /**\n * Homes gripper by moving it to its homing position.\n * @param [options.waitUntilIdle=true] Wait until homing has completed before returning.\n */\n public async home(\n options: Ge1xGripper.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperWaitUntilIdleRequest & gateway.Message = {\n ...requests.Ge1xGripperWaitUntilIdleRequest.DEFAULT,\n connectionId: this.connectionId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/home', request);\n }\n\n /**\n * Waits until the gripper has stopped moving.\n */\n public async waitUntilIdle(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/wait_until_idle', request);\n }\n\n /**\n * Moves the gripper to a specified position.\n * @param position The target position for the gripper as a percentage, where 0 is closed and 100 is open.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async move(\n position: number,\n options: Ge1xGripper.MoveOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: position,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Moves the gripper to the open position.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async moveOpen(\n options: Ge1xGripper.MoveOpenOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: 100,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Moves the gripper to the closed position.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async moveClose(\n options: Ge1xGripper.MoveCloseOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: 0,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Stops the gripper from moving.\n * @param [options.waitUntilIdle=true] Wait until the gripper has stopped before returning.\n */\n public async stop(\n options: Ge1xGripper.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperWaitUntilIdleRequest & gateway.Message = {\n ...requests.Ge1xGripperWaitUntilIdleRequest.DEFAULT,\n connectionId: this.connectionId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/stop', request);\n }\n\n /**\n * Sets the gripping force of the gripper.\n * @param force The gripping force as a percentage from 20 to 100.\n */\n public async setForce(\n force: number\n ): Promise<void> {\n const request: requests.Ge1xGripperSetForceRequest & gateway.Message = {\n ...requests.Ge1xGripperSetForceRequest.DEFAULT,\n connectionId: this.connectionId,\n force: force,\n toBinary() {\n return requests.Ge1xGripperSetForceRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_force', request);\n }\n\n /**\n * Sets the maximum speed of the gripper.\n * @param speed The maximum speed as a percentage from 1 to 100.\n */\n public async setSpeed(\n speed: number\n ): Promise<void> {\n const request: requests.Ge1xGripperSetSpeedRequest & gateway.Message = {\n ...requests.Ge1xGripperSetSpeedRequest.DEFAULT,\n connectionId: this.connectionId,\n speed: speed,\n toBinary() {\n return requests.Ge1xGripperSetSpeedRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_speed', request);\n }\n\n /**\n * Enables the gripper driver.\n */\n public async driverEnable(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/driver_enable', request);\n }\n\n /**\n * Disables the gripper driver.\n */\n public async driverDisable(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/driver_disable', request);\n }\n\n /**\n * Performs a calibration of the travel range by moving to the fully open and fully closed positions.\n * @param [options.saveToFlash=true] Save the calibration results to flash memory so they are retained on power cycle.\n */\n public async calibrate(\n options: Ge1xGripper.CalibrateOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperCalibrateRequest & gateway.Message = {\n ...requests.Ge1xGripperCalibrateRequest.DEFAULT,\n connectionId: this.connectionId,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperCalibrateRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/calibrate', request);\n }\n\n /**\n * Gets the current state of the gripper.\n * @returns The current state of the gripper.\n */\n public async getState(): Promise<Ge1xGripperState> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Ge1xGripperGetStateResponse>(\n 'ge1x_gripper/get_state',\n request,\n requests.Ge1xGripperGetStateResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current error of the gripper.\n * @returns The current error of the gripper.\n */\n public async getError(): Promise<Ge1xGripperError> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Ge1xGripperGetErrorResponse>(\n 'ge1x_gripper/get_error',\n request,\n requests.Ge1xGripperGetErrorResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the current error of the gripper.\n */\n public async clearError(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/clear_error', request);\n }\n\n /**\n * Checks if the gripper has been homed.\n * @returns True if the gripper is homed, false otherwise.\n */\n public async isHomed(): Promise<boolean> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'ge1x_gripper/is_homed',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current position of the gripper.\n * @returns The current position of the gripper as a percentage, where 0 is closed and 100 is open.\n */\n public async getPosition(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'ge1x_gripper/get_position',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current current of the gripper.\n * @returns The current current of the gripper in milliamps.\n */\n public async getCurrent(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/get_current',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets the home direction for the gripper.\n * @param direction The home direction to set.\n * @param [options.saveToFlash=true] Save the home direction setting to flash memory so it is retained on power cycle.\n */\n public async setHomeDirection(\n direction: Ge1xGripperDirection,\n options: Ge1xGripper.SetHomeDirectionOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetHomeDirectionRequest & gateway.Message = {\n ...requests.Ge1xGripperSetHomeDirectionRequest.DEFAULT,\n connectionId: this.connectionId,\n direction: direction,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetHomeDirectionRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_home_direction', request);\n }\n\n /**\n * Enables or disables automatic homing on power up.\n * @param enabled True to enable automatic homing on power up, false to disable.\n * @param [options.saveToFlash=true] Save the auto home setting to flash memory so it is retained on power cycle.\n */\n public async setAutoHome(\n enabled: boolean,\n options: Ge1xGripper.SetAutoHomeOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetAutoHomeRequest & gateway.Message = {\n ...requests.Ge1xGripperSetAutoHomeRequest.DEFAULT,\n connectionId: this.connectionId,\n enabled: enabled,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetAutoHomeRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_auto_home', request);\n }\n\n /**\n * Enables or disables IO control for the gripper.\n * @param enabled True to enable IO control, false to disable.\n * @param [options.saveToFlash=true] Save the IO enabled setting to flash memory so it is retained on power cycle.\n */\n public async setIoEnabled(\n enabled: boolean,\n options: Ge1xGripper.SetIoEnabledOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetIoEnabledRequest & gateway.Message = {\n ...requests.Ge1xGripperSetIoEnabledRequest.DEFAULT,\n connectionId: this.connectionId,\n enabled: enabled,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetIoEnabledRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_io_enabled', request);\n }\n\n /**\n * Sets the debounce filter time for the gripper IO input to suppress noise.\n * @param duration The IO input filter time in milliseconds.\n * @param [options.saveToFlash=true] Save the IO input filter setting to flash memory so it is retained on power cycle.\n */\n public async setIoInputFilter(\n duration: number,\n options: Ge1xGripper.SetIoInputFilterOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetIoInputFilterRequest & gateway.Message = {\n ...requests.Ge1xGripperSetIoInputFilterRequest.DEFAULT,\n connectionId: this.connectionId,\n duration: duration,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetIoInputFilterRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_io_input_filter', request);\n }\n\n /**\n * Saves a position, force, and speed as a preset.\n * @param presetNumber The preset number to save the preset to, from 1 to 4.\n * @param position The target position for the preset as a percentage, where 0 is closed and 100 is open.\n * @param [options.force=100] The gripping force for the preset as a percentage from 20 to 100.\n * @param [options.speed=100] The maximum speed for the preset as a percentage from 1 to 100.\n * @param [options.saveToFlash=true] Save the preset to flash memory so it is retained on power cycle.\n */\n public async setPreset(\n presetNumber: number,\n position: number,\n options: Ge1xGripper.SetPresetOptions = {}\n ): Promise<void> {\n const {\n force = 100,\n speed = 100,\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetPresetRequest & gateway.Message = {\n ...requests.Ge1xGripperSetPresetRequest.DEFAULT,\n connectionId: this.connectionId,\n presetNumber: presetNumber,\n position: position,\n force: force,\n speed: speed,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetPresetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_preset', request);\n }\n\n /**\n * Activates a preset, causing the gripper to move to the preset position using the preset force and speed.\n * @param presetNumber The preset number to activate, from 1 to 4.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async activatePreset(\n presetNumber: number,\n options: Ge1xGripper.ActivatePresetOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperActivatePresetRequest & gateway.Message = {\n ...requests.Ge1xGripperActivatePresetRequest.DEFAULT,\n connectionId: this.connectionId,\n presetNumber: presetNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperActivatePresetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/activate_preset', request);\n }\n\n /**\n * Gets the preset number currently activated by the gripper IO input.\n * @returns The current preset number activated by the gripper IO input.\n */\n public async getIoInputPresetNumber(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/get_io_input_preset_number',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Frees the connection instance.\n * @param connectionId Connection ID to be freed.\n */\n private static _free(\n connectionId: number\n ): void {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n gateway.callSync('ge1x_gripper/free_connection', request);\n }\n\n /**\n * Releases the native resources of the ge 1 x gripper.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n Ge1xGripper._free(this.connectionId);\n }\n}\n\nnamespace Ge1xGripper {\n export interface OpenConnectionOptions {\n /**\n * The address of the gripper to connect to.\n */\n deviceAddress?: number;\n /**\n * The timeout in milliseconds for any request sent using this connection.\n */\n timeout?: number;\n }\n export interface HomeOptions {\n /**\n * Wait until homing has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveOpenOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveCloseOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n /**\n * Wait until the gripper has stopped before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface CalibrateOptions {\n /**\n * Save the calibration results to flash memory so they are retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetHomeDirectionOptions {\n /**\n * Save the home direction setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetAutoHomeOptions {\n /**\n * Save the auto home setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetIoEnabledOptions {\n /**\n * Save the IO enabled setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetIoInputFilterOptions {\n /**\n * Save the IO input filter setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetPresetOptions {\n /**\n * The gripping force for the preset as a percentage from 20 to 100.\n */\n force?: number;\n /**\n * The maximum speed for the preset as a percentage from 1 to 100.\n */\n speed?: number;\n /**\n * Save the preset to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface ActivatePresetOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ge_1_x_gripper.js","sourceRoot":"","sources":["../../../src/product/ge_1_x_gripper.ts"],"names":[],"mappings":";AAAA,wDAAwD;AACxD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,oDAAsC;AACtC,sDAAwC;AACxC,4CAAuD;AAKvD;;GAEG;AACH,MAAa,WAAW;IAMtB;;OAEG;IACH,IAAW,YAAY;QAC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KAAK,CAAC;IACxB,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,KAAK,CAClB,YAAoB;QAEpB,MAAM,OAAO,GAAuD;YAClE,GAAG,QAAQ,CAAC,uBAAuB,CAAC,OAAO;YAC3C,YAAY,EAAE,YAAY;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACzD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACI,IAAI;QACT,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC;;AAtoBH,kCAuoBC;AAtoBC;;GAEG;AACoB,kCAAsB,GAAW,CAAC,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\n\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { registerForFinalization } from '../finalizer';\nimport { Ge1xGripperState } from './ge_1_x_gripper_state';\nimport { Ge1xGripperError } from './ge_1_x_gripper_error';\nimport { Ge1xGripperDirection } from './ge_1_x_gripper_direction';\n\n/**\n * Class representing a gripper in the GE1x series.\n */\nexport class Ge1xGripper {\n /**\n * The default device address for a gripper in the GE1x series.\n */\n public static readonly DEFAULT_DEVICE_ADDRESS: number = 1;\n\n /**\n * The identifier for the connection.\n */\n public get connectionId(): number {\n return this._connectionId;\n }\n private _connectionId: number;\n\n constructor(connectionId: number) {\n this._connectionId = connectionId;\n registerForFinalization(this, Ge1xGripper._free.bind(null, connectionId));\n }\n\n /**\n * Opens a serial connection to a gripper.\n * @param portName The name of the serial port to connect to.\n * @param [options.deviceAddress=Ge1xGripper.DEFAULT_DEVICE_ADDRESS] The address of the gripper to connect to.\n * @param [options.timeout=500] The timeout in milliseconds for any request sent using this connection.\n * @returns A Ge1xGripper instance representing the connection to the gripper.\n */\n public static async openConnection(\n portName: string,\n options: Ge1xGripper.OpenConnectionOptions = {}\n ): Promise<Ge1xGripper> {\n const {\n deviceAddress = Ge1xGripper.DEFAULT_DEVICE_ADDRESS,\n timeout = 500,\n } = options;\n const request: requests.Ge1xGripperOpenConnectionRequest & gateway.Message = {\n ...requests.Ge1xGripperOpenConnectionRequest.DEFAULT,\n portName: portName,\n deviceAddress: deviceAddress,\n timeout: timeout,\n toBinary() {\n return requests.Ge1xGripperOpenConnectionRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/open_connection',\n request,\n requests.IntResponse.fromBinary);\n return new Ge1xGripper(response.value);\n }\n\n /**\n * Closes the connection to the gripper.\n */\n public async close(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/close_connection', request);\n }\n\n /**\n * Reads a single register value from the gripper.\n * @param registerAddress The address of the register to read.\n * @returns The data at the specified register address.\n */\n public async readRegister(\n registerAddress: number\n ): Promise<number> {\n const request: requests.Ge1xGripperReadRegisterRequest & gateway.Message = {\n ...requests.Ge1xGripperReadRegisterRequest.DEFAULT,\n connectionId: this.connectionId,\n registerAddress: registerAddress,\n toBinary() {\n return requests.Ge1xGripperReadRegisterRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/read_register',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Writes a single register value to the gripper.\n * @param registerAddress The address of the register to write.\n * @param data The data to write to the specified register address.\n */\n public async writeRegister(\n registerAddress: number,\n data: number\n ): Promise<void> {\n const request: requests.Ge1xGripperWriteRegisterRequest & gateway.Message = {\n ...requests.Ge1xGripperWriteRegisterRequest.DEFAULT,\n connectionId: this.connectionId,\n registerAddress: registerAddress,\n data: data,\n toBinary() {\n return requests.Ge1xGripperWriteRegisterRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/write_register', request);\n }\n\n /**\n * Homes gripper by moving it to its homing position.\n * @param [options.waitUntilIdle=true] Wait until homing has completed before returning.\n */\n public async home(\n options: Ge1xGripper.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperWaitUntilIdleRequest & gateway.Message = {\n ...requests.Ge1xGripperWaitUntilIdleRequest.DEFAULT,\n connectionId: this.connectionId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/home', request);\n }\n\n /**\n * Waits until the gripper has stopped moving.\n */\n public async waitUntilIdle(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/wait_until_idle', request);\n }\n\n /**\n * Moves the gripper to a specified position.\n * @param position The target position for the gripper as a percentage, where 0 is closed and 100 is open.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async move(\n position: number,\n options: Ge1xGripper.MoveOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: position,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Moves the gripper to the open position.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async moveOpen(\n options: Ge1xGripper.MoveOpenOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: 100,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Moves the gripper to the closed position.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async moveClose(\n options: Ge1xGripper.MoveCloseOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperMoveRequest & gateway.Message = {\n ...requests.Ge1xGripperMoveRequest.DEFAULT,\n connectionId: this.connectionId,\n position: 0,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/move', request);\n }\n\n /**\n * Stops the gripper from moving.\n * @param [options.waitUntilIdle=true] Wait until the gripper has stopped before returning.\n */\n public async stop(\n options: Ge1xGripper.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperWaitUntilIdleRequest & gateway.Message = {\n ...requests.Ge1xGripperWaitUntilIdleRequest.DEFAULT,\n connectionId: this.connectionId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/stop', request);\n }\n\n /**\n * Sets the gripping force of the gripper.\n * @param force The gripping force as a percentage from 20 to 100.\n */\n public async setForce(\n force: number\n ): Promise<void> {\n const request: requests.Ge1xGripperSetForceRequest & gateway.Message = {\n ...requests.Ge1xGripperSetForceRequest.DEFAULT,\n connectionId: this.connectionId,\n force: force,\n toBinary() {\n return requests.Ge1xGripperSetForceRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_force', request);\n }\n\n /**\n * Sets the maximum speed of the gripper.\n * @param speed The maximum speed as a percentage from 1 to 100.\n */\n public async setSpeed(\n speed: number\n ): Promise<void> {\n const request: requests.Ge1xGripperSetSpeedRequest & gateway.Message = {\n ...requests.Ge1xGripperSetSpeedRequest.DEFAULT,\n connectionId: this.connectionId,\n speed: speed,\n toBinary() {\n return requests.Ge1xGripperSetSpeedRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_speed', request);\n }\n\n /**\n * Enables the gripper driver.\n */\n public async driverEnable(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/driver_enable', request);\n }\n\n /**\n * Disables the gripper driver.\n */\n public async driverDisable(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/driver_disable', request);\n }\n\n /**\n * Performs a calibration of the travel range by moving to the fully open and fully closed positions.\n */\n public async calibrate(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/calibrate', request);\n }\n\n /**\n * Gets the current state of the gripper.\n * @returns The current state of the gripper.\n */\n public async getState(): Promise<Ge1xGripperState> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Ge1xGripperGetStateResponse>(\n 'ge1x_gripper/get_state',\n request,\n requests.Ge1xGripperGetStateResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current error of the gripper.\n * @returns The current error of the gripper.\n */\n public async getError(): Promise<Ge1xGripperError> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Ge1xGripperGetErrorResponse>(\n 'ge1x_gripper/get_error',\n request,\n requests.Ge1xGripperGetErrorResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the current error of the gripper.\n */\n public async clearError(): Promise<void> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/clear_error', request);\n }\n\n /**\n * Checks if the gripper has been homed.\n * @returns True if the gripper is homed, false otherwise.\n */\n public async isHomed(): Promise<boolean> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'ge1x_gripper/is_homed',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current position of the gripper.\n * @returns The current position of the gripper as a percentage, where 0 is closed and 100 is open.\n */\n public async getPosition(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'ge1x_gripper/get_position',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the current current of the gripper.\n * @returns The current current of the gripper in milliamps.\n */\n public async getCurrent(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/get_current',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets the home direction for the gripper.\n * @param direction The home direction to set.\n * @param [options.saveToFlash=true] Save the home direction setting to flash memory so it is retained on power cycle.\n */\n public async setHomeDirection(\n direction: Ge1xGripperDirection,\n options: Ge1xGripper.SetHomeDirectionOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetHomeDirectionRequest & gateway.Message = {\n ...requests.Ge1xGripperSetHomeDirectionRequest.DEFAULT,\n connectionId: this.connectionId,\n direction: direction,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetHomeDirectionRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_home_direction', request);\n }\n\n /**\n * Enables or disables automatic homing on power up.\n * @param enabled True to enable automatic homing on power up, false to disable.\n * @param [options.saveToFlash=true] Save the auto home setting to flash memory so it is retained on power cycle.\n */\n public async setAutoHome(\n enabled: boolean,\n options: Ge1xGripper.SetAutoHomeOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetAutoHomeRequest & gateway.Message = {\n ...requests.Ge1xGripperSetAutoHomeRequest.DEFAULT,\n connectionId: this.connectionId,\n enabled: enabled,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetAutoHomeRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_auto_home', request);\n }\n\n /**\n * Enables or disables IO control for the gripper.\n * When enabled, the gripper will not move to a preset position until the IO input changes.\n * @param enabled True to enable IO control, false to disable.\n * @param [options.saveToFlash=true] Save the IO enabled setting to flash memory so it is retained on power cycle.\n */\n public async setIoEnabled(\n enabled: boolean,\n options: Ge1xGripper.SetIoEnabledOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetIoEnabledRequest & gateway.Message = {\n ...requests.Ge1xGripperSetIoEnabledRequest.DEFAULT,\n connectionId: this.connectionId,\n enabled: enabled,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetIoEnabledRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_io_enabled', request);\n }\n\n /**\n * Sets the debounce filter time for the gripper IO input to suppress noise.\n * @param duration The IO input filter time in milliseconds.\n * @param [options.saveToFlash=true] Save the IO input filter setting to flash memory so it is retained on power cycle.\n */\n public async setIoInputFilter(\n duration: number,\n options: Ge1xGripper.SetIoInputFilterOptions = {}\n ): Promise<void> {\n const {\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetIoInputFilterRequest & gateway.Message = {\n ...requests.Ge1xGripperSetIoInputFilterRequest.DEFAULT,\n connectionId: this.connectionId,\n duration: duration,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetIoInputFilterRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_io_input_filter', request);\n }\n\n /**\n * Saves a position, force, and speed as a preset that can be enabled using I/O or the activatePreset() method.\n * Note that presets are only activated by I/O when the I/O input changes to that preset number.\n * @param presetNumber The preset number to save the preset to, from 1 to 4.\n * @param position The target position for the preset as a percentage, where 0 is closed and 100 is open.\n * @param [options.force=100] The gripping force for the preset as a percentage from 20 to 100.\n * @param [options.speed=100] The maximum speed for the preset as a percentage from 1 to 100.\n * @param [options.saveToFlash=true] Save the preset to flash memory so it is retained on power cycle.\n */\n public async setPreset(\n presetNumber: number,\n position: number,\n options: Ge1xGripper.SetPresetOptions = {}\n ): Promise<void> {\n const {\n force = 100,\n speed = 100,\n saveToFlash = true,\n } = options;\n const request: requests.Ge1xGripperSetPresetRequest & gateway.Message = {\n ...requests.Ge1xGripperSetPresetRequest.DEFAULT,\n connectionId: this.connectionId,\n presetNumber: presetNumber,\n position: position,\n force: force,\n speed: speed,\n saveToFlash: saveToFlash,\n toBinary() {\n return requests.Ge1xGripperSetPresetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/set_preset', request);\n }\n\n /**\n * Activates a preset, causing the gripper to move to the preset position using the preset force and speed.\n * @param presetNumber The preset number to activate, from 1 to 4.\n * @param [options.waitUntilIdle=true] Wait until the move has completed before returning.\n */\n public async activatePreset(\n presetNumber: number,\n options: Ge1xGripper.ActivatePresetOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.Ge1xGripperActivatePresetRequest & gateway.Message = {\n ...requests.Ge1xGripperActivatePresetRequest.DEFAULT,\n connectionId: this.connectionId,\n presetNumber: presetNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.Ge1xGripperActivatePresetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('ge1x_gripper/activate_preset', request);\n }\n\n /**\n * Gets the preset number currently activated by the gripper IO input.\n * @returns The current preset number activated by the gripper IO input.\n */\n public async getIoInputPresetNumber(): Promise<number> {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: this.connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'ge1x_gripper/get_io_input_preset_number',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Frees the connection instance.\n * @param connectionId Connection ID to be freed.\n */\n private static _free(\n connectionId: number\n ): void {\n const request: requests.Ge1xGripperEmptyRequest & gateway.Message = {\n ...requests.Ge1xGripperEmptyRequest.DEFAULT,\n connectionId: connectionId,\n toBinary() {\n return requests.Ge1xGripperEmptyRequest.toBinary(this);\n },\n };\n\n gateway.callSync('ge1x_gripper/free_connection', request);\n }\n\n /**\n * Releases the native resources of the ge 1 x gripper.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n Ge1xGripper._free(this.connectionId);\n }\n}\n\nnamespace Ge1xGripper {\n export interface OpenConnectionOptions {\n /**\n * The address of the gripper to connect to.\n */\n deviceAddress?: number;\n /**\n * The timeout in milliseconds for any request sent using this connection.\n */\n timeout?: number;\n }\n export interface HomeOptions {\n /**\n * Wait until homing has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveOpenOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveCloseOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n /**\n * Wait until the gripper has stopped before returning.\n */\n waitUntilIdle?: boolean;\n }\n export interface SetHomeDirectionOptions {\n /**\n * Save the home direction setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetAutoHomeOptions {\n /**\n * Save the auto home setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetIoEnabledOptions {\n /**\n * Save the IO enabled setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetIoInputFilterOptions {\n /**\n * Save the IO input filter setting to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface SetPresetOptions {\n /**\n * The gripping force for the preset as a percentage from 20 to 100.\n */\n force?: number;\n /**\n * The maximum speed for the preset as a percentage from 1 to 100.\n */\n speed?: number;\n /**\n * Save the preset to flash memory so it is retained on power cycle.\n */\n saveToFlash?: boolean;\n }\n export interface ActivatePresetOptions {\n /**\n * Wait until the move has completed before returning.\n */\n waitUntilIdle?: boolean;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device_convert_setting_request.d.ts","sourceRoot":"","sources":["../../../src/requests/device_convert_setting_request.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,KAAK,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"device_convert_setting_request.d.ts","sourceRoot":"","sources":["../../../src/requests/device_convert_setting_request.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,KAAK,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,OAAO,CAAC;IAEpB,KAAK,EAAE,OAAO,CAAC;CAEhB;AAED,eAAO,MAAM,2BAA2B;yBACjB,UAAU,KAAG,2BAA2B;sBAE3C,2BAA2B,KAAG,UAAU;;sBAaxC,2BAA2B,KAAG,2BAA2B;qBAe1D,KAAK,QAAQ,KAAG,2BAA2B;iBAW/C,GAAG;CAejB,CAAC"}
|
|
@@ -17,6 +17,7 @@ exports.DeviceConvertSettingRequest = {
|
|
|
17
17
|
unit: units_1.Units.NATIVE,
|
|
18
18
|
value: 0,
|
|
19
19
|
fromNative: false,
|
|
20
|
+
round: false,
|
|
20
21
|
}),
|
|
21
22
|
sanitize: (value) => {
|
|
22
23
|
if (value == null) {
|
|
@@ -33,6 +34,7 @@ exports.DeviceConvertSettingRequest = {
|
|
|
33
34
|
unit: sanitizer_1.sanitizer.sanitizeUnits(value.unit, 'unit'),
|
|
34
35
|
value: sanitizer_1.sanitizer.sanitizeNumber(value.value, 'value'),
|
|
35
36
|
fromNative: sanitizer_1.sanitizer.sanitizeBool(value.fromNative, 'fromNative'),
|
|
37
|
+
round: sanitizer_1.sanitizer.sanitizeBool(value.round, 'round'),
|
|
36
38
|
};
|
|
37
39
|
},
|
|
38
40
|
convert: (value) => ({
|
|
@@ -43,6 +45,7 @@ exports.DeviceConvertSettingRequest = {
|
|
|
43
45
|
unit: value.unit,
|
|
44
46
|
value: value.value,
|
|
45
47
|
fromNative: value.fromNative,
|
|
48
|
+
round: value.round,
|
|
46
49
|
}),
|
|
47
50
|
isA: (value) => {
|
|
48
51
|
const castValue = value;
|
|
@@ -54,7 +57,8 @@ exports.DeviceConvertSettingRequest = {
|
|
|
54
57
|
sanitizer_1.sanitizer.isString(castValue.setting) &&
|
|
55
58
|
sanitizer_1.sanitizer.isUnits(castValue.unit) &&
|
|
56
59
|
sanitizer_1.sanitizer.isNumber(castValue.value) &&
|
|
57
|
-
sanitizer_1.sanitizer.isBool(castValue.fromNative)
|
|
60
|
+
sanitizer_1.sanitizer.isBool(castValue.fromNative) &&
|
|
61
|
+
sanitizer_1.sanitizer.isBool(castValue.round));
|
|
58
62
|
},
|
|
59
63
|
};
|
|
60
64
|
//# sourceMappingURL=device_convert_setting_request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device_convert_setting_request.js","sourceRoot":"","sources":["../../../src/requests/device_convert_setting_request.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,oCAAiC;
|
|
1
|
+
{"version":3,"file":"device_convert_setting_request.js","sourceRoot":"","sources":["../../../src/requests/device_convert_setting_request.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,oCAAiC;AAqBpB,QAAA,2BAA2B,GAAG;IACzC,UAAU,EAAE,CAAC,MAAkB,EAA+B,EAAE,CAAC,mCAA2B,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAErJ,QAAQ,EAAE,CAAC,KAAkC,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,mCAA2B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEzH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,aAAK,CAAC,MAAM;QAClB,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,KAAK;KACb,CAA0C;IAE3C,QAAQ,EAAE,CAAC,KAAkC,EAA+B,EAAE;QAC5E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,wEAAwE,CAAC,CAAA;QAAC,CAAC;QACpH,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,uDAAuD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAC9H,OAAO;YACL,WAAW,EAAE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CAAC,SAAS,CAAC,MAAM,CAAC;YACjC,qBAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;YAC/B,qBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;YACrC,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;YACjC,qBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC;YACnC,qBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;YACtC,qBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAClC,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { Units } from '../units';\n\nexport interface DeviceConvertSettingRequest {\n interfaceId: number;\n\n device: number;\n\n axis: number;\n\n setting: string;\n\n unit: Units;\n\n value: number;\n\n fromNative: boolean;\n\n round: boolean;\n\n}\n\nexport const DeviceConvertSettingRequest = {\n fromBinary: (buffer: Uint8Array): DeviceConvertSettingRequest => DeviceConvertSettingRequest.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: DeviceConvertSettingRequest): Uint8Array => BSON.serialize(DeviceConvertSettingRequest.sanitize(value)),\n\n DEFAULT: Object.freeze({\n interfaceId: 0,\n device: 0,\n axis: 0,\n setting: '',\n unit: Units.NATIVE,\n value: 0,\n fromNative: false,\n round: false,\n }) as Readonly<DeviceConvertSettingRequest>,\n\n sanitize: (value: DeviceConvertSettingRequest): DeviceConvertSettingRequest => {\n if (value == null) { throw new TypeError('Expected DeviceConvertSettingRequest object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected DeviceConvertSettingRequest object but got ${typeof value}.`) }\n return {\n interfaceId: sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),\n device: sanitizer.sanitizeInt(value.device, 'device'),\n axis: sanitizer.sanitizeInt(value.axis, 'axis'),\n setting: sanitizer.sanitizeString(value.setting, 'setting'),\n unit: sanitizer.sanitizeUnits(value.unit, 'unit'),\n value: sanitizer.sanitizeNumber(value.value, 'value'),\n fromNative: sanitizer.sanitizeBool(value.fromNative, 'fromNative'),\n round: sanitizer.sanitizeBool(value.round, 'round'),\n };\n },\n\n convert: (value: BSON.Document): DeviceConvertSettingRequest => ({\n interfaceId: value.interfaceId,\n device: value.device,\n axis: value.axis,\n setting: value.setting,\n unit: value.unit,\n value: value.value,\n fromNative: value.fromNative,\n round: value.round,\n }),\n\n isA: (value: any): value is DeviceConvertSettingRequest => {\n const castValue = value as DeviceConvertSettingRequest;\n return (\n value != null &&\n typeof value === 'object' &&\n sanitizer.isInt(castValue.interfaceId) &&\n sanitizer.isInt(castValue.device) &&\n sanitizer.isInt(castValue.axis) &&\n sanitizer.isString(castValue.setting) &&\n sanitizer.isUnits(castValue.unit) &&\n sanitizer.isNumber(castValue.value) &&\n sanitizer.isBool(castValue.fromNative) &&\n sanitizer.isBool(castValue.round)\n );\n },\n};\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BSON } from 'bson';
|
|
2
|
+
import { GetSetting } from '../ascii/get_setting';
|
|
3
|
+
export interface DeviceGetManyByTypeRequest {
|
|
4
|
+
interfaceId: number;
|
|
5
|
+
device: number;
|
|
6
|
+
floatSettings: GetSetting[];
|
|
7
|
+
intSettings: GetSetting[];
|
|
8
|
+
boolSettings: GetSetting[];
|
|
9
|
+
stringSettings: GetSetting[];
|
|
10
|
+
}
|
|
11
|
+
export declare const DeviceGetManyByTypeRequest: {
|
|
12
|
+
fromBinary: (buffer: Uint8Array) => DeviceGetManyByTypeRequest;
|
|
13
|
+
toBinary: (value: DeviceGetManyByTypeRequest) => Uint8Array;
|
|
14
|
+
DEFAULT: Readonly<DeviceGetManyByTypeRequest>;
|
|
15
|
+
sanitize: (value: DeviceGetManyByTypeRequest) => DeviceGetManyByTypeRequest;
|
|
16
|
+
convert: (value: BSON.Document) => DeviceGetManyByTypeRequest;
|
|
17
|
+
isA: (value: any) => value is DeviceGetManyByTypeRequest;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=device_get_many_by_type_request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device_get_many_by_type_request.d.ts","sourceRoot":"","sources":["../../../src/requests/device_get_many_by_type_request.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,aAAa,EAAE,UAAU,EAAE,CAAC;IAE5B,WAAW,EAAE,UAAU,EAAE,CAAC;IAE1B,YAAY,EAAE,UAAU,EAAE,CAAC;IAE3B,cAAc,EAAE,UAAU,EAAE,CAAC;CAE9B;AAED,eAAO,MAAM,0BAA0B;yBAChB,UAAU,KAAG,0BAA0B;sBAE1C,0BAA0B,KAAG,UAAU;;sBAWvC,0BAA0B,KAAG,0BAA0B;qBAaxD,KAAK,QAAQ,KAAG,0BAA0B;iBAS9C,GAAG;CAajB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceGetManyByTypeRequest = void 0;
|
|
4
|
+
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
|
|
5
|
+
// ============== DO NOT EDIT DIRECTLY ============== //
|
|
6
|
+
const bson_1 = require("bson");
|
|
7
|
+
const sanitizer_1 = require("../gateway/sanitizer");
|
|
8
|
+
const get_setting_1 = require("../ascii/get_setting");
|
|
9
|
+
exports.DeviceGetManyByTypeRequest = {
|
|
10
|
+
fromBinary: (buffer) => exports.DeviceGetManyByTypeRequest.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
|
|
11
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.DeviceGetManyByTypeRequest.sanitize(value)),
|
|
12
|
+
DEFAULT: Object.freeze({
|
|
13
|
+
interfaceId: 0,
|
|
14
|
+
device: 0,
|
|
15
|
+
floatSettings: [],
|
|
16
|
+
intSettings: [],
|
|
17
|
+
boolSettings: [],
|
|
18
|
+
stringSettings: [],
|
|
19
|
+
}),
|
|
20
|
+
sanitize: (value) => {
|
|
21
|
+
if (value == null) {
|
|
22
|
+
throw new TypeError('Expected DeviceGetManyByTypeRequest object but got null or undefined.');
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== 'object') {
|
|
25
|
+
throw new TypeError(`Expected DeviceGetManyByTypeRequest object but got ${typeof value}.`);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
interfaceId: sanitizer_1.sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),
|
|
29
|
+
device: sanitizer_1.sanitizer.sanitizeInt(value.device, 'device'),
|
|
30
|
+
floatSettings: Array.from(value.floatSettings ?? [], item => get_setting_1.GetSetting.sanitize(item)),
|
|
31
|
+
intSettings: Array.from(value.intSettings ?? [], item => get_setting_1.GetSetting.sanitize(item)),
|
|
32
|
+
boolSettings: Array.from(value.boolSettings ?? [], item => get_setting_1.GetSetting.sanitize(item)),
|
|
33
|
+
stringSettings: Array.from(value.stringSettings ?? [], item => get_setting_1.GetSetting.sanitize(item)),
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
convert: (value) => ({
|
|
37
|
+
interfaceId: value.interfaceId,
|
|
38
|
+
device: value.device,
|
|
39
|
+
floatSettings: value.floatSettings,
|
|
40
|
+
intSettings: value.intSettings,
|
|
41
|
+
boolSettings: value.boolSettings,
|
|
42
|
+
stringSettings: value.stringSettings,
|
|
43
|
+
}),
|
|
44
|
+
isA: (value) => {
|
|
45
|
+
const castValue = value;
|
|
46
|
+
return (value != null &&
|
|
47
|
+
typeof value === 'object' &&
|
|
48
|
+
sanitizer_1.sanitizer.isInt(castValue.interfaceId) &&
|
|
49
|
+
sanitizer_1.sanitizer.isInt(castValue.device) &&
|
|
50
|
+
!!castValue.floatSettings?.every(item => get_setting_1.GetSetting.isA(item)) &&
|
|
51
|
+
!!castValue.intSettings?.every(item => get_setting_1.GetSetting.isA(item)) &&
|
|
52
|
+
!!castValue.boolSettings?.every(item => get_setting_1.GetSetting.isA(item)) &&
|
|
53
|
+
!!castValue.stringSettings?.every(item => get_setting_1.GetSetting.isA(item)));
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=device_get_many_by_type_request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device_get_many_by_type_request.js","sourceRoot":"","sources":["../../../src/requests/device_get_many_by_type_request.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,sDAAkD;AAiBrC,QAAA,0BAA0B,GAAG;IACxC,UAAU,EAAE,CAAC,MAAkB,EAA8B,EAAE,CAAC,kCAA0B,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEnJ,QAAQ,EAAE,CAAC,KAAiC,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,kCAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEvH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,aAAa,EAAE,EAAE;QACjB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,EAAE;KACnB,CAAyC;IAE1C,QAAQ,EAAE,CAAC,KAAiC,EAA8B,EAAE;QAC1E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,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C,cAAc;KACrC,CAAC;IAEF,GAAG,EAAE,CAAC,KAAU,EAAuC,EAAE;QACvD,MAAM,SAAS,GAAG,KAAmC,CAAC;QACtD,OAAO,CACL,KAAK,IAAI,IAAI;YACb,OAAO,KAAK,KAAK,QAAQ;YACzB,qBAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;YACtC,qBAAS,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;YACjC,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9D,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC5D,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC7D,CAAC,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAChE,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { GetSetting } from '../ascii/get_setting';\n\nexport interface DeviceGetManyByTypeRequest {\n interfaceId: number;\n\n device: number;\n\n floatSettings: GetSetting[];\n\n intSettings: GetSetting[];\n\n boolSettings: GetSetting[];\n\n stringSettings: GetSetting[];\n\n}\n\nexport const DeviceGetManyByTypeRequest = {\n fromBinary: (buffer: Uint8Array): DeviceGetManyByTypeRequest => DeviceGetManyByTypeRequest.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: DeviceGetManyByTypeRequest): Uint8Array => BSON.serialize(DeviceGetManyByTypeRequest.sanitize(value)),\n\n DEFAULT: Object.freeze({\n interfaceId: 0,\n device: 0,\n floatSettings: [],\n intSettings: [],\n boolSettings: [],\n stringSettings: [],\n }) as Readonly<DeviceGetManyByTypeRequest>,\n\n sanitize: (value: DeviceGetManyByTypeRequest): DeviceGetManyByTypeRequest => {\n if (value == null) { throw new TypeError('Expected DeviceGetManyByTypeRequest object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected DeviceGetManyByTypeRequest object but got ${typeof value}.`) }\n return {\n interfaceId: sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),\n device: sanitizer.sanitizeInt(value.device, 'device'),\n floatSettings: Array.from(value.floatSettings ?? [], item => GetSetting.sanitize(item)),\n intSettings: Array.from(value.intSettings ?? [], item => GetSetting.sanitize(item)),\n boolSettings: Array.from(value.boolSettings ?? [], item => GetSetting.sanitize(item)),\n stringSettings: Array.from(value.stringSettings ?? [], item => GetSetting.sanitize(item)),\n };\n },\n\n convert: (value: BSON.Document): DeviceGetManyByTypeRequest => ({\n interfaceId: value.interfaceId,\n device: value.device,\n floatSettings: value.floatSettings,\n intSettings: value.intSettings,\n boolSettings: value.boolSettings,\n stringSettings: value.stringSettings,\n }),\n\n isA: (value: any): value is DeviceGetManyByTypeRequest => {\n const castValue = value as DeviceGetManyByTypeRequest;\n return (\n value != null &&\n typeof value === 'object' &&\n sanitizer.isInt(castValue.interfaceId) &&\n sanitizer.isInt(castValue.device) &&\n !!castValue.floatSettings?.every(item => GetSetting.isA(item)) &&\n !!castValue.intSettings?.every(item => GetSetting.isA(item)) &&\n !!castValue.boolSettings?.every(item => GetSetting.isA(item)) &&\n !!castValue.stringSettings?.every(item => GetSetting.isA(item))\n );\n },\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BSON } from 'bson';
|
|
2
|
+
import { GetAxisSettingTypedResult } from '../ascii/get_axis_setting_typed_result';
|
|
3
|
+
export interface GetAxisSettingsTypedResponse {
|
|
4
|
+
values: GetAxisSettingTypedResult[];
|
|
5
|
+
}
|
|
6
|
+
export declare const GetAxisSettingsTypedResponse: {
|
|
7
|
+
fromBinary: (buffer: Uint8Array) => GetAxisSettingsTypedResponse;
|
|
8
|
+
toBinary: (value: GetAxisSettingsTypedResponse) => Uint8Array;
|
|
9
|
+
DEFAULT: Readonly<GetAxisSettingsTypedResponse>;
|
|
10
|
+
sanitize: (value: GetAxisSettingsTypedResponse) => GetAxisSettingsTypedResponse;
|
|
11
|
+
convert: (value: BSON.Document) => GetAxisSettingsTypedResponse;
|
|
12
|
+
isA: (value: any) => value is GetAxisSettingsTypedResponse;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=get_axis_settings_typed_response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_axis_settings_typed_response.d.ts","sourceRoot":"","sources":["../../../src/requests/get_axis_settings_typed_response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,yBAAyB,EAAE,CAAC;CAErC;AAED,eAAO,MAAM,4BAA4B;yBAClB,UAAU,KAAG,4BAA4B;sBAE5C,4BAA4B,KAAG,UAAU;;sBAMzC,4BAA4B,KAAG,4BAA4B;qBAQ5D,KAAK,QAAQ,KAAG,4BAA4B;iBAIhD,GAAG;CAQjB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAxisSettingsTypedResponse = void 0;
|
|
4
|
+
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
|
|
5
|
+
// ============== DO NOT EDIT DIRECTLY ============== //
|
|
6
|
+
const bson_1 = require("bson");
|
|
7
|
+
const get_axis_setting_typed_result_1 = require("../ascii/get_axis_setting_typed_result");
|
|
8
|
+
exports.GetAxisSettingsTypedResponse = {
|
|
9
|
+
fromBinary: (buffer) => exports.GetAxisSettingsTypedResponse.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
|
|
10
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.GetAxisSettingsTypedResponse.sanitize(value)),
|
|
11
|
+
DEFAULT: Object.freeze({
|
|
12
|
+
values: [],
|
|
13
|
+
}),
|
|
14
|
+
sanitize: (value) => {
|
|
15
|
+
if (value == null) {
|
|
16
|
+
throw new TypeError('Expected GetAxisSettingsTypedResponse object but got null or undefined.');
|
|
17
|
+
}
|
|
18
|
+
if (typeof value !== 'object') {
|
|
19
|
+
throw new TypeError(`Expected GetAxisSettingsTypedResponse object but got ${typeof value}.`);
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
values: Array.from(value.values ?? [], item => get_axis_setting_typed_result_1.GetAxisSettingTypedResult.sanitize(item)),
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
convert: (value) => ({
|
|
26
|
+
values: value.values.map(item => get_axis_setting_typed_result_1.GetAxisSettingTypedResult.convert(item)),
|
|
27
|
+
}),
|
|
28
|
+
isA: (value) => {
|
|
29
|
+
const castValue = value;
|
|
30
|
+
return (value != null &&
|
|
31
|
+
typeof value === 'object' &&
|
|
32
|
+
!!castValue.values?.every(item => get_axis_setting_typed_result_1.GetAxisSettingTypedResult.isA(item)));
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=get_axis_settings_typed_response.js.map
|