@zaber/motion 6.6.1 → 6.7.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/axis.d.ts +27 -1
- package/dist/lib/ascii/axis.d.ts.map +1 -1
- package/dist/lib/ascii/axis.js +50 -0
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/connection.js +4 -4
- package/dist/lib/ascii/connection.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +8 -0
- package/dist/lib/ascii/device.d.ts.map +1 -1
- package/dist/lib/ascii/device.js +23 -0
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +28 -1
- package/dist/lib/ascii/lockstep.d.ts.map +1 -1
- package/dist/lib/ascii/lockstep.js +51 -0
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/microscopy/autofocus.d.ts +4 -1
- package/dist/lib/microscopy/autofocus.d.ts.map +1 -1
- package/dist/lib/microscopy/autofocus.js +5 -1
- package/dist/lib/microscopy/autofocus.js.map +1 -1
- package/dist/lib/requests/autofocus_focus_request.d.ts +1 -0
- package/dist/lib/requests/autofocus_focus_request.d.ts.map +1 -1
- package/dist/lib/requests/autofocus_focus_request.js +2 -0
- package/dist/lib/requests/autofocus_focus_request.js.map +1 -1
- package/dist/lib/requests/device_move_sin_request.d.ts +19 -0
- package/dist/lib/requests/device_move_sin_request.d.ts.map +1 -0
- package/dist/lib/requests/device_move_sin_request.js +42 -0
- package/dist/lib/requests/device_move_sin_request.js.map +1 -0
- package/dist/lib/requests/index.d.ts +3 -1
- package/dist/lib/requests/index.d.ts.map +1 -1
- package/dist/lib/requests/index.js +3 -1
- package/dist/lib/requests/index.js.map +1 -1
- package/dist/lib/requests/lockstep_move_sin_request.d.ts +19 -0
- package/dist/lib/requests/lockstep_move_sin_request.d.ts.map +1 -0
- package/dist/lib/requests/lockstep_move_sin_request.js +42 -0
- package/dist/lib/requests/lockstep_move_sin_request.js.map +1 -0
- package/dist/lib/requests/renumber_request.d.ts +12 -0
- package/dist/lib/requests/renumber_request.d.ts.map +1 -0
- package/dist/lib/requests/{device_renumber_request.js → renumber_request.js} +10 -8
- package/dist/lib/requests/renumber_request.js.map +1 -0
- package/package.json +1 -1
- package/dist/lib/requests/device_renumber_request.d.ts +0 -11
- package/dist/lib/requests/device_renumber_request.d.ts.map +0 -1
- package/dist/lib/requests/device_renumber_request.js.map +0 -1
|
@@ -226,6 +226,14 @@ export declare class Device {
|
|
|
226
226
|
* @param timeout For how long to wait in milliseconds for the device to start responding.
|
|
227
227
|
*/
|
|
228
228
|
waitToRespond(timeout: number): Promise<void>;
|
|
229
|
+
/**
|
|
230
|
+
* Changes the address of this device.
|
|
231
|
+
* After the address is successfully changed, the existing device class instance no longer represents the device.
|
|
232
|
+
* Instead, use the new device instance returned by this method.
|
|
233
|
+
* @param address The new address to assign to the device.
|
|
234
|
+
* @returns New device instance with the new address.
|
|
235
|
+
*/
|
|
236
|
+
renumber(address: number): Promise<Device>;
|
|
229
237
|
/**
|
|
230
238
|
* Returns identity.
|
|
231
239
|
* @returns Device identity.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAA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;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAgB9B;AAED,kBAAU,MAAM,CAAC;IACf,UAAiB,eAAe;QAC5B,aAAa,CAAC,EAAE,eAAe,CAAC;KACnC;IACD,UAAiB,qBAAqB;QAClC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,+BAA+B;QAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB;IACD,UAAiB,eAAe;QAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;KACxB;CACF"}
|
package/dist/lib/ascii/device.js
CHANGED
|
@@ -455,6 +455,29 @@ class Device {
|
|
|
455
455
|
};
|
|
456
456
|
await gateway.callAsync('device/wait_to_respond', request);
|
|
457
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* Changes the address of this device.
|
|
460
|
+
* After the address is successfully changed, the existing device class instance no longer represents the device.
|
|
461
|
+
* Instead, use the new device instance returned by this method.
|
|
462
|
+
* @param address The new address to assign to the device.
|
|
463
|
+
* @returns New device instance with the new address.
|
|
464
|
+
*/
|
|
465
|
+
async renumber(address) {
|
|
466
|
+
if (address < 1 || address > 99) {
|
|
467
|
+
throw new TypeError('Invalid value; device addresses are numbered from 1 to 99.');
|
|
468
|
+
}
|
|
469
|
+
const request = {
|
|
470
|
+
...requests.RenumberRequest.DEFAULT,
|
|
471
|
+
interfaceId: this.connection.interfaceId,
|
|
472
|
+
device: this.deviceAddress,
|
|
473
|
+
address: address,
|
|
474
|
+
toBinary() {
|
|
475
|
+
return requests.RenumberRequest.toBinary(this);
|
|
476
|
+
},
|
|
477
|
+
};
|
|
478
|
+
const response = await gateway.callAsync('device/renumber', request, requests.IntResponse.fromBinary);
|
|
479
|
+
return new Device(this.connection, response.value);
|
|
480
|
+
}
|
|
458
481
|
/**
|
|
459
482
|
* Returns identity.
|
|
460
483
|
* @returns Device identity.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,uDAAmD;AACnD,iCAA8B;AAC9B,yCAAqC;AACrC,yCAAsC;AACtC,uDAAmD;AACnD,2CAAuC;AACvC,yCAAsC;AACtC,yCAAsC;AACtC,iDAA8C;AAC9C,mFAA4E;AAC5E,+BAA4B;AAG5B,oDAAsC;AACtC,sDAAwC;AACxC,uCAA0C;AAC1C,yCAAsC;AACtC,uCAAoC;AAEpC;;GAEG;AACH,MAAa,MAAM;IACjB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;;OAGG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAGD;;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,EAAE;QACX,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,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;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED;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CAAC,UAAU,CAAC,WAAW;YACxC,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,qBAAqB,EACrB,OAAO,EACP,gCAAc,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAkD;YAC7D,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO;YACtC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;YACxC,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AA9jBD,wBA8jBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Connection } from './connection';\nimport { DeviceSettings } from './device_settings';\nimport { Axis } from './axis';\nimport { AllAxes } from './all_axes';\nimport { Warnings } from './warnings';\nimport { DeviceIdentity } from './device_identity';\nimport { DeviceIO } from './device_io';\nimport { Response } from './response';\nimport { Lockstep } from './lockstep';\nimport { Oscilloscope } from './oscilloscope';\nimport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nimport { Pvt } from './pvt';\nimport { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { DeviceStorage } from './storage';\nimport { Triggers } from './triggers';\nimport { Streams } from './streams';\n\n/**\n * Represents the controller part of one device - may be either a standalone controller or an integrated controller.\n */\nexport class Device {\n /**\n * Connection of this device.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n /**\n * The device address uniquely identifies the device on the connection.\n * It can be configured or automatically assigned by the renumber command.\n */\n public get deviceAddress(): number {\n return this._deviceAddress;\n }\n private _deviceAddress: number;\n\n /**\n * Settings and properties of this device.\n */\n public get settings(): DeviceSettings {\n return this._settings;\n }\n private _settings: DeviceSettings;\n\n /**\n * Key-value storage of this device.\n */\n public get storage(): DeviceStorage {\n return this._storage;\n }\n private _storage: DeviceStorage;\n\n /**\n * I/O channels of this device.\n */\n public get io(): DeviceIO {\n return this._io;\n }\n private _io: DeviceIO;\n\n /**\n * Virtual axis which allows you to target all axes of this device.\n */\n public get allAxes(): AllAxes {\n return this._allAxes;\n }\n private _allAxes: AllAxes;\n\n /**\n * Warnings and faults of this device and all its axes.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the device.\n */\n public get identity(): DeviceIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Indicates whether or not the device has been identified.\n */\n public get isIdentified(): boolean {\n return this._retrieveIsIdentified();\n }\n\n /**\n * Oscilloscope recording helper for this device.\n * Requires at least Firmware 7.00.\n */\n public get oscilloscope(): Oscilloscope {\n return this._oscilloscope;\n }\n private _oscilloscope: Oscilloscope;\n\n /**\n * Unique ID of the device hardware.\n */\n public get deviceId(): number {\n return this.identity.deviceId;\n }\n\n /**\n * Serial number of the device.\n */\n public get serialNumber(): number {\n return this.identity.serialNumber;\n }\n\n /**\n * Name of the product.\n */\n public get name(): string {\n return this.identity.name;\n }\n\n /**\n * Number of axes this device has.\n */\n public get axisCount(): number {\n return this.identity.axisCount;\n }\n\n /**\n * Version of the firmware.\n */\n public get firmwareVersion(): FirmwareVersion {\n return this.identity.firmwareVersion;\n }\n\n /**\n * The device is an integrated product.\n */\n public get isIntegrated(): boolean {\n return this.identity.isIntegrated;\n }\n\n /**\n * User-assigned label of the device.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n /**\n * Triggers for this device.\n * Requires at least Firmware 7.06.\n */\n public get triggers(): Triggers {\n return this._triggers;\n }\n private _triggers: Triggers;\n\n /**\n * Gets an object that provides access to Streams on this device.\n * Requires at least Firmware 7.05.\n */\n public get streams(): Streams {\n return this._streams;\n }\n private _streams: Streams;\n\n /**\n * Gets an object that provides access to PVT functions of this device.\n * Note that as of ZML v5.0.0, this returns a Pvt object and NOT a PvtSequence object.\n * The PvtSequence can now be obtained from the Pvt object.\n * Requires at least Firmware 7.33.\n */\n public get pvt(): Pvt {\n return this._pvt;\n }\n private _pvt: Pvt;\n\n constructor(connection: Connection, deviceAddress: number) {\n this._connection = connection;\n this._deviceAddress = deviceAddress;\n this._settings = new DeviceSettings(this);\n this._storage = new DeviceStorage(this);\n this._io = new DeviceIO(this);\n this._allAxes = new AllAxes(this);\n this._warnings = new Warnings(this, 0);\n this._oscilloscope = new Oscilloscope(this);\n this._triggers = new Triggers(this);\n this._streams = new Streams(this);\n this._pvt = new Pvt(this);\n }\n\n /**\n * Queries the device and the database, gathering information about the product.\n * Without this information features such as unit conversions will not work.\n * Usually, called automatically by detect devices method.\n * @param options.assumeVersion The identification assumes the specified firmware version\n * instead of the version queried from the device.\n * Providing this argument can lead to unexpected compatibility issues.\n * @returns Device identification data.\n */\n public async identify(\n options: Device.IdentifyOptions = {}\n ): Promise<DeviceIdentity> {\n const {\n assumeVersion,\n } = options;\n const request: requests.DeviceIdentifyRequest & gateway.Message = {\n ...requests.DeviceIdentifyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n assumeVersion: assumeVersion,\n toBinary() {\n return requests.DeviceIdentifyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<DeviceIdentity>(\n 'device/identify',\n request,\n DeviceIdentity.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this device.\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.axis=0] Optional axis number to send the command to.\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: Device.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 device 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.axis=0] Optional axis number to send the command to.\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: Device.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 device 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 * @param [options.axis=0] Optional axis number to send the command to.\n * Specifying -1 omits the number completely.\n */\n public async genericCommandNoResponse(\n command: string,\n options: Device.GenericCommandNoResponseOptions = {}\n ): Promise<void> {\n const {\n axis = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 * Gets an Axis class instance which allows you to control a particular axis on this device.\n * Axes are numbered from 1.\n * @param axisNumber Number of axis intended to control.\n * @returns Axis instance.\n */\n public getAxis(\n axisNumber: number\n ): Axis {\n if (axisNumber <= 0) {\n throw new TypeError('Invalid value; physical axes are numbered from 1.');\n }\n return new Axis(this, axisNumber);\n }\n\n /**\n * Gets a Lockstep class instance which allows you to control a particular lockstep group on the device.\n * Requires at least Firmware 6.15 or 7.11.\n * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @returns Lockstep instance.\n */\n public getLockstep(\n lockstepGroupId: number\n ): Lockstep {\n if (lockstepGroupId <= 0) {\n throw new TypeError('Invalid value; lockstep groups are numbered from 1.');\n }\n return new Lockstep(this, lockstepGroupId);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this device.\n * Unit conversion is not supported for commands where axes can be remapped, such as stream and PVT commands.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @returns Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request: requests.PrepareCommandRequest & gateway.Message = {\n ...requests.PrepareCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n commandTemplate: commandTemplate,\n parameters: parameters,\n toBinary() {\n return requests.PrepareCommandRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/prepare_command',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets the user-assigned device label.\n * The label is stored on the controller and recognized by other software.\n * @param label Label to set.\n */\n public async setLabel(\n label: string\n ): Promise<void> {\n const request: requests.DeviceSetStorageRequest & gateway.Message = {\n ...requests.DeviceSetStorageRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n value: label,\n toBinary() {\n return requests.DeviceSetStorageRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the device name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_label',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string that represents the device.\n * @returns A string that represents the device.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/device_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a serialization of the current device state that can be saved and reapplied.\n * @returns A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\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 device.\n * @param state The state object to apply to this device.\n * @param [options.deviceOnly=false] If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n options: Device.SetStateOptions = {}\n ): Promise<void> {\n const {\n deviceOnly = false,\n } = options;\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n state: state,\n deviceOnly: deviceOnly,\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 device.\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 object listing errors that come up when trying to set the state.\n */\n public async canSetState(\n state: string\n ): Promise<CanSetStateDeviceResponse> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n CanSetStateDeviceResponse.fromBinary);\n return response;\n }\n\n /**\n * Waits for the device to start responding to messages.\n * Useful to call after resetting the device.\n * Throws RequestTimeoutException upon timeout.\n * @param timeout For how long to wait in milliseconds for the device to start responding.\n */\n public async waitToRespond(\n timeout: number\n ): Promise<void> {\n const request: requests.WaitToRespondRequest & gateway.Message = {\n ...requests.WaitToRespondRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n timeout: timeout,\n toBinary() {\n return requests.WaitToRespondRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/wait_to_respond', request);\n }\n\n /**\n * Returns identity.\n * @returns Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request: requests.DeviceEmptyRequest & gateway.Message = {\n ...requests.DeviceEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.DeviceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<DeviceIdentity>(\n 'device/get_identity',\n request,\n DeviceIdentity.fromBinary);\n return response;\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @returns True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request: requests.DeviceEmptyRequest & gateway.Message = {\n ...requests.DeviceEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.DeviceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/get_is_identified',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Device {\n export interface IdentifyOptions {\n assumeVersion?: FirmwareVersion;\n }\n export interface GenericCommandOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandNoResponseOptions {\n axis?: number;\n }\n export interface SetStateOptions {\n deviceOnly?: boolean;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,uDAAmD;AACnD,iCAA8B;AAC9B,yCAAq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,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,iBAAiB,EACjB,OAAO,EACP,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACnC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,iBAAiB;QACvB,MAAM,OAAO,GAAkD;YAC7D,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO;YACtC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;YACxC,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,qBAAqB,EACrB,OAAO,EACP,gCAAc,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAkD;YAC7D,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO;YACtC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;YACxC,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AA5lBD,wBA4lBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Connection } from './connection';\nimport { DeviceSettings } from './device_settings';\nimport { Axis } from './axis';\nimport { AllAxes } from './all_axes';\nimport { Warnings } from './warnings';\nimport { DeviceIdentity } from './device_identity';\nimport { DeviceIO } from './device_io';\nimport { Response } from './response';\nimport { Lockstep } from './lockstep';\nimport { Oscilloscope } from './oscilloscope';\nimport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nimport { Pvt } from './pvt';\nimport { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { DeviceStorage } from './storage';\nimport { Triggers } from './triggers';\nimport { Streams } from './streams';\n\n/**\n * Represents the controller part of one device - may be either a standalone controller or an integrated controller.\n */\nexport class Device {\n /**\n * Connection of this device.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n /**\n * The device address uniquely identifies the device on the connection.\n * It can be configured or automatically assigned by the renumber command.\n */\n public get deviceAddress(): number {\n return this._deviceAddress;\n }\n private _deviceAddress: number;\n\n /**\n * Settings and properties of this device.\n */\n public get settings(): DeviceSettings {\n return this._settings;\n }\n private _settings: DeviceSettings;\n\n /**\n * Key-value storage of this device.\n */\n public get storage(): DeviceStorage {\n return this._storage;\n }\n private _storage: DeviceStorage;\n\n /**\n * I/O channels of this device.\n */\n public get io(): DeviceIO {\n return this._io;\n }\n private _io: DeviceIO;\n\n /**\n * Virtual axis which allows you to target all axes of this device.\n */\n public get allAxes(): AllAxes {\n return this._allAxes;\n }\n private _allAxes: AllAxes;\n\n /**\n * Warnings and faults of this device and all its axes.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the device.\n */\n public get identity(): DeviceIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Indicates whether or not the device has been identified.\n */\n public get isIdentified(): boolean {\n return this._retrieveIsIdentified();\n }\n\n /**\n * Oscilloscope recording helper for this device.\n * Requires at least Firmware 7.00.\n */\n public get oscilloscope(): Oscilloscope {\n return this._oscilloscope;\n }\n private _oscilloscope: Oscilloscope;\n\n /**\n * Unique ID of the device hardware.\n */\n public get deviceId(): number {\n return this.identity.deviceId;\n }\n\n /**\n * Serial number of the device.\n */\n public get serialNumber(): number {\n return this.identity.serialNumber;\n }\n\n /**\n * Name of the product.\n */\n public get name(): string {\n return this.identity.name;\n }\n\n /**\n * Number of axes this device has.\n */\n public get axisCount(): number {\n return this.identity.axisCount;\n }\n\n /**\n * Version of the firmware.\n */\n public get firmwareVersion(): FirmwareVersion {\n return this.identity.firmwareVersion;\n }\n\n /**\n * The device is an integrated product.\n */\n public get isIntegrated(): boolean {\n return this.identity.isIntegrated;\n }\n\n /**\n * User-assigned label of the device.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n /**\n * Triggers for this device.\n * Requires at least Firmware 7.06.\n */\n public get triggers(): Triggers {\n return this._triggers;\n }\n private _triggers: Triggers;\n\n /**\n * Gets an object that provides access to Streams on this device.\n * Requires at least Firmware 7.05.\n */\n public get streams(): Streams {\n return this._streams;\n }\n private _streams: Streams;\n\n /**\n * Gets an object that provides access to PVT functions of this device.\n * Note that as of ZML v5.0.0, this returns a Pvt object and NOT a PvtSequence object.\n * The PvtSequence can now be obtained from the Pvt object.\n * Requires at least Firmware 7.33.\n */\n public get pvt(): Pvt {\n return this._pvt;\n }\n private _pvt: Pvt;\n\n constructor(connection: Connection, deviceAddress: number) {\n this._connection = connection;\n this._deviceAddress = deviceAddress;\n this._settings = new DeviceSettings(this);\n this._storage = new DeviceStorage(this);\n this._io = new DeviceIO(this);\n this._allAxes = new AllAxes(this);\n this._warnings = new Warnings(this, 0);\n this._oscilloscope = new Oscilloscope(this);\n this._triggers = new Triggers(this);\n this._streams = new Streams(this);\n this._pvt = new Pvt(this);\n }\n\n /**\n * Queries the device and the database, gathering information about the product.\n * Without this information features such as unit conversions will not work.\n * Usually, called automatically by detect devices method.\n * @param options.assumeVersion The identification assumes the specified firmware version\n * instead of the version queried from the device.\n * Providing this argument can lead to unexpected compatibility issues.\n * @returns Device identification data.\n */\n public async identify(\n options: Device.IdentifyOptions = {}\n ): Promise<DeviceIdentity> {\n const {\n assumeVersion,\n } = options;\n const request: requests.DeviceIdentifyRequest & gateway.Message = {\n ...requests.DeviceIdentifyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n assumeVersion: assumeVersion,\n toBinary() {\n return requests.DeviceIdentifyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<DeviceIdentity>(\n 'device/identify',\n request,\n DeviceIdentity.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this device.\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.axis=0] Optional axis number to send the command to.\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: Device.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 device 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.axis=0] Optional axis number to send the command to.\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: Device.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 device 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 * @param [options.axis=0] Optional axis number to send the command to.\n * Specifying -1 omits the number completely.\n */\n public async genericCommandNoResponse(\n command: string,\n options: Device.GenericCommandNoResponseOptions = {}\n ): Promise<void> {\n const {\n axis = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n command: command,\n axis: axis,\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 * Gets an Axis class instance which allows you to control a particular axis on this device.\n * Axes are numbered from 1.\n * @param axisNumber Number of axis intended to control.\n * @returns Axis instance.\n */\n public getAxis(\n axisNumber: number\n ): Axis {\n if (axisNumber <= 0) {\n throw new TypeError('Invalid value; physical axes are numbered from 1.');\n }\n return new Axis(this, axisNumber);\n }\n\n /**\n * Gets a Lockstep class instance which allows you to control a particular lockstep group on the device.\n * Requires at least Firmware 6.15 or 7.11.\n * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @returns Lockstep instance.\n */\n public getLockstep(\n lockstepGroupId: number\n ): Lockstep {\n if (lockstepGroupId <= 0) {\n throw new TypeError('Invalid value; lockstep groups are numbered from 1.');\n }\n return new Lockstep(this, lockstepGroupId);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this device.\n * Unit conversion is not supported for commands where axes can be remapped, such as stream and PVT commands.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @returns Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request: requests.PrepareCommandRequest & gateway.Message = {\n ...requests.PrepareCommandRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n commandTemplate: commandTemplate,\n parameters: parameters,\n toBinary() {\n return requests.PrepareCommandRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/prepare_command',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets the user-assigned device label.\n * The label is stored on the controller and recognized by other software.\n * @param label Label to set.\n */\n public async setLabel(\n label: string\n ): Promise<void> {\n const request: requests.DeviceSetStorageRequest & gateway.Message = {\n ...requests.DeviceSetStorageRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n value: label,\n toBinary() {\n return requests.DeviceSetStorageRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the device name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_label',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string that represents the device.\n * @returns A string that represents the device.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/device_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a serialization of the current device state that can be saved and reapplied.\n * @returns A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\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 device.\n * @param state The state object to apply to this device.\n * @param [options.deviceOnly=false] If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n options: Device.SetStateOptions = {}\n ): Promise<void> {\n const {\n deviceOnly = false,\n } = options;\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n state: state,\n deviceOnly: deviceOnly,\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 device.\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 object listing errors that come up when trying to set the state.\n */\n public async canSetState(\n state: string\n ): Promise<CanSetStateDeviceResponse> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n CanSetStateDeviceResponse.fromBinary);\n return response;\n }\n\n /**\n * Waits for the device to start responding to messages.\n * Useful to call after resetting the device.\n * Throws RequestTimeoutException upon timeout.\n * @param timeout For how long to wait in milliseconds for the device to start responding.\n */\n public async waitToRespond(\n timeout: number\n ): Promise<void> {\n const request: requests.WaitToRespondRequest & gateway.Message = {\n ...requests.WaitToRespondRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n timeout: timeout,\n toBinary() {\n return requests.WaitToRespondRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/wait_to_respond', request);\n }\n\n /**\n * Changes the address of this device.\n * After the address is successfully changed, the existing device class instance no longer represents the device.\n * Instead, use the new device instance returned by this method.\n * @param address The new address to assign to the device.\n * @returns New device instance with the new address.\n */\n public async renumber(\n address: number\n ): Promise<Device> {\n if (address < 1 || address > 99) {\n throw new TypeError('Invalid value; device addresses are numbered from 1 to 99.');\n }\n const request: requests.RenumberRequest & gateway.Message = {\n ...requests.RenumberRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n address: address,\n toBinary() {\n return requests.RenumberRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'device/renumber',\n request,\n requests.IntResponse.fromBinary);\n return new Device(this.connection, response.value);\n }\n\n /**\n * Returns identity.\n * @returns Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request: requests.DeviceEmptyRequest & gateway.Message = {\n ...requests.DeviceEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.DeviceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<DeviceIdentity>(\n 'device/get_identity',\n request,\n DeviceIdentity.fromBinary);\n return response;\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @returns True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request: requests.DeviceEmptyRequest & gateway.Message = {\n ...requests.DeviceEmptyRequest.DEFAULT,\n interfaceId: this.connection.interfaceId,\n device: this.deviceAddress,\n toBinary() {\n return requests.DeviceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/get_is_identified',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Device {\n export interface IdentifyOptions {\n assumeVersion?: FirmwareVersion;\n }\n export interface GenericCommandOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandNoResponseOptions {\n axis?: number;\n }\n export interface SetStateOptions {\n deviceOnly?: boolean;\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Device } from './device';
|
|
2
|
-
import { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration } from '../units';
|
|
2
|
+
import { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Time } from '../units';
|
|
3
3
|
import { LockstepAxes } from './lockstep_axes';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a lockstep group with this ID on a device.
|
|
@@ -80,6 +80,26 @@ export declare class Lockstep {
|
|
|
80
80
|
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
81
81
|
*/
|
|
82
82
|
moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, options?: Lockstep.MoveVelocityOptions): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Moves the first axis of the lockstep group in a sinusoidal trajectory.
|
|
85
|
+
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
86
|
+
* @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).
|
|
87
|
+
* @param amplitudeUnits Units of position.
|
|
88
|
+
* @param period Period of the sinusoidal motion in milliseconds.
|
|
89
|
+
* @param periodUnits Units of time.
|
|
90
|
+
* @param [options.count=0] Number of sinusoidal cycles to complete.
|
|
91
|
+
* Must be a multiple of 0.5
|
|
92
|
+
* If count is not specified or set to 0, the axis will move indefinitely.
|
|
93
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
94
|
+
*/
|
|
95
|
+
moveSin(amplitude: number, amplitudeUnits: Length | Angle | Native, period: number, periodUnits: Time | Native, options?: Lockstep.MoveSinOptions): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Stops the lockstep group at the end of the sinusoidal trajectory for the first axis.
|
|
98
|
+
* If the sinusoidal motion was started with an integer-plus-half cycle count,
|
|
99
|
+
* the motion ends at the half-way point of the sinusoidal trajectory.
|
|
100
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.
|
|
101
|
+
*/
|
|
102
|
+
moveSinStop(options?: Lockstep.MoveSinStopOptions): Promise<void>;
|
|
83
103
|
/**
|
|
84
104
|
* Moves the axes to the maximum valid position.
|
|
85
105
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
@@ -199,6 +219,13 @@ declare namespace Lockstep {
|
|
|
199
219
|
acceleration?: number;
|
|
200
220
|
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
201
221
|
}
|
|
222
|
+
interface MoveSinOptions {
|
|
223
|
+
count?: number;
|
|
224
|
+
waitUntilIdle?: boolean;
|
|
225
|
+
}
|
|
226
|
+
interface MoveSinStopOptions {
|
|
227
|
+
waitUntilIdle?: boolean;
|
|
228
|
+
}
|
|
202
229
|
interface MoveMaxOptions {
|
|
203
230
|
waitUntilIdle?: boolean;
|
|
204
231
|
velocity?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockstep.d.ts","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":"A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B,gBAAgB,CAAC,EAAE,YAAY,GAAG,mBAAmB,GAAG,MAAM,CAAC;KAClE;IACD,UAAiB,mBAAmB;QAChC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,YAAY,GAAG,mBAAmB,GAAG,MAAM,CAAC;KAClE;IACD,UAAiB,cAAc;QAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,OAAO,CAAC;KAC3B;IACD,UAAiB,kBAAkB;QAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;KAC3B;IACD,UAAiB,cAAc;QAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,MAAM,CAAC;QACnD,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,YAAY,GAAG,mBAAmB,GAAG,MAAM,CAAC;KAClE;IACD,UAAiB,cAAc;QAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,MAAM,CAAC;QACnD,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,YAAY,GAAG,mBAAmB,GAAG,MAAM,CAAC;KAClE;IACD,UAAiB,oBAAoB;QACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC/B;IACD,UAAiB,mBAAmB;QAChC,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB;CACF"}
|
|
@@ -220,6 +220,57 @@ class Lockstep {
|
|
|
220
220
|
};
|
|
221
221
|
await gateway.callAsync('device/lockstep_move', request);
|
|
222
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Moves the first axis of the lockstep group in a sinusoidal trajectory.
|
|
225
|
+
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
226
|
+
* @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).
|
|
227
|
+
* @param amplitudeUnits Units of position.
|
|
228
|
+
* @param period Period of the sinusoidal motion in milliseconds.
|
|
229
|
+
* @param periodUnits Units of time.
|
|
230
|
+
* @param [options.count=0] Number of sinusoidal cycles to complete.
|
|
231
|
+
* Must be a multiple of 0.5
|
|
232
|
+
* If count is not specified or set to 0, the axis will move indefinitely.
|
|
233
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
234
|
+
*/
|
|
235
|
+
async moveSin(amplitude, amplitudeUnits, period, periodUnits, options = {}) {
|
|
236
|
+
const { count = 0, waitUntilIdle = true, } = options;
|
|
237
|
+
const request = {
|
|
238
|
+
...requests.LockstepMoveSinRequest.DEFAULT,
|
|
239
|
+
interfaceId: this.device.connection.interfaceId,
|
|
240
|
+
device: this.device.deviceAddress,
|
|
241
|
+
lockstepGroupId: this.lockstepGroupId,
|
|
242
|
+
amplitude: amplitude,
|
|
243
|
+
amplitudeUnits: amplitudeUnits,
|
|
244
|
+
period: period,
|
|
245
|
+
periodUnits: periodUnits,
|
|
246
|
+
count: count,
|
|
247
|
+
waitUntilIdle: waitUntilIdle,
|
|
248
|
+
toBinary() {
|
|
249
|
+
return requests.LockstepMoveSinRequest.toBinary(this);
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
await gateway.callAsync('device/lockstep_move_sin', request);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Stops the lockstep group at the end of the sinusoidal trajectory for the first axis.
|
|
256
|
+
* If the sinusoidal motion was started with an integer-plus-half cycle count,
|
|
257
|
+
* the motion ends at the half-way point of the sinusoidal trajectory.
|
|
258
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.
|
|
259
|
+
*/
|
|
260
|
+
async moveSinStop(options = {}) {
|
|
261
|
+
const { waitUntilIdle = true, } = options;
|
|
262
|
+
const request = {
|
|
263
|
+
...requests.LockstepStopRequest.DEFAULT,
|
|
264
|
+
interfaceId: this.device.connection.interfaceId,
|
|
265
|
+
device: this.device.deviceAddress,
|
|
266
|
+
lockstepGroupId: this.lockstepGroupId,
|
|
267
|
+
waitUntilIdle: waitUntilIdle,
|
|
268
|
+
toBinary() {
|
|
269
|
+
return requests.LockstepStopRequest.toBinary(this);
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
await gateway.callAsync('device/lockstep_move_sin_stop', request);
|
|
273
|
+
}
|
|
223
274
|
/**
|
|
224
275
|
* Moves the axes to the maximum valid position.
|
|
225
276
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAsH;AACtH,oDAAsC;AACtC,sDAAwC;AACxC,mDAA+C;AAE/C;;;;GAIG;AACH,MAAa,QAAQ;IACnB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAGD,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAEjB,MAAM,OAAO,GAAqD;YAChE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO;YACzC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,IAAI,EAAE,IA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C,CAAC;QACpC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAoD;YAC/D,GAAG,QAAQ,CAAC,oBAAoB,CAAC,OAAO;YACxC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ;gBACN,OAAO,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAhkBD,4BAgkBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n * Requires at least Firmware 6.15 or 7.11.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request: requests.LockstepEnableRequest & gateway.Message = {\n ...requests.LockstepEnableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n axes: axes,\n toBinary() {\n return requests.LockstepEnableRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request: requests.LockstepDisableRequest & gateway.Message = {\n ...requests.LockstepDisableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepDisableRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group movement. Decelerates until zero speed.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n options: Lockstep.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepStopRequest & gateway.Message = {\n ...requests.LockstepStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepStopRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n options: Lockstep.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepHomeRequest & gateway.Message = {\n ...requests.LockstepHomeRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepHomeRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveAbsoluteOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.ABS,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveRelativeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.REL,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param [unit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE,\n options: Lockstep.MoveVelocityOptions = {}\n ): Promise<void> {\n const {\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.VEL,\n arg: velocity,\n unit: unit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMax(\n options: Lockstep.MoveMaxOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.MAX,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMin(\n options: Lockstep.MoveMinOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.MIN,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: Lockstep.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request: requests.LockstepWaitUntilIdleRequest & gateway.Message = {\n ...requests.LockstepWaitUntilIdleRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n throwErrorOnFault: throwErrorOnFault,\n toBinary() {\n return requests.LockstepWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @returns True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/lockstep_is_busy',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @returns LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<LockstepAxes>(\n 'device/lockstep_get_axes',\n request,\n LockstepAxes.fromBinary);\n return response;\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @returns Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n requests.LockstepGetAxisNumbersResponse.fromBinary);\n return response.axes;\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * Uses primary axis unit conversion.\n * @returns Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleArrayResponse>(\n 'device/lockstep_get_offsets',\n request,\n requests.DoubleArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * Uses primary axis unit conversion.\n * @returns Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleArrayResponse>(\n 'device/lockstep_get_twists',\n request,\n requests.DoubleArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Returns current position of the primary axis.\n * @param [unit=Units.NATIVE] Units of the position.\n * @returns Primary axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/lockstep_get_pos',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets lockstep twist tolerance.\n * Twist tolerances that do not match the system configuration can reduce performance or damage the system.\n * @param tolerance Twist tolerance.\n * @param [unit=Units.NATIVE] Units of the tolerance.\n * Uses primary axis unit conversion when setting to all axes,\n * otherwise uses specified secondary axis unit conversion.\n * @param [options.axisIndex=0] Optional index of a secondary axis to set the tolerance for.\n * If left empty or set to 0, the tolerance is set to all the secondary axes.\n */\n public async setTolerance(\n tolerance: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.SetToleranceOptions = {}\n ): Promise<void> {\n const {\n axisIndex = 0,\n } = options;\n const request: requests.LockstepSetRequest & gateway.Message = {\n ...requests.LockstepSetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n value: tolerance,\n unit: unit,\n axisIndex: axisIndex,\n toBinary() {\n return requests.LockstepSetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_set_tolerance', request);\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @returns True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/lockstep_is_enabled',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @returns String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/lockstep_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Lockstep {\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface MoveAbsoluteOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveRelativeOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveVelocityOptions {\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMaxOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMinOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n export interface SetToleranceOptions {\n axisIndex?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAA4H;AAC5H,oDAAsC;AACtC,sDAAwC;AACxC,mDAA+C;AAE/C;;;;GAIG;AACH,MAAa,QAAQ;IACnB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAGD,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAE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C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ;gBACN,OAAO,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,4BAA4B,EAC5B,OAAO,EACP,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAoD;YAC/D,GAAG,QAAQ,CAAC,oBAAoB,CAAC,OAAO;YACxC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ;gBACN,OAAO,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AApoBD,4BAooBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units, Time } from '../units';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n * Requires at least Firmware 6.15 or 7.11.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request: requests.LockstepEnableRequest & gateway.Message = {\n ...requests.LockstepEnableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n axes: axes,\n toBinary() {\n return requests.LockstepEnableRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request: requests.LockstepDisableRequest & gateway.Message = {\n ...requests.LockstepDisableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepDisableRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group movement. Decelerates until zero speed.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n options: Lockstep.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepStopRequest & gateway.Message = {\n ...requests.LockstepStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepStopRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n options: Lockstep.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepHomeRequest & gateway.Message = {\n ...requests.LockstepHomeRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepHomeRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveAbsoluteOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.ABS,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveRelativeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.REL,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param [unit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE,\n options: Lockstep.MoveVelocityOptions = {}\n ): Promise<void> {\n const {\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.VEL,\n arg: velocity,\n unit: unit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group in a sinusoidal trajectory.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).\n * @param amplitudeUnits Units of position.\n * @param period Period of the sinusoidal motion in milliseconds.\n * @param periodUnits Units of time.\n * @param [options.count=0] Number of sinusoidal cycles to complete.\n * Must be a multiple of 0.5\n * If count is not specified or set to 0, the axis will move indefinitely.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async moveSin(\n amplitude: number,\n amplitudeUnits: Length | Angle | Native,\n period: number,\n periodUnits: Time | Native,\n options: Lockstep.MoveSinOptions = {}\n ): Promise<void> {\n const {\n count = 0,\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepMoveSinRequest & gateway.Message = {\n ...requests.LockstepMoveSinRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n amplitude: amplitude,\n amplitudeUnits: amplitudeUnits,\n period: period,\n periodUnits: periodUnits,\n count: count,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepMoveSinRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move_sin', request);\n }\n\n /**\n * Stops the lockstep group at the end of the sinusoidal trajectory for the first axis.\n * If the sinusoidal motion was started with an integer-plus-half cycle count,\n * the motion ends at the half-way point of the sinusoidal trajectory.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.\n */\n public async moveSinStop(\n options: Lockstep.MoveSinStopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.LockstepStopRequest & gateway.Message = {\n ...requests.LockstepStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.LockstepStopRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move_sin_stop', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMax(\n options: Lockstep.MoveMaxOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.MAX,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMin(\n options: Lockstep.MoveMinOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request: requests.LockstepMoveRequest & gateway.Message = {\n ...requests.LockstepMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n type: requests.AxisMoveType.MIN,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.LockstepMoveRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: Lockstep.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request: requests.LockstepWaitUntilIdleRequest & gateway.Message = {\n ...requests.LockstepWaitUntilIdleRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n throwErrorOnFault: throwErrorOnFault,\n toBinary() {\n return requests.LockstepWaitUntilIdleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @returns True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/lockstep_is_busy',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @returns LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<LockstepAxes>(\n 'device/lockstep_get_axes',\n request,\n LockstepAxes.fromBinary);\n return response;\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @returns Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n requests.LockstepGetAxisNumbersResponse.fromBinary);\n return response.axes;\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * Uses primary axis unit conversion.\n * @returns Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleArrayResponse>(\n 'device/lockstep_get_offsets',\n request,\n requests.DoubleArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * Uses primary axis unit conversion.\n * @returns Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleArrayResponse>(\n 'device/lockstep_get_twists',\n request,\n requests.DoubleArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Returns current position of the primary axis.\n * @param [unit=Units.NATIVE] Units of the position.\n * @returns Primary axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request: requests.LockstepGetRequest & gateway.Message = {\n ...requests.LockstepGetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n unit: unit,\n toBinary() {\n return requests.LockstepGetRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/lockstep_get_pos',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets lockstep twist tolerance.\n * Twist tolerances that do not match the system configuration can reduce performance or damage the system.\n * @param tolerance Twist tolerance.\n * @param [unit=Units.NATIVE] Units of the tolerance.\n * Uses primary axis unit conversion when setting to all axes,\n * otherwise uses specified secondary axis unit conversion.\n * @param [options.axisIndex=0] Optional index of a secondary axis to set the tolerance for.\n * If left empty or set to 0, the tolerance is set to all the secondary axes.\n */\n public async setTolerance(\n tolerance: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.SetToleranceOptions = {}\n ): Promise<void> {\n const {\n axisIndex = 0,\n } = options;\n const request: requests.LockstepSetRequest & gateway.Message = {\n ...requests.LockstepSetRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n value: tolerance,\n unit: unit,\n axisIndex: axisIndex,\n toBinary() {\n return requests.LockstepSetRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/lockstep_set_tolerance', request);\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @returns True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/lockstep_is_enabled',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @returns String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request: requests.LockstepEmptyRequest & gateway.Message = {\n ...requests.LockstepEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n lockstepGroupId: this.lockstepGroupId,\n toBinary() {\n return requests.LockstepEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/lockstep_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Lockstep {\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface MoveAbsoluteOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveRelativeOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveVelocityOptions {\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveSinOptions {\n count?: number;\n waitUntilIdle?: boolean;\n }\n export interface MoveSinStopOptions {\n waitUntilIdle?: boolean;\n }\n export interface MoveMaxOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMinOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n export interface SetToleranceOptions {\n axisIndex?: number;\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;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AO,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: '6.
|
|
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,O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wB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAC3B,IAAa;QAEb,MAAM,OAAO,GAAsD;YACjE,GAAG,QAAQ,CAAC,sBAAsB,CAAC,OAAO;YAC1C,IAAI,EAAE,IAAI;YACV,QAAQ;gBACN,OAAO,QAAQ,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAChC,MAAc;QAEd,MAAM,OAAO,GAA0C;YACrD,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO;YAC9B,KAAK,EAAE,MAAM;YACb,QAAQ;gBACN,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;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: '6.7.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"]}
|
|
@@ -38,8 +38,9 @@ export declare class Autofocus {
|
|
|
38
38
|
/**
|
|
39
39
|
* Moves the device until it's in focus.
|
|
40
40
|
* @param [scan=false] If true, the autofocus will approach from the limit moving until it's in range.
|
|
41
|
+
* @param [timeout=-1] Sets autofocus timeout duration in milliseconds.
|
|
41
42
|
*/
|
|
42
|
-
focusOnce(scan?: boolean): Promise<void>;
|
|
43
|
+
focusOnce(scan?: boolean, timeout?: number): Promise<void>;
|
|
43
44
|
/**
|
|
44
45
|
* Moves the focus axis continuously maintaining focus.
|
|
45
46
|
* Starts the autofocus control loop.
|
|
@@ -88,6 +89,7 @@ export declare class Autofocus {
|
|
|
88
89
|
synchronizeParameters(): Promise<void>;
|
|
89
90
|
/**
|
|
90
91
|
* Sets the parameters for the autofocus objective.
|
|
92
|
+
* Note that the method temporarily switches current objective to set the parameters.
|
|
91
93
|
* @param objective The objective (numbered from 1) to set the parameters for.
|
|
92
94
|
* If your microscope has only one objective, use value of 1.
|
|
93
95
|
* @param parameters The parameters for the autofocus objective.
|
|
@@ -97,6 +99,7 @@ export declare class Autofocus {
|
|
|
97
99
|
* Returns the parameters for the autofocus objective.
|
|
98
100
|
* @param objective The objective (numbered from 1) to get the parameters for.
|
|
99
101
|
* If your microscope has only one objective, use value of 1.
|
|
102
|
+
* Note that the method temporarily switches current objective to get the parameters.
|
|
100
103
|
* @returns The parameters for the autofocus objective.
|
|
101
104
|
*/
|
|
102
105
|
getObjectiveParameters(objective: number): Promise<NamedParameter[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autofocus.d.ts","sourceRoot":"","sources":["../../../src/microscopy/autofocus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAS,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;GAEG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IACD,OAAO,CAAC,WAAW,CAAS;IAE5B;;OAEG;IACH,IAAW,SAAS,IAAI,IAAI,CAE3B;IACD,OAAO,CAAC,UAAU,CAAO;IAEzB;;OAEG;IACH,IAAW,eAAe,IAAI,MAAM,GAAG,SAAS,CAE/C;IACD,OAAO,CAAC,gBAAgB,CAAqB;IAE7C;;OAEG;gBACS,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,IA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