@zaber/motion 3.1.0 → 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/ascii/can_set_state_axis_response.js.map +1 -0
- package/dist/lib/ascii/can_set_state_device_response.js.map +1 -0
- package/dist/lib/ascii/device.d.ts +1 -1
- package/dist/lib/ascii/device.js +1 -1
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +2 -0
- package/dist/lib/ascii/index.js +5 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +3 -0
- package/dist/lib/ascii/servo_tuner.js +3 -0
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii_ns.d.ts +4 -0
- package/dist/lib/ascii_ns.js +2 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- 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/bindings.js +4 -1
- package/dist/lib/gateway/bindings.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 -2
- package/dist/lib/index.js +2 -5
- 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 +11 -1
- package/dist/lib/can_set_state_axis_response.js.map +0 -1
- package/dist/lib/can_set_state_device_response.js.map +0 -1
- /package/dist/lib/{can_set_state_axis_response.d.ts → ascii/can_set_state_axis_response.d.ts} +0 -0
- /package/dist/lib/{can_set_state_axis_response.js → ascii/can_set_state_axis_response.js} +0 -0
- /package/dist/lib/{can_set_state_device_response.d.ts → ascii/can_set_state_device_response.d.ts} +0 -0
- /package/dist/lib/{can_set_state_device_response.js → ascii/can_set_state_device_response.js} +0 -0
package/dist/lib/index.js
CHANGED
|
@@ -14,10 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Tools = exports.
|
|
17
|
+
exports.Tools = exports.RotationDirection = exports.Measurement = exports.LogOutputMode = exports.Library = exports.FirmwareVersion = exports.DeviceDbSourceType = void 0;
|
|
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; } });
|
|
@@ -31,10 +32,6 @@ var measurement_1 = require("./measurement");
|
|
|
31
32
|
Object.defineProperty(exports, "Measurement", { enumerable: true, get: function () { return measurement_1.Measurement; } });
|
|
32
33
|
var rotation_direction_1 = require("./rotation_direction");
|
|
33
34
|
Object.defineProperty(exports, "RotationDirection", { enumerable: true, get: function () { return rotation_direction_1.RotationDirection; } });
|
|
34
|
-
var can_set_state_axis_response_1 = require("./can_set_state_axis_response");
|
|
35
|
-
Object.defineProperty(exports, "CanSetStateAxisResponse", { enumerable: true, get: function () { return can_set_state_axis_response_1.CanSetStateAxisResponse; } });
|
|
36
|
-
var can_set_state_device_response_1 = require("./can_set_state_device_response");
|
|
37
|
-
Object.defineProperty(exports, "CanSetStateDeviceResponse", { enumerable: true, get: function () { return can_set_state_device_response_1.CanSetStateDeviceResponse; } });
|
|
38
35
|
var tools_1 = require("./tools");
|
|
39
36
|
Object.defineProperty(exports, "Tools", { enumerable: true, get: function () { return tools_1.Tools; } });
|
|
40
37
|
__exportStar(require("./units"), exports);
|
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,
|
|
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,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC1C,OAAO,IAAI,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,SAAiB,EACjB,UAA0C,EAAE;QAE5C,MAAM,EACJ,WAAW,GACZ,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,6BAA6B,EAAE,CAAC;QAC5D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3C,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChC,OAAO,CAAC,cAAc,CAAC,yBAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;QAE5D,MAAM,OAAO,CAAC,SAAS,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;QAClB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE3C,MAAM,OAAO,CAAC,SAAS,CAAC,2BAA2B,EAAE,OAAO,CAAC,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 {
|