@zaber/motion 4.5.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/axis.js +1 -1
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_group.d.ts +62 -0
- package/dist/lib/ascii/axis_group.js +154 -0
- package/dist/lib/ascii/axis_group.js.map +1 -0
- package/dist/lib/ascii/axis_settings.d.ts +15 -0
- package/dist/lib/ascii/axis_settings.js +31 -0
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/device.js +1 -1
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +15 -0
- package/dist/lib/ascii/device_settings.js +29 -0
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/get_axis_setting.d.ts +17 -0
- package/dist/lib/ascii/get_axis_setting.js +45 -0
- package/dist/lib/ascii/get_axis_setting.js.map +1 -0
- package/dist/lib/ascii/get_axis_setting_result.d.ts +21 -0
- package/dist/lib/ascii/get_axis_setting_result.js +19 -0
- package/dist/lib/ascii/get_axis_setting_result.js.map +1 -0
- package/dist/lib/ascii/get_setting.d.ts +21 -0
- package/dist/lib/ascii/get_setting.js +47 -0
- package/dist/lib/ascii/get_setting.js.map +1 -0
- package/dist/lib/ascii/get_setting_result.d.ts +21 -0
- package/dist/lib/ascii/get_setting_result.js +19 -0
- package/dist/lib/ascii/get_setting_result.js.map +1 -0
- package/dist/lib/ascii/index.d.ts +5 -0
- package/dist/lib/ascii/index.js +12 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/setting_constants.d.ts +116 -0
- package/dist/lib/ascii/setting_constants.js +116 -0
- package/dist/lib/ascii/setting_constants.js.map +1 -1
- package/dist/lib/ascii_ns.d.ts +10 -0
- package/dist/lib/ascii_ns.js +5 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/axis_address.d.ts +16 -0
- package/dist/lib/axis_address.js +53 -0
- package/dist/lib/axis_address.js.map +1 -0
- package/dist/lib/exceptions/index.d.ts +2 -0
- package/dist/lib/exceptions/index.js +6 -2
- package/dist/lib/exceptions/index.js.map +1 -1
- package/dist/lib/exceptions/operation_failed_exception.d.ts +14 -0
- package/dist/lib/exceptions/operation_failed_exception.js +32 -0
- package/dist/lib/exceptions/operation_failed_exception.js.map +1 -0
- package/dist/lib/exceptions/operation_failed_exception_data.d.ts +24 -0
- package/dist/lib/exceptions/operation_failed_exception_data.js +20 -0
- package/dist/lib/exceptions/operation_failed_exception_data.js.map +1 -0
- package/dist/lib/gateway/convert_exceptions.js +1 -0
- package/dist/lib/gateway/convert_exceptions.js.map +1 -1
- package/dist/lib/gcode/axis_transformation.js +1 -0
- package/dist/lib/gcode/axis_transformation.js.map +1 -1
- package/dist/lib/gcode/device_definition.js +1 -0
- package/dist/lib/gcode/device_definition.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +3 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/microscopy/filter_changer.d.ts +36 -0
- package/dist/lib/microscopy/filter_changer.js +98 -0
- package/dist/lib/microscopy/filter_changer.js.map +1 -0
- package/dist/lib/microscopy/illuminator.d.ts +56 -0
- package/dist/lib/microscopy/illuminator.js +109 -0
- package/dist/lib/microscopy/illuminator.js.map +1 -0
- package/dist/lib/microscopy/illuminator_channel.d.ts +128 -0
- package/dist/lib/microscopy/illuminator_channel.js +260 -0
- package/dist/lib/microscopy/illuminator_channel.js.map +1 -0
- package/dist/lib/microscopy/index.d.ts +5 -0
- package/dist/lib/microscopy/index.js +11 -1
- package/dist/lib/microscopy/index.js.map +1 -1
- package/dist/lib/microscopy/microscope.d.ts +82 -0
- package/dist/lib/microscopy/microscope.js +153 -0
- package/dist/lib/microscopy/microscope.js.map +1 -0
- package/dist/lib/microscopy/microscope_config.d.ts +34 -0
- package/dist/lib/microscopy/microscope_config.js +65 -0
- package/dist/lib/microscopy/microscope_config.js.map +1 -0
- package/dist/lib/microscopy/objective_changer.d.ts +42 -16
- package/dist/lib/microscopy/objective_changer.js +95 -33
- package/dist/lib/microscopy/objective_changer.js.map +1 -1
- package/dist/lib/microscopy_ns.d.ts +8 -0
- package/dist/lib/microscopy_ns.js +4 -0
- package/dist/lib/microscopy_ns.js.map +1 -1
- package/dist/lib/product/process.d.ts +5 -0
- package/dist/lib/product/process.js +13 -0
- package/dist/lib/product/process.js.map +1 -1
- package/dist/lib/product/process_controller.d.ts +6 -1
- package/dist/lib/product/process_controller.js +12 -1
- package/dist/lib/product/process_controller.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +560 -3
- package/dist/lib/protobufs/main_pb.js +10544 -6161
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/ascii/device.js
CHANGED
|
@@ -311,7 +311,7 @@ class Device {
|
|
|
311
311
|
* @returns A string that represents the device.
|
|
312
312
|
*/
|
|
313
313
|
toString() {
|
|
314
|
-
const request = new gateway.
|
|
314
|
+
const request = new gateway.AxisToStringRequest();
|
|
315
315
|
request.setInterfaceId(this.connection.interfaceId);
|
|
316
316
|
request.setDevice(this.deviceAddress);
|
|
317
317
|
const response = gateway.callSync('device/device_to_string', request, gateway.StringResponse);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,uDAAmD;AACnD,iCAA8B;AAC9B,yCAAqC;AACrC,yCAAsC;AACtC,uDAAmD;AACnD,2CAAuC;AACvC,yCAAsC;AACtC,yCAAsC;AACtC,iDAA8C;AAC9C,qCAAkC;AAClC,mDAA+C;AAC/C,mFAA4E;AAC5E,iDAA6C;AAC7C,6CAAyC;AACzC,gDAA6C;AAC7C,0D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AAc,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA/gBD,wBA+gBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Connection } from './connection';\nimport { DeviceSettings } from './device_settings';\nimport { Axis } from './axis';\nimport { AllAxes } from './all_axes';\nimport { Warnings } from './warnings';\nimport { DeviceIdentity } from './device_identity';\nimport { DeviceIO } from './device_io';\nimport { Response } from './response';\nimport { Lockstep } from './lockstep';\nimport { Oscilloscope } from './oscilloscope';\nimport { Stream } from './stream';\nimport { StreamBuffer } from './stream_buffer';\nimport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nimport { PvtSequence } from './pvt_sequence';\nimport { PvtBuffer } from './pvt_buffer';\nimport { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport * as gateway from '../gateway';\nimport { DeviceStorage } from './storage';\n\n/**\n * Represents the controller part of one device - may be either a standalone controller or an integrated controller.\n */\nexport class Device {\n /**\n * Connection of this device.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n /**\n * The device address uniquely identifies the device on the connection.\n * It can be configured or automatically assigned by the renumber command.\n */\n public get deviceAddress(): number {\n return this._deviceAddress;\n }\n private _deviceAddress: number;\n\n /**\n * Settings and properties of this device.\n */\n public get settings(): DeviceSettings {\n return this._settings;\n }\n private _settings: DeviceSettings;\n\n /**\n * Key-value storage of this device.\n */\n public get storage(): DeviceStorage {\n return this._storage;\n }\n private _storage: DeviceStorage;\n\n /**\n * I/O channels of this device.\n */\n public get io(): DeviceIO {\n return this._io;\n }\n private _io: DeviceIO;\n\n /**\n * Virtual axis which allows you to target all axes of this device.\n */\n public get allAxes(): AllAxes {\n return this._allAxes;\n }\n private _allAxes: AllAxes;\n\n /**\n * Warnings and faults of this device and all its axes.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the device.\n */\n public get identity(): DeviceIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Indicates whether or not the device has been identified.\n */\n public get isIdentified(): boolean {\n return this._retrieveIsIdentified();\n }\n\n /**\n * Oscilloscope recording helper for this device.\n * Requires at least Firmware 7.00.\n */\n public get oscilloscope(): Oscilloscope {\n return this._oscilloscope;\n }\n private _oscilloscope: Oscilloscope;\n\n /**\n * Unique ID of the device hardware.\n */\n public get deviceId(): number {\n return this.identity.deviceId;\n }\n\n /**\n * Serial number of the device.\n */\n public get serialNumber(): number {\n return this.identity.serialNumber;\n }\n\n /**\n * Name of the product.\n */\n public get name(): string {\n return this.identity.name;\n }\n\n /**\n * Number of axes this device has.\n */\n public get axisCount(): number {\n return this.identity.axisCount;\n }\n\n /**\n * Version of the firmware.\n */\n public get firmwareVersion(): FirmwareVersion {\n return this.identity.firmwareVersion;\n }\n\n /**\n * The device is an integrated product.\n */\n public get isIntegrated(): boolean {\n return this.identity.isIntegrated;\n }\n\n /**\n * User-assigned label of the device.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n constructor(connection: Connection, deviceAddress: number) {\n this._connection = connection;\n this._deviceAddress = deviceAddress;\n this._settings = new DeviceSettings(this);\n this._storage = new DeviceStorage(this);\n this._io = new DeviceIO(this);\n this._allAxes = new AllAxes(this);\n this._warnings = new Warnings(this, 0);\n this._oscilloscope = new Oscilloscope(this);\n }\n\n /**\n * Queries the device and the database, gathering information about the product.\n * Without this information features such as unit conversions will not work.\n * Usually, called automatically by detect devices method.\n * @param options.assumeVersion The identification assumes the specified firmware version\n * instead of the version queried from the device.\n * Providing this argument can lead to unexpected compatibility issues.\n * @returns Device identification data.\n */\n public async identify(\n options: Device.IdentifyOptions = {}\n ): Promise<DeviceIdentity> {\n const {\n assumeVersion,\n } = options;\n const request = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setAssumeVersion(FirmwareVersion.toProtobuf(assumeVersion));\n\n const response = await gateway.callAsync<gateway.DeviceIdentity>(\n 'device/identify',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Device.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this device and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Device.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\n }\n\n /**\n * Sends a generic ASCII command to this device without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * Specifying -1 omits the number completely.\n */\n public async genericCommandNoResponse(\n command: string,\n options: Device.GenericCommandNoResponseOptions = {}\n ): Promise<void> {\n const {\n axis = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Gets an Axis class instance which allows you to control a particular axis on this device.\n * Axes are numbered from 1.\n * @param axisNumber Number of axis intended to control.\n * @returns Axis instance.\n */\n public getAxis(\n axisNumber: number\n ): Axis {\n if (axisNumber <= 0) {\n throw new TypeError('Invalid value; physical axes are numbered from 1.');\n }\n return new Axis(this, axisNumber);\n }\n\n /**\n * Gets a Lockstep class instance which allows you to control a particular lockstep group on the device.\n * Requires at least Firmware 6.15 or 7.11.\n * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @returns Lockstep instance.\n */\n public getLockstep(\n lockstepGroupId: number\n ): Lockstep {\n if (lockstepGroupId <= 0) {\n throw new TypeError('Invalid value; lockstep groups are numbered from 1.');\n }\n return new Lockstep(this, lockstepGroupId);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @returns Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the user-assigned device label.\n * The label is stored on the controller and recognized by other software.\n * @param label Label to set.\n */\n public async setLabel(\n label: string\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setValue(label);\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the device name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the device.\n * @returns A string that represents the device.\n */\n public toString(): string {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/device_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Gets a Stream class instance which allows you to control a particular stream on the device.\n * @param streamId The ID of the stream to control. Stream IDs start at one.\n * @returns Stream instance.\n */\n public getStream(\n streamId: number\n ): Stream {\n if (streamId <= 0) {\n throw new TypeError('Invalid value; streams are numbered from 1.');\n }\n return new Stream(this, streamId);\n }\n\n /**\n * Gets a StreamBuffer class instance which is a handle for a stream buffer on the device.\n * @param streamBufferId The ID of the stream buffer to control. Stream buffer IDs start at one.\n * @returns StreamBuffer instance.\n */\n public getStreamBuffer(\n streamBufferId: number\n ): StreamBuffer {\n if (streamBufferId <= 0) {\n throw new TypeError('Invalid value; stream buffers are numbered from 1.');\n }\n return new StreamBuffer(this, streamBufferId);\n }\n\n /**\n * Gets a PvtSequence class instance which allows you to control a particular PVT sequence on the device.\n * @param pvtId The ID of the PVT sequence to control. The IDs start at 1.\n * @returns PvtSequence instance.\n */\n public getPvt(\n pvtId: number\n ): PvtSequence {\n if (pvtId <= 0) {\n throw new TypeError('Invalid value; PVT sequences are numbered from 1.');\n }\n return new PvtSequence(this, pvtId);\n }\n\n /**\n * Gets a PvtBuffer class instance which is a handle for a PVT buffer on the device.\n * @param pvtBufferId The ID of the PVT buffer to control. PVT buffer IDs start at one.\n * @returns PvtBuffer instance.\n */\n public getPvtBuffer(\n pvtBufferId: number\n ): PvtBuffer {\n if (pvtBufferId <= 0) {\n throw new TypeError('Invalid value; PVT buffers are numbered from 1.');\n }\n return new PvtBuffer(this, pvtBufferId);\n }\n\n /**\n * Returns a serialization of the current device state that can be saved and reapplied.\n * @returns A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to this device.\n * @param state The state object to apply to this device.\n * @param [options.deviceOnly=false] If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n options: Device.SetStateOptions = {}\n ): Promise<void> {\n const {\n deviceOnly = false,\n } = options;\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n request.setDeviceOnly(deviceOnly);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this device.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An object listing errors that come up when trying to set the state.\n */\n public async canSetState(\n state: string\n ): Promise<CanSetStateDeviceResponse> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n gateway.CanSetStateDeviceResponse);\n return CanSetStateDeviceResponse.fromProtobuf(response.toObject());\n }\n\n /**\n * Waits for the device to start responding to messages.\n * Useful to call after resetting the device.\n * Throws RequestTimeoutException upon timeout.\n * @param timeout For how long to wait in milliseconds for the device to start responding.\n */\n public async waitToRespond(\n timeout: number\n ): Promise<void> {\n const request = new gateway.WaitToRespondRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setTimeout(timeout);\n\n await gateway.callAsync('device/wait_to_respond', request);\n }\n\n /**\n * Returns identity.\n * @returns Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceIdentity>(\n 'device/get_identity',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @returns True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/get_is_identified',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\nnamespace Device {\n export interface IdentifyOptions {\n assumeVersion?: FirmwareVersion;\n }\n export interface GenericCommandOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandNoResponseOptions {\n axis?: number;\n }\n export interface SetStateOptions {\n deviceOnly?: boolean;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../src/ascii/device.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,uDAAmD;AACnD,iCAA8B;AAC9B,yCAAqC;AACrC,yCAAsC;AACtC,uDAAmD;AACnD,2CAAuC;AACvC,yCAAsC;AACtC,yCAAsC;AACtC,iDAA8C;AAC9C,qCAAkC;AAClC,mDAA+C;AAC/C,mFAA4E;AAC5E,iDAA6C;AAC7C,6CAAyC;AACzC,gDAA6C;AAC7C,0DAAsD;AACtD,oDAAsC;AACtC,uCAA0C;AAE1C;;GAEG;AACH,MAAa,MAAM;IACjB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;;OAGG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OA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CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA/gBD,wBA+gBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Connection } from './connection';\nimport { DeviceSettings } from './device_settings';\nimport { Axis } from './axis';\nimport { AllAxes } from './all_axes';\nimport { Warnings } from './warnings';\nimport { DeviceIdentity } from './device_identity';\nimport { DeviceIO } from './device_io';\nimport { Response } from './response';\nimport { Lockstep } from './lockstep';\nimport { Oscilloscope } from './oscilloscope';\nimport { Stream } from './stream';\nimport { StreamBuffer } from './stream_buffer';\nimport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nimport { PvtSequence } from './pvt_sequence';\nimport { PvtBuffer } from './pvt_buffer';\nimport { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport * as gateway from '../gateway';\nimport { DeviceStorage } from './storage';\n\n/**\n * Represents the controller part of one device - may be either a standalone controller or an integrated controller.\n */\nexport class Device {\n /**\n * Connection of this device.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n /**\n * The device address uniquely identifies the device on the connection.\n * It can be configured or automatically assigned by the renumber command.\n */\n public get deviceAddress(): number {\n return this._deviceAddress;\n }\n private _deviceAddress: number;\n\n /**\n * Settings and properties of this device.\n */\n public get settings(): DeviceSettings {\n return this._settings;\n }\n private _settings: DeviceSettings;\n\n /**\n * Key-value storage of this device.\n */\n public get storage(): DeviceStorage {\n return this._storage;\n }\n private _storage: DeviceStorage;\n\n /**\n * I/O channels of this device.\n */\n public get io(): DeviceIO {\n return this._io;\n }\n private _io: DeviceIO;\n\n /**\n * Virtual axis which allows you to target all axes of this device.\n */\n public get allAxes(): AllAxes {\n return this._allAxes;\n }\n private _allAxes: AllAxes;\n\n /**\n * Warnings and faults of this device and all its axes.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the device.\n */\n public get identity(): DeviceIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Indicates whether or not the device has been identified.\n */\n public get isIdentified(): boolean {\n return this._retrieveIsIdentified();\n }\n\n /**\n * Oscilloscope recording helper for this device.\n * Requires at least Firmware 7.00.\n */\n public get oscilloscope(): Oscilloscope {\n return this._oscilloscope;\n }\n private _oscilloscope: Oscilloscope;\n\n /**\n * Unique ID of the device hardware.\n */\n public get deviceId(): number {\n return this.identity.deviceId;\n }\n\n /**\n * Serial number of the device.\n */\n public get serialNumber(): number {\n return this.identity.serialNumber;\n }\n\n /**\n * Name of the product.\n */\n public get name(): string {\n return this.identity.name;\n }\n\n /**\n * Number of axes this device has.\n */\n public get axisCount(): number {\n return this.identity.axisCount;\n }\n\n /**\n * Version of the firmware.\n */\n public get firmwareVersion(): FirmwareVersion {\n return this.identity.firmwareVersion;\n }\n\n /**\n * The device is an integrated product.\n */\n public get isIntegrated(): boolean {\n return this.identity.isIntegrated;\n }\n\n /**\n * User-assigned label of the device.\n */\n public get label(): string {\n return this._retrieveLabel();\n }\n\n constructor(connection: Connection, deviceAddress: number) {\n this._connection = connection;\n this._deviceAddress = deviceAddress;\n this._settings = new DeviceSettings(this);\n this._storage = new DeviceStorage(this);\n this._io = new DeviceIO(this);\n this._allAxes = new AllAxes(this);\n this._warnings = new Warnings(this, 0);\n this._oscilloscope = new Oscilloscope(this);\n }\n\n /**\n * Queries the device and the database, gathering information about the product.\n * Without this information features such as unit conversions will not work.\n * Usually, called automatically by detect devices method.\n * @param options.assumeVersion The identification assumes the specified firmware version\n * instead of the version queried from the device.\n * Providing this argument can lead to unexpected compatibility issues.\n * @returns Device identification data.\n */\n public async identify(\n options: Device.IdentifyOptions = {}\n ): Promise<DeviceIdentity> {\n const {\n assumeVersion,\n } = options;\n const request = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setAssumeVersion(FirmwareVersion.toProtobuf(assumeVersion));\n\n const response = await gateway.callAsync<gateway.DeviceIdentity>(\n 'device/identify',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Device.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this device and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Device.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n axis = 0,\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\n }\n\n /**\n * Sends a generic ASCII command to this device without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.axis=0] Optional axis number to send the command to.\n * Specifying -1 omits the number completely.\n */\n public async genericCommandNoResponse(\n command: string,\n options: Device.GenericCommandNoResponseOptions = {}\n ): Promise<void> {\n const {\n axis = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommand(command);\n request.setAxis(axis);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Gets an Axis class instance which allows you to control a particular axis on this device.\n * Axes are numbered from 1.\n * @param axisNumber Number of axis intended to control.\n * @returns Axis instance.\n */\n public getAxis(\n axisNumber: number\n ): Axis {\n if (axisNumber <= 0) {\n throw new TypeError('Invalid value; physical axes are numbered from 1.');\n }\n return new Axis(this, axisNumber);\n }\n\n /**\n * Gets a Lockstep class instance which allows you to control a particular lockstep group on the device.\n * Requires at least Firmware 6.15 or 7.11.\n * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @returns Lockstep instance.\n */\n public getLockstep(\n lockstepGroupId: number\n ): Lockstep {\n if (lockstepGroupId <= 0) {\n throw new TypeError('Invalid value; lockstep groups are numbered from 1.');\n }\n return new Lockstep(this, lockstepGroupId);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @returns Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the user-assigned device label.\n * The label is stored on the controller and recognized by other software.\n * @param label Label to set.\n */\n public async setLabel(\n label: string\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setValue(label);\n\n await gateway.callAsync('device/set_label', request);\n }\n\n /**\n * Gets the device name.\n * @returns The label.\n */\n private _retrieveLabel(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_label',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the device.\n * @returns A string that represents the device.\n */\n public toString(): string {\n const request = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/device_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Gets a Stream class instance which allows you to control a particular stream on the device.\n * @param streamId The ID of the stream to control. Stream IDs start at one.\n * @returns Stream instance.\n */\n public getStream(\n streamId: number\n ): Stream {\n if (streamId <= 0) {\n throw new TypeError('Invalid value; streams are numbered from 1.');\n }\n return new Stream(this, streamId);\n }\n\n /**\n * Gets a StreamBuffer class instance which is a handle for a stream buffer on the device.\n * @param streamBufferId The ID of the stream buffer to control. Stream buffer IDs start at one.\n * @returns StreamBuffer instance.\n */\n public getStreamBuffer(\n streamBufferId: number\n ): StreamBuffer {\n if (streamBufferId <= 0) {\n throw new TypeError('Invalid value; stream buffers are numbered from 1.');\n }\n return new StreamBuffer(this, streamBufferId);\n }\n\n /**\n * Gets a PvtSequence class instance which allows you to control a particular PVT sequence on the device.\n * @param pvtId The ID of the PVT sequence to control. The IDs start at 1.\n * @returns PvtSequence instance.\n */\n public getPvt(\n pvtId: number\n ): PvtSequence {\n if (pvtId <= 0) {\n throw new TypeError('Invalid value; PVT sequences are numbered from 1.');\n }\n return new PvtSequence(this, pvtId);\n }\n\n /**\n * Gets a PvtBuffer class instance which is a handle for a PVT buffer on the device.\n * @param pvtBufferId The ID of the PVT buffer to control. PVT buffer IDs start at one.\n * @returns PvtBuffer instance.\n */\n public getPvtBuffer(\n pvtBufferId: number\n ): PvtBuffer {\n if (pvtBufferId <= 0) {\n throw new TypeError('Invalid value; PVT buffers are numbered from 1.');\n }\n return new PvtBuffer(this, pvtBufferId);\n }\n\n /**\n * Returns a serialization of the current device state that can be saved and reapplied.\n * @returns A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to this device.\n * @param state The state object to apply to this device.\n * @param [options.deviceOnly=false] If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n options: Device.SetStateOptions = {}\n ): Promise<void> {\n const {\n deviceOnly = false,\n } = options;\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n request.setDeviceOnly(deviceOnly);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this device.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An object listing errors that come up when trying to set the state.\n */\n public async canSetState(\n state: string\n ): Promise<CanSetStateDeviceResponse> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateDeviceResponse>(\n 'device/can_set_state',\n request,\n gateway.CanSetStateDeviceResponse);\n return CanSetStateDeviceResponse.fromProtobuf(response.toObject());\n }\n\n /**\n * Waits for the device to start responding to messages.\n * Useful to call after resetting the device.\n * Throws RequestTimeoutException upon timeout.\n * @param timeout For how long to wait in milliseconds for the device to start responding.\n */\n public async waitToRespond(\n timeout: number\n ): Promise<void> {\n const request = new gateway.WaitToRespondRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n request.setTimeout(timeout);\n\n await gateway.callAsync('device/wait_to_respond', request);\n }\n\n /**\n * Returns identity.\n * @returns Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceIdentity>(\n 'device/get_identity',\n request,\n gateway.DeviceIdentity);\n return DeviceIdentity.fromProtobuf(response.toObject());\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @returns True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/get_is_identified',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\nnamespace Device {\n export interface IdentifyOptions {\n assumeVersion?: FirmwareVersion;\n }\n export interface GenericCommandOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n axis?: number;\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandNoResponseOptions {\n axis?: number;\n }\n export interface SetStateOptions {\n deviceOnly?: boolean;\n }\n}\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Device } from './device';
|
|
2
|
+
import { GetSetting } from './get_setting';
|
|
3
|
+
import { GetSettingResult } from './get_setting_result';
|
|
2
4
|
import { Units } from '../units';
|
|
3
5
|
/**
|
|
4
6
|
* Class providing access to various device settings and properties.
|
|
@@ -78,4 +80,17 @@ export declare class DeviceSettings {
|
|
|
78
80
|
* @returns The setting values on each axis.
|
|
79
81
|
*/
|
|
80
82
|
getFromAllAxes(setting: string): Promise<number[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Gets many setting values in as few device requests as possible.
|
|
85
|
+
* @param settings The settings to read.
|
|
86
|
+
* @returns The setting values read.
|
|
87
|
+
*/
|
|
88
|
+
getMany(...settings: GetSetting[]): Promise<GetSettingResult[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Gets many setting values in the same tick, ensuring their values are synchronized.
|
|
91
|
+
* Requires at least Firmware 7.35.
|
|
92
|
+
* @param settings The settings to read.
|
|
93
|
+
* @returns The setting values read.
|
|
94
|
+
*/
|
|
95
|
+
getSynchronized(...settings: GetSetting[]): Promise<GetSettingResult[]>;
|
|
81
96
|
}
|
|
@@ -26,6 +26,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.DeviceSettings = void 0;
|
|
29
|
+
const get_setting_1 = require("./get_setting");
|
|
30
|
+
const get_setting_result_1 = require("./get_setting_result");
|
|
29
31
|
const units_1 = require("../units");
|
|
30
32
|
const gateway = __importStar(require("../gateway"));
|
|
31
33
|
/**
|
|
@@ -185,6 +187,33 @@ class DeviceSettings {
|
|
|
185
187
|
const response = await gateway.callAsync('device/get_setting_from_all_axes', request, gateway.DoubleArrayResponse);
|
|
186
188
|
return response.getValuesList();
|
|
187
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Gets many setting values in as few device requests as possible.
|
|
192
|
+
* @param settings The settings to read.
|
|
193
|
+
* @returns The setting values read.
|
|
194
|
+
*/
|
|
195
|
+
async getMany(...settings) {
|
|
196
|
+
const request = new gateway.DeviceMultiGetSettingRequest();
|
|
197
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
198
|
+
request.setDevice(this._device.deviceAddress);
|
|
199
|
+
request.setSettingsList(settings.map(get_setting_1.GetSetting.toProtobuf));
|
|
200
|
+
const response = await gateway.callAsync('device/get_many_settings', request, gateway.GetSettingResults);
|
|
201
|
+
return response.getResultsList().map(a => get_setting_result_1.GetSettingResult.fromProtobuf(a.toObject()));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Gets many setting values in the same tick, ensuring their values are synchronized.
|
|
205
|
+
* Requires at least Firmware 7.35.
|
|
206
|
+
* @param settings The settings to read.
|
|
207
|
+
* @returns The setting values read.
|
|
208
|
+
*/
|
|
209
|
+
async getSynchronized(...settings) {
|
|
210
|
+
const request = new gateway.DeviceMultiGetSettingRequest();
|
|
211
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
212
|
+
request.setDevice(this._device.deviceAddress);
|
|
213
|
+
request.setSettingsList(settings.map(get_setting_1.GetSetting.toProtobuf));
|
|
214
|
+
const response = await gateway.callAsync('device/get_sync_settings', request, gateway.GetSettingResults);
|
|
215
|
+
return response.getResultsList().map(a => get_setting_result_1.GetSettingResult.fromProtobuf(a.toObject()));
|
|
216
|
+
}
|
|
188
217
|
}
|
|
189
218
|
exports.DeviceSettings = DeviceSettings;
|
|
190
219
|
//# sourceMappingURL=device_settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device_settings.js","sourceRoot":"","sources":["../../../src/ascii/device_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAiC;AACjC,oDAAsC;AAEtC;;GA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;OAKG;IACI,KAAK,CAAC,cAAc,CACzB,OAAe;QAEf,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAE5B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,kCAAkC,EAClC,OAAO,EACP,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;CACF;AArOD,wCAqOC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Units } from '../units';\nimport * as gateway from '../gateway';\n\n/**\n * Class providing access to various device settings and properties.\n */\nexport class DeviceSettings {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Returns any device 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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets any device 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 = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Returns any device 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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_setting_str',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets any device 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 = new gateway.DeviceSetSettingStrRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n\n await gateway.callAsync('device/set_setting_str', 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 = new gateway.DeviceConvertSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/convert_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceConvertSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setFromNative(true);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/convert_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/get_setting_default',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_setting_default_str',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/can_convert_setting',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Gets the value of an axis scope setting for each axis on the device.\n * Values may be NaN where the setting is not applicable.\n * @param setting Name of the setting.\n * @returns The setting values on each axis.\n */\n public async getFromAllAxes(\n setting: string\n ): Promise<number[]> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = await gateway.callAsync<gateway.DoubleArrayResponse>(\n 'device/get_setting_from_all_axes',\n request,\n gateway.DoubleArrayResponse);\n return response.getValuesList();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"device_settings.js","sourceRoot":"","sources":["../../../src/ascii/device_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,+CAA2C;AAC3C,6DAAwD;AACxD,oCAAiC;AACjC,oDAAsC;AAEtC;;GAEG;AACH,MAAa,cAAc;IAGzB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,OAAe,EACf,OAAc,aAAK,CAAC,MAAM;QAE1B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,oBAAoB,EACpB,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC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Device } from './device';\nimport { GetSetting } from './get_setting';\nimport { GetSettingResult } from './get_setting_result';\nimport { Units } from '../units';\nimport * as gateway from '../gateway';\n\n/**\n * Class providing access to various device settings and properties.\n */\nexport class DeviceSettings {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Returns any device 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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets any device 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 = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Returns any device 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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_setting_str',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets any device 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 = new gateway.DeviceSetSettingStrRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n\n await gateway.callAsync('device/set_setting_str', 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 = new gateway.DeviceConvertSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/convert_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceConvertSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setFromNative(true);\n request.setSetting(setting);\n request.setValue(value);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/convert_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'device/get_setting_default',\n request,\n gateway.DoubleResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/get_setting_default_str',\n request,\n gateway.StringResponse);\n return response.getValue();\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 = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = gateway.callSync<gateway.BoolResponse>(\n 'device/can_convert_setting',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Gets the value of an axis scope setting for each axis on the device.\n * Values may be NaN where the setting is not applicable.\n * @param setting Name of the setting.\n * @returns The setting values on each axis.\n */\n public async getFromAllAxes(\n setting: string\n ): Promise<number[]> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSetting(setting);\n\n const response = await gateway.callAsync<gateway.DoubleArrayResponse>(\n 'device/get_setting_from_all_axes',\n request,\n gateway.DoubleArrayResponse);\n return response.getValuesList();\n }\n\n /**\n * Gets many setting values in as few device requests as possible.\n * @param settings The settings to read.\n * @returns The setting values read.\n */\n public async getMany(\n ...settings: GetSetting[]\n ): Promise<GetSettingResult[]> {\n const request = new gateway.DeviceMultiGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSettingsList(settings.map(GetSetting.toProtobuf));\n\n const response = await gateway.callAsync<gateway.GetSettingResults>(\n 'device/get_many_settings',\n request,\n gateway.GetSettingResults);\n return response.getResultsList().map(a => GetSettingResult.fromProtobuf(a.toObject()));\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 settings The settings to read.\n * @returns The setting values read.\n */\n public async getSynchronized(\n ...settings: GetSetting[]\n ): Promise<GetSettingResult[]> {\n const request = new gateway.DeviceMultiGetSettingRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setSettingsList(settings.map(GetSetting.toProtobuf));\n\n const response = await gateway.callAsync<gateway.GetSettingResults>(\n 'device/get_sync_settings',\n request,\n gateway.GetSettingResults);\n return response.getResultsList().map(a => GetSettingResult.fromProtobuf(a.toObject()));\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Units } from '../units';
|
|
2
|
+
/**
|
|
3
|
+
* Specifies a setting to get with one of the multi-get commands.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetAxisSetting {
|
|
6
|
+
/**
|
|
7
|
+
* The setting to read.
|
|
8
|
+
*/
|
|
9
|
+
setting: string;
|
|
10
|
+
/**
|
|
11
|
+
* The unit to convert the read setting to.
|
|
12
|
+
*/
|
|
13
|
+
unit?: Units;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace GetAxisSetting {
|
|
16
|
+
const __type = "GetAxisSetting";
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.GetAxisSetting = void 0;
|
|
29
|
+
const gateway = __importStar(require("../gateway"));
|
|
30
|
+
var GetAxisSetting;
|
|
31
|
+
(function (GetAxisSetting) {
|
|
32
|
+
GetAxisSetting.__type = 'GetAxisSetting';
|
|
33
|
+
/** @internal */
|
|
34
|
+
function toProtobuf(source) {
|
|
35
|
+
const pbData = new gateway.GetSetting();
|
|
36
|
+
if (source == null) {
|
|
37
|
+
return pbData;
|
|
38
|
+
}
|
|
39
|
+
pbData.setSetting(source.setting);
|
|
40
|
+
pbData.setUnit(source.unit);
|
|
41
|
+
return pbData;
|
|
42
|
+
}
|
|
43
|
+
GetAxisSetting.toProtobuf = toProtobuf;
|
|
44
|
+
})(GetAxisSetting = exports.GetAxisSetting || (exports.GetAxisSetting = {}));
|
|
45
|
+
//# sourceMappingURL=get_axis_setting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_axis_setting.js","sourceRoot":"","sources":["../../../src/ascii/get_axis_setting.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAmBtC,IAAiB,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAChB,qBAAM,GAAG,gBAAgB,CAAC;IAEvC,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAAyC;QAClE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAK,CAAC,CAAC;QAC7B,OAAO,MAAM,CAAC;IAChB,CAAC;IATe,yBAAU,aASzB,CAAA;AACH,CAAC,EAdgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAc9B","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Units } from '../units';\n\n/**\n * Specifies a setting to get with one of the multi-get commands.\n */\nexport interface GetAxisSetting {\n /**\n * The setting to read.\n */\n setting: string;\n\n /**\n * The unit to convert the read setting to.\n */\n unit?: Units;\n\n}\n\nexport namespace GetAxisSetting {\n export const __type = 'GetAxisSetting';\n\n /** @internal */\n export function toProtobuf(source: GetAxisSetting | null | undefined): gateway.GetSetting {\n const pbData = new gateway.GetSetting();\n if (source == null) {\n return pbData;\n }\n\n pbData.setSetting(source.setting);\n pbData.setUnit(source.unit!);\n return pbData;\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Units } from '../units';
|
|
2
|
+
/**
|
|
3
|
+
* The response from a multi-get axis command.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetAxisSettingResult {
|
|
6
|
+
/**
|
|
7
|
+
* The setting read.
|
|
8
|
+
*/
|
|
9
|
+
setting: string;
|
|
10
|
+
/**
|
|
11
|
+
* The value read.
|
|
12
|
+
*/
|
|
13
|
+
value: number;
|
|
14
|
+
/**
|
|
15
|
+
* The unit of the values.
|
|
16
|
+
*/
|
|
17
|
+
unit: Units;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace GetAxisSettingResult {
|
|
20
|
+
const __type = "GetAxisSettingResult";
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.GetAxisSettingResult = void 0;
|
|
6
|
+
var GetAxisSettingResult;
|
|
7
|
+
(function (GetAxisSettingResult) {
|
|
8
|
+
GetAxisSettingResult.__type = 'GetAxisSettingResult';
|
|
9
|
+
/** @internal */
|
|
10
|
+
function fromProtobuf(pbData) {
|
|
11
|
+
return {
|
|
12
|
+
setting: pbData.setting,
|
|
13
|
+
value: pbData.valuesList[0],
|
|
14
|
+
unit: pbData.unit,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
GetAxisSettingResult.fromProtobuf = fromProtobuf;
|
|
18
|
+
})(GetAxisSettingResult = exports.GetAxisSettingResult || (exports.GetAxisSettingResult = {}));
|
|
19
|
+
//# sourceMappingURL=get_axis_setting_result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_axis_setting_result.js","sourceRoot":"","sources":["../../../src/ascii/get_axis_setting_result.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AA0BtD,IAAiB,oBAAoB,CAWpC;AAXD,WAAiB,oBAAoB;IACtB,2BAAM,GAAG,sBAAsB,CAAC;IAE7C,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAyC;QACpE,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YAC3B,IAAI,EAAE,MAAM,CAAC,IAAa;SAC3B,CAAC;IACJ,CAAC;IANe,iCAAY,eAM3B,CAAA;AACH,CAAC,EAXgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAWpC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Units } from '../units';\n\n/**\n * The response from a multi-get axis command.\n */\nexport interface GetAxisSettingResult {\n /**\n * The setting read.\n */\n setting: string;\n\n /**\n * The value read.\n */\n value: number;\n\n /**\n * The unit of the values.\n */\n unit: Units;\n\n}\n\nexport namespace GetAxisSettingResult {\n export const __type = 'GetAxisSettingResult';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.GetSettingResult.AsObject): GetAxisSettingResult {\n return {\n setting: pbData.setting,\n value: pbData.valuesList[0],\n unit: pbData.unit as Units,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Units } from '../units';
|
|
2
|
+
/**
|
|
3
|
+
* Specifies a setting to get with one of the multi-get commands.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetSetting {
|
|
6
|
+
/**
|
|
7
|
+
* The setting to read.
|
|
8
|
+
*/
|
|
9
|
+
setting: string;
|
|
10
|
+
/**
|
|
11
|
+
* The list of axes to read.
|
|
12
|
+
*/
|
|
13
|
+
axes?: number[];
|
|
14
|
+
/**
|
|
15
|
+
* The unit to convert the read settings to.
|
|
16
|
+
*/
|
|
17
|
+
unit?: Units;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace GetSetting {
|
|
20
|
+
const __type = "GetSetting";
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.GetSetting = void 0;
|
|
29
|
+
const gateway = __importStar(require("../gateway"));
|
|
30
|
+
var GetSetting;
|
|
31
|
+
(function (GetSetting) {
|
|
32
|
+
GetSetting.__type = 'GetSetting';
|
|
33
|
+
/** @internal */
|
|
34
|
+
function toProtobuf(source) {
|
|
35
|
+
var _a;
|
|
36
|
+
const pbData = new gateway.GetSetting();
|
|
37
|
+
if (source == null) {
|
|
38
|
+
return pbData;
|
|
39
|
+
}
|
|
40
|
+
pbData.setSetting(source.setting);
|
|
41
|
+
pbData.setAxesList((_a = source.axes) !== null && _a !== void 0 ? _a : []);
|
|
42
|
+
pbData.setUnit(source.unit);
|
|
43
|
+
return pbData;
|
|
44
|
+
}
|
|
45
|
+
GetSetting.toProtobuf = toProtobuf;
|
|
46
|
+
})(GetSetting = exports.GetSetting || (exports.GetSetting = {}));
|
|
47
|
+
//# sourceMappingURL=get_setting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_setting.js","sourceRoot":"","sources":["../../../src/ascii/get_setting.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAwBtC,IAAiB,UAAU,CAe1B;AAfD,WAAiB,UAAU;IACZ,iBAAM,GAAG,YAAY,CAAC;IAEnC,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAAqC;;QAC9D,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACxC,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClC,MAAM,CAAC,WAAW,CAAC,MAAA,MAAM,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC;QACtC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAK,CAAC,CAAC;QAC7B,OAAO,MAAM,CAAC;IAChB,CAAC;IAVe,qBAAU,aAUzB,CAAA;AACH,CAAC,EAfgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAe1B","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Units } from '../units';\n\n/**\n * Specifies a setting to get with one of the multi-get commands.\n */\nexport interface GetSetting {\n /**\n * The setting to read.\n */\n setting: string;\n\n /**\n * The list of axes to read.\n */\n axes?: number[];\n\n /**\n * The unit to convert the read settings to.\n */\n unit?: Units;\n\n}\n\nexport namespace GetSetting {\n export const __type = 'GetSetting';\n\n /** @internal */\n export function toProtobuf(source: GetSetting | null | undefined): gateway.GetSetting {\n const pbData = new gateway.GetSetting();\n if (source == null) {\n return pbData;\n }\n\n pbData.setSetting(source.setting);\n pbData.setAxesList(source.axes ?? []);\n pbData.setUnit(source.unit!);\n return pbData;\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Units } from '../units';
|
|
2
|
+
/**
|
|
3
|
+
* The response from a multi-get command.
|
|
4
|
+
*/
|
|
5
|
+
export interface GetSettingResult {
|
|
6
|
+
/**
|
|
7
|
+
* The setting read.
|
|
8
|
+
*/
|
|
9
|
+
setting: string;
|
|
10
|
+
/**
|
|
11
|
+
* The list of values returned.
|
|
12
|
+
*/
|
|
13
|
+
values: number[];
|
|
14
|
+
/**
|
|
15
|
+
* The unit of the values.
|
|
16
|
+
*/
|
|
17
|
+
unit: Units;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace GetSettingResult {
|
|
20
|
+
const __type = "GetSettingResult";
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.GetSettingResult = void 0;
|
|
6
|
+
var GetSettingResult;
|
|
7
|
+
(function (GetSettingResult) {
|
|
8
|
+
GetSettingResult.__type = 'GetSettingResult';
|
|
9
|
+
/** @internal */
|
|
10
|
+
function fromProtobuf(pbData) {
|
|
11
|
+
return {
|
|
12
|
+
setting: pbData.setting,
|
|
13
|
+
values: pbData.valuesList,
|
|
14
|
+
unit: pbData.unit,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
GetSettingResult.fromProtobuf = fromProtobuf;
|
|
18
|
+
})(GetSettingResult = exports.GetSettingResult || (exports.GetSettingResult = {}));
|
|
19
|
+
//# sourceMappingURL=get_setting_result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_setting_result.js","sourceRoot":"","sources":["../../../src/ascii/get_setting_result.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AA0BtD,IAAiB,gBAAgB,CAWhC;AAXD,WAAiB,gBAAgB;IAClB,uBAAM,GAAG,kBAAkB,CAAC;IAEzC,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAyC;QACpE,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,MAAM,CAAC,UAAU;YACzB,IAAI,EAAE,MAAM,CAAC,IAAa;SAC3B,CAAC;IACJ,CAAC;IANe,6BAAY,eAM3B,CAAA;AACH,CAAC,EAXgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAWhC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Units } from '../units';\n\n/**\n * The response from a multi-get command.\n */\nexport interface GetSettingResult {\n /**\n * The setting read.\n */\n setting: string;\n\n /**\n * The list of values returned.\n */\n values: number[];\n\n /**\n * The unit of the values.\n */\n unit: Units;\n\n}\n\nexport namespace GetSettingResult {\n export const __type = 'GetSettingResult';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.GetSettingResult.AsObject): GetSettingResult {\n return {\n setting: pbData.setting,\n values: pbData.valuesList,\n unit: pbData.unit as Units,\n };\n }\n}\n"]}
|
|
@@ -7,6 +7,10 @@ export { Axis } from './axis';
|
|
|
7
7
|
export { Connection } from './connection';
|
|
8
8
|
export { DeviceIdentity } from './device_identity';
|
|
9
9
|
export { DeviceSettings } from './device_settings';
|
|
10
|
+
export { GetSetting } from './get_setting';
|
|
11
|
+
export { GetAxisSetting } from './get_axis_setting';
|
|
12
|
+
export { GetSettingResult } from './get_setting_result';
|
|
13
|
+
export { GetAxisSettingResult } from './get_axis_setting_result';
|
|
10
14
|
export { Device } from './device';
|
|
11
15
|
export { DeviceIO } from './device_io';
|
|
12
16
|
export { DeviceIOInfo } from './device_io_info';
|
|
@@ -44,3 +48,4 @@ export { CanSetStateAxisResponse } from './can_set_state_axis_response';
|
|
|
44
48
|
export { CanSetStateDeviceResponse } from './can_set_state_device_response';
|
|
45
49
|
export { PvtAxisDefinition } from './pvt_axis_definition';
|
|
46
50
|
export { PvtAxisType } from './pvt_axis_type';
|
|
51
|
+
export { AxisGroup } from './axis_group';
|
package/dist/lib/ascii/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.PvtMode = exports.PvtBuffer = exports.PvtSequence = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeDataSource = exports.OscilloscopeData = exports.OscilloscopeCaptureProperties = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.IoPortType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.GetAxisSettingResult = exports.GetSettingResult = exports.GetAxisSetting = exports.GetSetting = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
|
|
4
|
+
exports.AxisGroup = exports.PvtAxisType = void 0;
|
|
4
5
|
var alert_event_1 = require("./alert_event");
|
|
5
6
|
Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return alert_event_1.AlertEvent; } });
|
|
6
7
|
var all_axes_1 = require("./all_axes");
|
|
@@ -19,6 +20,14 @@ var device_identity_1 = require("./device_identity");
|
|
|
19
20
|
Object.defineProperty(exports, "DeviceIdentity", { enumerable: true, get: function () { return device_identity_1.DeviceIdentity; } });
|
|
20
21
|
var device_settings_1 = require("./device_settings");
|
|
21
22
|
Object.defineProperty(exports, "DeviceSettings", { enumerable: true, get: function () { return device_settings_1.DeviceSettings; } });
|
|
23
|
+
var get_setting_1 = require("./get_setting");
|
|
24
|
+
Object.defineProperty(exports, "GetSetting", { enumerable: true, get: function () { return get_setting_1.GetSetting; } });
|
|
25
|
+
var get_axis_setting_1 = require("./get_axis_setting");
|
|
26
|
+
Object.defineProperty(exports, "GetAxisSetting", { enumerable: true, get: function () { return get_axis_setting_1.GetAxisSetting; } });
|
|
27
|
+
var get_setting_result_1 = require("./get_setting_result");
|
|
28
|
+
Object.defineProperty(exports, "GetSettingResult", { enumerable: true, get: function () { return get_setting_result_1.GetSettingResult; } });
|
|
29
|
+
var get_axis_setting_result_1 = require("./get_axis_setting_result");
|
|
30
|
+
Object.defineProperty(exports, "GetAxisSettingResult", { enumerable: true, get: function () { return get_axis_setting_result_1.GetAxisSettingResult; } });
|
|
22
31
|
var device_1 = require("./device");
|
|
23
32
|
Object.defineProperty(exports, "Device", { enumerable: true, get: function () { return device_1.Device; } });
|
|
24
33
|
var device_io_1 = require("./device_io");
|
|
@@ -94,4 +103,6 @@ var pvt_axis_definition_1 = require("./pvt_axis_definition");
|
|
|
94
103
|
Object.defineProperty(exports, "PvtAxisDefinition", { enumerable: true, get: function () { return pvt_axis_definition_1.PvtAxisDefinition; } });
|
|
95
104
|
var pvt_axis_type_1 = require("./pvt_axis_type");
|
|
96
105
|
Object.defineProperty(exports, "PvtAxisType", { enumerable: true, get: function () { return pvt_axis_type_1.PvtAxisType; } });
|
|
106
|
+
var axis_group_1 = require("./axis_group");
|
|
107
|
+
Object.defineProperty(exports, "AxisGroup", { enumerable: true, get: function () { return axis_group_1.AxisGroup; } });
|
|
97
108
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+CAA4C;AAAnC,0GAAA,UAAU,OAAA;AACnB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yDAAuD;AAA9C,qHAAA,gBAA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HAAA,iBAAiB,OAAA;AAC1B,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { GetSetting } from './get_setting';\nexport { GetAxisSetting } from './get_axis_setting';\nexport { GetSettingResult } from './get_setting_result';\nexport { GetAxisSettingResult } from './get_axis_setting_result';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { IoPortType } from './io_port_type';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeDataSource } from './oscilloscope_data_source';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nexport { AxisStorage, DeviceStorage } from './storage';\nexport { ConversionFactor } from './conversion_factor';\nexport { CanSetStateAxisResponse } from './can_set_state_axis_response';\nexport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nexport { PvtAxisDefinition } from './pvt_axis_definition';\nexport { PvtAxisType } from './pvt_axis_type';\nexport { AxisGroup } from './axis_group';\n"]}
|