@zaber/motion 7.2.3 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
- package/dist/lib/ascii/axis.d.ts +3 -1
- package/dist/lib/ascii/axis.d.ts.map +1 -1
- package/dist/lib/ascii/axis.js +4 -1
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +3 -1
- package/dist/lib/ascii/device.d.ts.map +1 -1
- package/dist/lib/ascii/device.js +4 -1
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +2 -0
- package/dist/lib/ascii/index.d.ts.map +1 -1
- package/dist/lib/ascii/index.js +2 -0
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/set_state_axis_response.d.ts +20 -0
- package/dist/lib/ascii/set_state_axis_response.d.ts.map +1 -0
- package/dist/lib/ascii/set_state_axis_response.js +28 -0
- package/dist/lib/ascii/set_state_axis_response.js.map +1 -0
- package/dist/lib/ascii/set_state_device_response.d.ts +21 -0
- package/dist/lib/ascii/set_state_device_response.d.ts.map +1 -0
- package/dist/lib/ascii/set_state_device_response.js +29 -0
- package/dist/lib/ascii/set_state_device_response.js.map +1 -0
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/microscopy/illuminator_channel.d.ts +3 -1
- package/dist/lib/microscopy/illuminator_channel.d.ts.map +1 -1
- package/dist/lib/microscopy/illuminator_channel.js +4 -1
- package/dist/lib/microscopy/illuminator_channel.js.map +1 -1
- package/dist/lib/product/process.d.ts +3 -1
- package/dist/lib/product/process.d.ts.map +1 -1
- package/dist/lib/product/process.js +4 -1
- package/dist/lib/product/process.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":"AACA,cAAc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AC;AAC/B,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
package/dist/lib/ascii/index.js
CHANGED
|
@@ -58,6 +58,8 @@ __exportStar(require("./response"), exports);
|
|
|
58
58
|
__exportStar(require("./servo_tuner"), exports);
|
|
59
59
|
__exportStar(require("./servo_tuning_param"), exports);
|
|
60
60
|
__exportStar(require("./servo_tuning_paramset"), exports);
|
|
61
|
+
__exportStar(require("./set_state_axis_response"), exports);
|
|
62
|
+
__exportStar(require("./set_state_device_response"), exports);
|
|
61
63
|
__exportStar(require("./setting_constants"), exports);
|
|
62
64
|
__exportStar(require("./simple_tuning"), exports);
|
|
63
65
|
__exportStar(require("./simple_tuning_param_definition"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,kDAAgC;AAChC,kDAAgC;AAChC,8CAA4B;AAC5B,gEAA8C;AAC9C,kEAAgD;AAChD,+CAA6B;AAC7B,sDAAoC;AACpC,2CAAyB;AACzB,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,oDAAkC;AAClC,0DAAwC;AACxC,qDAAmC;AACnC,4DAA0C;AAC1C,gDAA8B;AAC9B,uDAAqC;AACrC,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,kDAAgC;AAChC,iDAA+B;AAC/B,iDAA+B;AAC/B,oEAAkD;AAClD,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,gDAA8B;AAC9B,uDAAqC;AACrC,0DAAwC;AACxC,sDAAoC;AACpC,kDAAgC;AAChC,mEAAiD;AACjD,4CAA0B;AAC1B,2CAAyB;AACzB,2DAAyC;AACzC,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,kDAAgC;AAChC,6CAA2B;AAC3B,2DAAyC;AACzC,kDAAgC;AAChC,6CAA2B","sourcesContent":["/* This file is generated. Do not modify by hand. */\nexport * from './alert_event';\nexport * from './all_axes';\nexport * from './axis';\nexport * from './axis_group';\nexport * from './axis_identity';\nexport * from './axis_settings';\nexport * from './axis_type';\nexport * from './can_set_state_axis_response';\nexport * from './can_set_state_device_response';\nexport * from './connection';\nexport * from './conversion_factor';\nexport * from './device';\nexport * from './device_identity';\nexport * from './device_io';\nexport * from './device_io_info';\nexport * from './device_settings';\nexport * from './digital_output_action';\nexport * from './get_axis_setting';\nexport * from './get_axis_setting_result';\nexport * from './get_setting';\nexport * from './get_setting_result';\nexport * from './io_port_label';\nexport * from './io_port_type';\nexport * from './lockstep';\nexport * from './lockstep_axes';\nexport * from './message_type';\nexport * from './oscilloscope';\nexport * from './oscilloscope_capture_properties';\nexport * from './oscilloscope_data';\nexport * from './oscilloscope_data_source';\nexport * from './paramset_info';\nexport * from './pid_tuning';\nexport * from './pvt';\nexport * from './pvt_axis_definition';\nexport * from './pvt_axis_type';\nexport * from './pvt_buffer';\nexport * from './pvt_io';\nexport * from './pvt_mode';\nexport * from './pvt_sequence';\nexport * from './response';\nexport * from './servo_tuner';\nexport * from './servo_tuning_param';\nexport * from './servo_tuning_paramset';\nexport * from './setting_constants';\nexport * from './simple_tuning';\nexport * from './simple_tuning_param_definition';\nexport * from './storage';\nexport * from './stream';\nexport * from './stream_axis_definition';\nexport * from './stream_axis_type';\nexport * from './stream_buffer';\nexport * from './stream_io';\nexport * from './stream_mode';\nexport * from './streams';\nexport * from './transport';\nexport * from './trigger';\nexport * from './trigger_action';\nexport * from './trigger_condition';\nexport * from './trigger_enabled_state';\nexport * from './trigger_operation';\nexport * from './trigger_state';\nexport * from './triggers';\nexport * from './unknown_response_event';\nexport * from './warning_flags';\nexport * from './warnings';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,kDAAgC;AAChC,kDAAgC;AAChC,8CAA4B;AAC5B,gEAA8C;AAC9C,kEAAgD;AAChD,+CAA6B;AAC7B,sDAAoC;AACpC,2CAAyB;AACzB,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,oDAAkC;AAClC,0DAAwC;AACxC,qDAAmC;AACnC,4DAA0C;AAC1C,gDAA8B;AAC9B,uDAAqC;AACrC,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,kDAAgC;AAChC,iDAA+B;AAC/B,iDAA+B;AAC/B,oEAAkD;AAClD,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,gDAA8B;AAC9B,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,8DAA4C;AAC5C,sDAAoC;AACpC,kDAAgC;AAChC,mEAAiD;AACjD,4CAA0B;AAC1B,2CAAyB;AACzB,2DAAyC;AACzC,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,kDAAgC;AAChC,6CAA2B;AAC3B,2DAAyC;AACzC,kDAAgC;AAChC,6CAA2B","sourcesContent":["/* This file is generated. Do not modify by hand. */\nexport * from './alert_event';\nexport * from './all_axes';\nexport * from './axis';\nexport * from './axis_group';\nexport * from './axis_identity';\nexport * from './axis_settings';\nexport * from './axis_type';\nexport * from './can_set_state_axis_response';\nexport * from './can_set_state_device_response';\nexport * from './connection';\nexport * from './conversion_factor';\nexport * from './device';\nexport * from './device_identity';\nexport * from './device_io';\nexport * from './device_io_info';\nexport * from './device_settings';\nexport * from './digital_output_action';\nexport * from './get_axis_setting';\nexport * from './get_axis_setting_result';\nexport * from './get_setting';\nexport * from './get_setting_result';\nexport * from './io_port_label';\nexport * from './io_port_type';\nexport * from './lockstep';\nexport * from './lockstep_axes';\nexport * from './message_type';\nexport * from './oscilloscope';\nexport * from './oscilloscope_capture_properties';\nexport * from './oscilloscope_data';\nexport * from './oscilloscope_data_source';\nexport * from './paramset_info';\nexport * from './pid_tuning';\nexport * from './pvt';\nexport * from './pvt_axis_definition';\nexport * from './pvt_axis_type';\nexport * from './pvt_buffer';\nexport * from './pvt_io';\nexport * from './pvt_mode';\nexport * from './pvt_sequence';\nexport * from './response';\nexport * from './servo_tuner';\nexport * from './servo_tuning_param';\nexport * from './servo_tuning_paramset';\nexport * from './set_state_axis_response';\nexport * from './set_state_device_response';\nexport * from './setting_constants';\nexport * from './simple_tuning';\nexport * from './simple_tuning_param_definition';\nexport * from './storage';\nexport * from './stream';\nexport * from './stream_axis_definition';\nexport * from './stream_axis_type';\nexport * from './stream_buffer';\nexport * from './stream_io';\nexport * from './stream_mode';\nexport * from './streams';\nexport * from './transport';\nexport * from './trigger';\nexport * from './trigger_action';\nexport * from './trigger_condition';\nexport * from './trigger_enabled_state';\nexport * from './trigger_operation';\nexport * from './trigger_state';\nexport * from './triggers';\nexport * from './unknown_response_event';\nexport * from './warning_flags';\nexport * from './warnings';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An object containing any non-blocking issues encountered when loading a saved state to an axis.
|
|
3
|
+
*/
|
|
4
|
+
export interface SetStateAxisResponse {
|
|
5
|
+
/**
|
|
6
|
+
* The warnings encountered when applying this state to the given axis.
|
|
7
|
+
*/
|
|
8
|
+
warnings: string[];
|
|
9
|
+
/**
|
|
10
|
+
* The number of the axis that was set.
|
|
11
|
+
*/
|
|
12
|
+
axisNumber: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const SetStateAxisResponse: {
|
|
15
|
+
fromBinary: (buffer: Uint8Array) => SetStateAxisResponse;
|
|
16
|
+
toBinary: (value: SetStateAxisResponse) => Uint8Array;
|
|
17
|
+
DEFAULT: Readonly<SetStateAxisResponse>;
|
|
18
|
+
sanitize: (value: SetStateAxisResponse) => SetStateAxisResponse;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=set_state_axis_response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set_state_axis_response.d.ts","sourceRoot":"","sources":["../../../src/ascii/set_state_axis_response.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CAEpB;AAED,eAAO,MAAM,oBAAoB;yBACV,UAAU,KAAG,oBAAoB;sBACpC,oBAAoB,KAAG,UAAU;;sBAKjC,oBAAoB,KAAG,oBAAoB;CAQ9D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetStateAxisResponse = void 0;
|
|
4
|
+
/* This file is generated. Do not modify by hand. */
|
|
5
|
+
const bson_1 = require("bson");
|
|
6
|
+
const sanitizer_1 = require("../gateway/sanitizer");
|
|
7
|
+
exports.SetStateAxisResponse = {
|
|
8
|
+
fromBinary: (buffer) => bson_1.BSON.deserialize(buffer),
|
|
9
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.SetStateAxisResponse.sanitize(value)),
|
|
10
|
+
DEFAULT: Object.freeze({
|
|
11
|
+
warnings: [],
|
|
12
|
+
axisNumber: 0,
|
|
13
|
+
}),
|
|
14
|
+
sanitize: (value) => {
|
|
15
|
+
var _a;
|
|
16
|
+
if (value == null) {
|
|
17
|
+
throw new TypeError('Expected SetStateAxisResponse object but got null or undefined.');
|
|
18
|
+
}
|
|
19
|
+
if (typeof value !== 'object') {
|
|
20
|
+
throw new TypeError(`Expected SetStateAxisResponse object but got ${typeof value}.`);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
warnings: Array.from((_a = value.warnings) !== null && _a !== void 0 ? _a : [], item => sanitizer_1.sanitizer.sanitizeString(item, 'items of warnings')),
|
|
24
|
+
axisNumber: sanitizer_1.sanitizer.sanitizeInt(value.axisNumber, 'axisNumber'),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=set_state_axis_response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set_state_axis_response.js","sourceRoot":"","sources":["../../../src/ascii/set_state_axis_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAkBpC,QAAA,oBAAoB,GAAG;IAClC,UAAU,EAAE,CAAC,MAAkB,EAAwB,EAAE,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,CAAyB;IAC1G,QAAQ,EAAE,CAAC,KAA2B,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,4BAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3G,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,CAAC;KACd,CAAmC;IACpC,QAAQ,EAAE,CAAC,KAA2B,EAAwB,EAAE;;QAC9D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,iEAAiE,CAAC,CAAA;QAAC,CAAC;QAC7G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,gDAAgD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QACvH,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,QAAQ,mCAAI,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,qBAAS,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACvG,UAAU,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC;SAClE,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\n\n/**\n * An object containing any non-blocking issues encountered when loading a saved state to an axis.\n */\nexport interface SetStateAxisResponse {\n /**\n * The warnings encountered when applying this state to the given axis.\n */\n warnings: string[];\n\n /**\n * The number of the axis that was set.\n */\n axisNumber: number;\n\n}\n\nexport const SetStateAxisResponse = {\n fromBinary: (buffer: Uint8Array): SetStateAxisResponse => BSON.deserialize(buffer) as SetStateAxisResponse,\n toBinary: (value: SetStateAxisResponse): Uint8Array => BSON.serialize(SetStateAxisResponse.sanitize(value)),\n DEFAULT: Object.freeze({\n warnings: [],\n axisNumber: 0,\n }) as Readonly<SetStateAxisResponse>,\n sanitize: (value: SetStateAxisResponse): SetStateAxisResponse => {\n if (value == null) { throw new TypeError('Expected SetStateAxisResponse object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected SetStateAxisResponse object but got ${typeof value}.`) }\n return {\n warnings: Array.from(value.warnings ?? [], item => sanitizer.sanitizeString(item, 'items of warnings')),\n axisNumber: sanitizer.sanitizeInt(value.axisNumber, 'axisNumber'),\n };\n },\n};\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SetStateAxisResponse } from '../ascii/set_state_axis_response';
|
|
2
|
+
/**
|
|
3
|
+
* An object containing any non-blocking issues encountered when loading a saved state to a device.
|
|
4
|
+
*/
|
|
5
|
+
export interface SetStateDeviceResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The warnings encountered when applying this state to the given device.
|
|
8
|
+
*/
|
|
9
|
+
warnings: string[];
|
|
10
|
+
/**
|
|
11
|
+
* A list of warnings encountered when applying this state to the device's axes.
|
|
12
|
+
*/
|
|
13
|
+
axisResponses: SetStateAxisResponse[];
|
|
14
|
+
}
|
|
15
|
+
export declare const SetStateDeviceResponse: {
|
|
16
|
+
fromBinary: (buffer: Uint8Array) => SetStateDeviceResponse;
|
|
17
|
+
toBinary: (value: SetStateDeviceResponse) => Uint8Array;
|
|
18
|
+
DEFAULT: Readonly<SetStateDeviceResponse>;
|
|
19
|
+
sanitize: (value: SetStateDeviceResponse) => SetStateDeviceResponse;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=set_state_device_response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set_state_device_response.d.ts","sourceRoot":"","sources":["../../../src/ascii/set_state_device_response.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,oBAAoB,EAAE,CAAC;CAEvC;AAED,eAAO,MAAM,sBAAsB;yBACZ,UAAU,KAAG,sBAAsB;sBACtC,sBAAsB,KAAG,UAAU;;sBAKnC,sBAAsB,KAAG,sBAAsB;CAQlE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetStateDeviceResponse = void 0;
|
|
4
|
+
/* This file is generated. Do not modify by hand. */
|
|
5
|
+
const bson_1 = require("bson");
|
|
6
|
+
const sanitizer_1 = require("../gateway/sanitizer");
|
|
7
|
+
const set_state_axis_response_1 = require("../ascii/set_state_axis_response");
|
|
8
|
+
exports.SetStateDeviceResponse = {
|
|
9
|
+
fromBinary: (buffer) => bson_1.BSON.deserialize(buffer),
|
|
10
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.SetStateDeviceResponse.sanitize(value)),
|
|
11
|
+
DEFAULT: Object.freeze({
|
|
12
|
+
warnings: [],
|
|
13
|
+
axisResponses: [],
|
|
14
|
+
}),
|
|
15
|
+
sanitize: (value) => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
if (value == null) {
|
|
18
|
+
throw new TypeError('Expected SetStateDeviceResponse object but got null or undefined.');
|
|
19
|
+
}
|
|
20
|
+
if (typeof value !== 'object') {
|
|
21
|
+
throw new TypeError(`Expected SetStateDeviceResponse object but got ${typeof value}.`);
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
warnings: Array.from((_a = value.warnings) !== null && _a !== void 0 ? _a : [], item => sanitizer_1.sanitizer.sanitizeString(item, 'items of warnings')),
|
|
25
|
+
axisResponses: Array.from((_b = value.axisResponses) !== null && _b !== void 0 ? _b : [], item => set_state_axis_response_1.SetStateAxisResponse.sanitize(item)),
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=set_state_device_response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set_state_device_response.js","sourceRoot":"","sources":["../../../src/ascii/set_state_device_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,8EAAwE;AAkB3D,QAAA,sBAAsB,GAAG;IACpC,UAAU,EAAE,CAAC,MAAkB,EAA0B,EAAE,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,CAA2B;IAC9G,QAAQ,EAAE,CAAC,KAA6B,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,8BAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC/G,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,QAAQ,EAAE,EAAE;QACZ,aAAa,EAAE,EAAE;KAClB,CAAqC;IACtC,QAAQ,EAAE,CAAC,KAA6B,EAA0B,EAAE;;QAClE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,mEAAmE,CAAC,CAAA;QAAC,CAAC;QAC/G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,kDAAkD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QACzH,OAAO;YACL,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,QAAQ,mCAAI,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,qBAAS,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACvG,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,MAAA,KAAK,CAAC,aAAa,mCAAI,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,8CAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAClG,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { SetStateAxisResponse } from '../ascii/set_state_axis_response';\n\n/**\n * An object containing any non-blocking issues encountered when loading a saved state to a device.\n */\nexport interface SetStateDeviceResponse {\n /**\n * The warnings encountered when applying this state to the given device.\n */\n warnings: string[];\n\n /**\n * A list of warnings encountered when applying this state to the device's axes.\n */\n axisResponses: SetStateAxisResponse[];\n\n}\n\nexport const SetStateDeviceResponse = {\n fromBinary: (buffer: Uint8Array): SetStateDeviceResponse => BSON.deserialize(buffer) as SetStateDeviceResponse,\n toBinary: (value: SetStateDeviceResponse): Uint8Array => BSON.serialize(SetStateDeviceResponse.sanitize(value)),\n DEFAULT: Object.freeze({\n warnings: [],\n axisResponses: [],\n }) as Readonly<SetStateDeviceResponse>,\n sanitize: (value: SetStateDeviceResponse): SetStateDeviceResponse => {\n if (value == null) { throw new TypeError('Expected SetStateDeviceResponse object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected SetStateDeviceResponse object but got ${typeof value}.`) }\n return {\n warnings: Array.from(value.warnings ?? [], item => sanitizer.sanitizeString(item, 'items of warnings')),\n axisResponses: Array.from(value.axisResponses ?? [], item => SetStateAxisResponse.sanitize(item)),\n };\n },\n};\n"]}
|
package/dist/lib/library.js
CHANGED
package/dist/lib/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAIvC,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,QAAiB;QAEjB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,aAAsB;QAEtB,MAAM,OAAO,GAAwD;YACnE,GAAG,QAAQ,CAAC,wBAAwB,CAAC,OAAO;YAC5C,UAAU,EAAE,UAAU;YACtB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;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AAC;QAEF,OAAO,CAAC,QAAQ,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY;QACxB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AAtID,0BAsIC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,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 { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath?: string\n ): void {\n const request: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath?: string\n ): void {\n const request: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation?: string\n ): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables certain customer checks (like FF flag).\n * @param mode Whether to turn internal mode on or off.\n */\n public static setInternalMode(\n mode: boolean\n ): void {\n const request: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAIvC,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,QAAiB;QAEjB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,aAAsB;QAEtB,MAAM,OAAO,GAAwD;YACnE,GAAG,QAAQ,CAAC,wBAAwB,CAAC,OAAO;YAC5C,UAAU,EAAE,UAAU;YACtB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,mBAAmB,CAC/B,aAAsB;QAEtB,MAAM,OAAO,GAA0D;YACrE,GAAG,QAAQ,CAAC,0BAA0B,CAAC,OAAO;YAC9C,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,0BAA0B,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E,OAAO;YAChB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AAtID,0BAsIC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,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 { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath?: string\n ): void {\n const request: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath?: string\n ): void {\n const request: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation?: string\n ): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables certain customer checks (like FF flag).\n * @param mode Whether to turn internal mode on or off.\n */\n public static setInternalMode(\n mode: boolean\n ): void {\n const request: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.3.0',\n toBinary() {\n return requests.CheckVersionRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/check_version', request);\n }\n}\n\ngateway.addInitCallback(Library.checkVersion);\n"]}
|
|
@@ -3,6 +3,7 @@ import { AxisSettings } from '../ascii/axis_settings';
|
|
|
3
3
|
import { Warnings } from '../ascii/warnings';
|
|
4
4
|
import { Response } from '../ascii/response';
|
|
5
5
|
import type { Illuminator } from './illuminator';
|
|
6
|
+
import { SetStateAxisResponse } from '../ascii';
|
|
6
7
|
/**
|
|
7
8
|
* Use to control a channel (LED lamp) on an illuminator.
|
|
8
9
|
* Requires at least Firmware 7.09.
|
|
@@ -98,8 +99,9 @@ export declare class IlluminatorChannel {
|
|
|
98
99
|
/**
|
|
99
100
|
* Applies a saved state to this channel.
|
|
100
101
|
* @param state The state object to apply to this channel.
|
|
102
|
+
* @returns Reports of any issues that were handled, but caused the state to not be exactly restored.
|
|
101
103
|
*/
|
|
102
|
-
setState(state: string): Promise<
|
|
104
|
+
setState(state: string): Promise<SetStateAxisResponse>;
|
|
103
105
|
/**
|
|
104
106
|
* Checks if a state can be applied to this channel.
|
|
105
107
|
* This only covers exceptions that can be determined statically such as mismatches of ID or version,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"illuminator_channel.d.ts","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"illuminator_channel.d.ts","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO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,EACf,OAAO,GAAE,kBAAkB,CAAC,kCAAuC,GAClE,OAAO,CAAC,QAAQ,EAAE,CAAC;IAyBtB;;;;OAIG;IACU,wBAAwB,CACnC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAehB;;;OAGG;IACU,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAkBxC;;;;OAIG;IACU,QAAQ,CACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC;IAmBhC;;;;;;OAMG;IACU,WAAW,CACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmBzB;;;OAGG;IACI,QAAQ,IAAI,MAAM;CAkB1B;AAED,kBAAU,kBAAkB,CAAC;IAC3B,UAAiB,qBAAqB;QAClC;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;CACF"}
|
|
@@ -33,6 +33,7 @@ const storage_1 = require("../ascii/storage");
|
|
|
33
33
|
const axis_settings_1 = require("../ascii/axis_settings");
|
|
34
34
|
const warnings_1 = require("../ascii/warnings");
|
|
35
35
|
const response_1 = require("../ascii/response");
|
|
36
|
+
const ascii_1 = require("../ascii");
|
|
36
37
|
/**
|
|
37
38
|
* Use to control a channel (LED lamp) on an illuminator.
|
|
38
39
|
* Requires at least Firmware 7.09.
|
|
@@ -267,6 +268,7 @@ class IlluminatorChannel {
|
|
|
267
268
|
/**
|
|
268
269
|
* Applies a saved state to this channel.
|
|
269
270
|
* @param state The state object to apply to this channel.
|
|
271
|
+
* @returns Reports of any issues that were handled, but caused the state to not be exactly restored.
|
|
270
272
|
*/
|
|
271
273
|
async setState(state) {
|
|
272
274
|
const request = {
|
|
@@ -279,7 +281,8 @@ class IlluminatorChannel {
|
|
|
279
281
|
return requests.SetStateRequest.toBinary(this);
|
|
280
282
|
},
|
|
281
283
|
};
|
|
282
|
-
await gateway.callAsync('device/
|
|
284
|
+
const response = await gateway.callAsync('device/set_axis_state', request, ascii_1.SetStateAxisResponse.fromBinary);
|
|
285
|
+
return response;
|
|
283
286
|
}
|
|
284
287
|
/**
|
|
285
288
|
* Checks if a state can be applied to this channel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"illuminator_channel.js","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,sDAAwC;AACxC,wCAAqC;AACrC,8CAA+C;AAC/C,0DAAsD;AACtD,gDAA6C;AAC7C,gDAA6C;AAG7C;;;GAGG;AACH,MAAa,kBAAkB;IAC7B;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAKD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,WAAwB,EAAE,aAAqB;QACzD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,I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;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AA5WD,gDA4WC","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 { Axis } from '../ascii/axis';\nimport { AxisStorage } from '../ascii/storage';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { Warnings } from '../ascii/warnings';\nimport { Response } from '../ascii/response';\nimport type { Illuminator } from './illuminator';\n\n/**\n * Use to control a channel (LED lamp) on an illuminator.\n * Requires at least Firmware 7.09.\n */\nexport class IlluminatorChannel {\n /**\n * Illuminator of this channel.\n */\n public get illuminator(): Illuminator {\n return this._illuminator;\n }\n private _illuminator: Illuminator;\n\n /**\n * The channel number identifies the channel on the illuminator.\n */\n public get channelNumber(): number {\n return this._channelNumber;\n }\n private _channelNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this channel.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this channel.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this channel.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(illuminator: Illuminator, channelNumber: number) {\n this._illuminator = illuminator;\n this._channelNumber = channelNumber;\n this._axis = new Axis(illuminator.device, channelNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(illuminator.device, channelNumber);\n }\n\n /**\n * Turns this channel on.\n */\n public async on(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: true,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel off.\n */\n public async off(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: false,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel on or off.\n * @param on True to turn channel on, false to turn it off.\n */\n public async setOn(\n on: boolean\n ): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: on,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Checks if this channel is on.\n * @returns True if channel is on, false otherwise.\n */\n public async isOn(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'illuminator/is_on',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets channel intensity as a fraction of the maximum flux.\n * @param intensity Fraction of intensity to set (between 0 and 1).\n */\n public async setIntensity(\n intensity: number\n ): Promise<void> {\n const request: requests.ChannelSetIntensity & gateway.Message = {\n ...requests.ChannelSetIntensity.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n intensity: intensity,\n toBinary() {\n return requests.ChannelSetIntensity.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/set_intensity', request);\n }\n\n /**\n * Gets the current intensity of this channel.\n * @returns Current intensity as fraction of maximum flux.\n */\n public async getIntensity(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'illuminator/get_intensity',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this channel.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: IlluminatorChannel.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this channel and expects multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: IlluminatorChannel.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this channel without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current channel state that can be saved and reapplied.\n * @returns A serialization of the current state of the channel.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this channel.\n * @param state The state object to apply to this channel.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this channel.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this channel.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the channel.\n * @returns A string that represents the channel.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n typeOverride: 'Channel',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace IlluminatorChannel {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"illuminator_channel.js","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,sDAAwC;AACxC,wCAAqC;AACrC,8CAA+C;AAC/C,0DAAsD;AACtD,gDAA6C;AAC7C,gDAA6C;AAE7C,oCAAgD;AAEhD;;;GAGG;AACH,MAAa,kBAAkB;IAC7B;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAKD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,WAAwB,EAAE,aAAqB;QACzD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,qBAAW,CAA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AQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAjXD,gDAiXC","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 { Axis } from '../ascii/axis';\nimport { AxisStorage } from '../ascii/storage';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { Warnings } from '../ascii/warnings';\nimport { Response } from '../ascii/response';\nimport type { Illuminator } from './illuminator';\nimport { SetStateAxisResponse } from '../ascii';\n\n/**\n * Use to control a channel (LED lamp) on an illuminator.\n * Requires at least Firmware 7.09.\n */\nexport class IlluminatorChannel {\n /**\n * Illuminator of this channel.\n */\n public get illuminator(): Illuminator {\n return this._illuminator;\n }\n private _illuminator: Illuminator;\n\n /**\n * The channel number identifies the channel on the illuminator.\n */\n public get channelNumber(): number {\n return this._channelNumber;\n }\n private _channelNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this channel.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this channel.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this channel.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(illuminator: Illuminator, channelNumber: number) {\n this._illuminator = illuminator;\n this._channelNumber = channelNumber;\n this._axis = new Axis(illuminator.device, channelNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(illuminator.device, channelNumber);\n }\n\n /**\n * Turns this channel on.\n */\n public async on(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: true,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel off.\n */\n public async off(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: false,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel on or off.\n * @param on True to turn channel on, false to turn it off.\n */\n public async setOn(\n on: boolean\n ): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: on,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Checks if this channel is on.\n * @returns True if channel is on, false otherwise.\n */\n public async isOn(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'illuminator/is_on',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets channel intensity as a fraction of the maximum flux.\n * @param intensity Fraction of intensity to set (between 0 and 1).\n */\n public async setIntensity(\n intensity: number\n ): Promise<void> {\n const request: requests.ChannelSetIntensity & gateway.Message = {\n ...requests.ChannelSetIntensity.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n intensity: intensity,\n toBinary() {\n return requests.ChannelSetIntensity.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/set_intensity', request);\n }\n\n /**\n * Gets the current intensity of this channel.\n * @returns Current intensity as fraction of maximum flux.\n */\n public async getIntensity(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'illuminator/get_intensity',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this channel.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: IlluminatorChannel.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this channel and expects multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: IlluminatorChannel.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this channel without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current channel state that can be saved and reapplied.\n * @returns A serialization of the current state of the channel.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this channel.\n * @param state The state object to apply to this channel.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this channel.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this channel.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the channel.\n * @returns A string that represents the channel.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n typeOverride: 'Channel',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace IlluminatorChannel {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
|
|
@@ -7,6 +7,7 @@ import { Warnings } from '../ascii/warnings';
|
|
|
7
7
|
import { ProcessControllerMode } from './process_controller_mode';
|
|
8
8
|
import { ProcessControllerSource } from './process_controller_source';
|
|
9
9
|
import { Measurement } from '../measurement';
|
|
10
|
+
import { SetStateAxisResponse } from '../ascii';
|
|
10
11
|
/**
|
|
11
12
|
* Use to drive voltage for a process such as a heater, valve, Peltier device, etc.
|
|
12
13
|
* Requires at least Firmware 7.35.
|
|
@@ -128,8 +129,9 @@ export declare class Process {
|
|
|
128
129
|
/**
|
|
129
130
|
* Applies a saved state to this process.
|
|
130
131
|
* @param state The state object to apply to this process.
|
|
132
|
+
* @returns Reports of any issues that were handled, but caused the state to not be exactly restored.
|
|
131
133
|
*/
|
|
132
|
-
setState(state: string): Promise<
|
|
134
|
+
setState(state: string): Promise<SetStateAxisResponse>;
|
|
133
135
|
/**
|
|
134
136
|
* Checks if a state can be applied to this process.
|
|
135
137
|
* This only covers exceptions that can be determined statically such as mismatches of ID or version,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,MAAM,EAAS,IAAI,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,w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wB,CACnC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAehB;;;OAGG;IACU,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAkBxC;;;;OAIG;IACU,QAAQ,CACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC;IAmBhC;;;;;;OAMG;IACU,WAAW,CACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmBzB;;;OAGG;IACI,QAAQ,IAAI,MAAM;CAkB1B;AAED,kBAAU,OAAO,CAAC;IAChB,UAAiB,qBAAqB;QAClC;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;CACF"}
|
|
@@ -36,6 +36,7 @@ const storage_1 = require("../ascii/storage");
|
|
|
36
36
|
const warnings_1 = require("../ascii/warnings");
|
|
37
37
|
const process_controller_source_1 = require("./process_controller_source");
|
|
38
38
|
const measurement_1 = require("../measurement");
|
|
39
|
+
const ascii_1 = require("../ascii");
|
|
39
40
|
/**
|
|
40
41
|
* Use to drive voltage for a process such as a heater, valve, Peltier device, etc.
|
|
41
42
|
* Requires at least Firmware 7.35.
|
|
@@ -360,6 +361,7 @@ class Process {
|
|
|
360
361
|
/**
|
|
361
362
|
* Applies a saved state to this process.
|
|
362
363
|
* @param state The state object to apply to this process.
|
|
364
|
+
* @returns Reports of any issues that were handled, but caused the state to not be exactly restored.
|
|
363
365
|
*/
|
|
364
366
|
async setState(state) {
|
|
365
367
|
const request = {
|
|
@@ -372,7 +374,8 @@ class Process {
|
|
|
372
374
|
return requests.SetStateRequest.toBinary(this);
|
|
373
375
|
},
|
|
374
376
|
};
|
|
375
|
-
await gateway.callAsync('device/
|
|
377
|
+
const response = await gateway.callAsync('device/set_axis_state', request, ascii_1.SetStateAxisResponse.fromBinary);
|
|
378
|
+
return response;
|
|
376
379
|
}
|
|
377
380
|
/**
|
|
378
381
|
* Checks if a state can be applied to this process.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,sDAAwC;AACxC,oCAA+C;AAC/C,wCAAqC;AACrC,gDAA6C;AAC7C,0DAAsD;AACtD,8CAA+C;AAC/C,gDAA6C;AAE7C,2EAAsE;AACtE,gDAA6C;AAE7C;;;GAGG;AACH,MAAa,OAAO;IAClB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAKD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,UAA6B,EAAE,aAAqB;QAC9D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,qBAAW,CA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aAAa;YAC5C,IAAI,EAAE,IAAI,CAAC,aAAa;YACxB,YAAY,EAAE,SAAS;YACvB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AA3dD,0BA2dC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { ProcessController } from './process_controller';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Native, Units, Time } from '../units';\nimport { Axis } from '../ascii/axis';\nimport { Response } from '../ascii/response';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { AxisStorage } from '../ascii/storage';\nimport { Warnings } from '../ascii/warnings';\nimport { ProcessControllerMode } from './process_controller_mode';\nimport { ProcessControllerSource } from './process_controller_source';\nimport { Measurement } from '../measurement';\n\n/**\n * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.\n * Requires at least Firmware 7.35.\n */\nexport class Process {\n /**\n * Controller for this process.\n */\n public get controller(): ProcessController {\n return this._controller;\n }\n private _controller: ProcessController;\n\n /**\n * The process number identifies the process on the controller.\n */\n public get processNumber(): number {\n return this._processNumber;\n }\n private _processNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this process.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this process.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this process.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(controller: ProcessController, processNumber: number) {\n this._controller = controller;\n this._processNumber = processNumber;\n this._axis = new Axis(controller.device, processNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(controller.device, processNumber);\n }\n\n /**\n * Sets the enabled state of the driver.\n * @param [enabled=true] If true (default) enables drive. If false disables.\n */\n public async enable(\n enabled: boolean = true\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: enabled,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/enable', request);\n }\n\n /**\n * Turns this process on. In manual mode, this supplies voltage; in controlled mode, it starts the control loop.\n * @param [duration=0] How long to leave the process on.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async on(\n duration: number = 0,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n duration: duration,\n unit: unit,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Turns this process off.\n */\n public async off(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Sets the control mode of this process.\n * @param mode Mode to set this process to.\n */\n public async setMode(\n mode: ProcessControllerMode\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n value: mode,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Gets the control mode of this process.\n * @returns Control mode.\n */\n public async getMode(): Promise<ProcessControllerMode> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the source used to control this process.\n * @returns The source providing feedback for this process.\n */\n public async getSource(): Promise<ProcessControllerSource> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ProcessControllerSource>(\n 'process_controller/get_source',\n request,\n ProcessControllerSource.fromBinary);\n return response;\n }\n\n /**\n * Sets the source used to control this process.\n * @param source Sets the source that should provide feedback for this process.\n */\n public async setSource(\n source: ProcessControllerSource\n ): Promise<void> {\n const request: requests.SetProcessControllerSource & gateway.Message = {\n ...requests.SetProcessControllerSource.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n source: source,\n toBinary() {\n return requests.SetProcessControllerSource.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/set_source', request);\n }\n\n /**\n * Gets the current value of the source used to control this process.\n * @returns The current value of this process's controlling source.\n */\n public async getInput(): Promise<Measurement> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Measurement>(\n 'process_controller/get_input',\n request,\n Measurement.fromBinary);\n return response;\n }\n\n /**\n * Creates an H-bridge between this process and its neighbor. This method is only callable on axis 1 and 3.\n */\n public async bridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Breaks the H-bridge between this process and its neighbor, allowing them to be independently controlled.\n * This method is only callable on axis 1 and 3.\n */\n public async unbridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Detects if the given process is in bridging mode.\n * @returns Whether this process is bridged with its neighbor.\n */\n public async isBridge(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'process_controller/is_bridge',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this process' underlying axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Process.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this process and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Process.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this process without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current process state that can be saved and reapplied.\n * @returns A serialization of the current state of the process.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this process.\n * @param state The state object to apply to this process.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this process.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this process.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the process.\n * @returns A string that represents the process.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n typeOverride: 'Process',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Process {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,sDAAwC;AACxC,oCAA+C;AAC/C,wCAAqC;AACrC,gDAA6C;AAC7C,0DAAsD;AACtD,8CAA+C;AAC/C,gDAA6C;AAE7C,2EAAsE;AACtE,gDAA6C;AAC7C,oCAAgD;AAEhD;;;GAGG;AACH,MAAa,OAAO;IAClB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;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C,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC1D,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa;YAC5C,IAAI,EAAE,IAAI,CAAC,aAAa;YACxB,KAAK,EAAE,KAAK;YACZ,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,QAAQ,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAC/C,OAAO,MAAA,QAAQ,CAAC,KAAK,mCAAI,IAAI,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC1D,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa;YAC5C,IAAI,EAAE,IAAI,CAAC,aAAa;YACxB,YAAY,EAAE,SAAS;YACvB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAheD,0BAgeC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { ProcessController } from './process_controller';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Native, Units, Time } from '../units';\nimport { Axis } from '../ascii/axis';\nimport { Response } from '../ascii/response';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { AxisStorage } from '../ascii/storage';\nimport { Warnings } from '../ascii/warnings';\nimport { ProcessControllerMode } from './process_controller_mode';\nimport { ProcessControllerSource } from './process_controller_source';\nimport { Measurement } from '../measurement';\nimport { SetStateAxisResponse } from '../ascii';\n\n/**\n * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.\n * Requires at least Firmware 7.35.\n */\nexport class Process {\n /**\n * Controller for this process.\n */\n public get controller(): ProcessController {\n return this._controller;\n }\n private _controller: ProcessController;\n\n /**\n * The process number identifies the process on the controller.\n */\n public get processNumber(): number {\n return this._processNumber;\n }\n private _processNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this process.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this process.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this process.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(controller: ProcessController, processNumber: number) {\n this._controller = controller;\n this._processNumber = processNumber;\n this._axis = new Axis(controller.device, processNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(controller.device, processNumber);\n }\n\n /**\n * Sets the enabled state of the driver.\n * @param [enabled=true] If true (default) enables drive. If false disables.\n */\n public async enable(\n enabled: boolean = true\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: enabled,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/enable', request);\n }\n\n /**\n * Turns this process on. In manual mode, this supplies voltage; in controlled mode, it starts the control loop.\n * @param [duration=0] How long to leave the process on.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async on(\n duration: number = 0,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n duration: duration,\n unit: unit,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Turns this process off.\n */\n public async off(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Sets the control mode of this process.\n * @param mode Mode to set this process to.\n */\n public async setMode(\n mode: ProcessControllerMode\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n value: mode,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Gets the control mode of this process.\n * @returns Control mode.\n */\n public async getMode(): Promise<ProcessControllerMode> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the source used to control this process.\n * @returns The source providing feedback for this process.\n */\n public async getSource(): Promise<ProcessControllerSource> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ProcessControllerSource>(\n 'process_controller/get_source',\n request,\n ProcessControllerSource.fromBinary);\n return response;\n }\n\n /**\n * Sets the source used to control this process.\n * @param source Sets the source that should provide feedback for this process.\n */\n public async setSource(\n source: ProcessControllerSource\n ): Promise<void> {\n const request: requests.SetProcessControllerSource & gateway.Message = {\n ...requests.SetProcessControllerSource.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n source: source,\n toBinary() {\n return requests.SetProcessControllerSource.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/set_source', request);\n }\n\n /**\n * Gets the current value of the source used to control this process.\n * @returns The current value of this process's controlling source.\n */\n public async getInput(): Promise<Measurement> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Measurement>(\n 'process_controller/get_input',\n request,\n Measurement.fromBinary);\n return response;\n }\n\n /**\n * Creates an H-bridge between this process and its neighbor. This method is only callable on axis 1 and 3.\n */\n public async bridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Breaks the H-bridge between this process and its neighbor, allowing them to be independently controlled.\n * This method is only callable on axis 1 and 3.\n */\n public async unbridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Detects if the given process is in bridging mode.\n * @returns Whether this process is bridged with its neighbor.\n */\n public async isBridge(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'process_controller/is_bridge',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this process' underlying axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Process.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this process and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Process.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this process without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current process state that can be saved and reapplied.\n * @returns A serialization of the current state of the process.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this process.\n * @param state The state object to apply to this process.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this process.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this process.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the process.\n * @returns A string that represents the process.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n typeOverride: 'Process',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Process {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
|