@zaber/motion 2.11.1 → 2.13.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.
Files changed (52) hide show
  1. package/LICENSE +1538 -3009
  2. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  3. package/dist/lib/ascii/axis.d.ts +39 -6
  4. package/dist/lib/ascii/axis.js +58 -5
  5. package/dist/lib/ascii/axis.js.map +1 -1
  6. package/dist/lib/ascii/connection.d.ts +2 -0
  7. package/dist/lib/ascii/connection.js +2 -0
  8. package/dist/lib/ascii/connection.js.map +1 -1
  9. package/dist/lib/ascii/device.d.ts +7 -0
  10. package/dist/lib/ascii/device.js +9 -0
  11. package/dist/lib/ascii/device.js.map +1 -1
  12. package/dist/lib/ascii/index.d.ts +1 -0
  13. package/dist/lib/ascii/index.js +4 -1
  14. package/dist/lib/ascii/index.js.map +1 -1
  15. package/dist/lib/ascii/lockstep.d.ts +33 -6
  16. package/dist/lib/ascii/lockstep.js +50 -5
  17. package/dist/lib/ascii/lockstep.js.map +1 -1
  18. package/dist/lib/ascii/servo_tuner.d.ts +11 -0
  19. package/dist/lib/ascii/servo_tuner.js +22 -0
  20. package/dist/lib/ascii/servo_tuner.js.map +1 -1
  21. package/dist/lib/ascii/setting_constants.d.ts +124 -0
  22. package/dist/lib/ascii/setting_constants.js +124 -0
  23. package/dist/lib/ascii/setting_constants.js.map +1 -1
  24. package/dist/lib/ascii/storage.d.ts +98 -0
  25. package/dist/lib/ascii/storage.js +220 -0
  26. package/dist/lib/ascii/storage.js.map +1 -0
  27. package/dist/lib/ascii/stream.d.ts +5 -5
  28. package/dist/lib/ascii/stream.js.map +1 -1
  29. package/dist/lib/ascii_ns.d.ts +4 -0
  30. package/dist/lib/ascii_ns.js +2 -0
  31. package/dist/lib/ascii_ns.js.map +1 -1
  32. package/dist/lib/exceptions/command_too_long_exception.d.ts +14 -0
  33. package/dist/lib/exceptions/command_too_long_exception.js +32 -0
  34. package/dist/lib/exceptions/command_too_long_exception.js.map +1 -0
  35. package/dist/lib/exceptions/command_too_long_exception_data.d.ts +24 -0
  36. package/dist/lib/exceptions/command_too_long_exception_data.js +20 -0
  37. package/dist/lib/exceptions/command_too_long_exception_data.js.map +1 -0
  38. package/dist/lib/exceptions/index.d.ts +3 -0
  39. package/dist/lib/exceptions/index.js +8 -2
  40. package/dist/lib/exceptions/index.js.map +1 -1
  41. package/dist/lib/exceptions/no_value_for_key_exception.d.ts +7 -0
  42. package/dist/lib/exceptions/no_value_for_key_exception.js +17 -0
  43. package/dist/lib/exceptions/no_value_for_key_exception.js.map +1 -0
  44. package/dist/lib/gateway/convert_exceptions.js +2 -0
  45. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  46. package/dist/lib/protobufs/main_pb.d.ts +358 -0
  47. package/dist/lib/protobufs/main_pb.js +2889 -195
  48. package/dist/lib/protobufs/main_pb.js.map +1 -1
  49. package/dist/lib/units.d.ts +63 -1
  50. package/dist/lib/units.js +70 -1
  51. package/dist/lib/units.js.map +1 -1
  52. package/package.json +3 -2
@@ -36,6 +36,7 @@ const stream_buffer_1 = require("./stream_buffer");
36
36
  const measurement_1 = require("../measurement");
37
37
  const can_set_state_device_response_1 = require("../can_set_state_device_response");
38
38
  const gateway = __importStar(require("../gateway"));
39
+ const storage_1 = require("./storage");
39
40
  /**
40
41
  * Represents the controller part of one device - may be either a standalone controller or an integrated controller.
41
42
  */
@@ -44,6 +45,7 @@ class Device {
44
45
  this._connection = connection;
45
46
  this._deviceAddress = deviceAddress;
46
47
  this._settings = new device_settings_1.DeviceSettings(this);
48
+ this._storage = new storage_1.DeviceStorage(this);
47
49
  this._io = new device_io_1.DeviceIO(this);
48
50
  this._allAxes = new all_axes_1.AllAxes(this);
49
51
  this._warnings = new warnings_1.Warnings(this, 0);
@@ -68,6 +70,12 @@ class Device {
68
70
  get settings() {
69
71
  return this._settings;
70
72
  }
73
+ /**
74
+ * Key-value storage of this device.
75
+ */
76
+ get storage() {
77
+ return this._storage;
78
+ }
71
79
  /**
72
80
  * I/O channels of this device.
73
81
  */
@@ -201,6 +209,7 @@ class Device {
201
209
  * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
202
210
  * @param command Command and its parameters.
203
211
  * @param axis Optional axis number to send the command to.
212
+ * Specifying -1 omits the number completely.
204
213
  */
205
214
  async genericCommandNoResponse(command, axis = 0) {
206
215
  const request = new gateway.GenericCommandRequest();
@@ -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,gDAA6C;AAE7C,oFAA6E;AAC7E,oDAAsC;AAEtC;;GAEG;AACH,MAAa,MAAM;IAkHjB,YAAY,UAAsB,EAAE,aAAqB;QACvD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,IAAI,oBAAQ,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAO,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,IAAI,mBAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAzHD;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IA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/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC;CACF;AA1ZD,wBA0ZC","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 { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport { CanSetStateDeviceResponse } from '../can_set_state_device_response';\nimport * as gateway from '../gateway';\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 * 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 */\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 constructor(connection: Connection, deviceAddress: number) {\n this._connection = connection;\n this._deviceAddress = deviceAddress;\n this._settings = new DeviceSettings(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 * @return Device identification data.\n */\n public async identify(): Promise<DeviceIdentity> {\n const request = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\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 axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\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 axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\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.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\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 axis Optional axis number to send the command to.\n */\n public async genericCommandNoResponse(\n command: string,\n axis: number = 0\n ): Promise<void> {\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 * @return 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 * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @return 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 * @return 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.PrepareCommandResponse>(\n 'device/prepare_command',\n request,\n gateway.PrepareCommandResponse);\n return response.getCommand();\n }\n\n /**\n * Returns a string that represents the device.\n * @return A string that represents the device.\n */\n public toString(): string {\n const request = new gateway.ToStringRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.ToStringResponse>(\n 'device/device_to_string',\n request,\n gateway.ToStringResponse);\n return response.getToStr();\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 * @return 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 * @return 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 * Returns a serialization of the current device state that can be saved and reapplied.\n * @return A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request = new gateway.GetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.GetStateResponse>(\n 'device/get_state',\n request,\n gateway.GetStateResponse);\n return response.getState();\n }\n\n /**\n * Applies a saved state to an axis.\n * @param state The state object to apply to this axis.\n * @param deviceOnly If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n deviceOnly: boolean = false\n ): Promise<void> {\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 a device and its peripherals.\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 * @return 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 * Returns identity.\n * @return Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request = new gateway.DeviceGetIdentityRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceGetIdentityResponse>(\n 'device/get_identity',\n request,\n gateway.DeviceGetIdentityResponse);\n return DeviceIdentity.fromProtobuf(response.getIdentity()!.toObject());\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @return True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request = new gateway.DeviceGetIsIdentifiedRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceGetIsIdentifiedResponse>(\n 'device/get_is_identified',\n request,\n gateway.DeviceGetIsIdentifiedResponse);\n return response.getIsIdentified();\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,gDAA6C;AAE7C,oFAA6E;AAC7E,oDAAsC;AACtC,uCAA0C;AAE1C;;GAEG;AACH,MAAa,MAAM;IA0HjB,YAAY,UAAsB,EAAE,aAAqB;QACvD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,uBAAa,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CA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Q,CAC/B,qBAAqB,EACrB,OAAO,EACP,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACrC,OAAO,gCAAc,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACK,qBAAqB;QAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,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,6BAA6B,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC;CACF;AApaD,wBAoaC","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 { Measurement } from '../measurement';\nimport { FirmwareVersion } from '../firmware_version';\nimport { CanSetStateDeviceResponse } from '../can_set_state_device_response';\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 */\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 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 * @return Device identification data.\n */\n public async identify(): Promise<DeviceIdentity> {\n const request = new gateway.DeviceIdentifyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\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 axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\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 axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\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.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\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 axis Optional axis number to send the command to.\n * Specifying -1 omits the number completely.\n */\n public async genericCommandNoResponse(\n command: string,\n axis: number = 0\n ): Promise<void> {\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 * @return 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 * @param lockstepGroupId The ID of the lockstep group to control. Lockstep group IDs start at one.\n * @return 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 * @return 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.PrepareCommandResponse>(\n 'device/prepare_command',\n request,\n gateway.PrepareCommandResponse);\n return response.getCommand();\n }\n\n /**\n * Returns a string that represents the device.\n * @return A string that represents the device.\n */\n public toString(): string {\n const request = new gateway.ToStringRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.ToStringResponse>(\n 'device/device_to_string',\n request,\n gateway.ToStringResponse);\n return response.getToStr();\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 * @return 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 * @return 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 * Returns a serialization of the current device state that can be saved and reapplied.\n * @return A serialization of the current state of the device.\n */\n public async getState(): Promise<string> {\n const request = new gateway.GetStateRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = await gateway.callAsync<gateway.GetStateResponse>(\n 'device/get_state',\n request,\n gateway.GetStateResponse);\n return response.getState();\n }\n\n /**\n * Applies a saved state to an axis.\n * @param state The state object to apply to this axis.\n * @param deviceOnly If true, only device scope settings and features will be set.\n */\n public async setState(\n state: string,\n deviceOnly: boolean = false\n ): Promise<void> {\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 a device and its peripherals.\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 * @return 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 * Returns identity.\n * @return Device identity.\n */\n private _retrieveIdentity(): DeviceIdentity {\n const request = new gateway.DeviceGetIdentityRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceGetIdentityResponse>(\n 'device/get_identity',\n request,\n gateway.DeviceGetIdentityResponse);\n return DeviceIdentity.fromProtobuf(response.getIdentity()!.toObject());\n }\n\n /**\n * Returns whether or not the device have been identified.\n * @return True if the device has already been identified. False otherwise.\n */\n private _retrieveIsIdentified(): boolean {\n const request = new gateway.DeviceGetIsIdentifiedRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setDevice(this.deviceAddress);\n\n const response = gateway.callSync<gateway.DeviceGetIsIdentifiedResponse>(\n 'device/get_is_identified',\n request,\n gateway.DeviceGetIsIdentifiedResponse);\n return response.getIsIdentified();\n }\n}\n"]}
@@ -33,3 +33,4 @@ export { ParamsetInfo } from './paramset_info';
33
33
  export { PidTuning } from './pid_tuning';
34
34
  export { ServoTuningParam } from './servo_tuning_param';
35
35
  export { SimpleTuningParam } from './simple_tuning_param';
36
+ export { AxisStorage, DeviceStorage } from './storage';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimpleTuningParam = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeCaptureProperties = exports.OscilloscopeData = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
3
+ exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParam = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeCaptureProperties = exports.OscilloscopeData = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
4
4
  var alert_event_1 = require("./alert_event");
5
5
  Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return alert_event_1.AlertEvent; } });
6
6
  var all_axes_1 = require("./all_axes");
@@ -71,4 +71,7 @@ var servo_tuning_param_1 = require("./servo_tuning_param");
71
71
  Object.defineProperty(exports, "ServoTuningParam", { enumerable: true, get: function () { return servo_tuning_param_1.ServoTuningParam; } });
72
72
  var simple_tuning_param_1 = require("./simple_tuning_param");
73
73
  Object.defineProperty(exports, "SimpleTuningParam", { enumerable: true, get: function () { return simple_tuning_param_1.SimpleTuningParam; } });
74
+ var storage_1 = require("./storage");
75
+ Object.defineProperty(exports, "AxisStorage", { enumerable: true, get: function () { return storage_1.AxisStorage; } });
76
+ Object.defineProperty(exports, "DeviceStorage", { enumerable: true, get: function () { return storage_1.DeviceStorage; } });
74
77
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qFAAkF;AAAzE,gJAAA,6BAA6B,OAAA;AACtC,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,6DAA0D;AAAjD,wHAAA,iBAAiB,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 { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\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 { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\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 { 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 { SimpleTuningParam } from './simple_tuning_param';\n"]}
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,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qFAAkF;AAAzE,gJAAA,6BAA6B,OAAA;AACtC,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,qCAAuD;AAA9C,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,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 { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\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 { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\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 { 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 { SimpleTuningParam } from './simple_tuning_param';\nexport { AxisStorage, DeviceStorage } from './storage';\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Device } from './device';
2
- import { Angle, Length, Native, AngularVelocity, Velocity } from '../units';
2
+ import { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration } from '../units';
3
3
  import { LockstepAxes } from './lockstep_axes';
4
4
  /**
5
5
  * Represents a lockstep group with this ID on a device.
@@ -42,37 +42,64 @@ export declare class Lockstep {
42
42
  * @param position Absolute position.
43
43
  * @param unit Units of position.
44
44
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
45
+ * @param velocity Movement velocity.
46
+ * Default value of 0 indicates that the maxspeed setting is used instead.
47
+ * @param velocityUnit Units of velocity.
48
+ * @param acceleration Movement acceleration.
49
+ * Default value of 0 indicates that the accel setting is used instead.
50
+ * @param accelerationUnit Units of acceleration.
45
51
  */
46
- moveAbsolute(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean): Promise<void>;
52
+ moveAbsolute(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
47
53
  /**
48
54
  * Move the first axis of the lockstep group to a position relative to its current position.
49
55
  * The other axes in the lockstep group maintain their offsets throughout movement.
50
56
  * @param position Relative position.
51
57
  * @param unit Units of position.
52
58
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
59
+ * @param velocity Movement velocity.
60
+ * Default value of 0 indicates that the maxspeed setting is used instead.
61
+ * @param velocityUnit Units of velocity.
62
+ * @param acceleration Movement acceleration.
63
+ * Default value of 0 indicates that the accel setting is used instead.
64
+ * @param accelerationUnit Units of acceleration.
53
65
  */
54
- moveRelative(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean): Promise<void>;
66
+ moveRelative(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
55
67
  /**
56
68
  * Moves the first axis of the lockstep group at the specified speed.
57
69
  * The other axes in the lockstep group maintain their offsets throughout movement.
58
70
  * @param velocity Movement velocity.
59
71
  * @param unit Units of velocity.
72
+ * @param acceleration Movement acceleration.
73
+ * Default value of 0 indicates that the accel setting is used instead.
74
+ * @param accelerationUnit Units of acceleration.
60
75
  */
61
- moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native): Promise<void>;
76
+ moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
62
77
  /**
63
78
  * Moves the axes to the maximum valid position.
64
79
  * The axes in the lockstep group maintain their offsets throughout movement.
65
80
  * Respects lim.max for all axes in the group.
66
81
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
82
+ * @param velocity Movement velocity.
83
+ * Default value of 0 indicates that the maxspeed setting is used instead.
84
+ * @param velocityUnit Units of velocity.
85
+ * @param acceleration Movement acceleration.
86
+ * Default value of 0 indicates that the accel setting is used instead.
87
+ * @param accelerationUnit Units of acceleration.
67
88
  */
68
- moveMax(waitUntilIdle?: boolean): Promise<void>;
89
+ moveMax(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
69
90
  /**
70
91
  * Moves the axes to the minimum valid position.
71
92
  * The axes in the lockstep group maintain their offsets throughout movement.
72
93
  * Respects lim.min for all axes in the group.
73
94
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
95
+ * @param velocity Movement velocity.
96
+ * Default value of 0 indicates that the maxspeed setting is used instead.
97
+ * @param velocityUnit Units of velocity.
98
+ * @param acceleration Movement acceleration.
99
+ * Default value of 0 indicates that the accel setting is used instead.
100
+ * @param accelerationUnit Units of acceleration.
74
101
  */
75
- moveMin(waitUntilIdle?: boolean): Promise<void>;
102
+ moveMin(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
76
103
  /**
77
104
  * Waits until the lockstep group stops moving.
78
105
  * @param throwErrorOnFault Determines whether to throw error when fault is observed.
@@ -98,8 +98,14 @@ class Lockstep {
98
98
  * @param position Absolute position.
99
99
  * @param unit Units of position.
100
100
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
101
+ * @param velocity Movement velocity.
102
+ * Default value of 0 indicates that the maxspeed setting is used instead.
103
+ * @param velocityUnit Units of velocity.
104
+ * @param acceleration Movement acceleration.
105
+ * Default value of 0 indicates that the accel setting is used instead.
106
+ * @param accelerationUnit Units of acceleration.
101
107
  */
102
- async moveAbsolute(position, unit = units_1.Units.NATIVE, waitUntilIdle = true) {
108
+ async moveAbsolute(position, unit = units_1.Units.NATIVE, waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
103
109
  const request = new gateway.LockstepMoveRequest();
104
110
  request.setInterfaceId(this.device.connection.interfaceId);
105
111
  request.setDevice(this.device.deviceAddress);
@@ -108,6 +114,10 @@ class Lockstep {
108
114
  request.setArg(position);
109
115
  request.setUnit(unit);
110
116
  request.setWaitUntilIdle(waitUntilIdle);
117
+ request.setVelocity(velocity);
118
+ request.setVelocityUnit(velocityUnit);
119
+ request.setAcceleration(acceleration);
120
+ request.setAccelerationUnit(accelerationUnit);
111
121
  await gateway.callAsync('device/lockstep_move', request);
112
122
  }
113
123
  /**
@@ -116,8 +126,14 @@ class Lockstep {
116
126
  * @param position Relative position.
117
127
  * @param unit Units of position.
118
128
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
129
+ * @param velocity Movement velocity.
130
+ * Default value of 0 indicates that the maxspeed setting is used instead.
131
+ * @param velocityUnit Units of velocity.
132
+ * @param acceleration Movement acceleration.
133
+ * Default value of 0 indicates that the accel setting is used instead.
134
+ * @param accelerationUnit Units of acceleration.
119
135
  */
120
- async moveRelative(position, unit = units_1.Units.NATIVE, waitUntilIdle = true) {
136
+ async moveRelative(position, unit = units_1.Units.NATIVE, waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
121
137
  const request = new gateway.LockstepMoveRequest();
122
138
  request.setInterfaceId(this.device.connection.interfaceId);
123
139
  request.setDevice(this.device.deviceAddress);
@@ -126,6 +142,10 @@ class Lockstep {
126
142
  request.setArg(position);
127
143
  request.setUnit(unit);
128
144
  request.setWaitUntilIdle(waitUntilIdle);
145
+ request.setVelocity(velocity);
146
+ request.setVelocityUnit(velocityUnit);
147
+ request.setAcceleration(acceleration);
148
+ request.setAccelerationUnit(accelerationUnit);
129
149
  await gateway.callAsync('device/lockstep_move', request);
130
150
  }
131
151
  /**
@@ -133,8 +153,11 @@ class Lockstep {
133
153
  * The other axes in the lockstep group maintain their offsets throughout movement.
134
154
  * @param velocity Movement velocity.
135
155
  * @param unit Units of velocity.
156
+ * @param acceleration Movement acceleration.
157
+ * Default value of 0 indicates that the accel setting is used instead.
158
+ * @param accelerationUnit Units of acceleration.
136
159
  */
137
- async moveVelocity(velocity, unit = units_1.Units.NATIVE) {
160
+ async moveVelocity(velocity, unit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
138
161
  const request = new gateway.LockstepMoveRequest();
139
162
  request.setInterfaceId(this.device.connection.interfaceId);
140
163
  request.setDevice(this.device.deviceAddress);
@@ -142,6 +165,8 @@ class Lockstep {
142
165
  request.setType(gateway.LockstepMoveRequest.MoveType.VEL);
143
166
  request.setArg(velocity);
144
167
  request.setUnit(unit);
168
+ request.setAcceleration(acceleration);
169
+ request.setAccelerationUnit(accelerationUnit);
145
170
  await gateway.callAsync('device/lockstep_move', request);
146
171
  }
147
172
  /**
@@ -149,14 +174,24 @@ class Lockstep {
149
174
  * The axes in the lockstep group maintain their offsets throughout movement.
150
175
  * Respects lim.max for all axes in the group.
151
176
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
177
+ * @param velocity Movement velocity.
178
+ * Default value of 0 indicates that the maxspeed setting is used instead.
179
+ * @param velocityUnit Units of velocity.
180
+ * @param acceleration Movement acceleration.
181
+ * Default value of 0 indicates that the accel setting is used instead.
182
+ * @param accelerationUnit Units of acceleration.
152
183
  */
153
- async moveMax(waitUntilIdle = true) {
184
+ async moveMax(waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
154
185
  const request = new gateway.LockstepMoveRequest();
155
186
  request.setInterfaceId(this.device.connection.interfaceId);
156
187
  request.setDevice(this.device.deviceAddress);
157
188
  request.setLockstepGroupId(this.lockstepGroupId);
158
189
  request.setType(gateway.LockstepMoveRequest.MoveType.MAX);
159
190
  request.setWaitUntilIdle(waitUntilIdle);
191
+ request.setVelocity(velocity);
192
+ request.setVelocityUnit(velocityUnit);
193
+ request.setAcceleration(acceleration);
194
+ request.setAccelerationUnit(accelerationUnit);
160
195
  await gateway.callAsync('device/lockstep_move', request);
161
196
  }
162
197
  /**
@@ -164,14 +199,24 @@ class Lockstep {
164
199
  * The axes in the lockstep group maintain their offsets throughout movement.
165
200
  * Respects lim.min for all axes in the group.
166
201
  * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
202
+ * @param velocity Movement velocity.
203
+ * Default value of 0 indicates that the maxspeed setting is used instead.
204
+ * @param velocityUnit Units of velocity.
205
+ * @param acceleration Movement acceleration.
206
+ * Default value of 0 indicates that the accel setting is used instead.
207
+ * @param accelerationUnit Units of acceleration.
167
208
  */
168
- async moveMin(waitUntilIdle = true) {
209
+ async moveMin(waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
169
210
  const request = new gateway.LockstepMoveRequest();
170
211
  request.setInterfaceId(this.device.connection.interfaceId);
171
212
  request.setDevice(this.device.deviceAddress);
172
213
  request.setLockstepGroupId(this.lockstepGroupId);
173
214
  request.setType(gateway.LockstepMoveRequest.MoveType.MIN);
174
215
  request.setWaitUntilIdle(waitUntilIdle);
216
+ request.setVelocity(velocity);
217
+ request.setVelocityUnit(velocityUnit);
218
+ request.setAcceleration(acceleration);
219
+ request.setAccelerationUnit(accelerationUnit);
175
220
  await gateway.callAsync('device/lockstep_move', request);
176
221
  }
177
222
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAmF;AACnF,oDAAsC;AACtC,mDAA+C;AAE/C;;;GAGG;AACH,MAAa,QAAQ;IAiBnB,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAnBD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAQD;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAEjB,MAAM,OAAO,GAAG,IAAI,OA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uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA7UD,4BA6UC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.LockstepEnableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request = new gateway.LockstepDisableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group movement. Decelerates until zero speed.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param unit Units of velocity.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveMax(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveMin(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops moving.\n * @param throwErrorOnFault Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n throwErrorOnFault: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @return True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.LockstepIsBusyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepIsBusyResponse>(\n 'device/lockstep_is_busy',\n request,\n gateway.LockstepIsBusyResponse);\n return response.getIsBusy();\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @return LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request = new gateway.LockstepGetAxesRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxesResponse>(\n 'device/lockstep_get_axes',\n request,\n gateway.LockstepGetAxesResponse);\n return LockstepAxes.fromProtobuf(response.getAxes()!.toObject());\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @return Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request = new gateway.LockstepGetAxisNumbersRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n gateway.LockstepGetAxisNumbersResponse);\n return response.getAxesList();\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetOffsetsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetOffsetsResponse>(\n 'device/lockstep_get_offsets',\n request,\n gateway.LockstepGetOffsetsResponse);\n return response.getOffsetsList();\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetTwistsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetTwistsResponse>(\n 'device/lockstep_get_twists',\n request,\n gateway.LockstepGetTwistsResponse);\n return response.getTwistsList();\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @return True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request = new gateway.LockstepIsEnabledRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepIsEnabledResponse>(\n 'device/lockstep_is_enabled',\n request,\n gateway.LockstepIsEnabledResponse);\n return response.getIsEnabled();\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @return String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request = new gateway.LockstepToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = gateway.callSync<gateway.LockstepToStringResponse>(\n 'device/lockstep_to_string',\n request,\n gateway.LockstepToStringResponse);\n return response.getToStr();\n }\n}\n"]}
1
+ {"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAsH;AACtH,oDAAsC;AACtC,mDAA+C;AAE/C;;;GAGG;AACH,MAAa,QAAQ;IAiBnB,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAnBD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAQD;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAEjB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;QACpD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WA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,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA5YD,4BA4YC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.LockstepEnableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request = new gateway.LockstepDisableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group movement. Decelerates until zero speed.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param unit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveMax(\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveMin(\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops moving.\n * @param throwErrorOnFault Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n throwErrorOnFault: boolean = true\n ): Promise<void> {\n const request = new gateway.LockstepWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @return True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.LockstepIsBusyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepIsBusyResponse>(\n 'device/lockstep_is_busy',\n request,\n gateway.LockstepIsBusyResponse);\n return response.getIsBusy();\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @return LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request = new gateway.LockstepGetAxesRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxesResponse>(\n 'device/lockstep_get_axes',\n request,\n gateway.LockstepGetAxesResponse);\n return LockstepAxes.fromProtobuf(response.getAxes()!.toObject());\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @return Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request = new gateway.LockstepGetAxisNumbersRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n gateway.LockstepGetAxisNumbersResponse);\n return response.getAxesList();\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetOffsetsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetOffsetsResponse>(\n 'device/lockstep_get_offsets',\n request,\n gateway.LockstepGetOffsetsResponse);\n return response.getOffsetsList();\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetTwistsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetTwistsResponse>(\n 'device/lockstep_get_twists',\n request,\n gateway.LockstepGetTwistsResponse);\n return response.getTwistsList();\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @return True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request = new gateway.LockstepIsEnabledRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepIsEnabledResponse>(\n 'device/lockstep_is_enabled',\n request,\n gateway.LockstepIsEnabledResponse);\n return response.getIsEnabled();\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @return String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request = new gateway.LockstepToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = gateway.callSync<gateway.LockstepToStringResponse>(\n 'device/lockstep_to_string',\n request,\n gateway.LockstepToStringResponse);\n return response.getToStr();\n }\n}\n"]}
@@ -74,4 +74,15 @@ export declare class ServoTuner {
74
74
  * @param carriageMass The mass of the carriage in kg. If this value is not set the default carriage mass is used.
75
75
  */
76
76
  setSimpleTuning(paramset: ServoTuningParamset, tuningParams: ServoTuningParam[], loadMass: number, carriageMass?: number): Promise<void>;
77
+ /**
78
+ * Checks if the provided simple tuning is being stored by this paramset.
79
+ * @param paramset The paramset to set tuning for.
80
+ * @param tuningParams The params used to tune this device.
81
+ * To get what parameters are expected, call GetSimpleTuningParamList.
82
+ * All values must be between 0 and 1.
83
+ * @param loadMass The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
84
+ * @param carriageMass The mass of the carriage in kg. If this value is not set the default carriage mass is used.
85
+ * @return True if the provided simple tuning is currently stored in this paramset.
86
+ */
87
+ isUsingSimpleTuning(paramset: ServoTuningParamset, tuningParams: ServoTuningParam[], loadMass: number, carriageMass?: number): Promise<boolean>;
77
88
  }
@@ -175,6 +175,28 @@ class ServoTuner {
175
175
  request.setCarriageMass(carriageMass);
176
176
  await gateway.callAsync('servotuning/set_simple_tuning', request);
177
177
  }
178
+ /**
179
+ * Checks if the provided simple tuning is being stored by this paramset.
180
+ * @param paramset The paramset to set tuning for.
181
+ * @param tuningParams The params used to tune this device.
182
+ * To get what parameters are expected, call GetSimpleTuningParamList.
183
+ * All values must be between 0 and 1.
184
+ * @param loadMass The mass loaded on the stage (excluding the mass of the carriage itself) in kg.
185
+ * @param carriageMass The mass of the carriage in kg. If this value is not set the default carriage mass is used.
186
+ * @return True if the provided simple tuning is currently stored in this paramset.
187
+ */
188
+ async isUsingSimpleTuning(paramset, tuningParams, loadMass, carriageMass = -1.0) {
189
+ const request = new gateway.SetSimpleTuning();
190
+ request.setInterfaceId(this.axis.device.connection.interfaceId);
191
+ request.setDevice(this.axis.device.deviceAddress);
192
+ request.setAxis(this.axis.axisNumber);
193
+ request.setParamset(paramset);
194
+ request.setTuningParamsList(tuningParams.map(servo_tuning_param_1.ServoTuningParam.toProtobuf));
195
+ request.setLoadMass(loadMass);
196
+ request.setCarriageMass(carriageMass);
197
+ const response = await gateway.callAsync('servotuning/is_using_simple_tuning', request, gateway.SimpleTuningIsInUse);
198
+ return response.getValue();
199
+ }
178
200
  }
179
201
  exports.ServoTuner = ServoTuner;
180
202
  //# sourceMappingURL=servo_tuner.js.map