@zaber/motion 5.1.4 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/axis.d.ts +4 -0
- package/dist/lib/ascii/axis.js +6 -0
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_identity.d.ts +4 -0
- package/dist/lib/ascii/axis_identity.js +1 -0
- package/dist/lib/ascii/axis_identity.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +1 -0
- package/dist/lib/ascii/device.js +1 -0
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_io.d.ts +54 -0
- package/dist/lib/ascii/device_io.js +120 -4
- package/dist/lib/ascii/device_io.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +1 -0
- package/dist/lib/ascii/index.js +4 -2
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/io_port_label.d.ts +21 -0
- package/dist/lib/ascii/io_port_label.js +19 -0
- package/dist/lib/ascii/io_port_label.js.map +1 -0
- package/dist/lib/ascii_ns.d.ts +2 -0
- package/dist/lib/ascii_ns.js +1 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/microscopy/microscope.d.ts +9 -2
- package/dist/lib/microscopy/microscope.js +6 -3
- package/dist/lib/microscopy/microscope.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +262 -14
- package/dist/lib/protobufs/main_pb.js +2178 -264
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +1 -3
|
Binary file
|
package/dist/lib/ascii/axis.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export declare class Axis {
|
|
|
50
50
|
* Name of the peripheral.
|
|
51
51
|
*/
|
|
52
52
|
get peripheralName(): string;
|
|
53
|
+
/**
|
|
54
|
+
* Serial number of the peripheral, or 0 when not applicable.
|
|
55
|
+
*/
|
|
56
|
+
get peripheralSerialNumber(): number;
|
|
53
57
|
/**
|
|
54
58
|
* Indicates whether the axis is a peripheral or part of an integrated device.
|
|
55
59
|
*/
|
package/dist/lib/ascii/axis.js
CHANGED
|
@@ -88,6 +88,12 @@ class Axis {
|
|
|
88
88
|
get peripheralName() {
|
|
89
89
|
return this.identity.peripheralName;
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Serial number of the peripheral, or 0 when not applicable.
|
|
93
|
+
*/
|
|
94
|
+
get peripheralSerialNumber() {
|
|
95
|
+
return this.identity.peripheralSerialNumber;
|
|
96
|
+
}
|
|
91
97
|
/**
|
|
92
98
|
* Indicates whether the axis is a peripheral or part of an integrated device.
|
|
93
99
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../../src/ascii/axis.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,mDAA+C;AAE/C,yCAAsC;AACtC,mDAA+C;AAC/C,oCAAsH;AACtH,yCAAsC;AACtC,gDAA6C;AAC7C,oDAAsC;AACtC,uCAAwC;AAExC;;GAEG;AACH,MAAa,IAAI;IACf;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;;OAGG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;;OAGG;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;I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port { Device } from './device';\nimport { AxisIdentity } from './axis_identity';\nimport { AxisType } from './axis_type';\nimport { Warnings } from './warnings';\nimport { AxisSettings } from './axis_settings';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\nimport { AxisStorage } from './storage';\n\n/**\n * Represents an axis of motion associated with a device.\n */\nexport class Axis {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The axis number identifies the axis on the device.\n * The first axis has the number one.\n */\n public get axisNumber(): number {\n return this._axisNumber;\n }\n private _axisNumber: number;\n\n /**\n * Settings and properties of this axis.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this axis.\n * Requires at least Firmware 7.30.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this axis.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the axis.\n */\n public get identity(): AxisIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Unique ID of the peripheral hardware.\n */\n public get peripheralId(): number {\n return this.identity.peripheralId;\n }\n\n /**\n * Name of the peripheral.\n */\n public get peripheralName(): string {\n return this.identity.peripheralName;\n }\n\n /**\n * Indicates whether the axis is a peripheral or part of an integrated device.\n */\n public get isPeripheral(): boolean {\n return this.identity.isPeripheral;\n }\n\n /**\n * Determines the type of an axis and units it accepts.\n */\n public get axisType(): AxisType {\n return this.identity.axisType;\n }\n\n /**\n * User-assigned label of the peripheral.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n constructor(device: Device, axisNumber: number) {\n this._device = device;\n this._axisNumber = axisNumber;\n this._settings = new AxisSettings(this);\n this._storage = new AxisStorage(this);\n this._warnings = new Warnings(device, axisNumber);\n }\n\n /**\n * Homes axis. Axis returns to its homing position.\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: Axis.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axis 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: Axis.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Parks the axis in anticipation of turning the power off.\n * It can later be powered on, unparked, and moved without first having to home it.\n */\n public async park(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks axis. Axis will now be able to move.\n */\n public async unpark(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether the axis is parked or not.\n * @returns True if the axis is currently parked. False otherwise.\n */\n public async isParked(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_parked',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Waits until axis stops moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: Axis.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the axis is executing a motion command.\n * @returns True if the axis is currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns bool indicating whether the axis has position reference and was homed.\n * @returns True if the axis has position reference and was homed.\n */\n public async isHomed(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_homed',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Move axis to absolute position.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the maximum position as specified by limit.max.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the minimum position as specified by limit.min.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Move axis to position relative to current position.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Begins to move axis at specified speed.\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: Axis.MoveVelocityOptions = {}\n ): Promise<void> {\n const {\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Returns current axis position.\n * @param [unit=Units.NATIVE] Units of position.\n * @returns Axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setSetting('pos');\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Gets number of index positions of the axis.\n * @returns Number of index positions.\n */\n public async getNumberOfIndexPositions(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_count',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Returns current axis index position.\n * @returns Index position starting from 1 or 0 if the position is not an index position.\n */\n public async getIndexPosition(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_position',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Moves the axis to index position.\n * @param index Index position. Index positions are numbered from 1.\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 moveIndex(\n index: number,\n options: Axis.MoveIndexOptions = {}\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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.INDEX);\n request.setArgInt(index);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Sends a generic ASCII command to this axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Axis.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this axis and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Axis.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\n }\n\n /**\n * Sends a generic ASCII command to this axis without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\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 axis and this device.\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 = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the user-assigned peripheral 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 = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setValue(label);\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the peripheral name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the axis.\n * @returns A string that represents the axis.\n */\n public toString(): string {\n const request = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/axis_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a serialization of the current axis state that can be saved and reapplied.\n * @returns A serialization of the current state of the axis.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to this axis.\n * @param state The state object to apply to this axis.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this axis.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string\n ): Promise<string> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n gateway.CanSetStateAxisResponse);\n return response.getError();\n }\n\n /**\n * Returns identity.\n * @returns Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.AxisIdentity>(\n 'device/get_axis_identity',\n request,\n gateway.AxisIdentity);\n return AxisIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Disables the driver, which prevents current from being sent to the motor or load.\n * If the driver is already disabled, the driver remains disabled.\n */\n public async driverDisable(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/driver_disable', request);\n }\n\n /**\n * Attempts to enable the driver.\n * If the driver is already enabled, the driver remains enabled.\n */\n public async driverEnable(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/driver_enable', request);\n }\n\n /**\n * Activates a peripheral on this axis.\n * Removes all identity information for the device.\n * Run the identify method on the device after activating to refresh the information.\n */\n public async activate(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/activate', request);\n }\n}\n\nnamespace Axis {\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: 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 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 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 MoveIndexOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface GenericCommandOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../../src/ascii/axis.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,mDAA+C;AAE/C,yCAAsC;AACtC,mDAA+C;AAC/C,oCAAsH;AACtH,yCAAsC;AACtC,gDAA6C;AAC7C,oDAAsC;AACtC,uCAAwC;AAExC;;GAEG;AACH,MAAa,IAAI;IACf;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;;OAGG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;;OAGG;IACH,IAAW,OAAO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AAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEjC,MAAM,OAAO,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;CACF;AAnxBD,oBAmxBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { AxisIdentity } from './axis_identity';\nimport { AxisType } from './axis_type';\nimport { Warnings } from './warnings';\nimport { AxisSettings } from './axis_settings';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\nimport { AxisStorage } from './storage';\n\n/**\n * Represents an axis of motion associated with a device.\n */\nexport class Axis {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The axis number identifies the axis on the device.\n * The first axis has the number one.\n */\n public get axisNumber(): number {\n return this._axisNumber;\n }\n private _axisNumber: number;\n\n /**\n * Settings and properties of this axis.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this axis.\n * Requires at least Firmware 7.30.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this axis.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the axis.\n */\n public get identity(): AxisIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Unique ID of the peripheral hardware.\n */\n public get peripheralId(): number {\n return this.identity.peripheralId;\n }\n\n /**\n * Name of the peripheral.\n */\n public get peripheralName(): string {\n return this.identity.peripheralName;\n }\n\n /**\n * Serial number of the peripheral, or 0 when not applicable.\n */\n public get peripheralSerialNumber(): number {\n return this.identity.peripheralSerialNumber;\n }\n\n /**\n * Indicates whether the axis is a peripheral or part of an integrated device.\n */\n public get isPeripheral(): boolean {\n return this.identity.isPeripheral;\n }\n\n /**\n * Determines the type of an axis and units it accepts.\n */\n public get axisType(): AxisType {\n return this.identity.axisType;\n }\n\n /**\n * User-assigned label of the peripheral.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n constructor(device: Device, axisNumber: number) {\n this._device = device;\n this._axisNumber = axisNumber;\n this._settings = new AxisSettings(this);\n this._storage = new AxisStorage(this);\n this._warnings = new Warnings(device, axisNumber);\n }\n\n /**\n * Homes axis. Axis returns to its homing position.\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: Axis.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axis 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: Axis.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Parks the axis in anticipation of turning the power off.\n * It can later be powered on, unparked, and moved without first having to home it.\n */\n public async park(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks axis. Axis will now be able to move.\n */\n public async unpark(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether the axis is parked or not.\n * @returns True if the axis is currently parked. False otherwise.\n */\n public async isParked(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_parked',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Waits until axis stops moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: Axis.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the axis is executing a motion command.\n * @returns True if the axis is currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns bool indicating whether the axis has position reference and was homed.\n * @returns True if the axis has position reference and was homed.\n */\n public async isHomed(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_homed',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Move axis to absolute position.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the maximum position as specified by limit.max.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the minimum position as specified by limit.min.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Move axis to position relative to current position.\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: Axis.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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Begins to move axis at specified speed.\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: Axis.MoveVelocityOptions = {}\n ): Promise<void> {\n const {\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Returns current axis position.\n * @param [unit=Units.NATIVE] Units of position.\n * @returns Axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setSetting('pos');\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Gets number of index positions of the axis.\n * @returns Number of index positions.\n */\n public async getNumberOfIndexPositions(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_count',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Returns current axis index position.\n * @returns Index position starting from 1 or 0 if the position is not an index position.\n */\n public async getIndexPosition(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_position',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Moves the axis to index position.\n * @param index Index position. Index positions are numbered from 1.\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 moveIndex(\n index: number,\n options: Axis.MoveIndexOptions = {}\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 = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.INDEX);\n request.setArgInt(index);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Sends a generic ASCII command to this axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Axis.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this axis and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Axis.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\n }\n\n /**\n * Sends a generic ASCII command to this axis without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\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 axis and this device.\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 = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the user-assigned peripheral 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 = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setValue(label);\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the peripheral name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the axis.\n * @returns A string that represents the axis.\n */\n public toString(): string {\n const request = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/axis_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a serialization of the current axis state that can be saved and reapplied.\n * @returns A serialization of the current state of the axis.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to this axis.\n * @param state The state object to apply to this axis.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this axis.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string\n ): Promise<string> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n gateway.CanSetStateAxisResponse);\n return response.getError();\n }\n\n /**\n * Returns identity.\n * @returns Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.AxisIdentity>(\n 'device/get_axis_identity',\n request,\n gateway.AxisIdentity);\n return AxisIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Disables the driver, which prevents current from being sent to the motor or load.\n * If the driver is already disabled, the driver remains disabled.\n */\n public async driverDisable(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/driver_disable', request);\n }\n\n /**\n * Attempts to enable the driver.\n * If the driver is already enabled, the driver remains enabled.\n */\n public async driverEnable(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/driver_enable', request);\n }\n\n /**\n * Activates a peripheral on this axis.\n * Removes all identity information for the device.\n * Run the identify method on the device after activating to refresh the information.\n */\n public async activate(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/activate', request);\n }\n}\n\nnamespace Axis {\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: 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 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 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 MoveIndexOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface GenericCommandOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n}\n"]}
|
|
@@ -11,6 +11,10 @@ export interface AxisIdentity {
|
|
|
11
11
|
* Name of the peripheral.
|
|
12
12
|
*/
|
|
13
13
|
peripheralName: string;
|
|
14
|
+
/**
|
|
15
|
+
* Serial number of the peripheral, or 0 when not applicable.
|
|
16
|
+
*/
|
|
17
|
+
peripheralSerialNumber: number;
|
|
14
18
|
/**
|
|
15
19
|
* Indicates whether the axis is a peripheral or part of an integrated device.
|
|
16
20
|
*/
|
|
@@ -11,6 +11,7 @@ var AxisIdentity;
|
|
|
11
11
|
return {
|
|
12
12
|
peripheralId: pbData.peripheralId,
|
|
13
13
|
peripheralName: pbData.peripheralName,
|
|
14
|
+
peripheralSerialNumber: pbData.peripheralSerialNumber,
|
|
14
15
|
isPeripheral: pbData.isPeripheral,
|
|
15
16
|
axisType: pbData.axisType,
|
|
16
17
|
isModified: pbData.isModified,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis_identity.js","sourceRoot":"","sources":["../../../src/ascii/axis_identity.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;
|
|
1
|
+
{"version":3,"file":"axis_identity.js","sourceRoot":"","sources":["../../../src/ascii/axis_identity.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAyCtD,IAAiB,YAAY,CAc5B;AAdD,WAAiB,YAAY;IACd,mBAAM,GAAG,cAAc,CAAC;IAErC,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAqC;QAChE,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,sBAAsB,EAAE,MAAM,CAAC,sBAAsB;YACrD,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAe;YAChC,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;IATe,yBAAY,eAS3B,CAAA;AACH,CAAC,EAdgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAc5B","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { AxisType } from './axis_type';\n\n/**\n * Representation of data gathered during axis identification.\n */\nexport interface AxisIdentity {\n /**\n * Unique ID of the peripheral hardware.\n */\n peripheralId: number;\n\n /**\n * Name of the peripheral.\n */\n peripheralName: string;\n\n /**\n * Serial number of the peripheral, or 0 when not applicable.\n */\n peripheralSerialNumber: number;\n\n /**\n * Indicates whether the axis is a peripheral or part of an integrated device.\n */\n isPeripheral: boolean;\n\n /**\n * Determines the type of an axis and units it accepts.\n */\n axisType: AxisType;\n\n /**\n * The peripheral has hardware modifications.\n */\n isModified: boolean;\n\n}\n\nexport namespace AxisIdentity {\n export const __type = 'AxisIdentity';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.AxisIdentity.AsObject): AxisIdentity {\n return {\n peripheralId: pbData.peripheralId,\n peripheralName: pbData.peripheralName,\n peripheralSerialNumber: pbData.peripheralSerialNumber,\n isPeripheral: pbData.isPeripheral,\n axisType: pbData.axisType as any,\n isModified: pbData.isModified,\n };\n }\n}\n"]}
|
|
@@ -177,6 +177,7 @@ export declare class Device {
|
|
|
177
177
|
* Formats parameters into a command and performs unit conversions.
|
|
178
178
|
* Parameters in the command template are denoted by a question mark.
|
|
179
179
|
* Command returned is only valid for this device.
|
|
180
|
+
* Unit conversion is not supported for commands where axes can be remapped, such as stream and PVT commands.
|
|
180
181
|
* For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
181
182
|
* @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.
|
|
182
183
|
* @param parameters Variable number of command parameters.
|
package/dist/lib/ascii/device.js
CHANGED
|
@@ -294,6 +294,7 @@ class Device {
|
|
|
294
294
|
* Formats parameters into a command and performs unit conversions.
|
|
295
295
|
* Parameters in the command template are denoted by a question mark.
|
|
296
296
|
* Command returned is only valid for this device.
|
|
297
|
+
* Unit conversion is not supported for commands where axes can be remapped, such as stream and PVT commands.
|
|
297
298
|
* For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
298
299
|
* @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.
|
|
299
300
|
* @param parameters Variable number of command parameters.
|
|
@@ -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;AAC5B,gDAA6C;AAC7C,0DAAsD;AACtD,oDAAsC;AACtC,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;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,qBAAqB,EAAE,CAAC;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,CAC/B,qBAAqB,EACrB,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,gCAAc,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAvfD,wBAufC","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 { 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 = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setAssumeVersion(FirmwareVersion.toProtobuf(assumeVersion));\n\n const response = await gateway.callAsync<gateway.DeviceIdentity>(\n 'device/identify',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\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 * 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 = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setValue(label);\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 = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/device_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.SetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n request.setDeviceOnly(deviceOnly);\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 = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n gateway.CanSetStateDeviceResponse);\n return CanSetStateDeviceResponse.fromProtobuf(response.toObject());\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 = new gateway.WaitToRespondRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setTimeout(timeout);\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 = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceIdentity>(\n 'device/get_identity',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\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 = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/get_is_identified',\n request,\n gateway.BoolResponse);\n return response.getValue();\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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AAc,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAxfD,wBAwfC","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 { 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 = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setAssumeVersion(FirmwareVersion.toProtobuf(assumeVersion));\n\n const response = await gateway.callAsync<gateway.DeviceIdentity>(\n 'device/identify',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\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 = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\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 = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setValue(label);\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 = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/device_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.SetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n request.setDeviceOnly(deviceOnly);\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 = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n gateway.CanSetStateDeviceResponse);\n return CanSetStateDeviceResponse.fromProtobuf(response.toObject());\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 = new gateway.WaitToRespondRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setTimeout(timeout);\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 = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceIdentity>(\n 'device/get_identity',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\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 = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/get_is_identified',\n request,\n gateway.BoolResponse);\n return response.getValue();\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"]}
|
|
@@ -2,6 +2,8 @@ import { Device } from './device';
|
|
|
2
2
|
import { Native, Time } from '../units';
|
|
3
3
|
import { DeviceIOInfo } from './device_io_info';
|
|
4
4
|
import { DigitalOutputAction } from './digital_output_action';
|
|
5
|
+
import { IoPortType } from './io_port_type';
|
|
6
|
+
import { IoPortLabel } from './io_port_label';
|
|
5
7
|
/**
|
|
6
8
|
* Class providing access to the I/O channels of the device.
|
|
7
9
|
*/
|
|
@@ -74,11 +76,28 @@ export declare class DeviceIO {
|
|
|
74
76
|
* Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
|
|
75
77
|
*/
|
|
76
78
|
cancelAllDigitalOutputsSchedule(channels?: boolean[]): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Cancel all scheduled analog output actions.
|
|
81
|
+
* Requires at least Firmware 7.38.
|
|
82
|
+
* @param [channels=[]] Optionally specify which channels to cancel.
|
|
83
|
+
* Array length must be empty or equal to the number of channels on device.
|
|
84
|
+
* Specifying "True" for a channel will cancel the scheduled analog output value for that channel.
|
|
85
|
+
*/
|
|
86
|
+
cancelAllAnalogOutputsSchedule(channels?: boolean[]): Promise<void>;
|
|
77
87
|
/**
|
|
78
88
|
* Sets values for all analog output channels.
|
|
79
89
|
* @param values Voltage values to set the output channels to.
|
|
80
90
|
*/
|
|
81
91
|
setAllAnalogOutputs(values: number[]): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Sets current and future values for all analog output channels.
|
|
94
|
+
* Requires at least Firmware 7.38.
|
|
95
|
+
* @param values Voltage values to set the output channels to immediately.
|
|
96
|
+
* @param futureValues Voltage values to set the output channels to in the future.
|
|
97
|
+
* @param delay Delay between setting current values and setting future values.
|
|
98
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
99
|
+
*/
|
|
100
|
+
setAllAnalogOutputsSchedule(values: number[], futureValues: number[], delay: number, unit?: Time | Native): Promise<void>;
|
|
82
101
|
/**
|
|
83
102
|
* Sets value for the specified digital output channel.
|
|
84
103
|
* @param channelNumber Channel number starting at 1.
|
|
@@ -101,15 +120,50 @@ export declare class DeviceIO {
|
|
|
101
120
|
* @param channelNumber Channel number starting at 1.
|
|
102
121
|
*/
|
|
103
122
|
cancelDigitalOutputSchedule(channelNumber: number): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Cancels a scheduled analog output value.
|
|
125
|
+
* Requires at least Firmware 7.38.
|
|
126
|
+
* @param channelNumber Channel number starting at 1.
|
|
127
|
+
*/
|
|
128
|
+
cancelAnalogOutputSchedule(channelNumber: number): Promise<void>;
|
|
104
129
|
/**
|
|
105
130
|
* Sets value for the specified analog output channel.
|
|
106
131
|
* @param channelNumber Channel number starting at 1.
|
|
107
132
|
* @param value Value to set the output channel voltage to.
|
|
108
133
|
*/
|
|
109
134
|
setAnalogOutput(channelNumber: number, value: number): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Sets current and future value for the specified analog output channel.
|
|
137
|
+
* Requires at least Firmware 7.38.
|
|
138
|
+
* @param channelNumber Channel number starting at 1.
|
|
139
|
+
* @param value Value to set the output channel voltage to immediately.
|
|
140
|
+
* @param futureValue Value to set the output channel voltage to in the future.
|
|
141
|
+
* @param delay Delay between setting current value and setting future value.
|
|
142
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
143
|
+
*/
|
|
144
|
+
setAnalogOutputSchedule(channelNumber: number, value: number, futureValue: number, delay: number, unit?: Time | Native): Promise<void>;
|
|
110
145
|
/**
|
|
111
146
|
* Returns the number of I/O channels the device has.
|
|
112
147
|
* @returns An object containing the number of I/O channels the device has.
|
|
113
148
|
*/
|
|
114
149
|
getChannelsInfo(): Promise<DeviceIOInfo>;
|
|
150
|
+
/**
|
|
151
|
+
* Sets the label of the specified channel.
|
|
152
|
+
* @param portType The type of channel to set the label of.
|
|
153
|
+
* @param channelNumber Channel number starting at 1.
|
|
154
|
+
* @param label The label to set for the specified channel.
|
|
155
|
+
*/
|
|
156
|
+
setLabel(portType: IoPortType, channelNumber: number, label: string): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Returns the label of the specified channel.
|
|
159
|
+
* @param portType The type of channel to get the label of.
|
|
160
|
+
* @param channelNumber Channel number starting at 1.
|
|
161
|
+
* @returns The label of the specified channel.
|
|
162
|
+
*/
|
|
163
|
+
getLabel(portType: IoPortType, channelNumber: number): Promise<string>;
|
|
164
|
+
/**
|
|
165
|
+
* Returns every label assigned to an IO port on this device.
|
|
166
|
+
* @returns The labels set for this device's IO.
|
|
167
|
+
*/
|
|
168
|
+
getAllLabels(): Promise<IoPortLabel[]>;
|
|
115
169
|
}
|