@zaber/motion 5.1.4 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/axis.d.ts +4 -0
- package/dist/lib/ascii/axis.js +6 -0
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_identity.d.ts +4 -0
- package/dist/lib/ascii/axis_identity.js +1 -0
- package/dist/lib/ascii/axis_identity.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +1 -0
- package/dist/lib/ascii/device.js +1 -0
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_io.d.ts +54 -0
- package/dist/lib/ascii/device_io.js +120 -4
- package/dist/lib/ascii/device_io.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +1 -0
- package/dist/lib/ascii/index.js +4 -2
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/io_port_label.d.ts +21 -0
- package/dist/lib/ascii/io_port_label.js +19 -0
- package/dist/lib/ascii/io_port_label.js.map +1 -0
- package/dist/lib/ascii_ns.d.ts +2 -0
- package/dist/lib/ascii_ns.js +1 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/microscopy/microscope.d.ts +9 -2
- package/dist/lib/microscopy/microscope.js +6 -3
- package/dist/lib/microscopy/microscope.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +262 -14
- package/dist/lib/protobufs/main_pb.js +2178 -264
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +1 -3
|
@@ -29,6 +29,7 @@ exports.DeviceIO = void 0;
|
|
|
29
29
|
const gateway = __importStar(require("../gateway"));
|
|
30
30
|
const units_1 = require("../units");
|
|
31
31
|
const device_io_info_1 = require("./device_io_info");
|
|
32
|
+
const io_port_label_1 = require("./io_port_label");
|
|
32
33
|
/**
|
|
33
34
|
* Class providing access to the I/O channels of the device.
|
|
34
35
|
*/
|
|
@@ -180,11 +181,27 @@ class DeviceIO {
|
|
|
180
181
|
* Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
|
|
181
182
|
*/
|
|
182
183
|
async cancelAllDigitalOutputsSchedule(channels = []) {
|
|
183
|
-
const request = new gateway.
|
|
184
|
+
const request = new gateway.DeviceCancelAllOutputsScheduleRequest();
|
|
184
185
|
request.setInterfaceId(this._device.connection.interfaceId);
|
|
185
186
|
request.setDevice(this._device.deviceAddress);
|
|
187
|
+
request.setAnalog(false);
|
|
186
188
|
request.setChannelsList(channels);
|
|
187
|
-
await gateway.callAsync('device/
|
|
189
|
+
await gateway.callAsync('device/cancel_all_outputs_schedule', request);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Cancel all scheduled analog output actions.
|
|
193
|
+
* Requires at least Firmware 7.38.
|
|
194
|
+
* @param [channels=[]] Optionally specify which channels to cancel.
|
|
195
|
+
* Array length must be empty or equal to the number of channels on device.
|
|
196
|
+
* Specifying "True" for a channel will cancel the scheduled analog output value for that channel.
|
|
197
|
+
*/
|
|
198
|
+
async cancelAllAnalogOutputsSchedule(channels = []) {
|
|
199
|
+
const request = new gateway.DeviceCancelAllOutputsScheduleRequest();
|
|
200
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
201
|
+
request.setDevice(this._device.deviceAddress);
|
|
202
|
+
request.setAnalog(true);
|
|
203
|
+
request.setChannelsList(channels);
|
|
204
|
+
await gateway.callAsync('device/cancel_all_outputs_schedule', request);
|
|
188
205
|
}
|
|
189
206
|
/**
|
|
190
207
|
* Sets values for all analog output channels.
|
|
@@ -197,6 +214,27 @@ class DeviceIO {
|
|
|
197
214
|
request.setValuesList(values);
|
|
198
215
|
await gateway.callAsync('device/set_all_analog_outputs', request);
|
|
199
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Sets current and future values for all analog output channels.
|
|
219
|
+
* Requires at least Firmware 7.38.
|
|
220
|
+
* @param values Voltage values to set the output channels to immediately.
|
|
221
|
+
* @param futureValues Voltage values to set the output channels to in the future.
|
|
222
|
+
* @param delay Delay between setting current values and setting future values.
|
|
223
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
224
|
+
*/
|
|
225
|
+
async setAllAnalogOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
|
|
226
|
+
if (delay <= 0) {
|
|
227
|
+
throw new TypeError('Delay must be a positive value.');
|
|
228
|
+
}
|
|
229
|
+
const request = new gateway.DeviceSetAllAnalogOutputsScheduleRequest();
|
|
230
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
231
|
+
request.setDevice(this._device.deviceAddress);
|
|
232
|
+
request.setValuesList(values);
|
|
233
|
+
request.setFutureValuesList(futureValues);
|
|
234
|
+
request.setDelay(delay);
|
|
235
|
+
request.setUnit(unit);
|
|
236
|
+
await gateway.callAsync('device/set_all_analog_outputs_schedule', request);
|
|
237
|
+
}
|
|
200
238
|
/**
|
|
201
239
|
* Sets value for the specified digital output channel.
|
|
202
240
|
* @param channelNumber Channel number starting at 1.
|
|
@@ -239,11 +277,25 @@ class DeviceIO {
|
|
|
239
277
|
* @param channelNumber Channel number starting at 1.
|
|
240
278
|
*/
|
|
241
279
|
async cancelDigitalOutputSchedule(channelNumber) {
|
|
242
|
-
const request = new gateway.
|
|
280
|
+
const request = new gateway.DeviceCancelOutputScheduleRequest();
|
|
281
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
282
|
+
request.setDevice(this._device.deviceAddress);
|
|
283
|
+
request.setAnalog(false);
|
|
284
|
+
request.setChannelNumber(channelNumber);
|
|
285
|
+
await gateway.callAsync('device/cancel_output_schedule', request);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Cancels a scheduled analog output value.
|
|
289
|
+
* Requires at least Firmware 7.38.
|
|
290
|
+
* @param channelNumber Channel number starting at 1.
|
|
291
|
+
*/
|
|
292
|
+
async cancelAnalogOutputSchedule(channelNumber) {
|
|
293
|
+
const request = new gateway.DeviceCancelOutputScheduleRequest();
|
|
243
294
|
request.setInterfaceId(this._device.connection.interfaceId);
|
|
244
295
|
request.setDevice(this._device.deviceAddress);
|
|
296
|
+
request.setAnalog(true);
|
|
245
297
|
request.setChannelNumber(channelNumber);
|
|
246
|
-
await gateway.callAsync('device/
|
|
298
|
+
await gateway.callAsync('device/cancel_output_schedule', request);
|
|
247
299
|
}
|
|
248
300
|
/**
|
|
249
301
|
* Sets value for the specified analog output channel.
|
|
@@ -258,6 +310,29 @@ class DeviceIO {
|
|
|
258
310
|
request.setValue(value);
|
|
259
311
|
await gateway.callAsync('device/set_analog_output', request);
|
|
260
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Sets current and future value for the specified analog output channel.
|
|
315
|
+
* Requires at least Firmware 7.38.
|
|
316
|
+
* @param channelNumber Channel number starting at 1.
|
|
317
|
+
* @param value Value to set the output channel voltage to immediately.
|
|
318
|
+
* @param futureValue Value to set the output channel voltage to in the future.
|
|
319
|
+
* @param delay Delay between setting current value and setting future value.
|
|
320
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
321
|
+
*/
|
|
322
|
+
async setAnalogOutputSchedule(channelNumber, value, futureValue, delay, unit = units_1.Units.NATIVE) {
|
|
323
|
+
if (delay <= 0) {
|
|
324
|
+
throw new TypeError('Delay must be a positive value.');
|
|
325
|
+
}
|
|
326
|
+
const request = new gateway.DeviceSetAnalogOutputScheduleRequest();
|
|
327
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
328
|
+
request.setDevice(this._device.deviceAddress);
|
|
329
|
+
request.setChannelNumber(channelNumber);
|
|
330
|
+
request.setValue(value);
|
|
331
|
+
request.setFutureValue(futureValue);
|
|
332
|
+
request.setDelay(delay);
|
|
333
|
+
request.setUnit(unit);
|
|
334
|
+
await gateway.callAsync('device/set_analog_output_schedule', request);
|
|
335
|
+
}
|
|
261
336
|
/**
|
|
262
337
|
* Returns the number of I/O channels the device has.
|
|
263
338
|
* @returns An object containing the number of I/O channels the device has.
|
|
@@ -269,6 +344,47 @@ class DeviceIO {
|
|
|
269
344
|
const response = await gateway.callAsync('device/get_io_info', request, gateway.DeviceIOInfo);
|
|
270
345
|
return device_io_info_1.DeviceIOInfo.fromProtobuf(response.toObject());
|
|
271
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* Sets the label of the specified channel.
|
|
349
|
+
* @param portType The type of channel to set the label of.
|
|
350
|
+
* @param channelNumber Channel number starting at 1.
|
|
351
|
+
* @param label The label to set for the specified channel.
|
|
352
|
+
*/
|
|
353
|
+
async setLabel(portType, channelNumber, label) {
|
|
354
|
+
const request = new gateway.SetIoPortLabel();
|
|
355
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
356
|
+
request.setDevice(this._device.deviceAddress);
|
|
357
|
+
request.setPortType(portType);
|
|
358
|
+
request.setChannelNumber(channelNumber);
|
|
359
|
+
request.setLabel(label);
|
|
360
|
+
await gateway.callAsync('device/set_io_label', request);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Returns the label of the specified channel.
|
|
364
|
+
* @param portType The type of channel to get the label of.
|
|
365
|
+
* @param channelNumber Channel number starting at 1.
|
|
366
|
+
* @returns The label of the specified channel.
|
|
367
|
+
*/
|
|
368
|
+
async getLabel(portType, channelNumber) {
|
|
369
|
+
const request = new gateway.GetIoPortLabel();
|
|
370
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
371
|
+
request.setDevice(this._device.deviceAddress);
|
|
372
|
+
request.setPortType(portType);
|
|
373
|
+
request.setChannelNumber(channelNumber);
|
|
374
|
+
const response = await gateway.callAsync('device/get_io_label', request, gateway.StringResponse);
|
|
375
|
+
return response.getValue();
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Returns every label assigned to an IO port on this device.
|
|
379
|
+
* @returns The labels set for this device's IO.
|
|
380
|
+
*/
|
|
381
|
+
async getAllLabels() {
|
|
382
|
+
const request = new gateway.DeviceEmptyRequest();
|
|
383
|
+
request.setInterfaceId(this._device.connection.interfaceId);
|
|
384
|
+
request.setDevice(this._device.deviceAddress);
|
|
385
|
+
const response = await gateway.callAsync('device/get_all_io_labels', request, gateway.GetAllIoPortLabelsResponse);
|
|
386
|
+
return response.getLabelsList().map(a => io_port_label_1.IoPortLabel.fromProtobuf(a.toObject()));
|
|
387
|
+
}
|
|
272
388
|
}
|
|
273
389
|
exports.DeviceIO = DeviceIO;
|
|
274
390
|
//# sourceMappingURL=device_io.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device_io.js","sourceRoot":"","sources":["../../../src/ascii/device_io.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,oCAA+C;AAC/C,qDAAgD;AAGhD;;GAEG;AACH,MAAa,QAAQ;IAGnB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,mBAAmB;QAC9B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB;QAC/B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAA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,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,OAAO,CAAC,SAAS,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,eAAe;QAC1B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,oBAAoB,EACpB,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,6BAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC;CACF;AA7UD,4BA6UC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { Native, Units, Time } from '../units';\nimport { DeviceIOInfo } from './device_io_info';\nimport { DigitalOutputAction } from './digital_output_action';\n\n/**\n * Class providing access to the I/O channels of the device.\n */\nexport class DeviceIO {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Returns the current values of all digital input channels.\n * @returns True if voltage is present on the input channel and false otherwise.\n */\n public async getAllDigitalInputs(): Promise<boolean[]> {\n const request = new gateway.DeviceGetAllDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('di');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllDigitalIOResponse>(\n 'device/get_all_digital_io',\n request,\n gateway.DeviceGetAllDigitalIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all digital output channels.\n * @returns True if the output channel is conducting and false otherwise.\n */\n public async getAllDigitalOutputs(): Promise<boolean[]> {\n const request = new gateway.DeviceGetAllDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('do');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllDigitalIOResponse>(\n 'device/get_all_digital_io',\n request,\n gateway.DeviceGetAllDigitalIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all analog input channels.\n * @returns Measurements of the voltage present on the input channels.\n */\n public async getAllAnalogInputs(): Promise<number[]> {\n const request = new gateway.DeviceGetAllAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ai');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllAnalogIOResponse>(\n 'device/get_all_analog_io',\n request,\n gateway.DeviceGetAllAnalogIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all analog output channels.\n * @returns Measurements of voltage that the output channels are conducting.\n */\n public async getAllAnalogOutputs(): Promise<number[]> {\n const request = new gateway.DeviceGetAllAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ao');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllAnalogIOResponse>(\n 'device/get_all_analog_io',\n request,\n gateway.DeviceGetAllAnalogIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current value of the specified digital input channel.\n * @param channelNumber Channel number starting at 1.\n * @returns True if voltage is present on the input channel and false otherwise.\n */\n public async getDigitalInput(\n channelNumber: number\n ): Promise<boolean> {\n const request = new gateway.DeviceGetDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('di');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_digital_io',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current value of the specified digital output channel.\n * @param channelNumber Channel number starting at 1.\n * @returns True if the output channel is conducting and false otherwise.\n */\n public async getDigitalOutput(\n channelNumber: number\n ): Promise<boolean> {\n const request = new gateway.DeviceGetDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('do');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_digital_io',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current value of the specified analog input channel.\n * @param channelNumber Channel number starting at 1.\n * @returns A measurementsof the voltage present on the input channel.\n */\n public async getAnalogInput(\n channelNumber: number\n ): Promise<number> {\n const request = new gateway.DeviceGetAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ai');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_analog_io',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current values of the specified analog output channel.\n * @param channelNumber Channel number starting at 1.\n * @returns A measurement of voltage that the output channel is conducting.\n */\n public async getAnalogOutput(\n channelNumber: number\n ): Promise<number> {\n const request = new gateway.DeviceGetAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ao');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_analog_io',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets values for all digital output channels.\n * @param values The type of action to perform on the channel.\n */\n public async setAllDigitalOutputs(\n values: DigitalOutputAction[]\n ): Promise<void> {\n const request = new gateway.DeviceSetAllDigitalOutputsRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values as any);\n\n await gateway.callAsync('device/set_all_digital_outputs', request);\n }\n\n /**\n * Sets current and future value for all digital output channels.\n * Requires at least Firmware 7.37.\n * @param values The type of actions to perform immediately on output channels.\n * @param futureValues The type of actions to perform in the future on output channels.\n * @param delay Delay between setting current values and setting future values.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setAllDigitalOutputsSchedule(\n values: DigitalOutputAction[],\n futureValues: DigitalOutputAction[],\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetAllDigitalOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values as any);\n request.setFutureValuesList(futureValues as any);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_all_digital_outputs_schedule', request);\n }\n\n /**\n * Cancel all scheduled digital output actions.\n * Requires at least Firmware 7.37.\n * @param [channels=[]] Optionally specify which channels to cancel.\n * Array length must be empty or equal to the number of channels on device.\n * Specifying \"True\" for a channel will cancel the scheduled digital output action for that channel.\n */\n public async cancelAllDigitalOutputsSchedule(\n channels: boolean[] = []\n ): Promise<void> {\n const request = new gateway.DeviceCancelAllDigitalOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelsList(channels);\n\n await gateway.callAsync('device/cancel_all_digital_outputs_schedule', request);\n }\n\n /**\n * Sets values for all analog output channels.\n * @param values Voltage values to set the output channels to.\n */\n public async setAllAnalogOutputs(\n values: number[]\n ): Promise<void> {\n const request = new gateway.DeviceSetAllAnalogOutputsRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values);\n\n await gateway.callAsync('device/set_all_analog_outputs', request);\n }\n\n /**\n * Sets value for the specified digital output channel.\n * @param channelNumber Channel number starting at 1.\n * @param value The type of action to perform on the channel.\n */\n public async setDigitalOutput(\n channelNumber: number,\n value: DigitalOutputAction\n ): Promise<void> {\n const request = new gateway.DeviceSetDigitalOutputRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value as any);\n\n await gateway.callAsync('device/set_digital_output', request);\n }\n\n /**\n * Sets current and future value for the specified digital output channel.\n * Requires at least Firmware 7.37.\n * @param channelNumber Channel number starting at 1.\n * @param value The type of action to perform immediately on the channel.\n * @param futureValue The type of action to perform in the future on the channel.\n * @param delay Delay between setting current value and setting future value.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setDigitalOutputSchedule(\n channelNumber: number,\n value: DigitalOutputAction,\n futureValue: DigitalOutputAction,\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetDigitalOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value as any);\n request.setFutureValue(futureValue as any);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_digital_output_schedule', request);\n }\n\n /**\n * Cancels a scheduled digital output action.\n * Requires at least Firmware 7.37.\n * @param channelNumber Channel number starting at 1.\n */\n public async cancelDigitalOutputSchedule(\n channelNumber: number\n ): Promise<void> {\n const request = new gateway.DeviceCancelDigitalOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n\n await gateway.callAsync('device/cancel_digital_output_schedule', request);\n }\n\n /**\n * Sets value for the specified analog output channel.\n * @param channelNumber Channel number starting at 1.\n * @param value Value to set the output channel voltage to.\n */\n public async setAnalogOutput(\n channelNumber: number,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetAnalogOutputRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/set_analog_output', request);\n }\n\n /**\n * Returns the number of I/O channels the device has.\n * @returns An object containing the number of I/O channels the device has.\n */\n public async getChannelsInfo(): Promise<DeviceIOInfo> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n\n const response = await gateway.callAsync<gateway.DeviceIOInfo>(\n 'device/get_io_info',\n request,\n gateway.DeviceIOInfo);\n return DeviceIOInfo.fromProtobuf(response.toObject());\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"device_io.js","sourceRoot":"","sources":["../../../src/ascii/device_io.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,oCAA+C;AAC/C,qDAAgD;AAGhD,mDAA8C;AAE9C;;GAEG;AACH,MAAa,QAAQ;IAGnB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,mBAAmB;QAC9B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB;QAC/B,MAAM,OAAO,GAAG,IAAI,OAAO,C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nB,QAAoB,EACpB,aAAqB;QAErB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;QAC7C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,WAAW,CAAC,QAAe,CAAC,CAAC;QACrC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,qBAAqB,EACrB,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAY;QACvB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,2BAAW,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC;CACF;AA1eD,4BA0eC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { Native, Units, Time } from '../units';\nimport { DeviceIOInfo } from './device_io_info';\nimport { DigitalOutputAction } from './digital_output_action';\nimport { IoPortType } from './io_port_type';\nimport { IoPortLabel } from './io_port_label';\n\n/**\n * Class providing access to the I/O channels of the device.\n */\nexport class DeviceIO {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Returns the current values of all digital input channels.\n * @returns True if voltage is present on the input channel and false otherwise.\n */\n public async getAllDigitalInputs(): Promise<boolean[]> {\n const request = new gateway.DeviceGetAllDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('di');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllDigitalIOResponse>(\n 'device/get_all_digital_io',\n request,\n gateway.DeviceGetAllDigitalIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all digital output channels.\n * @returns True if the output channel is conducting and false otherwise.\n */\n public async getAllDigitalOutputs(): Promise<boolean[]> {\n const request = new gateway.DeviceGetAllDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('do');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllDigitalIOResponse>(\n 'device/get_all_digital_io',\n request,\n gateway.DeviceGetAllDigitalIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all analog input channels.\n * @returns Measurements of the voltage present on the input channels.\n */\n public async getAllAnalogInputs(): Promise<number[]> {\n const request = new gateway.DeviceGetAllAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ai');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllAnalogIOResponse>(\n 'device/get_all_analog_io',\n request,\n gateway.DeviceGetAllAnalogIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current values of all analog output channels.\n * @returns Measurements of voltage that the output channels are conducting.\n */\n public async getAllAnalogOutputs(): Promise<number[]> {\n const request = new gateway.DeviceGetAllAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ao');\n\n const response = await gateway.callAsync<gateway.DeviceGetAllAnalogIOResponse>(\n 'device/get_all_analog_io',\n request,\n gateway.DeviceGetAllAnalogIOResponse);\n return response.getValuesList();\n }\n\n /**\n * Returns the current value of the specified digital input channel.\n * @param channelNumber Channel number starting at 1.\n * @returns True if voltage is present on the input channel and false otherwise.\n */\n public async getDigitalInput(\n channelNumber: number\n ): Promise<boolean> {\n const request = new gateway.DeviceGetDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('di');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_digital_io',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current value of the specified digital output channel.\n * @param channelNumber Channel number starting at 1.\n * @returns True if the output channel is conducting and false otherwise.\n */\n public async getDigitalOutput(\n channelNumber: number\n ): Promise<boolean> {\n const request = new gateway.DeviceGetDigitalIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('do');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_digital_io',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current value of the specified analog input channel.\n * @param channelNumber Channel number starting at 1.\n * @returns A measurementsof the voltage present on the input channel.\n */\n public async getAnalogInput(\n channelNumber: number\n ): Promise<number> {\n const request = new gateway.DeviceGetAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ai');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_analog_io',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current values of the specified analog output channel.\n * @param channelNumber Channel number starting at 1.\n * @returns A measurement of voltage that the output channel is conducting.\n */\n public async getAnalogOutput(\n channelNumber: number\n ): Promise<number> {\n const request = new gateway.DeviceGetAnalogIORequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelType('ao');\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_analog_io',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets values for all digital output channels.\n * @param values The type of action to perform on the channel.\n */\n public async setAllDigitalOutputs(\n values: DigitalOutputAction[]\n ): Promise<void> {\n const request = new gateway.DeviceSetAllDigitalOutputsRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values as any);\n\n await gateway.callAsync('device/set_all_digital_outputs', request);\n }\n\n /**\n * Sets current and future value for all digital output channels.\n * Requires at least Firmware 7.37.\n * @param values The type of actions to perform immediately on output channels.\n * @param futureValues The type of actions to perform in the future on output channels.\n * @param delay Delay between setting current values and setting future values.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setAllDigitalOutputsSchedule(\n values: DigitalOutputAction[],\n futureValues: DigitalOutputAction[],\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetAllDigitalOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values as any);\n request.setFutureValuesList(futureValues as any);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_all_digital_outputs_schedule', request);\n }\n\n /**\n * Cancel all scheduled digital output actions.\n * Requires at least Firmware 7.37.\n * @param [channels=[]] Optionally specify which channels to cancel.\n * Array length must be empty or equal to the number of channels on device.\n * Specifying \"True\" for a channel will cancel the scheduled digital output action for that channel.\n */\n public async cancelAllDigitalOutputsSchedule(\n channels: boolean[] = []\n ): Promise<void> {\n const request = new gateway.DeviceCancelAllOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setAnalog(false);\n request.setChannelsList(channels);\n\n await gateway.callAsync('device/cancel_all_outputs_schedule', request);\n }\n\n /**\n * Cancel all scheduled analog output actions.\n * Requires at least Firmware 7.38.\n * @param [channels=[]] Optionally specify which channels to cancel.\n * Array length must be empty or equal to the number of channels on device.\n * Specifying \"True\" for a channel will cancel the scheduled analog output value for that channel.\n */\n public async cancelAllAnalogOutputsSchedule(\n channels: boolean[] = []\n ): Promise<void> {\n const request = new gateway.DeviceCancelAllOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setAnalog(true);\n request.setChannelsList(channels);\n\n await gateway.callAsync('device/cancel_all_outputs_schedule', request);\n }\n\n /**\n * Sets values for all analog output channels.\n * @param values Voltage values to set the output channels to.\n */\n public async setAllAnalogOutputs(\n values: number[]\n ): Promise<void> {\n const request = new gateway.DeviceSetAllAnalogOutputsRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values);\n\n await gateway.callAsync('device/set_all_analog_outputs', request);\n }\n\n /**\n * Sets current and future values for all analog output channels.\n * Requires at least Firmware 7.38.\n * @param values Voltage values to set the output channels to immediately.\n * @param futureValues Voltage values to set the output channels to in the future.\n * @param delay Delay between setting current values and setting future values.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setAllAnalogOutputsSchedule(\n values: number[],\n futureValues: number[],\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetAllAnalogOutputsScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setValuesList(values);\n request.setFutureValuesList(futureValues);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_all_analog_outputs_schedule', request);\n }\n\n /**\n * Sets value for the specified digital output channel.\n * @param channelNumber Channel number starting at 1.\n * @param value The type of action to perform on the channel.\n */\n public async setDigitalOutput(\n channelNumber: number,\n value: DigitalOutputAction\n ): Promise<void> {\n const request = new gateway.DeviceSetDigitalOutputRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value as any);\n\n await gateway.callAsync('device/set_digital_output', request);\n }\n\n /**\n * Sets current and future value for the specified digital output channel.\n * Requires at least Firmware 7.37.\n * @param channelNumber Channel number starting at 1.\n * @param value The type of action to perform immediately on the channel.\n * @param futureValue The type of action to perform in the future on the channel.\n * @param delay Delay between setting current value and setting future value.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setDigitalOutputSchedule(\n channelNumber: number,\n value: DigitalOutputAction,\n futureValue: DigitalOutputAction,\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetDigitalOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value as any);\n request.setFutureValue(futureValue as any);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_digital_output_schedule', request);\n }\n\n /**\n * Cancels a scheduled digital output action.\n * Requires at least Firmware 7.37.\n * @param channelNumber Channel number starting at 1.\n */\n public async cancelDigitalOutputSchedule(\n channelNumber: number\n ): Promise<void> {\n const request = new gateway.DeviceCancelOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setAnalog(false);\n request.setChannelNumber(channelNumber);\n\n await gateway.callAsync('device/cancel_output_schedule', request);\n }\n\n /**\n * Cancels a scheduled analog output value.\n * Requires at least Firmware 7.38.\n * @param channelNumber Channel number starting at 1.\n */\n public async cancelAnalogOutputSchedule(\n channelNumber: number\n ): Promise<void> {\n const request = new gateway.DeviceCancelOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setAnalog(true);\n request.setChannelNumber(channelNumber);\n\n await gateway.callAsync('device/cancel_output_schedule', request);\n }\n\n /**\n * Sets value for the specified analog output channel.\n * @param channelNumber Channel number starting at 1.\n * @param value Value to set the output channel voltage to.\n */\n public async setAnalogOutput(\n channelNumber: number,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetAnalogOutputRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/set_analog_output', request);\n }\n\n /**\n * Sets current and future value for the specified analog output channel.\n * Requires at least Firmware 7.38.\n * @param channelNumber Channel number starting at 1.\n * @param value Value to set the output channel voltage to immediately.\n * @param futureValue Value to set the output channel voltage to in the future.\n * @param delay Delay between setting current value and setting future value.\n * @param [unit=Units.NATIVE] Units of time.\n */\n public async setAnalogOutputSchedule(\n channelNumber: number,\n value: number,\n futureValue: number,\n delay: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n if (delay <= 0) {\n throw new TypeError('Delay must be a positive value.');\n }\n const request = new gateway.DeviceSetAnalogOutputScheduleRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n request.setFutureValue(futureValue);\n request.setDelay(delay);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_analog_output_schedule', request);\n }\n\n /**\n * Returns the number of I/O channels the device has.\n * @returns An object containing the number of I/O channels the device has.\n */\n public async getChannelsInfo(): Promise<DeviceIOInfo> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n\n const response = await gateway.callAsync<gateway.DeviceIOInfo>(\n 'device/get_io_info',\n request,\n gateway.DeviceIOInfo);\n return DeviceIOInfo.fromProtobuf(response.toObject());\n }\n\n /**\n * Sets the label of the specified channel.\n * @param portType The type of channel to set the label of.\n * @param channelNumber Channel number starting at 1.\n * @param label The label to set for the specified channel.\n */\n public async setLabel(\n portType: IoPortType,\n channelNumber: number,\n label: string\n ): Promise<void> {\n const request = new gateway.SetIoPortLabel();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setPortType(portType as any);\n request.setChannelNumber(channelNumber);\n request.setLabel(label);\n\n await gateway.callAsync('device/set_io_label', request);\n }\n\n /**\n * Returns the label of the specified channel.\n * @param portType The type of channel to get the label of.\n * @param channelNumber Channel number starting at 1.\n * @returns The label of the specified channel.\n */\n public async getLabel(\n portType: IoPortType,\n channelNumber: number\n ): Promise<string> {\n const request = new gateway.GetIoPortLabel();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setPortType(portType as any);\n request.setChannelNumber(channelNumber);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_io_label',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns every label assigned to an IO port on this device.\n * @returns The labels set for this device's IO.\n */\n public async getAllLabels(): Promise<IoPortLabel[]> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n\n const response = await gateway.callAsync<gateway.GetAllIoPortLabelsResponse>(\n 'device/get_all_io_labels',\n request,\n gateway.GetAllIoPortLabelsResponse);\n return response.getLabelsList().map(a => IoPortLabel.fromProtobuf(a.toObject()));\n }\n}\n"]}
|
|
@@ -15,6 +15,7 @@ export { Device } from './device';
|
|
|
15
15
|
export { DeviceIO } from './device_io';
|
|
16
16
|
export { DeviceIOInfo } from './device_io_info';
|
|
17
17
|
export { IoPortType } from './io_port_type';
|
|
18
|
+
export { IoPortLabel } from './io_port_label';
|
|
18
19
|
export { MessageType } from './message_type';
|
|
19
20
|
export { Response } from './response';
|
|
20
21
|
export { SettingConstants } from './setting_constants';
|
package/dist/lib/ascii/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.DigitalOutputAction = exports.Streams = exports.TriggerOperation = exports.TriggerCondition = exports.TriggerAction = exports.TriggerEnabledState = exports.TriggerState = exports.Trigger = exports.Triggers = exports.AxisGroup = exports.PvtAxisType = exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = void 0;
|
|
3
|
+
exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = exports.SimpleTuning = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.PvtMode = exports.PvtBuffer = exports.PvtSequence = exports.Pvt = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeDataSource = exports.OscilloscopeData = exports.OscilloscopeCaptureProperties = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.IoPortLabel = exports.IoPortType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.GetAxisSettingResult = exports.GetSettingResult = exports.GetAxisSetting = exports.GetSetting = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
|
|
4
|
+
exports.DigitalOutputAction = exports.Streams = exports.TriggerOperation = exports.TriggerCondition = exports.TriggerAction = exports.TriggerEnabledState = exports.TriggerState = exports.Trigger = exports.Triggers = exports.AxisGroup = exports.PvtAxisType = exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = void 0;
|
|
5
5
|
var alert_event_1 = require("./alert_event");
|
|
6
6
|
Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return alert_event_1.AlertEvent; } });
|
|
7
7
|
var all_axes_1 = require("./all_axes");
|
|
@@ -36,6 +36,8 @@ var device_io_info_1 = require("./device_io_info");
|
|
|
36
36
|
Object.defineProperty(exports, "DeviceIOInfo", { enumerable: true, get: function () { return device_io_info_1.DeviceIOInfo; } });
|
|
37
37
|
var io_port_type_1 = require("./io_port_type");
|
|
38
38
|
Object.defineProperty(exports, "IoPortType", { enumerable: true, get: function () { return io_port_type_1.IoPortType; } });
|
|
39
|
+
var io_port_label_1 = require("./io_port_label");
|
|
40
|
+
Object.defineProperty(exports, "IoPortLabel", { enumerable: true, get: function () { return io_port_label_1.IoPortLabel; } });
|
|
39
41
|
var message_type_1 = require("./message_type");
|
|
40
42
|
Object.defineProperty(exports, "MessageType", { enumerable: true, get: function () { return message_type_1.MessageType; } });
|
|
41
43
|
var response_1 = require("./response");
|
|
@@ -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,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,O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D,4HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,qCAAuD;AAA9C,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,OAAA;AACnC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,iFAA4E;AAAnE,0IAAA,yBAAyB,OAAA;AAClC,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { GetSetting } from './get_setting';\nexport { GetAxisSetting } from './get_axis_setting';\nexport { GetSettingResult } from './get_setting_result';\nexport { GetAxisSettingResult } from './get_axis_setting_result';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { IoPortType } from './io_port_type';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeDataSource } from './oscilloscope_data_source';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { Pvt } from './pvt';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { SimpleTuning } from './simple_tuning';\nexport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nexport { AxisStorage, DeviceStorage } from './storage';\nexport { ConversionFactor } from './conversion_factor';\nexport { CanSetStateAxisResponse } from './can_set_state_axis_response';\nexport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nexport { PvtAxisDefinition } from './pvt_axis_definition';\nexport { PvtAxisType } from './pvt_axis_type';\nexport { AxisGroup } from './axis_group';\nexport { Triggers } from './triggers';\nexport { Trigger } from './trigger';\nexport { TriggerState } from './trigger_state';\nexport { TriggerEnabledState } from './trigger_enabled_state';\nexport { TriggerAction } from './trigger_action';\nexport { TriggerCondition } from './trigger_condition';\nexport { TriggerOperation } from './trigger_operation';\nexport { Streams } from './streams';\nexport { DigitalOutputAction } from './digital_output_action';\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,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+CAA4C;AAAnC,0GAAA,UAAU,OAAA;AACnB,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AACpB,+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;AACr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A;AACjB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { GetSetting } from './get_setting';\nexport { GetAxisSetting } from './get_axis_setting';\nexport { GetSettingResult } from './get_setting_result';\nexport { GetAxisSettingResult } from './get_axis_setting_result';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { IoPortType } from './io_port_type';\nexport { IoPortLabel } from './io_port_label';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeDataSource } from './oscilloscope_data_source';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { Pvt } from './pvt';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { SimpleTuning } from './simple_tuning';\nexport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nexport { AxisStorage, DeviceStorage } from './storage';\nexport { ConversionFactor } from './conversion_factor';\nexport { CanSetStateAxisResponse } from './can_set_state_axis_response';\nexport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nexport { PvtAxisDefinition } from './pvt_axis_definition';\nexport { PvtAxisType } from './pvt_axis_type';\nexport { AxisGroup } from './axis_group';\nexport { Triggers } from './triggers';\nexport { Trigger } from './trigger';\nexport { TriggerState } from './trigger_state';\nexport { TriggerEnabledState } from './trigger_enabled_state';\nexport { TriggerAction } from './trigger_action';\nexport { TriggerCondition } from './trigger_condition';\nexport { TriggerOperation } from './trigger_operation';\nexport { Streams } from './streams';\nexport { DigitalOutputAction } from './digital_output_action';\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IoPortType } from './io_port_type';
|
|
2
|
+
/**
|
|
3
|
+
* The label of an IO port.
|
|
4
|
+
*/
|
|
5
|
+
export interface IoPortLabel {
|
|
6
|
+
/**
|
|
7
|
+
* The type of the port.
|
|
8
|
+
*/
|
|
9
|
+
portType: IoPortType;
|
|
10
|
+
/**
|
|
11
|
+
* The number of the port.
|
|
12
|
+
*/
|
|
13
|
+
channelNumber: number;
|
|
14
|
+
/**
|
|
15
|
+
* The label of the port.
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace IoPortLabel {
|
|
20
|
+
const __type = "IoPortLabel";
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.IoPortLabel = void 0;
|
|
6
|
+
var IoPortLabel;
|
|
7
|
+
(function (IoPortLabel) {
|
|
8
|
+
IoPortLabel.__type = 'IoPortLabel';
|
|
9
|
+
/** @internal */
|
|
10
|
+
function fromProtobuf(pbData) {
|
|
11
|
+
return {
|
|
12
|
+
portType: pbData.portType,
|
|
13
|
+
channelNumber: pbData.channelNumber,
|
|
14
|
+
label: pbData.label,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
IoPortLabel.fromProtobuf = fromProtobuf;
|
|
18
|
+
})(IoPortLabel = exports.IoPortLabel || (exports.IoPortLabel = {}));
|
|
19
|
+
//# sourceMappingURL=io_port_label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io_port_label.js","sourceRoot":"","sources":["../../../src/ascii/io_port_label.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AA0BtD,IAAiB,WAAW,CAW3B;AAXD,WAAiB,WAAW;IACb,kBAAM,GAAG,aAAa,CAAC;IAEpC,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAoC;QAC/D,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,QAAe;YAChC,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC;IACJ,CAAC;IANe,wBAAY,eAM3B,CAAA;AACH,CAAC,EAXgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAW3B","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { IoPortType } from './io_port_type';\n\n/**\n * The label of an IO port.\n */\nexport interface IoPortLabel {\n /**\n * The type of the port.\n */\n portType: IoPortType;\n\n /**\n * The number of the port.\n */\n channelNumber: number;\n\n /**\n * The label of the port.\n */\n label: string;\n\n}\n\nexport namespace IoPortLabel {\n export const __type = 'IoPortLabel';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.IoPortLabel.AsObject): IoPortLabel {\n return {\n portType: pbData.portType as any,\n channelNumber: pbData.channelNumber,\n label: pbData.label,\n };\n }\n}\n"]}
|
package/dist/lib/ascii_ns.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export declare namespace ascii {
|
|
|
34
34
|
type GetAxisSettingResult = asciiImport.GetAxisSettingResult;
|
|
35
35
|
const IoPortType: typeof asciiImport.IoPortType;
|
|
36
36
|
type IoPortType = asciiImport.IoPortType;
|
|
37
|
+
const IoPortLabel: typeof asciiImport.IoPortLabel;
|
|
38
|
+
type IoPortLabel = asciiImport.IoPortLabel;
|
|
37
39
|
const Lockstep: typeof asciiImport.Lockstep;
|
|
38
40
|
type Lockstep = asciiImport.Lockstep;
|
|
39
41
|
const LockstepAxes: typeof asciiImport.LockstepAxes;
|
package/dist/lib/ascii_ns.js
CHANGED
|
@@ -44,6 +44,7 @@ var ascii;
|
|
|
44
44
|
ascii.GetSettingResult = asciiImport.GetSettingResult;
|
|
45
45
|
ascii.GetAxisSettingResult = asciiImport.GetAxisSettingResult;
|
|
46
46
|
ascii.IoPortType = asciiImport.IoPortType;
|
|
47
|
+
ascii.IoPortLabel = asciiImport.IoPortLabel;
|
|
47
48
|
ascii.Lockstep = asciiImport.Lockstep;
|
|
48
49
|
ascii.LockstepAxes = asciiImport.LockstepAxes;
|
|
49
50
|
ascii.Oscilloscope = asciiImport.Oscilloscope;
|
package/dist/lib/ascii_ns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ascii_ns.js","sourceRoot":"","sources":["../../src/ascii_ns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAEvC,I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AAC;IAElC,aAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE9B,cAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAEhC,kBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAExC,yBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;IAEtD,mBAAa,GAAG,WAAW,CAAC,aAAa,CAAC;IAE1C,sBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;IAEhD,sBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;IAEhD,aAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE9B,yBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC;AAErE,CAAC,EA/HgB,KAAK,GAAL,aAAK,KAAL,aAAK,QA+HrB","sourcesContent":["import * as asciiImport from './ascii';\n\nexport namespace ascii {\n export const AlertEvent = asciiImport.AlertEvent;\n export type AlertEvent = asciiImport.AlertEvent;\n export const AllAxes = asciiImport.AllAxes;\n export type AllAxes = asciiImport.AllAxes;\n export const Axis = asciiImport.Axis;\n export type Axis = asciiImport.Axis;\n export const AxisIdentity = asciiImport.AxisIdentity;\n export type AxisIdentity = asciiImport.AxisIdentity;\n export const AxisSettings = asciiImport.AxisSettings;\n export type AxisSettings = asciiImport.AxisSettings;\n export const AxisType = asciiImport.AxisType;\n export type AxisType = asciiImport.AxisType;\n export const Connection = asciiImport.Connection;\n export type Connection = asciiImport.Connection;\n export const Device = asciiImport.Device;\n export type Device = asciiImport.Device;\n export const DeviceIO = asciiImport.DeviceIO;\n export type DeviceIO = asciiImport.DeviceIO;\n export const DeviceIOInfo = asciiImport.DeviceIOInfo;\n export type DeviceIOInfo = asciiImport.DeviceIOInfo;\n export const DeviceIdentity = asciiImport.DeviceIdentity;\n export type DeviceIdentity = asciiImport.DeviceIdentity;\n export const DeviceSettings = asciiImport.DeviceSettings;\n export type DeviceSettings = asciiImport.DeviceSettings;\n export const GetSetting = asciiImport.GetSetting;\n export type GetSetting = asciiImport.GetSetting;\n export const GetAxisSetting = asciiImport.GetAxisSetting;\n export type GetAxisSetting = asciiImport.GetAxisSetting;\n export const GetSettingResult = asciiImport.GetSettingResult;\n export type GetSettingResult = asciiImport.GetSettingResult;\n export const GetAxisSettingResult = asciiImport.GetAxisSettingResult;\n export type GetAxisSettingResult = asciiImport.GetAxisSettingResult;\n export const IoPortType = asciiImport.IoPortType;\n export type IoPortType = asciiImport.IoPortType;\n export const Lockstep = asciiImport.Lockstep;\n export type Lockstep = asciiImport.Lockstep;\n export const LockstepAxes = asciiImport.LockstepAxes;\n export type LockstepAxes = asciiImport.LockstepAxes;\n export const Oscilloscope = asciiImport.Oscilloscope;\n export type Oscilloscope = asciiImport.Oscilloscope;\n export const OscilloscopeData = asciiImport.OscilloscopeData;\n export type OscilloscopeData = asciiImport.OscilloscopeData;\n export const OscilloscopeDataSource = asciiImport.OscilloscopeDataSource;\n export type OscilloscopeDataSource = asciiImport.OscilloscopeDataSource;\n export const OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export type OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export const MessageType = asciiImport.MessageType;\n export type MessageType = asciiImport.MessageType;\n export const Response = asciiImport.Response;\n export type Response = asciiImport.Response;\n export const SettingConstants = asciiImport.SettingConstants;\n export type SettingConstants = asciiImport.SettingConstants;\n export const UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export type UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export const Warnings = asciiImport.Warnings;\n export type Warnings = asciiImport.Warnings;\n export const WarningFlags = asciiImport.WarningFlags;\n export type WarningFlags = asciiImport.WarningFlags;\n export const Stream = asciiImport.Stream;\n export type Stream = asciiImport.Stream;\n export const StreamBuffer = asciiImport.StreamBuffer;\n export type StreamBuffer = asciiImport.StreamBuffer;\n export const StreamMode = asciiImport.StreamMode;\n export type StreamMode = asciiImport.StreamMode;\n export const StreamAxisType = asciiImport.StreamAxisType;\n export type StreamAxisType = asciiImport.StreamAxisType;\n export const StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export type StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export const Transport = asciiImport.Transport;\n export type Transport = asciiImport.Transport;\n export const ServoTuner = asciiImport.ServoTuner;\n export type ServoTuner = asciiImport.ServoTuner;\n export const ServoTuningParamset = asciiImport.ServoTuningParamset;\n export type ServoTuningParamset = asciiImport.ServoTuningParamset;\n export const ParamsetInfo = asciiImport.ParamsetInfo;\n export type ParamsetInfo = asciiImport.ParamsetInfo;\n export const PidTuning = asciiImport.PidTuning;\n export type PidTuning = asciiImport.PidTuning;\n export const ServoTuningParam = asciiImport.ServoTuningParam;\n export type ServoTuningParam = asciiImport.ServoTuningParam;\n export const SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export type SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export const SimpleTuning = asciiImport.SimpleTuning;\n export type SimpleTuning = asciiImport.SimpleTuning;\n export const AxisStorage = asciiImport.AxisStorage;\n export type AxisStorage = asciiImport.AxisStorage;\n export const DeviceStorage = asciiImport.DeviceStorage;\n export type DeviceStorage = asciiImport.DeviceStorage;\n export const ConversionFactor = asciiImport.ConversionFactor;\n export type ConversionFactor = asciiImport.ConversionFactor;\n export const CanSetStateAxisResponse = asciiImport.CanSetStateAxisResponse;\n export type CanSetStateAxisResponse = asciiImport.CanSetStateAxisResponse;\n export const CanSetStateDeviceResponse = asciiImport.CanSetStateDeviceResponse;\n export type CanSetStateDeviceResponse = asciiImport.CanSetStateDeviceResponse;\n export const Pvt = asciiImport.Pvt;\n export type Pvt = asciiImport.Pvt;\n export const PvtSequence = asciiImport.PvtSequence;\n export type PvtSequence = asciiImport.PvtSequence;\n export const PvtBuffer = asciiImport.PvtBuffer;\n export type PvtBuffer = asciiImport.PvtBuffer;\n export const PvtMode = asciiImport.PvtMode;\n export type PvtMode = asciiImport.PvtMode;\n export const PvtAxisDefinition = asciiImport.PvtAxisDefinition;\n export type PvtAxisDefinition = asciiImport.PvtAxisDefinition;\n export const PvtAxisType = asciiImport.PvtAxisType;\n export type PvtAxisType = asciiImport.PvtAxisType;\n export const AxisGroup = asciiImport.AxisGroup;\n export type AxisGroup = asciiImport.AxisGroup;\n export const Trigger = asciiImport.Trigger;\n export type Trigger = asciiImport.Trigger;\n export const Triggers = asciiImport.Triggers;\n export type Triggers = asciiImport.Triggers;\n export const TriggerState = asciiImport.TriggerState;\n export type TriggerState = asciiImport.TriggerState;\n export const TriggerEnabledState = asciiImport.TriggerEnabledState;\n export type TriggerEnabledState = asciiImport.TriggerEnabledState;\n export const TriggerAction = asciiImport.TriggerAction;\n export type TriggerAction = asciiImport.TriggerAction;\n export const TriggerCondition = asciiImport.TriggerCondition;\n export type TriggerCondition = asciiImport.TriggerCondition;\n export const TriggerOperation = asciiImport.TriggerOperation;\n export type TriggerOperation = asciiImport.TriggerOperation;\n export const Streams = asciiImport.Streams;\n export type Streams = asciiImport.Streams;\n export const DigitalOutputAction = asciiImport.DigitalOutputAction;\n export type DigitalOutputAction = asciiImport.DigitalOutputAction;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ascii_ns.js","sourceRoot":"","sources":["../../src/ascii_ns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAEvC,IAAiB,KAAK,CAiIrB;AAjID,WAAiB,KAAK;IACP,gBAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEpC,aAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE9B,UAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAExB,kBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAExC,kBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAExC,cAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAEhC,gBAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEpC,YAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAE5B,cAAQ,GAAG,WAAW,CAAC,QAAQ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B,GAAG,WAAW,CAAC,mBAAmB,CAAC;AAErE,CAAC,EAjIgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAiIrB","sourcesContent":["import * as asciiImport from './ascii';\n\nexport namespace ascii {\n export const AlertEvent = asciiImport.AlertEvent;\n export type AlertEvent = asciiImport.AlertEvent;\n export const AllAxes = asciiImport.AllAxes;\n export type AllAxes = asciiImport.AllAxes;\n export const Axis = asciiImport.Axis;\n export type Axis = asciiImport.Axis;\n export const AxisIdentity = asciiImport.AxisIdentity;\n export type AxisIdentity = asciiImport.AxisIdentity;\n export const AxisSettings = asciiImport.AxisSettings;\n export type AxisSettings = asciiImport.AxisSettings;\n export const AxisType = asciiImport.AxisType;\n export type AxisType = asciiImport.AxisType;\n export const Connection = asciiImport.Connection;\n export type Connection = asciiImport.Connection;\n export const Device = asciiImport.Device;\n export type Device = asciiImport.Device;\n export const DeviceIO = asciiImport.DeviceIO;\n export type DeviceIO = asciiImport.DeviceIO;\n export const DeviceIOInfo = asciiImport.DeviceIOInfo;\n export type DeviceIOInfo = asciiImport.DeviceIOInfo;\n export const DeviceIdentity = asciiImport.DeviceIdentity;\n export type DeviceIdentity = asciiImport.DeviceIdentity;\n export const DeviceSettings = asciiImport.DeviceSettings;\n export type DeviceSettings = asciiImport.DeviceSettings;\n export const GetSetting = asciiImport.GetSetting;\n export type GetSetting = asciiImport.GetSetting;\n export const GetAxisSetting = asciiImport.GetAxisSetting;\n export type GetAxisSetting = asciiImport.GetAxisSetting;\n export const GetSettingResult = asciiImport.GetSettingResult;\n export type GetSettingResult = asciiImport.GetSettingResult;\n export const GetAxisSettingResult = asciiImport.GetAxisSettingResult;\n export type GetAxisSettingResult = asciiImport.GetAxisSettingResult;\n export const IoPortType = asciiImport.IoPortType;\n export type IoPortType = asciiImport.IoPortType;\n export const IoPortLabel = asciiImport.IoPortLabel;\n export type IoPortLabel = asciiImport.IoPortLabel;\n export const Lockstep = asciiImport.Lockstep;\n export type Lockstep = asciiImport.Lockstep;\n export const LockstepAxes = asciiImport.LockstepAxes;\n export type LockstepAxes = asciiImport.LockstepAxes;\n export const Oscilloscope = asciiImport.Oscilloscope;\n export type Oscilloscope = asciiImport.Oscilloscope;\n export const OscilloscopeData = asciiImport.OscilloscopeData;\n export type OscilloscopeData = asciiImport.OscilloscopeData;\n export const OscilloscopeDataSource = asciiImport.OscilloscopeDataSource;\n export type OscilloscopeDataSource = asciiImport.OscilloscopeDataSource;\n export const OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export type OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export const MessageType = asciiImport.MessageType;\n export type MessageType = asciiImport.MessageType;\n export const Response = asciiImport.Response;\n export type Response = asciiImport.Response;\n export const SettingConstants = asciiImport.SettingConstants;\n export type SettingConstants = asciiImport.SettingConstants;\n export const UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export type UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export const Warnings = asciiImport.Warnings;\n export type Warnings = asciiImport.Warnings;\n export const WarningFlags = asciiImport.WarningFlags;\n export type WarningFlags = asciiImport.WarningFlags;\n export const Stream = asciiImport.Stream;\n export type Stream = asciiImport.Stream;\n export const StreamBuffer = asciiImport.StreamBuffer;\n export type StreamBuffer = asciiImport.StreamBuffer;\n export const StreamMode = asciiImport.StreamMode;\n export type StreamMode = asciiImport.StreamMode;\n export const StreamAxisType = asciiImport.StreamAxisType;\n export type StreamAxisType = asciiImport.StreamAxisType;\n export const StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export type StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export const Transport = asciiImport.Transport;\n export type Transport = asciiImport.Transport;\n export const ServoTuner = asciiImport.ServoTuner;\n export type ServoTuner = asciiImport.ServoTuner;\n export const ServoTuningParamset = asciiImport.ServoTuningParamset;\n export type ServoTuningParamset = asciiImport.ServoTuningParamset;\n export const ParamsetInfo = asciiImport.ParamsetInfo;\n export type ParamsetInfo = asciiImport.ParamsetInfo;\n export const PidTuning = asciiImport.PidTuning;\n export type PidTuning = asciiImport.PidTuning;\n export const ServoTuningParam = asciiImport.ServoTuningParam;\n export type ServoTuningParam = asciiImport.ServoTuningParam;\n export const SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export type SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export const SimpleTuning = asciiImport.SimpleTuning;\n export type SimpleTuning = asciiImport.SimpleTuning;\n export const AxisStorage = asciiImport.AxisStorage;\n export type AxisStorage = asciiImport.AxisStorage;\n export const DeviceStorage = asciiImport.DeviceStorage;\n export type DeviceStorage = asciiImport.DeviceStorage;\n export const ConversionFactor = asciiImport.ConversionFactor;\n export type ConversionFactor = asciiImport.ConversionFactor;\n export const CanSetStateAxisResponse = asciiImport.CanSetStateAxisResponse;\n export type CanSetStateAxisResponse = asciiImport.CanSetStateAxisResponse;\n export const CanSetStateDeviceResponse = asciiImport.CanSetStateDeviceResponse;\n export type CanSetStateDeviceResponse = asciiImport.CanSetStateDeviceResponse;\n export const Pvt = asciiImport.Pvt;\n export type Pvt = asciiImport.Pvt;\n export const PvtSequence = asciiImport.PvtSequence;\n export type PvtSequence = asciiImport.PvtSequence;\n export const PvtBuffer = asciiImport.PvtBuffer;\n export type PvtBuffer = asciiImport.PvtBuffer;\n export const PvtMode = asciiImport.PvtMode;\n export type PvtMode = asciiImport.PvtMode;\n export const PvtAxisDefinition = asciiImport.PvtAxisDefinition;\n export type PvtAxisDefinition = asciiImport.PvtAxisDefinition;\n export const PvtAxisType = asciiImport.PvtAxisType;\n export type PvtAxisType = asciiImport.PvtAxisType;\n export const AxisGroup = asciiImport.AxisGroup;\n export type AxisGroup = asciiImport.AxisGroup;\n export const Trigger = asciiImport.Trigger;\n export type Trigger = asciiImport.Trigger;\n export const Triggers = asciiImport.Triggers;\n export type Triggers = asciiImport.Triggers;\n export const TriggerState = asciiImport.TriggerState;\n export type TriggerState = asciiImport.TriggerState;\n export const TriggerEnabledState = asciiImport.TriggerEnabledState;\n export type TriggerEnabledState = asciiImport.TriggerEnabledState;\n export const TriggerAction = asciiImport.TriggerAction;\n export type TriggerAction = asciiImport.TriggerAction;\n export const TriggerCondition = asciiImport.TriggerCondition;\n export type TriggerCondition = asciiImport.TriggerCondition;\n export const TriggerOperation = asciiImport.TriggerOperation;\n export type TriggerOperation = asciiImport.TriggerOperation;\n export const Streams = asciiImport.Streams;\n export type Streams = asciiImport.Streams;\n export const DigitalOutputAction = asciiImport.DigitalOutputAction;\n export type DigitalOutputAction = asciiImport.DigitalOutputAction;\n}\n"]}
|
|
@@ -66,9 +66,10 @@ export declare class Microscope {
|
|
|
66
66
|
static find(connection: Connection): Promise<Microscope>;
|
|
67
67
|
/**
|
|
68
68
|
* Initializes the microscope.
|
|
69
|
-
* Homes all axes, filter changer, and objective changer.
|
|
69
|
+
* Homes all axes, filter changer, and objective changer if they require it.
|
|
70
|
+
* @param [options.force=false] Forces all devices to home even when not required.
|
|
70
71
|
*/
|
|
71
|
-
initialize(): Promise<void>;
|
|
72
|
+
initialize(options?: Microscope.InitializeOptions): Promise<void>;
|
|
72
73
|
/**
|
|
73
74
|
* Checks whether the microscope is initialized.
|
|
74
75
|
* @returns True, when the microscope is initialized. False, otherwise.
|
|
@@ -80,3 +81,9 @@ export declare class Microscope {
|
|
|
80
81
|
*/
|
|
81
82
|
toString(): string;
|
|
82
83
|
}
|
|
84
|
+
declare namespace Microscope {
|
|
85
|
+
interface InitializeOptions {
|
|
86
|
+
force?: boolean;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {};
|
|
@@ -118,12 +118,15 @@ class Microscope {
|
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* Initializes the microscope.
|
|
121
|
-
* Homes all axes, filter changer, and objective changer.
|
|
121
|
+
* Homes all axes, filter changer, and objective changer if they require it.
|
|
122
|
+
* @param [options.force=false] Forces all devices to home even when not required.
|
|
122
123
|
*/
|
|
123
|
-
async initialize() {
|
|
124
|
-
const
|
|
124
|
+
async initialize(options = {}) {
|
|
125
|
+
const { force = false, } = options;
|
|
126
|
+
const request = new gateway.MicroscopeInitRequest();
|
|
125
127
|
request.setInterfaceId(this.connection.interfaceId);
|
|
126
128
|
request.setConfig(microscope_config_1.MicroscopeConfig.toProtobuf(this._config));
|
|
129
|
+
request.setForce(force);
|
|
127
130
|
await gateway.callAsync('microscope/initialize', request);
|
|
128
131
|
}
|
|
129
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"microscope.js","sourceRoot":"","sources":["../../../src/microscopy/microscope.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,wCAAqC;AACrC,oDAAgD;AAChD,4CAAyC;AAEzC,+CAA4C;AAC5C,2DAAuD;AACvD,2DAAuD;AACvD,qDAAiD;AAEjD;;;;;GAKG;AACH,MAAa,UAAU;IACrB;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAKD;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAGD;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAGD;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAGD;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAGD;;OAEG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAGD;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAGD;;;OAG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O,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC;QACrD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,CAAC,SAAS,CAAC,oCAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAE7D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,sBAAsB,EACtB,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAvJD,gCAuJC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Axis } from '../ascii/axis';\nimport { AxisGroup } from '../ascii/axis_group';\nimport { Device } from '../ascii/device';\nimport { Connection } from '../ascii/connection';\nimport { Illuminator } from './illuminator';\nimport { ObjectiveChanger } from './objective_changer';\nimport { MicroscopeConfig } from './microscope_config';\nimport { FilterChanger } from './filter_changer';\n\n/**\n * Represent a microscope.\n * It is subject to breaking changes without warning until further notice.\n * Parts of the microscope may or may not be instantiated depending on the configuration.\n * Requires at least Firmware 7.34.\n */\nexport class Microscope {\n /**\n * Connection of the microscope.\n */\n public get connection(): Connection {\n return this._connection;\n }\n private _connection: Connection;\n\n private _config: MicroscopeConfig;\n\n /**\n * The illuminator.\n */\n public get illuminator(): Illuminator | undefined {\n return this._illuminator;\n }\n private _illuminator: Illuminator | undefined;\n\n /**\n * The focus axis.\n */\n public get focusAxis(): Axis | undefined {\n return this._focusAxis;\n }\n private _focusAxis: Axis | undefined;\n\n /**\n * The X axis.\n */\n public get xAxis(): Axis | undefined {\n return this._xAxis;\n }\n private _xAxis: Axis | undefined;\n\n /**\n * The Y axis.\n */\n public get yAxis(): Axis | undefined {\n return this._yAxis;\n }\n private _yAxis: Axis | undefined;\n\n /**\n * Axis group consisting of X and Y axes representing the plate of the microscope.\n */\n public get plate(): AxisGroup | undefined {\n return this._plate;\n }\n private _plate: AxisGroup | undefined;\n\n /**\n * The objective changer.\n */\n public get objectiveChanger(): ObjectiveChanger | undefined {\n return this._objectiveChanger;\n }\n private _objectiveChanger: ObjectiveChanger | undefined;\n\n /**\n * The filter changer.\n */\n public get filterChanger(): FilterChanger | undefined {\n return this._filterChanger;\n }\n private _filterChanger: FilterChanger | undefined;\n\n /**\n * Creates instance of `Microscope` from the given config.\n * Parts are instantiated depending on device addresses in the config.\n */\n constructor(connection: Connection, config: MicroscopeConfig) {\n this._connection = connection;\n this._config = MicroscopeConfig.fromProtobuf(MicroscopeConfig.toProtobuf(config).toObject());\n this._illuminator = config.illuminator ? new Illuminator(new Device(connection, config.illuminator)) : undefined;\n this._focusAxis = config.focusAxis?.device ? new Axis(new Device(connection, config.focusAxis.device), config.focusAxis.axis) : undefined;\n this._xAxis = config.xAxis?.device ? new Axis(new Device(connection, config.xAxis.device), config.xAxis.axis) : undefined;\n this._yAxis = config.yAxis?.device ? new Axis(new Device(connection, config.yAxis.device), config.yAxis.axis) : undefined;\n this._plate = this._xAxis && this._yAxis ? new AxisGroup([this._xAxis, this._yAxis]) : undefined;\n this._objectiveChanger = config.objectiveChanger && this._focusAxis ? new ObjectiveChanger(new Device(connection, config.objectiveChanger), this._focusAxis) : undefined;\n this._filterChanger = config.filterChanger ? new FilterChanger(new Device(connection, config.filterChanger)) : undefined;\n }\n\n /**\n * Finds a microscope on a connection.\n * @param connection Connection on which to detect the microscope.\n * @returns New instance of microscope.\n */\n public static async find(\n connection: Connection\n ): Promise<Microscope> {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(connection.interfaceId);\n\n const response = await gateway.callAsync<gateway.MicroscopeConfig>(\n 'microscope/detect',\n request,\n gateway.MicroscopeConfig);\n return new Microscope(connection, MicroscopeConfig.fromProtobuf(response.toObject()));\n }\n\n /**\n * Initializes the microscope.\n * Homes all axes, filter changer, and objective changer if they require it.\n * @param [options.force=false] Forces all devices to home even when not required.\n */\n public async initialize(\n options: Microscope.InitializeOptions = {}\n ): Promise<void> {\n const {\n force = false,\n } = options;\n const request = new gateway.MicroscopeInitRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setConfig(MicroscopeConfig.toProtobuf(this._config));\n request.setForce(force);\n\n await gateway.callAsync('microscope/initialize', request);\n }\n\n /**\n * Checks whether the microscope is initialized.\n * @returns True, when the microscope is initialized. False, otherwise.\n */\n public async isInitialized(): Promise<boolean> {\n const request = new gateway.MicroscopeEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setConfig(MicroscopeConfig.toProtobuf(this._config));\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'microscope/is_initialized',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the microscope.\n * @returns A string that represents the microscope.\n */\n public toString(): string {\n const request = new gateway.MicroscopeEmptyRequest();\n request.setInterfaceId(this.connection.interfaceId);\n request.setConfig(MicroscopeConfig.toProtobuf(this._config));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'microscope/to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n\nnamespace Microscope {\n export interface InitializeOptions {\n force?: boolean;\n }\n}\n"]}
|