@zaber/motion 7.4.1 → 7.5.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.
@@ -4,6 +4,7 @@ import { Warnings } from '../ascii/warnings';
4
4
  import { Response } from '../ascii/response';
5
5
  import type { Illuminator } from './illuminator';
6
6
  import { SetStateAxisResponse } from '../ascii';
7
+ import { FirmwareVersion } from '../firmware_version';
7
8
  /**
8
9
  * Use to control a channel (LED lamp) on an illuminator.
9
10
  * Requires at least Firmware 7.09.
@@ -107,9 +108,11 @@ export declare class IlluminatorChannel {
107
108
  * This only covers exceptions that can be determined statically such as mismatches of ID or version,
108
109
  * the process of applying the state can still fail when running.
109
110
  * @param state The state object to check against.
111
+ * @param options.firmwareVersion The firmware version of the device to apply the state to.
112
+ * Use this to ensure the state will still be compatible after an update.
110
113
  * @returns An explanation of why this state cannot be set to this channel.
111
114
  */
112
- canSetState(state: string): Promise<string | null>;
115
+ canSetState(state: string, options?: IlluminatorChannel.CanSetStateOptions): Promise<string | null>;
113
116
  /**
114
117
  * Returns a string that represents the channel.
115
118
  * @returns A string that represents the channel.
@@ -139,6 +142,13 @@ declare namespace IlluminatorChannel {
139
142
  */
140
143
  timeout?: number;
141
144
  }
145
+ interface CanSetStateOptions {
146
+ /**
147
+ * The firmware version of the device to apply the state to.
148
+ * Use this to ensure the state will still be compatible after an update.
149
+ */
150
+ firmwareVersion?: FirmwareVersion;
151
+ }
142
152
  }
143
153
  export {};
144
154
  //# sourceMappingURL=illuminator_channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"illuminator_channel.d.ts","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,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AO,CAAC,MAAM,CAAC;IAkBxC;;;;OAIG;IACU,QAAQ,CACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC;IAmBhC;;;;;;;;OAQG;IACU,WAAW,CACtB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAAkB,CAAC,kBAAuB,GAClD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAuBzB;;;OAGG;IACI,QAAQ,IAAI,MAAM;CAkB1B;AAED,kBAAU,kBAAkB,CAAC;IAC3B,UAAiB,qBAAqB;QAClC;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kBAAkB;QAC/B;;;WAGG;QACH,eAAe,CAAC,EAAE,eAAe,CAAC;KACrC;CACF"}
@@ -289,16 +289,20 @@ class IlluminatorChannel {
289
289
  * This only covers exceptions that can be determined statically such as mismatches of ID or version,
290
290
  * the process of applying the state can still fail when running.
291
291
  * @param state The state object to check against.
292
+ * @param options.firmwareVersion The firmware version of the device to apply the state to.
293
+ * Use this to ensure the state will still be compatible after an update.
292
294
  * @returns An explanation of why this state cannot be set to this channel.
293
295
  */
294
- async canSetState(state) {
296
+ async canSetState(state, options = {}) {
295
297
  var _a;
298
+ const { firmwareVersion, } = options;
296
299
  const request = {
297
300
  ...requests.CanSetStateRequest.DEFAULT,
298
301
  interfaceId: this.illuminator.device.connection.interfaceId,
299
302
  device: this.illuminator.device.deviceAddress,
300
303
  axis: this.channelNumber,
301
304
  state: state,
305
+ firmwareVersion: firmwareVersion,
302
306
  toBinary() {
303
307
  return requests.CanSetStateRequest.toBinary(this);
304
308
  },
@@ -1 +1 @@
1
- {"version":3,"file":"illuminator_channel.js","sour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DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Axis } from '../ascii/axis';\nimport { AxisStorage } from '../ascii/storage';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { Warnings } from '../ascii/warnings';\nimport { Response } from '../ascii/response';\nimport type { Illuminator } from './illuminator';\nimport { SetStateAxisResponse } from '../ascii';\n\n/**\n * Use to control a channel (LED lamp) on an illuminator.\n * Requires at least Firmware 7.09.\n */\nexport class IlluminatorChannel {\n /**\n * Illuminator of this channel.\n */\n public get illuminator(): Illuminator {\n return this._illuminator;\n }\n private _illuminator: Illuminator;\n\n /**\n * The channel number identifies the channel on the illuminator.\n */\n public get channelNumber(): number {\n return this._channelNumber;\n }\n private _channelNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this channel.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this channel.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this channel.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(illuminator: Illuminator, channelNumber: number) {\n this._illuminator = illuminator;\n this._channelNumber = channelNumber;\n this._axis = new Axis(illuminator.device, channelNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(illuminator.device, channelNumber);\n }\n\n /**\n * Turns this channel on.\n */\n public async on(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: true,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel off.\n */\n public async off(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: false,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel on or off.\n * @param on True to turn channel on, false to turn it off.\n */\n public async setOn(\n on: boolean\n ): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: on,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Checks if this channel is on.\n * @returns True if channel is on, false otherwise.\n */\n public async isOn(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'illuminator/is_on',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets channel intensity as a fraction of the maximum flux.\n * @param intensity Fraction of intensity to set (between 0 and 1).\n */\n public async setIntensity(\n intensity: number\n ): Promise<void> {\n const request: requests.ChannelSetIntensity & gateway.Message = {\n ...requests.ChannelSetIntensity.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n intensity: intensity,\n toBinary() {\n return requests.ChannelSetIntensity.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/set_intensity', request);\n }\n\n /**\n * Gets the current intensity of this channel.\n * @returns Current intensity as fraction of maximum flux.\n */\n public async getIntensity(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'illuminator/get_intensity',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this channel.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: IlluminatorChannel.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this channel and expects multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: IlluminatorChannel.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this channel without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current channel state that can be saved and reapplied.\n * @returns A serialization of the current state of the channel.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this channel.\n * @param state The state object to apply to this channel.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this channel.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this channel.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the channel.\n * @returns A string that represents the channel.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n typeOverride: 'Channel',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace IlluminatorChannel {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
1
+ {"version":3,"file":"illuminator_channel.js","sourceRoot":"","sources":["../../../src/microscopy/illuminator_channel.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,sDAAwC;AACxC,wCAAqC;AACrC,8CAA+C;AAC/C,0DAAsD;AACtD,gDAA6C;AAC7C,gDAA6C;AAE7C,oCAAgD;AAGhD;;;GAGG;AACH,MAAa,kBAAkB;IAC7B;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAKD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,WAAwB,EAAE,aAAqB;QACzD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,qBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,GAAG,IAAI,mBAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACn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,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAxXD,gDAwXC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Axis } from '../ascii/axis';\nimport { AxisStorage } from '../ascii/storage';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { Warnings } from '../ascii/warnings';\nimport { Response } from '../ascii/response';\nimport type { Illuminator } from './illuminator';\nimport { SetStateAxisResponse } from '../ascii';\nimport { FirmwareVersion } from '../firmware_version';\n\n/**\n * Use to control a channel (LED lamp) on an illuminator.\n * Requires at least Firmware 7.09.\n */\nexport class IlluminatorChannel {\n /**\n * Illuminator of this channel.\n */\n public get illuminator(): Illuminator {\n return this._illuminator;\n }\n private _illuminator: Illuminator;\n\n /**\n * The channel number identifies the channel on the illuminator.\n */\n public get channelNumber(): number {\n return this._channelNumber;\n }\n private _channelNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this channel.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this channel.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this channel.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(illuminator: Illuminator, channelNumber: number) {\n this._illuminator = illuminator;\n this._channelNumber = channelNumber;\n this._axis = new Axis(illuminator.device, channelNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(illuminator.device, channelNumber);\n }\n\n /**\n * Turns this channel on.\n */\n public async on(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: true,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel off.\n */\n public async off(): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: false,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Turns this channel on or off.\n * @param on True to turn channel on, false to turn it off.\n */\n public async setOn(\n on: boolean\n ): Promise<void> {\n const request: requests.ChannelOn & gateway.Message = {\n ...requests.ChannelOn.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n on: on,\n toBinary() {\n return requests.ChannelOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/on', request);\n }\n\n /**\n * Checks if this channel is on.\n * @returns True if channel is on, false otherwise.\n */\n public async isOn(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'illuminator/is_on',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sets channel intensity as a fraction of the maximum flux.\n * @param intensity Fraction of intensity to set (between 0 and 1).\n */\n public async setIntensity(\n intensity: number\n ): Promise<void> {\n const request: requests.ChannelSetIntensity & gateway.Message = {\n ...requests.ChannelSetIntensity.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n intensity: intensity,\n toBinary() {\n return requests.ChannelSetIntensity.toBinary(this);\n },\n };\n\n await gateway.callAsync('illuminator/set_intensity', request);\n }\n\n /**\n * Gets the current intensity of this channel.\n * @returns Current intensity as fraction of maximum flux.\n */\n public async getIntensity(): Promise<number> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'illuminator/get_intensity',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this channel.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: IlluminatorChannel.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this channel and expects multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: IlluminatorChannel.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this channel without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current channel state that can be saved and reapplied.\n * @returns A serialization of the current state of the channel.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this channel.\n * @param state The state object to apply to this channel.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this channel.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @param options.firmwareVersion The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n * @returns An explanation of why this state cannot be set to this channel.\n */\n public async canSetState(\n state: string,\n options: IlluminatorChannel.CanSetStateOptions = {}\n ): Promise<string | null> {\n const {\n firmwareVersion,\n } = options;\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n state: state,\n firmwareVersion: firmwareVersion,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the channel.\n * @returns A string that represents the channel.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.illuminator.device.connection.interfaceId,\n device: this.illuminator.device.deviceAddress,\n axis: this.channelNumber,\n typeOverride: 'Channel',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace IlluminatorChannel {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface CanSetStateOptions {\n /**\n * The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n */\n firmwareVersion?: FirmwareVersion;\n }\n}\n"]}
@@ -8,6 +8,7 @@ import { ProcessControllerMode } from './process_controller_mode';
8
8
  import { ProcessControllerSource } from './process_controller_source';
9
9
  import { Measurement } from '../measurement';
10
10
  import { SetStateAxisResponse } from '../ascii';
11
+ import { FirmwareVersion } from '../firmware_version';
11
12
  /**
12
13
  * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.
13
14
  * Requires at least Firmware 7.35.
@@ -137,9 +138,11 @@ export declare class Process {
137
138
  * This only covers exceptions that can be determined statically such as mismatches of ID or version,
138
139
  * the process of applying the state can still fail when running.
139
140
  * @param state The state object to check against.
141
+ * @param options.firmwareVersion The firmware version of the device to apply the state to.
142
+ * Use this to ensure the state will still be compatible after an update.
140
143
  * @returns An explanation of why this state cannot be set to this process.
141
144
  */
142
- canSetState(state: string): Promise<string | null>;
145
+ canSetState(state: string, options?: Process.CanSetStateOptions): Promise<string | null>;
143
146
  /**
144
147
  * Returns a string that represents the process.
145
148
  * @returns A string that represents the process.
@@ -169,6 +172,13 @@ declare namespace Process {
169
172
  */
170
173
  timeout?: number;
171
174
  }
175
+ interface CanSetStateOptions {
176
+ /**
177
+ * The firmware version of the device to apply the state to.
178
+ * Use this to ensure the state will still be compatible after an update.
179
+ */
180
+ firmwareVersion?: FirmwareVersion;
181
+ }
172
182
  }
173
183
  export {};
174
184
  //# sourceMappingURL=process.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,MAAM,EAAS,IAAI,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD;;;GAGG;AACH,qBAAa,OAAO;IAClB;;OAEG;IACH,IAAW,UAAU,IAAI,iBAAiB,CAEzC;IACD,OAAO,CAAC,WAAW,CAAoB;IAEvC;;OAEG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,KAAK,CAAO;IAEpB;;OAEG;IACH,IAAW,QAAQ,IAAI,YAAY,CAElC;IACD,OAAO,CAAC,SAAS,CAAe;IAEhC;;OAEG;IACH,IAAW,OAAO,IAAI,WAAW,CAEhC;IACD,OAAO,CAAC,QAAQ,CAAc;IAE9B;;OAEG;IACH,IAAW,QAAQ,IAAI,QAAQ,CAE9B;IACD,OAAO,CAAC,SAAS,CAAW;gBAEhB,UAAU,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AAc,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,OAAO,CAAC,qBAA0B,GAC1C,OAAO,CAAC,QAAQ,CAAC;IAyBpB;;;;;;;;;OASG;IACU,2BAA2B,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,OAAO,CAAC,kCAAuC,GACvD,OAAO,CAAC,QAAQ,EAAE,CAAC;IAyBtB;;;;OAIG;IACU,wBAAwB,CACnC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAehB;;;OAGG;IACU,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAkBxC;;;;OAIG;IACU,QAAQ,CACnB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,CAAC;IAmBhC;;;;;;;;OAQG;IACU,WAAW,CACtB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,OAAO,CAAC,kBAAuB,GACvC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAuBzB;;;OAGG;IACI,QAAQ,IAAI,MAAM;CAkB1B;AAED,kBAAU,OAAO,CAAC;IAChB,UAAiB,qBAAqB;QAClC;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kCAAkC;QAC/C;;WAEG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB;IACD,UAAiB,kBAAkB;QAC/B;;;WAGG;QACH,eAAe,CAAC,EAAE,eAAe,CAAC;KACrC;CACF"}
@@ -382,16 +382,20 @@ class Process {
382
382
  * This only covers exceptions that can be determined statically such as mismatches of ID or version,
383
383
  * the process of applying the state can still fail when running.
384
384
  * @param state The state object to check against.
385
+ * @param options.firmwareVersion The firmware version of the device to apply the state to.
386
+ * Use this to ensure the state will still be compatible after an update.
385
387
  * @returns An explanation of why this state cannot be set to this process.
386
388
  */
387
- async canSetState(state) {
389
+ async canSetState(state, options = {}) {
388
390
  var _a;
391
+ const { firmwareVersion, } = options;
389
392
  const request = {
390
393
  ...requests.CanSetStateRequest.DEFAULT,
391
394
  interfaceId: this.controller.device.connection.interfaceId,
392
395
  device: this.controller.device.deviceAddress,
393
396
  axis: this.processNumber,
394
397
  state: state,
398
+ firmwareVersion: firmwareVersion,
395
399
  toBinary() {
396
400
  return requests.CanSetStateRequest.toBinary(this);
397
401
  },
@@ -1 +1 @@
1
- {"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,sDAAwC;AACxC,oCAA+C;AAC/C,wCAAqC;AACrC,gDAA6C;AAC7C,0DAAsD;AACtD,8CAA+C;AAC/C,gDAA6C;AAE7C,2EAAsE;AACtE,gDAA6C;AAC7C,oCAAgD;AAEhD;;;GAGG;AACH,MAAa,OAAO;IAClB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAKD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,UAA6B,EAAE,aAAqB;QAC9D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAC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b,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC1D,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa;YAC5C,IAAI,EAAE,IAAI,CAAC,aAAa;YACxB,YAAY,EAAE,SAAS;YACvB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAheD,0BAgeC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { ProcessController } from './process_controller';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Native, Units, Time } from '../units';\nimport { Axis } from '../ascii/axis';\nimport { Response } from '../ascii/response';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { AxisStorage } from '../ascii/storage';\nimport { Warnings } from '../ascii/warnings';\nimport { ProcessControllerMode } from './process_controller_mode';\nimport { ProcessControllerSource } from './process_controller_source';\nimport { Measurement } from '../measurement';\nimport { SetStateAxisResponse } from '../ascii';\n\n/**\n * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.\n * Requires at least Firmware 7.35.\n */\nexport class Process {\n /**\n * Controller for this process.\n */\n public get controller(): ProcessController {\n return this._controller;\n }\n private _controller: ProcessController;\n\n /**\n * The process number identifies the process on the controller.\n */\n public get processNumber(): number {\n return this._processNumber;\n }\n private _processNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this process.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this process.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this process.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(controller: ProcessController, processNumber: number) {\n this._controller = controller;\n this._processNumber = processNumber;\n this._axis = new Axis(controller.device, processNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(controller.device, processNumber);\n }\n\n /**\n * Sets the enabled state of the driver.\n * @param [enabled=true] If true (default) enables drive. If false disables.\n */\n public async enable(\n enabled: boolean = true\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: enabled,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/enable', request);\n }\n\n /**\n * Turns this process on. In manual mode, this supplies voltage; in controlled mode, it starts the control loop.\n * @param [duration=0] How long to leave the process on.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async on(\n duration: number = 0,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n duration: duration,\n unit: unit,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Turns this process off.\n */\n public async off(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Sets the control mode of this process.\n * @param mode Mode to set this process to.\n */\n public async setMode(\n mode: ProcessControllerMode\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n value: mode,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Gets the control mode of this process.\n * @returns Control mode.\n */\n public async getMode(): Promise<ProcessControllerMode> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the source used to control this process.\n * @returns The source providing feedback for this process.\n */\n public async getSource(): Promise<ProcessControllerSource> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ProcessControllerSource>(\n 'process_controller/get_source',\n request,\n ProcessControllerSource.fromBinary);\n return response;\n }\n\n /**\n * Sets the source used to control this process.\n * @param source Sets the source that should provide feedback for this process.\n */\n public async setSource(\n source: ProcessControllerSource\n ): Promise<void> {\n const request: requests.SetProcessControllerSource & gateway.Message = {\n ...requests.SetProcessControllerSource.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n source: source,\n toBinary() {\n return requests.SetProcessControllerSource.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/set_source', request);\n }\n\n /**\n * Gets the current value of the source used to control this process.\n * @returns The current value of this process's controlling source.\n */\n public async getInput(): Promise<Measurement> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Measurement>(\n 'process_controller/get_input',\n request,\n Measurement.fromBinary);\n return response;\n }\n\n /**\n * Creates an H-bridge between this process and its neighbor. This method is only callable on axis 1 and 3.\n */\n public async bridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Breaks the H-bridge between this process and its neighbor, allowing them to be independently controlled.\n * This method is only callable on axis 1 and 3.\n */\n public async unbridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Detects if the given process is in bridging mode.\n * @returns Whether this process is bridged with its neighbor.\n */\n public async isBridge(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'process_controller/is_bridge',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this process' underlying axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Process.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this process and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Process.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this process without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current process state that can be saved and reapplied.\n * @returns A serialization of the current state of the process.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this process.\n * @param state The state object to apply to this process.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this process.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this process.\n */\n public async canSetState(\n state: string\n ): Promise<string | null> {\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the process.\n * @returns A string that represents the process.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n typeOverride: 'Process',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Process {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n}\n"]}
1
+ {"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/product/process.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;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AAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,uBAAuB,EACvB,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;CACF;AAveD,0BAueC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { ProcessController } from './process_controller';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { Native, Units, Time } from '../units';\nimport { Axis } from '../ascii/axis';\nimport { Response } from '../ascii/response';\nimport { AxisSettings } from '../ascii/axis_settings';\nimport { AxisStorage } from '../ascii/storage';\nimport { Warnings } from '../ascii/warnings';\nimport { ProcessControllerMode } from './process_controller_mode';\nimport { ProcessControllerSource } from './process_controller_source';\nimport { Measurement } from '../measurement';\nimport { SetStateAxisResponse } from '../ascii';\nimport { FirmwareVersion } from '../firmware_version';\n\n/**\n * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.\n * Requires at least Firmware 7.35.\n */\nexport class Process {\n /**\n * Controller for this process.\n */\n public get controller(): ProcessController {\n return this._controller;\n }\n private _controller: ProcessController;\n\n /**\n * The process number identifies the process on the controller.\n */\n public get processNumber(): number {\n return this._processNumber;\n }\n private _processNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this process.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this process.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this process.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(controller: ProcessController, processNumber: number) {\n this._controller = controller;\n this._processNumber = processNumber;\n this._axis = new Axis(controller.device, processNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(controller.device, processNumber);\n }\n\n /**\n * Sets the enabled state of the driver.\n * @param [enabled=true] If true (default) enables drive. If false disables.\n */\n public async enable(\n enabled: boolean = true\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: enabled,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/enable', request);\n }\n\n /**\n * Turns this process on. In manual mode, this supplies voltage; in controlled mode, it starts the control loop.\n * @param [duration=0] How long to leave the process on.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async on(\n duration: number = 0,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n duration: duration,\n unit: unit,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Turns this process off.\n */\n public async off(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Sets the control mode of this process.\n * @param mode Mode to set this process to.\n */\n public async setMode(\n mode: ProcessControllerMode\n ): Promise<void> {\n const request: requests.DeviceSetSettingRequest & gateway.Message = {\n ...requests.DeviceSetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n value: mode,\n toBinary() {\n return requests.DeviceSetSettingRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Gets the control mode of this process.\n * @returns Control mode.\n */\n public async getMode(): Promise<ProcessControllerMode> {\n const request: requests.DeviceGetSettingRequest & gateway.Message = {\n ...requests.DeviceGetSettingRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n setting: 'process.control.mode',\n toBinary() {\n return requests.DeviceGetSettingRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.DoubleResponse>(\n 'device/get_setting',\n request,\n requests.DoubleResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Gets the source used to control this process.\n * @returns The source providing feedback for this process.\n */\n public async getSource(): Promise<ProcessControllerSource> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<ProcessControllerSource>(\n 'process_controller/get_source',\n request,\n ProcessControllerSource.fromBinary);\n return response;\n }\n\n /**\n * Sets the source used to control this process.\n * @param source Sets the source that should provide feedback for this process.\n */\n public async setSource(\n source: ProcessControllerSource\n ): Promise<void> {\n const request: requests.SetProcessControllerSource & gateway.Message = {\n ...requests.SetProcessControllerSource.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n source: source,\n toBinary() {\n return requests.SetProcessControllerSource.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/set_source', request);\n }\n\n /**\n * Gets the current value of the source used to control this process.\n * @returns The current value of this process's controlling source.\n */\n public async getInput(): Promise<Measurement> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Measurement>(\n 'process_controller/get_input',\n request,\n Measurement.fromBinary);\n return response;\n }\n\n /**\n * Creates an H-bridge between this process and its neighbor. This method is only callable on axis 1 and 3.\n */\n public async bridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: true,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Breaks the H-bridge between this process and its neighbor, allowing them to be independently controlled.\n * This method is only callable on axis 1 and 3.\n */\n public async unbridge(): Promise<void> {\n const request: requests.ProcessOn & gateway.Message = {\n ...requests.ProcessOn.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n on: false,\n toBinary() {\n return requests.ProcessOn.toBinary(this);\n },\n };\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Detects if the given process is in bridging mode.\n * @returns Whether this process is bridged with its neighbor.\n */\n public async isBridge(): Promise<boolean> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.BoolResponse>(\n 'process_controller/is_bridge',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Sends a generic ASCII command to this process' underlying axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Process.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<Response>(\n 'interface/generic_command',\n request,\n Response.fromBinary);\n return response;\n }\n\n /**\n * Sends a generic ASCII command to this process and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Process.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n checkErrors: checkErrors,\n timeout: timeout,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n requests.GenericCommandResponseCollection.fromBinary);\n return response.responses;\n }\n\n /**\n * Sends a generic ASCII command to this process without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request: requests.GenericCommandRequest & gateway.Message = {\n ...requests.GenericCommandRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n command: command,\n toBinary() {\n return requests.GenericCommandRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current process state that can be saved and reapplied.\n * @returns A serialization of the current state of the process.\n */\n public async getState(): Promise<string> {\n const request: requests.AxisEmptyRequest & gateway.Message = {\n ...requests.AxisEmptyRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n toBinary() {\n return requests.AxisEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StringResponse>(\n 'device/get_state',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Applies a saved state to this process.\n * @param state The state object to apply to this process.\n * @returns Reports of any issues that were handled, but caused the state to not be exactly restored.\n */\n public async setState(\n state: string\n ): Promise<SetStateAxisResponse> {\n const request: requests.SetStateRequest & gateway.Message = {\n ...requests.SetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n toBinary() {\n return requests.SetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<SetStateAxisResponse>(\n 'device/set_axis_state',\n request,\n SetStateAxisResponse.fromBinary);\n return response;\n }\n\n /**\n * Checks if a state can be applied to this process.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @param options.firmwareVersion The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n * @returns An explanation of why this state cannot be set to this process.\n */\n public async canSetState(\n state: string,\n options: Process.CanSetStateOptions = {}\n ): Promise<string | null> {\n const {\n firmwareVersion,\n } = options;\n const request: requests.CanSetStateRequest & gateway.Message = {\n ...requests.CanSetStateRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n state: state,\n firmwareVersion: firmwareVersion,\n toBinary() {\n return requests.CanSetStateRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n requests.CanSetStateAxisResponse.fromBinary);\n return response.error ?? null;\n }\n\n /**\n * Returns a string that represents the process.\n * @returns A string that represents the process.\n */\n public toString(): string {\n const request: requests.AxisToStringRequest & gateway.Message = {\n ...requests.AxisToStringRequest.DEFAULT,\n interfaceId: this.controller.device.connection.interfaceId,\n device: this.controller.device.deviceAddress,\n axis: this.processNumber,\n typeOverride: 'Process',\n toBinary() {\n return requests.AxisToStringRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'device/axis_to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n}\n\nnamespace Process {\n export interface GenericCommandOptions {\n /**\n * Controls whether to throw an exception when the device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n /**\n * Controls whether to throw an exception when a device rejects the command.\n */\n checkErrors?: boolean;\n /**\n * The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n */\n timeout?: number;\n }\n export interface CanSetStateOptions {\n /**\n * The firmware version of the device to apply the state to.\n * Use this to ensure the state will still be compatible after an update.\n */\n firmwareVersion?: FirmwareVersion;\n }\n}\n"]}
@@ -1,8 +1,10 @@
1
+ import { FirmwareVersion } from '../firmware_version';
1
2
  export interface CanSetStateRequest {
2
3
  interfaceId: number;
3
4
  device: number;
4
5
  axis: number;
5
6
  state: string;
7
+ firmwareVersion?: (FirmwareVersion | null);
6
8
  }
7
9
  export declare const CanSetStateRequest: {
8
10
  fromBinary: (buffer: Uint8Array) => CanSetStateRequest;
@@ -1 +1 @@
1
- {"version":3,"file":"can_set_state_request.d.ts","sourceRoot":"","sources":["../../../src/requests/can_set_state_request.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;CAEf;AAED,eAAO,MAAM,kBAAkB;yBACR,UAAU,KAAG,kBAAkB;sBAClC,kBAAkB,KAAG,UAAU;;sBAO/B,kBAAkB,KAAG,kBAAkB;CAU1D,CAAC"}
1
+ {"version":3,"file":"can_set_state_request.d.ts","sourceRoot":"","sources":["../../../src/requests/can_set_state_request.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,eAAe,CAAC,EAAE,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;CAE5C;AAED,eAAO,MAAM,kBAAkB;yBACR,UAAU,KAAG,kBAAkB;sBAClC,kBAAkB,KAAG,UAAU;;sBAQ/B,kBAAkB,KAAG,kBAAkB;CAW1D,CAAC"}
@@ -4,6 +4,7 @@ exports.CanSetStateRequest = void 0;
4
4
  /* This file is generated. Do not modify by hand. */
5
5
  const bson_1 = require("bson");
6
6
  const sanitizer_1 = require("../gateway/sanitizer");
7
+ const firmware_version_1 = require("../firmware_version");
7
8
  exports.CanSetStateRequest = {
8
9
  fromBinary: (buffer) => bson_1.BSON.deserialize(buffer),
9
10
  toBinary: (value) => bson_1.BSON.serialize(exports.CanSetStateRequest.sanitize(value)),
@@ -12,6 +13,7 @@ exports.CanSetStateRequest = {
12
13
  device: 0,
13
14
  axis: 0,
14
15
  state: '',
16
+ firmwareVersion: null,
15
17
  }),
16
18
  sanitize: (value) => {
17
19
  if (value == null) {
@@ -25,6 +27,7 @@ exports.CanSetStateRequest = {
25
27
  device: sanitizer_1.sanitizer.sanitizeInt(value.device, 'device'),
26
28
  axis: sanitizer_1.sanitizer.sanitizeInt(value.axis, 'axis'),
27
29
  state: sanitizer_1.sanitizer.sanitizeString(value.state, 'state'),
30
+ firmwareVersion: value.firmwareVersion != null ? firmware_version_1.FirmwareVersion.sanitize(value.firmwareVersion) : null,
28
31
  };
29
32
  },
30
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"can_set_state_request.js","sourceRoot":"","sources":["../../../src/requests/can_set_state_request.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAapC,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,CAAC,MAAkB,EAAsB,EAAE,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,CAAuB;IACtG,QAAQ,EAAE,CAAC,KAAyB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,0BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvG,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,EAAE;KACV,CAAiC;IAClC,QAAQ,EAAE,CAAC,KAAyB,EAAsB,EAAE;QAC1D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,+DAA+D,CAAC,CAAA;QAAC,CAAC;QAC3G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,8CAA8C,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QACrH,OAAO;YACL,WAAW,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC;YACpE,MAAM,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC;YACrD,IAAI,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;YAC/C,KAAK,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC;SACtD,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\n\nexport interface CanSetStateRequest {\n interfaceId: number;\n\n device: number;\n\n axis: number;\n\n state: string;\n\n}\n\nexport const CanSetStateRequest = {\n fromBinary: (buffer: Uint8Array): CanSetStateRequest => BSON.deserialize(buffer) as CanSetStateRequest,\n toBinary: (value: CanSetStateRequest): Uint8Array => BSON.serialize(CanSetStateRequest.sanitize(value)),\n DEFAULT: Object.freeze({\n interfaceId: 0,\n device: 0,\n axis: 0,\n state: '',\n }) as Readonly<CanSetStateRequest>,\n sanitize: (value: CanSetStateRequest): CanSetStateRequest => {\n if (value == null) { throw new TypeError('Expected CanSetStateRequest object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected CanSetStateRequest object but got ${typeof value}.`) }\n return {\n interfaceId: sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),\n device: sanitizer.sanitizeInt(value.device, 'device'),\n axis: sanitizer.sanitizeInt(value.axis, 'axis'),\n state: sanitizer.sanitizeString(value.state, 'state'),\n };\n },\n};\n"]}
1
+ {"version":3,"file":"can_set_state_request.js","sourceRoot":"","sources":["../../../src/requests/can_set_state_request.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,0DAAsD;AAezC,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,CAAC,MAAkB,EAAsB,EAAE,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,CAAuB;IACtG,QAAQ,EAAE,CAAC,KAAyB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,0BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvG,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,EAAE;QACT,eAAe,EAAE,IAAI;KACtB,CAAiC;IAClC,QAAQ,EAAE,CAAC,KAAyB,EAAsB,EAAE;QAC1D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,+DAA+D,CAAC,CAAA;QAAC,CAAC;QAC3G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,8CAA8C,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QACrH,OAAO;YACL,WAAW,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC;YACpE,MAAM,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC;YACrD,IAAI,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;YAC/C,KAAK,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC;YACrD,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,kCAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI;SACxG,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { FirmwareVersion } from '../firmware_version';\n\nexport interface CanSetStateRequest {\n interfaceId: number;\n\n device: number;\n\n axis: number;\n\n state: string;\n\n firmwareVersion?: (FirmwareVersion | null);\n\n}\n\nexport const CanSetStateRequest = {\n fromBinary: (buffer: Uint8Array): CanSetStateRequest => BSON.deserialize(buffer) as CanSetStateRequest,\n toBinary: (value: CanSetStateRequest): Uint8Array => BSON.serialize(CanSetStateRequest.sanitize(value)),\n DEFAULT: Object.freeze({\n interfaceId: 0,\n device: 0,\n axis: 0,\n state: '',\n firmwareVersion: null,\n }) as Readonly<CanSetStateRequest>,\n sanitize: (value: CanSetStateRequest): CanSetStateRequest => {\n if (value == null) { throw new TypeError('Expected CanSetStateRequest object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected CanSetStateRequest object but got ${typeof value}.`) }\n return {\n interfaceId: sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),\n device: sanitizer.sanitizeInt(value.device, 'device'),\n axis: sanitizer.sanitizeInt(value.axis, 'axis'),\n state: sanitizer.sanitizeString(value.state, 'state'),\n firmwareVersion: value.firmwareVersion != null ? FirmwareVersion.sanitize(value.firmwareVersion) : null,\n };\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaber/motion",
3
- "version": "7.4.1",
3
+ "version": "7.5.0",
4
4
  "description": "Zaber Motion Library is a multi-platform library used to operate Zaber devices.",
5
5
  "keywords": [],
6
6
  "main": "dist/lib/index.js",