@zaber/motion 3.1.1 → 3.2.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-lib.wasm +0 -0
- package/dist/lib/exceptions/device_detection_failed_exception.d.ts +7 -0
- package/dist/lib/exceptions/device_detection_failed_exception.js +17 -0
- package/dist/lib/exceptions/device_detection_failed_exception.js.map +1 -0
- package/dist/lib/exceptions/index.d.ts +1 -0
- package/dist/lib/exceptions/index.js +4 -2
- package/dist/lib/exceptions/index.js.map +1 -1
- package/dist/lib/gateway/convert_exceptions.js +1 -0
- package/dist/lib/gateway/convert_exceptions.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/microscopy/index.d.ts +1 -0
- package/dist/lib/microscopy/index.js +6 -0
- package/dist/lib/microscopy/index.js.map +1 -0
- package/dist/lib/microscopy/objective_changer.d.ts +63 -0
- package/dist/lib/microscopy/objective_changer.js +116 -0
- package/dist/lib/microscopy/objective_changer.js.map +1 -0
- package/dist/lib/microscopy_ns.d.ts +5 -0
- package/dist/lib/microscopy_ns.js +32 -0
- package/dist/lib/microscopy_ns.js.map +1 -0
- package/dist/lib/protobufs/main_pb.d.ts +91 -0
- package/dist/lib/protobufs/main_pb.js +689 -1
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +6 -1
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.DeviceDetectionFailedException = void 0;
|
|
6
|
+
const motion_lib_exception_1 = require("./motion_lib_exception");
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when device detection fails.
|
|
9
|
+
*/
|
|
10
|
+
class DeviceDetectionFailedException extends motion_lib_exception_1.MotionLibException {
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message);
|
|
13
|
+
Object.setPrototypeOf(this, DeviceDetectionFailedException.prototype);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.DeviceDetectionFailedException = DeviceDetectionFailedException;
|
|
17
|
+
//# sourceMappingURL=device_detection_failed_exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device_detection_failed_exception.js","sourceRoot":"","sources":["../../../src/exceptions/device_detection_failed_exception.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD,iEAA4D;AAE5D;;GAEG;AACH,MAAa,8BAA+B,SAAQ,yCAAkB;IACpE,YACE,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,8BAA8B,CAAC,SAAS,CAAC,CAAC;IACxE,CAAC;CACF;AAPD,wEAOC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { MotionLibException } from './motion_lib_exception';\n\n/**\n * Thrown when device detection fails.\n */\nexport class DeviceDetectionFailedException extends MotionLibException {\n constructor(\n message: string\n ) {\n super(message);\n Object.setPrototypeOf(this, DeviceDetectionFailedException.prototype);\n }\n}\n"]}
|
|
@@ -8,6 +8,7 @@ export { ConversionFailedException } from './conversion_failed_exception';
|
|
|
8
8
|
export { DeviceAddressConflictException } from './device_address_conflict_exception';
|
|
9
9
|
export { DeviceBusyException } from './device_busy_exception';
|
|
10
10
|
export { DeviceDbFailedException } from './device_db_failed_exception';
|
|
11
|
+
export { DeviceDetectionFailedException } from './device_detection_failed_exception';
|
|
11
12
|
export { DeviceFailedException } from './device_failed_exception';
|
|
12
13
|
export { DeviceNotIdentifiedException } from './device_not_identified_exception';
|
|
13
14
|
export { GCodeExecutionException } from './g_code_execution_exception';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
3
|
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
-
exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = exports.GCodeExecutionExceptionData = void 0;
|
|
5
|
+
exports.DeviceAddressConflictExceptionData = exports.CommandTooLongExceptionData = exports.CommandFailedExceptionData = exports.BinaryCommandFailedExceptionData = exports.MotionLibException = exports.UnknownRequestException = exports.TransportAlreadyUsedException = exports.StreamSetupFailedException = exports.StreamMovementInterruptedException = exports.StreamMovementFailedException = exports.StreamModeException = exports.StreamExecutionException = exports.SettingNotFoundException = exports.SetPeripheralStateFailedException = exports.SetDeviceStateFailedException = exports.SerialPortBusyException = exports.RequestTimeoutException = exports.OutOfRequestIdsException = exports.OsFailedException = exports.NotSupportedException = exports.NoValueForKeyException = exports.NoDeviceFoundException = exports.MovementInterruptedException = exports.MovementFailedException = exports.LockstepNotEnabledException = exports.LockstepEnabledException = exports.IoFailedException = exports.IoChannelOutOfRangeException = exports.InvalidResponseException = exports.InvalidParkStateException = exports.InvalidPacketException = exports.InvalidOperationException = exports.InvalidDataException = exports.InvalidArgumentException = exports.InternalErrorException = exports.GCodeSyntaxException = exports.GCodeExecutionException = exports.DeviceNotIdentifiedException = exports.DeviceFailedException = exports.DeviceDetectionFailedException = exports.DeviceDbFailedException = exports.DeviceBusyException = exports.DeviceAddressConflictException = exports.ConversionFailedException = exports.ConnectionFailedException = exports.ConnectionClosedException = exports.CommandTooLongException = exports.CommandPreemptedException = exports.CommandFailedException = exports.BinaryCommandFailedException = void 0;
|
|
6
|
+
exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = exports.GCodeExecutionExceptionData = exports.DeviceDbFailedExceptionData = void 0;
|
|
7
7
|
var binary_command_failed_exception_1 = require("./binary_command_failed_exception");
|
|
8
8
|
Object.defineProperty(exports, "BinaryCommandFailedException", { enumerable: true, get: function () { return binary_command_failed_exception_1.BinaryCommandFailedException; } });
|
|
9
9
|
var command_failed_exception_1 = require("./command_failed_exception");
|
|
@@ -24,6 +24,8 @@ var device_busy_exception_1 = require("./device_busy_exception");
|
|
|
24
24
|
Object.defineProperty(exports, "DeviceBusyException", { enumerable: true, get: function () { return device_busy_exception_1.DeviceBusyException; } });
|
|
25
25
|
var device_db_failed_exception_1 = require("./device_db_failed_exception");
|
|
26
26
|
Object.defineProperty(exports, "DeviceDbFailedException", { enumerable: true, get: function () { return device_db_failed_exception_1.DeviceDbFailedException; } });
|
|
27
|
+
var device_detection_failed_exception_1 = require("./device_detection_failed_exception");
|
|
28
|
+
Object.defineProperty(exports, "DeviceDetectionFailedException", { enumerable: true, get: function () { return device_detection_failed_exception_1.DeviceDetectionFailedException; } });
|
|
27
29
|
var device_failed_exception_1 = require("./device_failed_exception");
|
|
28
30
|
Object.defineProperty(exports, "DeviceFailedException", { enumerable: true, get: function () { return device_failed_exception_1.DeviceFailedException; } });
|
|
29
31
|
var device_not_identified_exception_1 = require("./device_not_identified_exception");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;AAEtD,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA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AA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD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,uJAAA,gCAAgC,OAAA;AACzC,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,6FAAwF;AAA/E,sJAAA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceDetectionFailedException } from './device_detection_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
|
|
@@ -39,6 +39,7 @@ errorMapping.set(main_pb_1.Errors.CONVERSION_FAILED, exceptions.ConversionFailed
|
|
|
39
39
|
errorMapping.set(main_pb_1.Errors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);
|
|
40
40
|
errorMapping.set(main_pb_1.Errors.DEVICE_BUSY, exceptions.DeviceBusyException);
|
|
41
41
|
errorMapping.set(main_pb_1.Errors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);
|
|
42
|
+
errorMapping.set(main_pb_1.Errors.DEVICE_DETECTION_FAILED, exceptions.DeviceDetectionFailedException);
|
|
42
43
|
errorMapping.set(main_pb_1.Errors.DEVICE_FAILED, exceptions.DeviceFailedException);
|
|
43
44
|
errorMapping.set(main_pb_1.Errors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);
|
|
44
45
|
errorMapping.set(main_pb_1.Errors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,uBAAuB,CAAC,C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AE,UAAmB;IACtF,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAElD,wBAAwB;IACxB,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,IAAI,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;KACnD;IAED,OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,UAAW,CAAC,CAAC;AACrD,CAAC;AATD,gDASC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAChF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,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAE/E,SAAgB,kBAAkB,CAAC,KAAe,EAAE,OAAe,EAAE,UAAmB;IACtF,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAElD,wBAAwB;IACxB,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,IAAI,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;KACnD;IAED,OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,UAAW,CAAC,CAAC;AACrD,CAAC;AATD,gDASC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_DETECTION_FAILED, exceptions.DeviceDetectionFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './ascii_ns';
|
|
2
2
|
export * from './binary_ns';
|
|
3
3
|
export * from './gcode_ns';
|
|
4
|
+
export * from './microscopy_ns';
|
|
4
5
|
export * from './exceptions';
|
|
5
6
|
export { DeviceDbSourceType } from './device_db_source_type';
|
|
6
7
|
export { FirmwareVersion } from './firmware_version';
|
package/dist/lib/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.Tools = exports.RotationDirection = exports.Measurement = exports.LogOut
|
|
|
18
18
|
__exportStar(require("./ascii_ns"), exports);
|
|
19
19
|
__exportStar(require("./binary_ns"), exports);
|
|
20
20
|
__exportStar(require("./gcode_ns"), exports);
|
|
21
|
+
__exportStar(require("./microscopy_ns"), exports);
|
|
21
22
|
__exportStar(require("./exceptions"), exports);
|
|
22
23
|
var device_db_source_type_1 = require("./device_db_source_type");
|
|
23
24
|
Object.defineProperty(exports, "DeviceDbSourceType", { enumerable: true, get: function () { return device_db_source_type_1.DeviceDbSourceType; } });
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,+CAA6B;AAC7B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,0CAAwB","sourcesContent":["export * from './ascii_ns';\nexport * from './binary_ns';\nexport * from './gcode_ns';\nexport * from './exceptions';\nexport { DeviceDbSourceType } from './device_db_source_type';\nexport { FirmwareVersion } from './firmware_version';\nexport { Library } from './library';\nexport { LogOutputMode } from './log_output_mode';\nexport { Measurement } from './measurement';\nexport { RotationDirection } from './rotation_direction';\nexport { Tools } from './tools';\nexport * from './units';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,+CAA6B;AAC7B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,0CAAwB","sourcesContent":["export * from './ascii_ns';\nexport * from './binary_ns';\nexport * from './gcode_ns';\nexport * from './microscopy_ns';\nexport * from './exceptions';\nexport { DeviceDbSourceType } from './device_db_source_type';\nexport { FirmwareVersion } from './firmware_version';\nexport { Library } from './library';\nexport { LogOutputMode } from './log_output_mode';\nexport { Measurement } from './measurement';\nexport { RotationDirection } from './rotation_direction';\nexport { Tools } from './tools';\nexport * from './units';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ObjectiveChanger } from './objective_changer';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectiveChanger = void 0;
|
|
4
|
+
var objective_changer_1 = require("./objective_changer");
|
|
5
|
+
Object.defineProperty(exports, "ObjectiveChanger", { enumerable: true, get: function () { return objective_changer_1.ObjectiveChanger; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/microscopy/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA","sourcesContent":["export { ObjectiveChanger } from './objective_changer';\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Connection } from '../ascii/connection';
|
|
2
|
+
import { Axis } from '../ascii/axis';
|
|
3
|
+
import { Measurement } from '../measurement';
|
|
4
|
+
/**
|
|
5
|
+
* Represents an objective changer of a microscope.
|
|
6
|
+
* Unstable. Expect breaking changes in future releases.
|
|
7
|
+
* Requires at least Firmware 7.32.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ObjectiveChanger {
|
|
10
|
+
/**
|
|
11
|
+
* Connection of this device.
|
|
12
|
+
*/
|
|
13
|
+
get connection(): Connection;
|
|
14
|
+
private _connection;
|
|
15
|
+
/**
|
|
16
|
+
* Device address of the turret.
|
|
17
|
+
*/
|
|
18
|
+
get turretAddress(): number;
|
|
19
|
+
private _turretAddress;
|
|
20
|
+
/**
|
|
21
|
+
* Device address of the focus.
|
|
22
|
+
*/
|
|
23
|
+
get focusAddress(): number;
|
|
24
|
+
private _focusAddress;
|
|
25
|
+
/**
|
|
26
|
+
* The focus axis.
|
|
27
|
+
*/
|
|
28
|
+
get focusAxis(): Axis;
|
|
29
|
+
private _focusAxis;
|
|
30
|
+
constructor(connection: Connection, turretAddress: number, focusAddress: number);
|
|
31
|
+
/**
|
|
32
|
+
* Finds an objective changer on a connection.
|
|
33
|
+
* In case of conflict, specify the optional device addresses.
|
|
34
|
+
* Devices on the connection must be identified.
|
|
35
|
+
* @param connection Connection on which to detect the objective changer.
|
|
36
|
+
* @param [options.turretAddress=0] Optional device address of the turret device (X-MOR).
|
|
37
|
+
* @param [options.focusAddress=0] Optional device address of the focus device (X-LDA).
|
|
38
|
+
* @returns New instance of objective changer.
|
|
39
|
+
*/
|
|
40
|
+
static find(connection: Connection, options?: ObjectiveChanger.FindOptions): Promise<ObjectiveChanger>;
|
|
41
|
+
/**
|
|
42
|
+
* Changes the objective.
|
|
43
|
+
* Runs a sequence of movements switching from the current objective to the new one.
|
|
44
|
+
* @param objective Objective number starting from one.
|
|
45
|
+
* @param options.focusOffset Optional focus offset from the datum.
|
|
46
|
+
* If specified, the focus stage will move to the designated offset.
|
|
47
|
+
*/
|
|
48
|
+
change(objective: number, options?: ObjectiveChanger.ChangeOptions): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Moves the focus stage out of the turret releasing the current objective.
|
|
51
|
+
*/
|
|
52
|
+
release(): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
declare namespace ObjectiveChanger {
|
|
55
|
+
interface FindOptions {
|
|
56
|
+
turretAddress?: number;
|
|
57
|
+
focusAddress?: number;
|
|
58
|
+
}
|
|
59
|
+
interface ChangeOptions {
|
|
60
|
+
focusOffset?: Measurement;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ObjectiveChanger = void 0;
|
|
29
|
+
const gateway = __importStar(require("../gateway"));
|
|
30
|
+
const device_1 = require("../ascii/device");
|
|
31
|
+
const axis_1 = require("../ascii/axis");
|
|
32
|
+
const measurement_1 = require("../measurement");
|
|
33
|
+
/**
|
|
34
|
+
* Represents an objective changer of a microscope.
|
|
35
|
+
* Unstable. Expect breaking changes in future releases.
|
|
36
|
+
* Requires at least Firmware 7.32.
|
|
37
|
+
*/
|
|
38
|
+
class ObjectiveChanger {
|
|
39
|
+
/**
|
|
40
|
+
* Connection of this device.
|
|
41
|
+
*/
|
|
42
|
+
get connection() {
|
|
43
|
+
return this._connection;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Device address of the turret.
|
|
47
|
+
*/
|
|
48
|
+
get turretAddress() {
|
|
49
|
+
return this._turretAddress;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Device address of the focus.
|
|
53
|
+
*/
|
|
54
|
+
get focusAddress() {
|
|
55
|
+
return this._focusAddress;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The focus axis.
|
|
59
|
+
*/
|
|
60
|
+
get focusAxis() {
|
|
61
|
+
return this._focusAxis;
|
|
62
|
+
}
|
|
63
|
+
constructor(connection, turretAddress, focusAddress) {
|
|
64
|
+
this._connection = connection;
|
|
65
|
+
this._turretAddress = turretAddress;
|
|
66
|
+
this._focusAddress = focusAddress;
|
|
67
|
+
this._focusAxis = new axis_1.Axis(new device_1.Device(connection, focusAddress), 1);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Finds an objective changer on a connection.
|
|
71
|
+
* In case of conflict, specify the optional device addresses.
|
|
72
|
+
* Devices on the connection must be identified.
|
|
73
|
+
* @param connection Connection on which to detect the objective changer.
|
|
74
|
+
* @param [options.turretAddress=0] Optional device address of the turret device (X-MOR).
|
|
75
|
+
* @param [options.focusAddress=0] Optional device address of the focus device (X-LDA).
|
|
76
|
+
* @returns New instance of objective changer.
|
|
77
|
+
*/
|
|
78
|
+
static async find(connection, options = {}) {
|
|
79
|
+
const { turretAddress = 0, focusAddress = 0, } = options;
|
|
80
|
+
const request = new gateway.ObjectiveChangerRequest();
|
|
81
|
+
request.setInterfaceId(connection.interfaceId);
|
|
82
|
+
request.setTurretAddress(turretAddress);
|
|
83
|
+
request.setFocusAddress(focusAddress);
|
|
84
|
+
const response = await gateway.callAsync('objective_changer/detect', request, gateway.ObjectiveChangerCreateResponse);
|
|
85
|
+
return new ObjectiveChanger(connection, response.getTurret(), response.getFocus());
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Changes the objective.
|
|
89
|
+
* Runs a sequence of movements switching from the current objective to the new one.
|
|
90
|
+
* @param objective Objective number starting from one.
|
|
91
|
+
* @param options.focusOffset Optional focus offset from the datum.
|
|
92
|
+
* If specified, the focus stage will move to the designated offset.
|
|
93
|
+
*/
|
|
94
|
+
async change(objective, options = {}) {
|
|
95
|
+
const { focusOffset, } = options;
|
|
96
|
+
const request = new gateway.ObjectiveChangerChangeRequest();
|
|
97
|
+
request.setInterfaceId(this.connection.interfaceId);
|
|
98
|
+
request.setTurretAddress(this.turretAddress);
|
|
99
|
+
request.setFocusAddress(this.focusAddress);
|
|
100
|
+
request.setObjective(objective);
|
|
101
|
+
request.setFocusOffset(measurement_1.Measurement.toProtobuf(focusOffset));
|
|
102
|
+
await gateway.callAsync('objective_changer/change', request);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Moves the focus stage out of the turret releasing the current objective.
|
|
106
|
+
*/
|
|
107
|
+
async release() {
|
|
108
|
+
const request = new gateway.ObjectiveChangerRequest();
|
|
109
|
+
request.setInterfaceId(this.connection.interfaceId);
|
|
110
|
+
request.setTurretAddress(this.turretAddress);
|
|
111
|
+
request.setFocusAddress(this.focusAddress);
|
|
112
|
+
await gateway.callAsync('objective_changer/release', request);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.ObjectiveChanger = ObjectiveChanger;
|
|
116
|
+
//# sourceMappingURL=objective_changer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objective_changer.js","sourceRoot":"","sources":["../../../src/microscopy/objective_changer.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAEtC,4CAAyC;AACzC,wCAAqC;AACrC,gDAA6C;AAE7C;;;;GAIG;AACH,MAAa,gBAAgB;IAC3B;;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;IAGD;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAGD;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAGD,YAAY,UAAsB,EAAE,aAAqB,EAAE,YAAoB;QAC7E,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,WAAI,CAAC,IAAI,eAAM,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,CAAC,IAAI,CACtB,UAAsB,EACtB,UAAwC,EAAE;QAE1C,MAAM,EACJ,aAAa,GAAG,CAAC,EACjB,YAAY,GAAG,CAAC,GACjB,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QACxC,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AC,CAAC;IAChE,CAAC;CACF;AAxGD,4CAwGC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Connection } from '../ascii/connection';\nimport { Device } from '../ascii/device';\nimport { Axis } from '../ascii/axis';\nimport { Measurement } from '../measurement';\n\n/**\n * Represents an objective changer of a microscope.\n * Unstable. Expect breaking changes in future releases.\n * Requires at least Firmware 7.32.\n */\nexport class ObjectiveChanger {\n /**\n * Connection of this device.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n /**\n * Device address of the turret.\n */\n public get turretAddress(): number {\n return this._turretAddress;\n }\n private _turretAddress: number;\n\n /**\n * Device address of the focus.\n */\n public get focusAddress(): number {\n return this._focusAddress;\n }\n private _focusAddress: number;\n\n /**\n * The focus axis.\n */\n public get focusAxis(): Axis {\n return this._focusAxis;\n }\n private _focusAxis: Axis;\n\n constructor(connection: Connection, turretAddress: number, focusAddress: number) {\n this._connection = connection;\n this._turretAddress = turretAddress;\n this._focusAddress = focusAddress;\n this._focusAxis = new Axis(new Device(connection, focusAddress), 1);\n }\n\n /**\n * Finds an objective changer on a connection.\n * In case of conflict, specify the optional device addresses.\n * Devices on the connection must be identified.\n * @param connection Connection on which to detect the objective changer.\n * @param [options.turretAddress=0] Optional device address of the turret device (X-MOR).\n * @param [options.focusAddress=0] Optional device address of the focus device (X-LDA).\n * @returns New instance of objective changer.\n */\n public static async find(\n connection: Connection,\n options: ObjectiveChanger.FindOptions = {}\n ): Promise<ObjectiveChanger> {\n const {\n turretAddress = 0,\n focusAddress = 0,\n } = options;\n const request = new gateway.ObjectiveChangerRequest();\n request.setInterfaceId(connection.interfaceId);\n request.setTurretAddress(turretAddress);\n request.setFocusAddress(focusAddress);\n\n const response = await gateway.callAsync<gateway.ObjectiveChangerCreateResponse>(\n 'objective_changer/detect',\n request,\n gateway.ObjectiveChangerCreateResponse);\n return new ObjectiveChanger(connection, response.getTurret(), response.getFocus());\n }\n\n /**\n * Changes the objective.\n * Runs a sequence of movements switching from the current objective to the new one.\n * @param objective Objective number starting from one.\n * @param options.focusOffset Optional focus offset from the datum.\n * If specified, the focus stage will move to the designated offset.\n */\n public async change(\n objective: number,\n options: ObjectiveChanger.ChangeOptions = {}\n ): Promise<void> {\n const {\n focusOffset,\n } = options;\n const request = new gateway.ObjectiveChangerChangeRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setTurretAddress(this.turretAddress);\n request.setFocusAddress(this.focusAddress);\n request.setObjective(objective);\n request.setFocusOffset(Measurement.toProtobuf(focusOffset));\n\n await gateway.callAsync('objective_changer/change', request);\n }\n\n /**\n * Moves the focus stage out of the turret releasing the current objective.\n */\n public async release(): Promise<void> {\n const request = new gateway.ObjectiveChangerRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setTurretAddress(this.turretAddress);\n request.setFocusAddress(this.focusAddress);\n\n await gateway.callAsync('objective_changer/release', request);\n }\n}\n\nnamespace ObjectiveChanger {\n export interface FindOptions {\n turretAddress?: number;\n focusAddress?: number;\n }\n export interface ChangeOptions {\n focusOffset?: Measurement;\n }\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.microscopy = void 0;
|
|
27
|
+
const microscopyImport = __importStar(require("./microscopy"));
|
|
28
|
+
var microscopy;
|
|
29
|
+
(function (microscopy) {
|
|
30
|
+
microscopy.ObjectiveChanger = microscopyImport.ObjectiveChanger;
|
|
31
|
+
})(microscopy = exports.microscopy || (exports.microscopy = {}));
|
|
32
|
+
//# sourceMappingURL=microscopy_ns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microscopy_ns.js","sourceRoot":"","sources":["../../src/microscopy_ns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAiD;AAEjD,IAAiB,UAAU,CAG1B;AAHD,WAAiB,UAAU;IACZ,2BAAgB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC;AAEpE,CAAC,EAHgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAG1B","sourcesContent":["import * as microscopyImport from './microscopy';\n\nexport namespace microscopy {\n export const ObjectiveChanger = microscopyImport.ObjectiveChanger;\n export type ObjectiveChanger = microscopyImport.ObjectiveChanger;\n}\n"]}
|
|
@@ -5905,6 +5905,96 @@ export namespace ConversionFactor {
|
|
|
5905
5905
|
}
|
|
5906
5906
|
}
|
|
5907
5907
|
|
|
5908
|
+
export class ObjectiveChangerRequest extends jspb.Message {
|
|
5909
|
+
getInterfaceId(): number;
|
|
5910
|
+
setInterfaceId(value: number): void;
|
|
5911
|
+
|
|
5912
|
+
getTurretAddress(): number;
|
|
5913
|
+
setTurretAddress(value: number): void;
|
|
5914
|
+
|
|
5915
|
+
getFocusAddress(): number;
|
|
5916
|
+
setFocusAddress(value: number): void;
|
|
5917
|
+
|
|
5918
|
+
serializeBinary(): Uint8Array;
|
|
5919
|
+
toObject(includeInstance?: boolean): ObjectiveChangerRequest.AsObject;
|
|
5920
|
+
static toObject(includeInstance: boolean, msg: ObjectiveChangerRequest): ObjectiveChangerRequest.AsObject;
|
|
5921
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
5922
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
5923
|
+
static serializeBinaryToWriter(message: ObjectiveChangerRequest, writer: jspb.BinaryWriter): void;
|
|
5924
|
+
static deserializeBinary(bytes: Uint8Array): ObjectiveChangerRequest;
|
|
5925
|
+
static deserializeBinaryFromReader(message: ObjectiveChangerRequest, reader: jspb.BinaryReader): ObjectiveChangerRequest;
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5928
|
+
export namespace ObjectiveChangerRequest {
|
|
5929
|
+
export type AsObject = {
|
|
5930
|
+
interfaceId: number,
|
|
5931
|
+
turretAddress: number,
|
|
5932
|
+
focusAddress: number,
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5935
|
+
|
|
5936
|
+
export class ObjectiveChangerCreateResponse extends jspb.Message {
|
|
5937
|
+
getTurret(): number;
|
|
5938
|
+
setTurret(value: number): void;
|
|
5939
|
+
|
|
5940
|
+
getFocus(): number;
|
|
5941
|
+
setFocus(value: number): void;
|
|
5942
|
+
|
|
5943
|
+
serializeBinary(): Uint8Array;
|
|
5944
|
+
toObject(includeInstance?: boolean): ObjectiveChangerCreateResponse.AsObject;
|
|
5945
|
+
static toObject(includeInstance: boolean, msg: ObjectiveChangerCreateResponse): ObjectiveChangerCreateResponse.AsObject;
|
|
5946
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
5947
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
5948
|
+
static serializeBinaryToWriter(message: ObjectiveChangerCreateResponse, writer: jspb.BinaryWriter): void;
|
|
5949
|
+
static deserializeBinary(bytes: Uint8Array): ObjectiveChangerCreateResponse;
|
|
5950
|
+
static deserializeBinaryFromReader(message: ObjectiveChangerCreateResponse, reader: jspb.BinaryReader): ObjectiveChangerCreateResponse;
|
|
5951
|
+
}
|
|
5952
|
+
|
|
5953
|
+
export namespace ObjectiveChangerCreateResponse {
|
|
5954
|
+
export type AsObject = {
|
|
5955
|
+
turret: number,
|
|
5956
|
+
focus: number,
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5960
|
+
export class ObjectiveChangerChangeRequest extends jspb.Message {
|
|
5961
|
+
getInterfaceId(): number;
|
|
5962
|
+
setInterfaceId(value: number): void;
|
|
5963
|
+
|
|
5964
|
+
getTurretAddress(): number;
|
|
5965
|
+
setTurretAddress(value: number): void;
|
|
5966
|
+
|
|
5967
|
+
getFocusAddress(): number;
|
|
5968
|
+
setFocusAddress(value: number): void;
|
|
5969
|
+
|
|
5970
|
+
getObjective(): number;
|
|
5971
|
+
setObjective(value: number): void;
|
|
5972
|
+
|
|
5973
|
+
hasFocusOffset(): boolean;
|
|
5974
|
+
clearFocusOffset(): void;
|
|
5975
|
+
getFocusOffset(): Measurement | undefined;
|
|
5976
|
+
setFocusOffset(value?: Measurement): void;
|
|
5977
|
+
|
|
5978
|
+
serializeBinary(): Uint8Array;
|
|
5979
|
+
toObject(includeInstance?: boolean): ObjectiveChangerChangeRequest.AsObject;
|
|
5980
|
+
static toObject(includeInstance: boolean, msg: ObjectiveChangerChangeRequest): ObjectiveChangerChangeRequest.AsObject;
|
|
5981
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
5982
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
5983
|
+
static serializeBinaryToWriter(message: ObjectiveChangerChangeRequest, writer: jspb.BinaryWriter): void;
|
|
5984
|
+
static deserializeBinary(bytes: Uint8Array): ObjectiveChangerChangeRequest;
|
|
5985
|
+
static deserializeBinaryFromReader(message: ObjectiveChangerChangeRequest, reader: jspb.BinaryReader): ObjectiveChangerChangeRequest;
|
|
5986
|
+
}
|
|
5987
|
+
|
|
5988
|
+
export namespace ObjectiveChangerChangeRequest {
|
|
5989
|
+
export type AsObject = {
|
|
5990
|
+
interfaceId: number,
|
|
5991
|
+
turretAddress: number,
|
|
5992
|
+
focusAddress: number,
|
|
5993
|
+
objective: number,
|
|
5994
|
+
focusOffset?: Measurement.AsObject,
|
|
5995
|
+
}
|
|
5996
|
+
}
|
|
5997
|
+
|
|
5908
5998
|
export enum MessageType {
|
|
5909
5999
|
REPLY = 0,
|
|
5910
6000
|
INFO = 1,
|
|
@@ -5956,6 +6046,7 @@ export enum Errors {
|
|
|
5956
6046
|
INVALID_OPERATION = 43,
|
|
5957
6047
|
COMMAND_TOO_LONG = 44,
|
|
5958
6048
|
NO_VALUE_FOR_KEY = 45,
|
|
6049
|
+
DEVICE_DETECTION_FAILED = 46,
|
|
5959
6050
|
}
|
|
5960
6051
|
|
|
5961
6052
|
export enum InterfaceType {
|