@zaber/motion 7.15.0 → 8.0.1
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/LICENSE +436 -1
- package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
- package/dist/lib/ascii/axis.d.ts +10 -0
- package/dist/lib/ascii/axis.d.ts.map +1 -1
- package/dist/lib/ascii/axis.js +22 -0
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_settings.d.ts +8 -0
- package/dist/lib/ascii/axis_settings.d.ts.map +1 -1
- package/dist/lib/ascii/axis_settings.js +21 -0
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +10 -0
- package/dist/lib/ascii/device.d.ts.map +1 -1
- package/dist/lib/ascii/device.js +21 -0
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +8 -0
- package/dist/lib/ascii/device_settings.d.ts.map +1 -1
- package/dist/lib/ascii/device_settings.js +20 -0
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +0 -1
- package/dist/lib/ascii/index.d.ts.map +1 -1
- package/dist/lib/ascii/index.js +0 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +0 -8
- package/dist/lib/ascii/lockstep.d.ts.map +1 -1
- package/dist/lib/ascii/lockstep.js +0 -20
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/pvt_sequence.d.ts +0 -31
- package/dist/lib/ascii/pvt_sequence.d.ts.map +1 -1
- package/dist/lib/ascii/pvt_sequence.js +0 -84
- package/dist/lib/ascii/pvt_sequence.js.map +1 -1
- package/dist/lib/ascii/response.d.ts +4 -1
- package/dist/lib/ascii/response.d.ts.map +1 -1
- package/dist/lib/ascii/response.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +11 -30
- package/dist/lib/ascii/servo_tuner.d.ts.map +1 -1
- package/dist/lib/ascii/servo_tuner.js +12 -42
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii/simple_tuning.d.ts +5 -4
- package/dist/lib/ascii/simple_tuning.d.ts.map +1 -1
- package/dist/lib/ascii/simple_tuning.js +6 -6
- package/dist/lib/ascii/simple_tuning.js.map +1 -1
- package/dist/lib/ascii/stream.d.ts +0 -50
- package/dist/lib/ascii/stream.d.ts.map +1 -1
- package/dist/lib/ascii/stream.js +0 -126
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii/unknown_response_event.d.ts +4 -1
- package/dist/lib/ascii/unknown_response_event.d.ts.map +1 -1
- package/dist/lib/ascii/unknown_response_event.js.map +1 -1
- package/dist/lib/binary/connection.d.ts +17 -2
- package/dist/lib/binary/connection.d.ts.map +1 -1
- package/dist/lib/binary/connection.js +14 -3
- package/dist/lib/binary/connection.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/microscopy/objective_changer.d.ts +0 -23
- package/dist/lib/microscopy/objective_changer.d.ts.map +1 -1
- package/dist/lib/microscopy/objective_changer.js +0 -27
- package/dist/lib/microscopy/objective_changer.js.map +1 -1
- package/dist/lib/requests/get_command_unit_conversion_response.d.ts +13 -0
- package/dist/lib/requests/get_command_unit_conversion_response.d.ts.map +1 -0
- package/dist/lib/requests/get_command_unit_conversion_response.js +28 -0
- package/dist/lib/requests/get_command_unit_conversion_response.js.map +1 -0
- package/dist/lib/requests/index.d.ts +2 -0
- package/dist/lib/requests/index.d.ts.map +1 -1
- package/dist/lib/requests/index.js +2 -0
- package/dist/lib/requests/index.js.map +1 -1
- package/dist/lib/requests/set_simple_tuning.d.ts +4 -4
- package/dist/lib/requests/set_simple_tuning.d.ts.map +1 -1
- package/dist/lib/requests/set_simple_tuning.js +12 -12
- package/dist/lib/requests/set_simple_tuning.js.map +1 -1
- package/dist/lib/requests/unit_convert_native_request.d.ts +17 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts.map +1 -0
- package/dist/lib/requests/unit_convert_native_request.js +39 -0
- package/dist/lib/requests/unit_convert_native_request.js.map +1 -0
- package/dist/lib/unit_conversion_descriptor.d.ts +30 -0
- package/dist/lib/unit_conversion_descriptor.d.ts.map +1 -0
- package/dist/lib/unit_conversion_descriptor.js +37 -0
- package/dist/lib/unit_conversion_descriptor.js.map +1 -0
- package/dist/lib/unit_table.d.ts +33 -0
- package/dist/lib/unit_table.d.ts.map +1 -1
- package/dist/lib/unit_table.js +80 -0
- package/dist/lib/unit_table.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/ascii/lockstep_axes.d.ts +0 -30
- package/dist/lib/ascii/lockstep_axes.d.ts.map +0 -1
- package/dist/lib/ascii/lockstep_axes.js +0 -37
- package/dist/lib/ascii/lockstep_axes.js.map +0 -1
|
@@ -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,oCAA4H;AAC5H,yCAAsC;AAEtC,oDAAsC;AACtC,sDAAwC;AACxC,uCAAwC;AACxC,uEAAiE;AAGjE;;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,CA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,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,WAAW,CACtB,UAAmC,EAAE;QAErC,MAAM,EACJ,aAAa,GAAG,IAAI,GACrB,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAiD;YAC5D,GAAG,QAAQ,CAAC,iBAAiB,CAAC,OAAO;YACrC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,IAAI,EAAE,IAAI,CAAC,UAAU;YACrB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AAhiCD,oBAgiCC","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, Time } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { AxisStorage } from './storage';\nimport { SetStateAxisResponse } from './set_state_axis_response';\nimport { FirmwareVersion } from '../firmware_version';\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 * The number of microsteps per full step for motion axes. Always equal to 0 for non-motion axes.\n */\n public get resolution(): number {\n return this.identity.resolution;\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: requests.DeviceHomeRequest & gateway.Message = {\n ...requests.DeviceHomeRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceHomeRequest.toBinary(this);\n },\n };\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: requests.DeviceStopRequest & gateway.Message = {\n ...requests.DeviceStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceStopRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_parked',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.DeviceWaitUntilIdleRequest & gateway.Message = {\n ...requests.DeviceWaitUntilIdleRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n throwErrorOnFault: throwErrorOnFault,\n toBinary() {\n return requests.DeviceWaitUntilIdleRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_busy',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_homed',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.ABS,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.MAX,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.MIN,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.REL,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.VEL,\n arg: velocity,\n unit: unit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n setting: 'pos',\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets number of index positions of the axis.\n * @returns Number of index positions.\n */\n public async getNumberOfIndexPositions(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'device/get_index_count',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'device/get_index_position',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.INDEX,\n argInt: index,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this 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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this 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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * 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: requests.PrepareCommandRequest & gateway.Message = {\n ...requests.PrepareCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n commandTemplate: commandTemplate,\n parameters: parameters,\n toBinary() {\n return requests.PrepareCommandRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/prepare_command',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets the user-assigned 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: requests.DeviceSetStorageRequest & gateway.Message = {\n ...requests.DeviceSetStorageRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n value: label,\n toBinary() {\n return requests.DeviceSetStorageRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the peripheral name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_label',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string that represents the axis.\n * @returns A string that represents the axis.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this axis.\n * @param state The state object to apply to this axis.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this 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 * @param options.firmwareVersion The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n * @returns An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string,\n options: Axis.CanSetStateOptions = {}\n ): Promise<string | null> {\n const {\n firmwareVersion,\n } = options;\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n state: state,\n firmwareVersion: firmwareVersion,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns identity.\n * @returns Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<AxisIdentity>(\n 'device/get_axis_identity',\n request,\n AxisIdentity.fromBinary);\n return response;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/driver_disable', request);\n }\n\n /**\n * Attempts to enable the driver repeatedly for the specified timeout.\n * If the driver is already enabled, the driver remains enabled.\n * @param [options.timeout=10] Timeout in seconds. Specify 0 to attempt to enable the driver once.\n */\n public async driverEnable(\n options: Axis.DriverEnableOptions = {}\n ): Promise<void> {\n const {\n timeout = 10,\n } = options;\n const request: requests.DriverEnableRequest & gateway.Message = {\n ...requests.DriverEnableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n timeout: timeout,\n toBinary() {\n return requests.DriverEnableRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/activate', request);\n }\n\n /**\n * Restores all axis settings to their default values.\n * Deletes all zaber axis storage keys.\n * Disables lockstep if the axis is part of one. Unparks the axis.\n * Preserves storage.\n * The device needs to be identified again after the restore.\n */\n public async restore(): Promise<void> {\n const request: requests.DeviceRestoreRequest & gateway.Message = {\n ...requests.DeviceRestoreRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.DeviceRestoreRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/restore', request);\n }\n\n /**\n * Moves the axis in a sinusoidal trajectory.\n * @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).\n * @param amplitudeUnits Units of position.\n * @param period Period of the sinusoidal motion in milliseconds.\n * @param periodUnits Units of time.\n * @param [options.count=0] Number of sinusoidal cycles to complete.\n * Must be a multiple of 0.5\n * If count is not specified or set to 0, the axis will move indefinitely.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async moveSin(\n amplitude: number,\n amplitudeUnits: Length | Angle | Native,\n period: number,\n periodUnits: Time | Native,\n options: Axis.MoveSinOptions = {}\n ): Promise<void> {\n const {\n count = 0,\n waitUntilIdle = true,\n } = options;\n const request: requests.DeviceMoveSinRequest & gateway.Message = {\n ...requests.DeviceMoveSinRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n amplitude: amplitude,\n amplitudeUnits: amplitudeUnits,\n period: period,\n periodUnits: periodUnits,\n count: count,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceMoveSinRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/move_sin', request);\n }\n\n /**\n * Stops the axis at the end of the sinusoidal trajectory.\n * If the sinusoidal motion was started with an integer-plus-half cycle count,\n * the motion ends at the half-way point of the sinusoidal trajectory.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.\n */\n public async moveSinStop(\n options: Axis.MoveSinStopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.DeviceStopRequest & gateway.Message = {\n ...requests.DeviceStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceStopRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/move_sin_stop', request);\n }\n}\n\nnamespace Axis {\n export interface HomeOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface WaitUntilIdleOptions {\n /**\n * Determines whether to throw error when fault is observed.\n */\n throwErrorOnFault?: boolean;\n }\n export interface MoveAbsoluteOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMaxOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMinOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveRelativeOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveVelocityOptions {\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveIndexOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface CanSetStateOptions {\n /**\n * The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n */\n firmwareVersion?: FirmwareVersion;\n }\n export interface DriverEnableOptions {\n /**\n * Timeout in seconds. Specify 0 to attempt to enable the driver once.\n */\n timeout?: number;\n }\n export interface MoveSinOptions {\n /**\n * Number of sinusoidal cycles to complete.\n * Must be a multiple of 0.5\n * If count is not specified or set to 0, the axis will move indefinitely.\n */\n count?: number;\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveSinStopOptions {\n /**\n * Determines whether function should return after the movement is finished.\n */\n waitUntilIdle?: boolean;\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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,MAAM,OAAO,GAAiD;YAC5D,GAAG,QAAQ,CAAC,iBAAiB,CAAC,OAAO;YACrC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,IAAI,EAAE,IAAI,CAAC,UAAU;YACrB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnD,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF;AA7jCD,oBA6jCC","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, Time } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { AxisStorage } from './storage';\nimport { SetStateAxisResponse } from './set_state_axis_response';\nimport { FirmwareVersion } from '../firmware_version';\nimport { UnitConversionDescriptor } from '../unit_conversion_descriptor';\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 * The number of microsteps per full step for motion axes. Always equal to 0 for non-motion axes.\n */\n public get resolution(): number {\n return this.identity.resolution;\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: requests.DeviceHomeRequest & gateway.Message = {\n ...requests.DeviceHomeRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceHomeRequest.toBinary(this);\n },\n };\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: requests.DeviceStopRequest & gateway.Message = {\n ...requests.DeviceStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceStopRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_parked',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.DeviceWaitUntilIdleRequest & gateway.Message = {\n ...requests.DeviceWaitUntilIdleRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n throwErrorOnFault: throwErrorOnFault,\n toBinary() {\n return requests.DeviceWaitUntilIdleRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_busy',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/is_homed',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.ABS,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.MAX,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.MIN,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.REL,\n arg: position,\n unit: unit,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.VEL,\n arg: velocity,\n unit: unit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n setting: 'pos',\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets number of index positions of the axis.\n * @returns Number of index positions.\n */\n public async getNumberOfIndexPositions(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'device/get_index_count',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'device/get_index_position',\n request,\n requests.IntResponse.fromBinary);\n return response.value;\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: requests.DeviceMoveRequest & gateway.Message = {\n ...requests.DeviceMoveRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n type: requests.AxisMoveType.INDEX,\n argInt: index,\n waitUntilIdle: waitUntilIdle,\n velocity: velocity,\n velocityUnit: velocityUnit,\n acceleration: acceleration,\n accelerationUnit: accelerationUnit,\n toBinary() {\n return requests.DeviceMoveRequest.toBinary(this);\n },\n };\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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this 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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this 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: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * 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: requests.PrepareCommandRequest & gateway.Message = {\n ...requests.PrepareCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n commandTemplate: commandTemplate,\n parameters: parameters,\n toBinary() {\n return requests.PrepareCommandRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/prepare_command',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Retrieves unit conversion descriptors for a command, allowing unit conversion without a device.\n * The descriptors can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.\n * Parameters in the command template are denoted by a question mark.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of the command. Parameters are denoted by question marks.\n * @returns Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.\n */\n public getCommandUnitConversionDescriptors(\n commandTemplate: string\n ): (UnitConversionDescriptor | null)[] {\n const request: requests.PrepareCommandRequest & gateway.Message = {\n ...requests.PrepareCommandRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n commandTemplate: commandTemplate,\n toBinary() {\n return requests.PrepareCommandRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.GetCommandUnitConversionResponse>(\n 'device/get_command_unit_conversion',\n request,\n requests.GetCommandUnitConversionResponse.fromBinary);\n return response.value;\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: requests.DeviceSetStorageRequest & gateway.Message = {\n ...requests.DeviceSetStorageRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n value: label,\n toBinary() {\n return requests.DeviceSetStorageRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the peripheral name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_label',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns a string that represents the axis.\n * @returns A string that represents the axis.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this axis.\n * @param state The state object to apply to this axis.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this 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 * @param options.firmwareVersion The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n * @returns An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string,\n options: Axis.CanSetStateOptions = {}\n ): Promise<string | null> {\n const {\n firmwareVersion,\n } = options;\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n state: state,\n firmwareVersion: firmwareVersion,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns identity.\n * @returns Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<AxisIdentity>(\n 'device/get_axis_identity',\n request,\n AxisIdentity.fromBinary);\n return response;\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/driver_disable', request);\n }\n\n /**\n * Attempts to enable the driver repeatedly for the specified timeout.\n * If the driver is already enabled, the driver remains enabled.\n * @param [options.timeout=10] Timeout in seconds. Specify 0 to attempt to enable the driver once.\n */\n public async driverEnable(\n options: Axis.DriverEnableOptions = {}\n ): Promise<void> {\n const {\n timeout = 10,\n } = options;\n const request: requests.DriverEnableRequest & gateway.Message = {\n ...requests.DriverEnableRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n timeout: timeout,\n toBinary() {\n return requests.DriverEnableRequest.toBinary(this);\n },\n };\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: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/activate', request);\n }\n\n /**\n * Restores all axis settings to their default values.\n * Deletes all zaber axis storage keys.\n * Disables lockstep if the axis is part of one. Unparks the axis.\n * Preserves storage.\n * The device needs to be identified again after the restore.\n */\n public async restore(): Promise<void> {\n const request: requests.DeviceRestoreRequest & gateway.Message = {\n ...requests.DeviceRestoreRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n toBinary() {\n return requests.DeviceRestoreRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/restore', request);\n }\n\n /**\n * Moves the axis in a sinusoidal trajectory.\n * @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).\n * @param amplitudeUnits Units of position.\n * @param period Period of the sinusoidal motion in milliseconds.\n * @param periodUnits Units of time.\n * @param [options.count=0] Number of sinusoidal cycles to complete.\n * Must be a multiple of 0.5\n * If count is not specified or set to 0, the axis will move indefinitely.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async moveSin(\n amplitude: number,\n amplitudeUnits: Length | Angle | Native,\n period: number,\n periodUnits: Time | Native,\n options: Axis.MoveSinOptions = {}\n ): Promise<void> {\n const {\n count = 0,\n waitUntilIdle = true,\n } = options;\n const request: requests.DeviceMoveSinRequest & gateway.Message = {\n ...requests.DeviceMoveSinRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n amplitude: amplitude,\n amplitudeUnits: amplitudeUnits,\n period: period,\n periodUnits: periodUnits,\n count: count,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceMoveSinRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/move_sin', request);\n }\n\n /**\n * Stops the axis at the end of the sinusoidal trajectory.\n * If the sinusoidal motion was started with an integer-plus-half cycle count,\n * the motion ends at the half-way point of the sinusoidal trajectory.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.\n */\n public async moveSinStop(\n options: Axis.MoveSinStopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request: requests.DeviceStopRequest & gateway.Message = {\n ...requests.DeviceStopRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n axis: this.axisNumber,\n waitUntilIdle: waitUntilIdle,\n toBinary() {\n return requests.DeviceStopRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/move_sin_stop', request);\n }\n}\n\nnamespace Axis {\n export interface HomeOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface WaitUntilIdleOptions {\n /**\n * Determines whether to throw error when fault is observed.\n */\n throwErrorOnFault?: boolean;\n }\n export interface MoveAbsoluteOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMaxOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMinOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveRelativeOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveVelocityOptions {\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveIndexOptions {\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n /**\n * Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n */\n velocity?: number;\n /**\n * Units of velocity.\n */\n velocityUnit?: Velocity | AngularVelocity | Native;\n /**\n * Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n */\n acceleration?: number;\n /**\n * Units of acceleration.\n */\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface CanSetStateOptions {\n /**\n * The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n */\n firmwareVersion?: FirmwareVersion;\n }\n export interface DriverEnableOptions {\n /**\n * Timeout in seconds. Specify 0 to attempt to enable the driver once.\n */\n timeout?: number;\n }\n export interface MoveSinOptions {\n /**\n * Number of sinusoidal cycles to complete.\n * Must be a multiple of 0.5\n * If count is not specified or set to 0, the axis will move indefinitely.\n */\n count?: number;\n /**\n * Determines whether function should return after the movement is finished or just started.\n */\n waitUntilIdle?: boolean;\n }\n export interface MoveSinStopOptions {\n /**\n * Determines whether function should return after the movement is finished.\n */\n waitUntilIdle?: boolean;\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import { Axis } from './axis';
|
|
|
2
2
|
import { GetAxisSetting } from './get_axis_setting';
|
|
3
3
|
import { GetAxisSettingResult } from './get_axis_setting_result';
|
|
4
4
|
import { ConversionFactor } from './conversion_factor';
|
|
5
|
+
import { UnitConversionDescriptor } from '../unit_conversion_descriptor';
|
|
5
6
|
import { Units } from '../units';
|
|
6
7
|
/**
|
|
7
8
|
* Class providing access to various axis settings and properties.
|
|
@@ -114,6 +115,13 @@ export declare class AxisSettings {
|
|
|
114
115
|
* @returns True if unit conversion can be performed.
|
|
115
116
|
*/
|
|
116
117
|
canConvertNativeUnits(setting: string): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device.
|
|
120
|
+
* The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
121
|
+
* @param setting Name of the setting.
|
|
122
|
+
* @returns The unit conversion descriptor for the setting.
|
|
123
|
+
*/
|
|
124
|
+
getUnitConversionDescriptor(setting: string): UnitConversionDescriptor;
|
|
117
125
|
/**
|
|
118
126
|
* Overrides default unit conversions.
|
|
119
127
|
* Conversion factors are specified by setting names representing underlying dimensions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis_settings.d.ts","sourceRoot":"","sources":["../../../src/ascii/axis_settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAA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,OAAO,EAAE,MAAM,GACd,OAAO;IAmBV;;;;;OAKG;IACI,2BAA2B,CAChC,OAAO,EAAE,MAAM,GACd,wBAAwB;IAmB3B;;;;;OAKG;IACU,wBAAwB,CACnC,WAAW,EAAE,gBAAgB,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC;IAehB;;;;OAIG;IACU,OAAO,CAClB,GAAG,YAAY,EAAE,cAAc,EAAE,GAChC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAmBlC;;;;;OAKG;IACU,eAAe,CAC1B,GAAG,YAAY,EAAE,cAAc,EAAE,GAChC,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAkBnC"}
|
|
@@ -26,6 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.AxisSettings = void 0;
|
|
29
|
+
const unit_conversion_descriptor_1 = require("../unit_conversion_descriptor");
|
|
29
30
|
const units_1 = require("../units");
|
|
30
31
|
const gateway = __importStar(require("../gateway"));
|
|
31
32
|
const requests = __importStar(require("../requests"));
|
|
@@ -344,6 +345,26 @@ class AxisSettings {
|
|
|
344
345
|
const response = gateway.callSync('device/can_convert_setting', request, requests.BoolResponse.fromBinary);
|
|
345
346
|
return response.value;
|
|
346
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device.
|
|
350
|
+
* The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
351
|
+
* @param setting Name of the setting.
|
|
352
|
+
* @returns The unit conversion descriptor for the setting.
|
|
353
|
+
*/
|
|
354
|
+
getUnitConversionDescriptor(setting) {
|
|
355
|
+
const request = {
|
|
356
|
+
...requests.DeviceGetSettingRequest.DEFAULT,
|
|
357
|
+
interfaceId: this._axis.device.connection.interfaceId,
|
|
358
|
+
device: this._axis.device.deviceAddress,
|
|
359
|
+
axis: this._axis.axisNumber,
|
|
360
|
+
setting: setting,
|
|
361
|
+
toBinary() {
|
|
362
|
+
return requests.DeviceGetSettingRequest.toBinary(this);
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
const response = gateway.callSync('device/get_setting_unit_conversion', request, unit_conversion_descriptor_1.UnitConversionDescriptor.fromBinary);
|
|
366
|
+
return response;
|
|
367
|
+
}
|
|
347
368
|
/**
|
|
348
369
|
* Overrides default unit conversions.
|
|
349
370
|
* Conversion factors are specified by setting names representing underlying dimensions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis_settings.js","sourceRoot":"","sources":["../../../src/ascii/axis_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAMtD,oCAAiC;AACjC,oDAAsC;AACtC,sDAAwC;AAExC;;GAEG;AACH,MAAa,YAAY;IAGvB,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,OAAe,EACf,OAAc,aAAK,CAAC,MAAM;QAE1B,MAAM,OAAO,GAAuD;YAClE,GAAG,QAAQ,CAAC,uBAAuB,CAAC,OAAO;YAC3C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YACrD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa;YACvC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;YAC3B,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI;YACV,QAAQ;gBACN,OAAO,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACzD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,oBAAoB,EACpB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,C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AU,CAAC,WAAW;YACrD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa;YACvC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;YAC3B,YAAY,EAAE,YAAY;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,4BAA4B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9D,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,+BAA+B,EAC/B,OAAO,EACP,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B,CAAC;CACF;AA9eD,oCA8eC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport { GetAxisSetting } from './get_axis_setting';\nimport { GetAxisSettingResult } from './get_axis_setting_result';\nimport { ConversionFactor } from './conversion_factor';\nimport { Units } from '../units';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\n\n/**\n * Class providing access to various axis settings and properties.\n */\nexport class AxisSettings {\n private _axis: Axis;\n\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Returns any axis setting or property.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n * @returns Setting value.\n */\n public async get(\n setting: string,\n unit: Units = Units.NATIVE\n ): Promise<number> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n */\n public async set(\n setting: string,\n value: number,\n unit: Units = Units.NATIVE\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Returns any axis setting or property as a string.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getString(\n setting: string\n ): Promise<string> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_setting_str',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting as a string.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setString(\n setting: string,\n value: string\n ): Promise<void> {\n const request: requests.DeviceSetSettingStrRequest & gateway.Message = {\n ...requests.DeviceSetSettingStrRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingStrRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_str', request);\n }\n\n /**\n * Returns any axis setting or property as an integer.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getInt(\n setting: string\n ): Promise<bigint> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Int64Response>(\n 'device/get_setting_int',\n request,\n requests.Int64Response.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting or property as an integer.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setInt(\n setting: string,\n value: bigint\n ): Promise<void> {\n const request: requests.DeviceSetSettingIntRequest & gateway.Message = {\n ...requests.DeviceSetSettingIntRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingIntRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_int', request);\n }\n\n /**\n * Returns any axis setting or property as a boolean.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getBool(\n setting: string\n ): Promise<boolean> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/get_setting_bool',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting as a boolean.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setBool(\n setting: string,\n value: boolean\n ): Promise<void> {\n const request: requests.DeviceSetSettingBoolRequest & gateway.Message = {\n ...requests.DeviceSetSettingBoolRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingBoolRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_bool', request);\n }\n\n /**\n * Convert arbitrary setting value to Zaber native units.\n * @param setting Name of the setting.\n * @param value Value of the setting in units specified by following argument.\n * @param unit Units of the value.\n * @returns Setting value.\n */\n public convertToNativeUnits(\n setting: string,\n value: number,\n unit: Units\n ): number {\n const request: requests.DeviceConvertSettingRequest & gateway.Message = {\n ...requests.DeviceConvertSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceConvertSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/convert_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Convert arbitrary setting value from Zaber native units.\n * @param setting Name of the setting.\n * @param value Value of the setting in Zaber native units.\n * @param unit Units to convert value to.\n * @returns Setting value.\n */\n public convertFromNativeUnits(\n setting: string,\n value: number,\n unit: Units\n ): number {\n const request: requests.DeviceConvertSettingRequest & gateway.Message = {\n ...requests.DeviceConvertSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n fromNative: true,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceConvertSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/convert_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting.\n * @param setting Name of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n * @returns Default setting value.\n */\n public getDefault(\n setting: string,\n unit: Units = Units.NATIVE\n ): number {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/get_setting_default',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as a string.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultString(\n setting: string\n ): string {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_setting_default_str',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as an integer.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultInt(\n setting: string\n ): bigint {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.Int64Response>(\n 'device/get_setting_default_int',\n request,\n requests.Int64Response.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as a boolean.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultBool(\n setting: string\n ): boolean {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/get_setting_default_bool',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Indicates if given setting can be converted from and to native units.\n * @param setting Name of the setting.\n * @returns True if unit conversion can be performed.\n */\n public canConvertNativeUnits(\n setting: string\n ): boolean {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/can_convert_setting',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Overrides default unit conversions.\n * Conversion factors are specified by setting names representing underlying dimensions.\n * Requires at least Firmware 7.30.\n * @param conversions Factors of all conversions to override.\n */\n public async setCustomUnitConversions(\n conversions: ConversionFactor[]\n ): Promise<void> {\n const request: requests.DeviceSetUnitConversionsRequest & gateway.Message = {\n ...requests.DeviceSetUnitConversionsRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n conversions: conversions,\n toBinary() {\n return requests.DeviceSetUnitConversionsRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_unit_conversions', request);\n }\n\n /**\n * Gets many setting values in as few requests as possible.\n * @param axisSettings The settings to read.\n * @returns The setting values read.\n */\n public async getMany(\n ...axisSettings: GetAxisSetting[]\n ): Promise<GetAxisSettingResult[]> {\n const request: requests.DeviceMultiGetSettingRequest & gateway.Message = {\n ...requests.DeviceMultiGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n axisSettings: axisSettings,\n toBinary() {\n return requests.DeviceMultiGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetAxisSettingResults>(\n 'device/get_many_axis_settings',\n request,\n requests.GetAxisSettingResults.fromBinary);\n return response.results;\n }\n\n /**\n * Gets many setting values in the same tick, ensuring their values are synchronized.\n * Requires at least Firmware 7.35.\n * @param axisSettings The settings to read.\n * @returns The setting values read.\n */\n public async getSynchronized(\n ...axisSettings: GetAxisSetting[]\n ): Promise<GetAxisSettingResult[]> {\n const request: requests.DeviceMultiGetSettingRequest & gateway.Message = {\n ...requests.DeviceMultiGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n axisSettings: axisSettings,\n toBinary() {\n return requests.DeviceMultiGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetAxisSettingResults>(\n 'device/get_sync_axis_settings',\n request,\n requests.GetAxisSettingResults.fromBinary);\n return response.results;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"axis_settings.js","sourceRoot":"","sources":["../../../src/ascii/axis_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAMtD,8EAAyE;AACzE,oCAAiC;AACjC,oDAAsC;AACtC,sDAAwC;AAExC;;GAEG;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IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YACrD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa;YACvC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;YAC3B,YAAY,EAAE,YAAY;YAC1B,QAAQ;gBACN,OAAO,QAAQ,CAAC,4BAA4B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9D,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,+BAA+B,EAC/B,OAAO,EACP,QAAQ,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC1B,CAAC;CACF;AAzgBD,oCAygBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport { GetAxisSetting } from './get_axis_setting';\nimport { GetAxisSettingResult } from './get_axis_setting_result';\nimport { ConversionFactor } from './conversion_factor';\nimport { UnitConversionDescriptor } from '../unit_conversion_descriptor';\nimport { Units } from '../units';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\n\n/**\n * Class providing access to various axis settings and properties.\n */\nexport class AxisSettings {\n private _axis: Axis;\n\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Returns any axis setting or property.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n * @returns Setting value.\n */\n public async get(\n setting: string,\n unit: Units = Units.NATIVE\n ): Promise<number> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n */\n public async set(\n setting: string,\n value: number,\n unit: Units = Units.NATIVE\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Returns any axis setting or property as a string.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getString(\n setting: string\n ): Promise<string> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_setting_str',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting as a string.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setString(\n setting: string,\n value: string\n ): Promise<void> {\n const request: requests.DeviceSetSettingStrRequest & gateway.Message = {\n ...requests.DeviceSetSettingStrRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingStrRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_str', request);\n }\n\n /**\n * Returns any axis setting or property as an integer.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getInt(\n setting: string\n ): Promise<bigint> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.Int64Response>(\n 'device/get_setting_int',\n request,\n requests.Int64Response.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting or property as an integer.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setInt(\n setting: string,\n value: bigint\n ): Promise<void> {\n const request: requests.DeviceSetSettingIntRequest & gateway.Message = {\n ...requests.DeviceSetSettingIntRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingIntRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_int', request);\n }\n\n /**\n * Returns any axis setting or property as a boolean.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @returns Setting value.\n */\n public async getBool(\n setting: string\n ): Promise<boolean> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'device/get_setting_bool',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets any axis setting as a boolean.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_settings).\n * @param setting Name of the setting.\n * @param value Value of the setting.\n */\n public async setBool(\n setting: string,\n value: boolean\n ): Promise<void> {\n const request: requests.DeviceSetSettingBoolRequest & gateway.Message = {\n ...requests.DeviceSetSettingBoolRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n toBinary() {\n return requests.DeviceSetSettingBoolRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting_bool', request);\n }\n\n /**\n * Convert arbitrary setting value to Zaber native units.\n * @param setting Name of the setting.\n * @param value Value of the setting in units specified by following argument.\n * @param unit Units of the value.\n * @returns Setting value.\n */\n public convertToNativeUnits(\n setting: string,\n value: number,\n unit: Units\n ): number {\n const request: requests.DeviceConvertSettingRequest & gateway.Message = {\n ...requests.DeviceConvertSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceConvertSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/convert_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Convert arbitrary setting value from Zaber native units.\n * @param setting Name of the setting.\n * @param value Value of the setting in Zaber native units.\n * @param unit Units to convert value to.\n * @returns Setting value.\n */\n public convertFromNativeUnits(\n setting: string,\n value: number,\n unit: Units\n ): number {\n const request: requests.DeviceConvertSettingRequest & gateway.Message = {\n ...requests.DeviceConvertSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n fromNative: true,\n setting: setting,\n value: value,\n unit: unit,\n toBinary() {\n return requests.DeviceConvertSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/convert_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting.\n * @param setting Name of the setting.\n * @param [unit=Units.NATIVE] Units of setting.\n * @returns Default setting value.\n */\n public getDefault(\n setting: string,\n unit: Units = Units.NATIVE\n ): number {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n unit: unit,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.DoubleResponse>(\n 'device/get_setting_default',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as a string.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultString(\n setting: string\n ): string {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/get_setting_default_str',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as an integer.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultInt(\n setting: string\n ): bigint {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.Int64Response>(\n 'device/get_setting_default_int',\n request,\n requests.Int64Response.fromBinary);\n return response.value;\n }\n\n /**\n * Returns the default value of a setting as a boolean.\n * @param setting Name of the setting.\n * @returns Default setting value.\n */\n public getDefaultBool(\n setting: string\n ): boolean {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/get_setting_default_bool',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Indicates if given setting can be converted from and to native units.\n * @param setting Name of the setting.\n * @returns True if unit conversion can be performed.\n */\n public canConvertNativeUnits(\n setting: string\n ): boolean {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device/can_convert_setting',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Retrieves unit conversion descriptor for a setting, allowing unit conversion without a device.\n * The descriptor can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.\n * @param setting Name of the setting.\n * @returns The unit conversion descriptor for the setting.\n */\n public getUnitConversionDescriptor(\n setting: string\n ): UnitConversionDescriptor {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n setting: setting,\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<UnitConversionDescriptor>(\n 'device/get_setting_unit_conversion',\n request,\n UnitConversionDescriptor.fromBinary);\n return response;\n }\n\n /**\n * Overrides default unit conversions.\n * Conversion factors are specified by setting names representing underlying dimensions.\n * Requires at least Firmware 7.30.\n * @param conversions Factors of all conversions to override.\n */\n public async setCustomUnitConversions(\n conversions: ConversionFactor[]\n ): Promise<void> {\n const request: requests.DeviceSetUnitConversionsRequest & gateway.Message = {\n ...requests.DeviceSetUnitConversionsRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n conversions: conversions,\n toBinary() {\n return requests.DeviceSetUnitConversionsRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_unit_conversions', request);\n }\n\n /**\n * Gets many setting values in as few requests as possible.\n * @param axisSettings The settings to read.\n * @returns The setting values read.\n */\n public async getMany(\n ...axisSettings: GetAxisSetting[]\n ): Promise<GetAxisSettingResult[]> {\n const request: requests.DeviceMultiGetSettingRequest & gateway.Message = {\n ...requests.DeviceMultiGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n axisSettings: axisSettings,\n toBinary() {\n return requests.DeviceMultiGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetAxisSettingResults>(\n 'device/get_many_axis_settings',\n request,\n requests.GetAxisSettingResults.fromBinary);\n return response.results;\n }\n\n /**\n * Gets many setting values in the same tick, ensuring their values are synchronized.\n * Requires at least Firmware 7.35.\n * @param axisSettings The settings to read.\n * @returns The setting values read.\n */\n public async getSynchronized(\n ...axisSettings: GetAxisSetting[]\n ): Promise<GetAxisSettingResult[]> {\n const request: requests.DeviceMultiGetSettingRequest & gateway.Message = {\n ...requests.DeviceMultiGetSettingRequest.DEFAULT,\n interfaceId: this._axis.device.connection.interfaceId,\n device: this._axis.device.deviceAddress,\n axis: this._axis.axisNumber,\n axisSettings: axisSettings,\n toBinary() {\n return requests.DeviceMultiGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GetAxisSettingResults>(\n 'device/get_sync_axis_settings',\n request,\n requests.GetAxisSettingResults.fromBinary);\n return response.results;\n }\n}\n"]}
|
|
@@ -12,6 +12,7 @@ import { CanSetStateDeviceResponse } from './can_set_state_device_response';
|
|
|
12
12
|
import { Pvt } from './pvt';
|
|
13
13
|
import { Measurement } from '../measurement';
|
|
14
14
|
import { FirmwareVersion } from '../firmware_version';
|
|
15
|
+
import { UnitConversionDescriptor } from '../unit_conversion_descriptor';
|
|
15
16
|
import { DeviceStorage } from './storage';
|
|
16
17
|
import { Triggers } from './triggers';
|
|
17
18
|
import { Streams } from './streams';
|
|
@@ -185,6 +186,15 @@ export declare class Device {
|
|
|
185
186
|
* @returns Command with converted parameters.
|
|
186
187
|
*/
|
|
187
188
|
prepareCommand(commandTemplate: string, ...parameters: Measurement[]): string;
|
|
189
|
+
/**
|
|
190
|
+
* Retrieves unit conversion descriptors for a command, allowing unit conversion without a device.
|
|
191
|
+
* The descriptors can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
192
|
+
* Parameters in the command template are denoted by a question mark.
|
|
193
|
+
* For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
194
|
+
* @param commandTemplate Template of the command. Parameters are denoted by question marks.
|
|
195
|
+
* @returns Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.
|
|
196
|
+
*/
|
|
197
|
+
getCommandUnitConversionDescriptors(commandTemplate: string): (UnitConversionDescriptor | null)[];
|
|
188
198
|
/**
|
|
189
199
|
* Sets the user-assigned device label.
|
|
190
200
|
* The label is stored on the controller and recognized by other software.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,qBAAa,MAAM;IACjB;;OAEG;IACH,IAAW,UAAU,IAAI,UAAU,CAElC;IACD,OAAO,CAAC,WAAW,CAAa;IAEhC;;;OAGG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,OAAO,CAAC,cAAc,CAAS;IAE/B;;OAEG;IACH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AAC,IAAI,CAAC;IAchB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAgB9B;AAED,kBAAU,MAAM,CAAC;IACf,UAAiB,eAAe;QAC5B;;;;WAIG;QACH,aAAa,CAAC,EAAE,eAAe,CAAC;KACnC;IACD,UAAiB,qBAAqB;QAClC;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,+BAA+B;QAC5C;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB;IACD,UAAiB,eAAe;QAC5B;;WAEG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACxB;IACD,UAAiB,kBAAkB;QAC/B;;;WAGG;QACH,eAAe,CAAC,EAAE,eAAe,CAAC;KACrC;CACF"}
|
package/dist/lib/ascii/device.js
CHANGED
|
@@ -334,6 +334,27 @@ class Device {
|
|
|
334
334
|
const response = gateway.callSync('device/prepare_command', request, requests.StringResponse.fromBinary);
|
|
335
335
|
return response.value;
|
|
336
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* Retrieves unit conversion descriptors for a command, allowing unit conversion without a device.
|
|
339
|
+
* The descriptors can be used with the ConvertTo/FromNativeUnits methods of the UnitTable class.
|
|
340
|
+
* Parameters in the command template are denoted by a question mark.
|
|
341
|
+
* For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
|
|
342
|
+
* @param commandTemplate Template of the command. Parameters are denoted by question marks.
|
|
343
|
+
* @returns Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.
|
|
344
|
+
*/
|
|
345
|
+
getCommandUnitConversionDescriptors(commandTemplate) {
|
|
346
|
+
const request = {
|
|
347
|
+
...requests.PrepareCommandRequest.DEFAULT,
|
|
348
|
+
interfaceId: this.connection.interfaceId,
|
|
349
|
+
device: this.deviceAddress,
|
|
350
|
+
commandTemplate: commandTemplate,
|
|
351
|
+
toBinary() {
|
|
352
|
+
return requests.PrepareCommandRequest.toBinary(this);
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
const response = gateway.callSync('device/get_command_unit_conversion', request, requests.GetCommandUnitConversionResponse.fromBinary);
|
|
356
|
+
return response.value;
|
|
357
|
+
}
|
|
337
358
|
/**
|
|
338
359
|
* Sets the user-assigned device label.
|
|
339
360
|
* The label is stored on the controller and recognized by other software.
|