@zaber/motion 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/device_io.d.ts +72 -72
  3. package/dist/lib/ascii/device_io.d.ts.map +1 -1
  4. package/dist/lib/ascii/device_io.js +176 -176
  5. package/dist/lib/ascii/device_io.js.map +1 -1
  6. package/dist/lib/ascii/index.d.ts +2 -0
  7. package/dist/lib/ascii/index.d.ts.map +1 -1
  8. package/dist/lib/ascii/index.js +2 -0
  9. package/dist/lib/ascii/index.js.map +1 -1
  10. package/dist/lib/ascii/pvt_io.d.ts +100 -0
  11. package/dist/lib/ascii/pvt_io.d.ts.map +1 -0
  12. package/dist/lib/ascii/pvt_io.js +318 -0
  13. package/dist/lib/ascii/pvt_io.js.map +1 -0
  14. package/dist/lib/ascii/pvt_sequence.d.ts +36 -24
  15. package/dist/lib/ascii/pvt_sequence.d.ts.map +1 -1
  16. package/dist/lib/ascii/pvt_sequence.js +92 -78
  17. package/dist/lib/ascii/pvt_sequence.js.map +1 -1
  18. package/dist/lib/ascii/stream.d.ts +55 -39
  19. package/dist/lib/ascii/stream.d.ts.map +1 -1
  20. package/dist/lib/ascii/stream.js +134 -116
  21. package/dist/lib/ascii/stream.js.map +1 -1
  22. package/dist/lib/ascii/stream_io.d.ts +115 -0
  23. package/dist/lib/ascii/stream_io.d.ts.map +1 -0
  24. package/dist/lib/ascii/stream_io.js +348 -0
  25. package/dist/lib/ascii/stream_io.js.map +1 -0
  26. package/dist/lib/library.js +1 -1
  27. package/dist/lib/library.js.map +1 -1
  28. package/dist/lib/requests/index.d.ts +6 -0
  29. package/dist/lib/requests/index.d.ts.map +1 -1
  30. package/dist/lib/requests/index.js +6 -0
  31. package/dist/lib/requests/index.js.map +1 -1
  32. package/dist/lib/requests/stream_cancel_all_outputs_schedule_request.d.ts +15 -0
  33. package/dist/lib/requests/stream_cancel_all_outputs_schedule_request.d.ts.map +1 -0
  34. package/dist/lib/requests/stream_cancel_all_outputs_schedule_request.js +36 -0
  35. package/dist/lib/requests/stream_cancel_all_outputs_schedule_request.js.map +1 -0
  36. package/dist/lib/requests/stream_cancel_output_schedule_request.d.ts +15 -0
  37. package/dist/lib/requests/stream_cancel_output_schedule_request.d.ts.map +1 -0
  38. package/dist/lib/requests/stream_cancel_output_schedule_request.js +35 -0
  39. package/dist/lib/requests/stream_cancel_output_schedule_request.js.map +1 -0
  40. package/dist/lib/requests/stream_set_all_analog_outputs_schedule_request.d.ts +18 -0
  41. package/dist/lib/requests/stream_set_all_analog_outputs_schedule_request.d.ts.map +1 -0
  42. package/dist/lib/requests/stream_set_all_analog_outputs_schedule_request.js +41 -0
  43. package/dist/lib/requests/stream_set_all_analog_outputs_schedule_request.js.map +1 -0
  44. package/dist/lib/requests/stream_set_all_digital_outputs_schedule_request.d.ts +19 -0
  45. package/dist/lib/requests/stream_set_all_digital_outputs_schedule_request.d.ts.map +1 -0
  46. package/dist/lib/requests/stream_set_all_digital_outputs_schedule_request.js +42 -0
  47. package/dist/lib/requests/stream_set_all_digital_outputs_schedule_request.js.map +1 -0
  48. package/dist/lib/requests/stream_set_analog_output_schedule_request.d.ts +19 -0
  49. package/dist/lib/requests/stream_set_analog_output_schedule_request.d.ts.map +1 -0
  50. package/dist/lib/requests/stream_set_analog_output_schedule_request.js +42 -0
  51. package/dist/lib/requests/stream_set_analog_output_schedule_request.js.map +1 -0
  52. package/dist/lib/requests/stream_set_digital_output_schedule_request.d.ts +20 -0
  53. package/dist/lib/requests/stream_set_digital_output_schedule_request.d.ts.map +1 -0
  54. package/dist/lib/requests/stream_set_digital_output_schedule_request.js +43 -0
  55. package/dist/lib/requests/stream_set_digital_output_schedule_request.js.map +1 -0
  56. package/package.json +1 -1
@@ -38,72 +38,77 @@ class DeviceIO {
38
38
  this._device = device;
39
39
  }
40
40
  /**
41
- * Returns the current values of all digital input channels.
42
- * @returns True if voltage is present on the input channel and false otherwise.
41
+ * Returns the number of I/O channels the device has.
42
+ * @returns An object containing the number of I/O channels the device has.
43
43
  */
44
- async getAllDigitalInputs() {
44
+ async getChannelsInfo() {
45
45
  const request = {
46
- ...requests.DeviceGetAllDigitalIORequest.DEFAULT,
46
+ ...requests.DeviceEmptyRequest.DEFAULT,
47
47
  interfaceId: this._device.connection.interfaceId,
48
48
  device: this._device.deviceAddress,
49
- channelType: 'di',
50
49
  toBinary() {
51
- return requests.DeviceGetAllDigitalIORequest.toBinary(this);
50
+ return requests.DeviceEmptyRequest.toBinary(this);
52
51
  },
53
52
  };
54
- const response = await gateway.callAsync('device/get_all_digital_io', request, requests.DeviceGetAllDigitalIOResponse.fromBinary);
55
- return response.values;
53
+ const response = await gateway.callAsync('device/get_io_info', request, device_io_info_1.DeviceIOInfo.fromBinary);
54
+ return response;
56
55
  }
57
56
  /**
58
- * Returns the current values of all digital output channels.
59
- * @returns True if the output channel is conducting and false otherwise.
57
+ * Sets the label of the specified channel.
58
+ * @param portType The type of channel to set the label of.
59
+ * @param channelNumber Channel number starting at 1.
60
+ * @param label The label to set for the specified channel.
61
+ * If no value or an empty string is provided, this label is deleted.
60
62
  */
61
- async getAllDigitalOutputs() {
63
+ async setLabel(portType, channelNumber, label) {
62
64
  const request = {
63
- ...requests.DeviceGetAllDigitalIORequest.DEFAULT,
65
+ ...requests.SetIoPortLabelRequest.DEFAULT,
64
66
  interfaceId: this._device.connection.interfaceId,
65
67
  device: this._device.deviceAddress,
66
- channelType: 'do',
68
+ portType: portType,
69
+ channelNumber: channelNumber,
70
+ label: label,
67
71
  toBinary() {
68
- return requests.DeviceGetAllDigitalIORequest.toBinary(this);
72
+ return requests.SetIoPortLabelRequest.toBinary(this);
69
73
  },
70
74
  };
71
- const response = await gateway.callAsync('device/get_all_digital_io', request, requests.DeviceGetAllDigitalIOResponse.fromBinary);
72
- return response.values;
75
+ await gateway.callAsync('device/set_io_label', request);
73
76
  }
74
77
  /**
75
- * Returns the current values of all analog input channels.
76
- * @returns Measurements of the voltage present on the input channels.
78
+ * Returns the label of the specified channel.
79
+ * @param portType The type of channel to get the label of.
80
+ * @param channelNumber Channel number starting at 1.
81
+ * @returns The label of the specified channel.
77
82
  */
78
- async getAllAnalogInputs() {
83
+ async getLabel(portType, channelNumber) {
79
84
  const request = {
80
- ...requests.DeviceGetAllAnalogIORequest.DEFAULT,
85
+ ...requests.GetIoPortLabelRequest.DEFAULT,
81
86
  interfaceId: this._device.connection.interfaceId,
82
87
  device: this._device.deviceAddress,
83
- channelType: 'ai',
88
+ portType: portType,
89
+ channelNumber: channelNumber,
84
90
  toBinary() {
85
- return requests.DeviceGetAllAnalogIORequest.toBinary(this);
91
+ return requests.GetIoPortLabelRequest.toBinary(this);
86
92
  },
87
93
  };
88
- const response = await gateway.callAsync('device/get_all_analog_io', request, requests.DeviceGetAllAnalogIOResponse.fromBinary);
89
- return response.values;
94
+ const response = await gateway.callAsync('device/get_io_label', request, requests.StringResponse.fromBinary);
95
+ return response.value;
90
96
  }
91
97
  /**
92
- * Returns the current values of all analog output channels.
93
- * @returns Measurements of voltage that the output channels are conducting.
98
+ * Returns every label assigned to an IO port on this device.
99
+ * @returns The labels set for this device's IO.
94
100
  */
95
- async getAllAnalogOutputs() {
101
+ async getAllLabels() {
96
102
  const request = {
97
- ...requests.DeviceGetAllAnalogIORequest.DEFAULT,
103
+ ...requests.DeviceEmptyRequest.DEFAULT,
98
104
  interfaceId: this._device.connection.interfaceId,
99
105
  device: this._device.deviceAddress,
100
- channelType: 'ao',
101
106
  toBinary() {
102
- return requests.DeviceGetAllAnalogIORequest.toBinary(this);
107
+ return requests.DeviceEmptyRequest.toBinary(this);
103
108
  },
104
109
  };
105
- const response = await gateway.callAsync('device/get_all_analog_io', request, requests.DeviceGetAllAnalogIOResponse.fromBinary);
106
- return response.values;
110
+ const response = await gateway.callAsync('device/get_all_io_labels', request, requests.GetAllIoPortLabelsResponse.fromBinary);
111
+ return response.labels;
107
112
  }
108
113
  /**
109
114
  * Returns the current value of the specified digital input channel.
@@ -182,146 +187,106 @@ class DeviceIO {
182
187
  return response.value;
183
188
  }
184
189
  /**
185
- * Sets values for all digital output channels.
186
- * @param values The type of action to perform on the channel.
190
+ * Returns the current values of all digital input channels.
191
+ * @returns True if voltage is present on the input channel and false otherwise.
187
192
  */
188
- async setAllDigitalOutputs(values) {
193
+ async getAllDigitalInputs() {
189
194
  const request = {
190
- ...requests.DeviceSetAllDigitalOutputsRequest.DEFAULT,
195
+ ...requests.DeviceGetAllDigitalIORequest.DEFAULT,
191
196
  interfaceId: this._device.connection.interfaceId,
192
197
  device: this._device.deviceAddress,
193
- values: values,
198
+ channelType: 'di',
194
199
  toBinary() {
195
- return requests.DeviceSetAllDigitalOutputsRequest.toBinary(this);
200
+ return requests.DeviceGetAllDigitalIORequest.toBinary(this);
196
201
  },
197
202
  };
198
- await gateway.callAsync('device/set_all_digital_outputs', request);
203
+ const response = await gateway.callAsync('device/get_all_digital_io', request, requests.DeviceGetAllDigitalIOResponse.fromBinary);
204
+ return response.values;
199
205
  }
200
206
  /**
201
- * Sets current and future value for all digital output channels.
202
- * Requires at least Firmware 7.37.
203
- * @param values The type of actions to perform immediately on output channels.
204
- * @param futureValues The type of actions to perform in the future on output channels.
205
- * @param delay Delay between setting current values and setting future values.
206
- * @param [unit=Units.NATIVE] Units of time.
207
+ * Returns the current values of all digital output channels.
208
+ * @returns True if the output channel is conducting and false otherwise.
207
209
  */
208
- async setAllDigitalOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
209
- if (delay <= 0) {
210
- throw new TypeError('Delay must be a positive value.');
211
- }
210
+ async getAllDigitalOutputs() {
212
211
  const request = {
213
- ...requests.DeviceSetAllDigitalOutputsScheduleRequest.DEFAULT,
212
+ ...requests.DeviceGetAllDigitalIORequest.DEFAULT,
214
213
  interfaceId: this._device.connection.interfaceId,
215
214
  device: this._device.deviceAddress,
216
- values: values,
217
- futureValues: futureValues,
218
- delay: delay,
219
- unit: unit,
215
+ channelType: 'do',
220
216
  toBinary() {
221
- return requests.DeviceSetAllDigitalOutputsScheduleRequest.toBinary(this);
217
+ return requests.DeviceGetAllDigitalIORequest.toBinary(this);
222
218
  },
223
219
  };
224
- await gateway.callAsync('device/set_all_digital_outputs_schedule', request);
220
+ const response = await gateway.callAsync('device/get_all_digital_io', request, requests.DeviceGetAllDigitalIOResponse.fromBinary);
221
+ return response.values;
225
222
  }
226
223
  /**
227
- * Cancel all scheduled digital output actions.
228
- * Requires at least Firmware 7.37.
229
- * @param [channels=[]] Optionally specify which channels to cancel.
230
- * Array length must be empty or equal to the number of channels on device.
231
- * Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
224
+ * Returns the current values of all analog input channels.
225
+ * @returns Measurements of the voltage present on the input channels.
232
226
  */
233
- async cancelAllDigitalOutputsSchedule(channels = []) {
227
+ async getAllAnalogInputs() {
234
228
  const request = {
235
- ...requests.DeviceCancelAllOutputsScheduleRequest.DEFAULT,
229
+ ...requests.DeviceGetAllAnalogIORequest.DEFAULT,
236
230
  interfaceId: this._device.connection.interfaceId,
237
231
  device: this._device.deviceAddress,
238
- analog: false,
239
- channels: channels,
232
+ channelType: 'ai',
240
233
  toBinary() {
241
- return requests.DeviceCancelAllOutputsScheduleRequest.toBinary(this);
234
+ return requests.DeviceGetAllAnalogIORequest.toBinary(this);
242
235
  },
243
236
  };
244
- await gateway.callAsync('device/cancel_all_outputs_schedule', request);
237
+ const response = await gateway.callAsync('device/get_all_analog_io', request, requests.DeviceGetAllAnalogIOResponse.fromBinary);
238
+ return response.values;
245
239
  }
246
240
  /**
247
- * Cancel all scheduled analog output actions.
248
- * Requires at least Firmware 7.38.
249
- * @param [channels=[]] Optionally specify which channels to cancel.
250
- * Array length must be empty or equal to the number of channels on device.
251
- * Specifying "True" for a channel will cancel the scheduled analog output value for that channel.
241
+ * Returns the current values of all analog output channels.
242
+ * @returns Measurements of voltage that the output channels are conducting.
252
243
  */
253
- async cancelAllAnalogOutputsSchedule(channels = []) {
244
+ async getAllAnalogOutputs() {
254
245
  const request = {
255
- ...requests.DeviceCancelAllOutputsScheduleRequest.DEFAULT,
246
+ ...requests.DeviceGetAllAnalogIORequest.DEFAULT,
256
247
  interfaceId: this._device.connection.interfaceId,
257
248
  device: this._device.deviceAddress,
258
- analog: true,
259
- channels: channels,
249
+ channelType: 'ao',
260
250
  toBinary() {
261
- return requests.DeviceCancelAllOutputsScheduleRequest.toBinary(this);
251
+ return requests.DeviceGetAllAnalogIORequest.toBinary(this);
262
252
  },
263
253
  };
264
- await gateway.callAsync('device/cancel_all_outputs_schedule', request);
254
+ const response = await gateway.callAsync('device/get_all_analog_io', request, requests.DeviceGetAllAnalogIOResponse.fromBinary);
255
+ return response.values;
265
256
  }
266
257
  /**
267
- * Sets values for all analog output channels.
268
- * @param values Voltage values to set the output channels to.
258
+ * Sets value for the specified digital output channel.
259
+ * @param channelNumber Channel number starting at 1.
260
+ * @param value The type of action to perform on the channel.
269
261
  */
270
- async setAllAnalogOutputs(values) {
262
+ async setDigitalOutput(channelNumber, value) {
271
263
  const request = {
272
- ...requests.DeviceSetAllAnalogOutputsRequest.DEFAULT,
264
+ ...requests.DeviceSetDigitalOutputRequest.DEFAULT,
273
265
  interfaceId: this._device.connection.interfaceId,
274
266
  device: this._device.deviceAddress,
275
- values: values,
267
+ channelNumber: channelNumber,
268
+ value: value,
276
269
  toBinary() {
277
- return requests.DeviceSetAllAnalogOutputsRequest.toBinary(this);
270
+ return requests.DeviceSetDigitalOutputRequest.toBinary(this);
278
271
  },
279
272
  };
280
- await gateway.callAsync('device/set_all_analog_outputs', request);
273
+ await gateway.callAsync('device/set_digital_output', request);
281
274
  }
282
275
  /**
283
- * Sets current and future values for all analog output channels.
284
- * Requires at least Firmware 7.38.
285
- * @param values Voltage values to set the output channels to immediately.
286
- * @param futureValues Voltage values to set the output channels to in the future.
287
- * @param delay Delay between setting current values and setting future values.
288
- * @param [unit=Units.NATIVE] Units of time.
276
+ * Sets values for all digital output channels.
277
+ * @param values The type of action to perform on the channel.
289
278
  */
290
- async setAllAnalogOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
291
- if (delay <= 0) {
292
- throw new TypeError('Delay must be a positive value.');
293
- }
279
+ async setAllDigitalOutputs(values) {
294
280
  const request = {
295
- ...requests.DeviceSetAllAnalogOutputsScheduleRequest.DEFAULT,
281
+ ...requests.DeviceSetAllDigitalOutputsRequest.DEFAULT,
296
282
  interfaceId: this._device.connection.interfaceId,
297
283
  device: this._device.deviceAddress,
298
284
  values: values,
299
- futureValues: futureValues,
300
- delay: delay,
301
- unit: unit,
302
- toBinary() {
303
- return requests.DeviceSetAllAnalogOutputsScheduleRequest.toBinary(this);
304
- },
305
- };
306
- await gateway.callAsync('device/set_all_analog_outputs_schedule', request);
307
- }
308
- /**
309
- * Sets value for the specified digital output channel.
310
- * @param channelNumber Channel number starting at 1.
311
- * @param value The type of action to perform on the channel.
312
- */
313
- async setDigitalOutput(channelNumber, value) {
314
- const request = {
315
- ...requests.DeviceSetDigitalOutputRequest.DEFAULT,
316
- interfaceId: this._device.connection.interfaceId,
317
- device: this._device.deviceAddress,
318
- channelNumber: channelNumber,
319
- value: value,
320
285
  toBinary() {
321
- return requests.DeviceSetDigitalOutputRequest.toBinary(this);
286
+ return requests.DeviceSetAllDigitalOutputsRequest.toBinary(this);
322
287
  },
323
288
  };
324
- await gateway.callAsync('device/set_digital_output', request);
289
+ await gateway.callAsync('device/set_all_digital_outputs', request);
325
290
  }
326
291
  /**
327
292
  * Sets current and future value for the specified digital output channel.
@@ -352,58 +317,64 @@ class DeviceIO {
352
317
  await gateway.callAsync('device/set_digital_output_schedule', request);
353
318
  }
354
319
  /**
355
- * Cancels a scheduled digital output action.
320
+ * Sets current and future values for all digital output channels.
356
321
  * Requires at least Firmware 7.37.
357
- * @param channelNumber Channel number starting at 1.
322
+ * @param values The type of actions to perform immediately on output channels.
323
+ * @param futureValues The type of actions to perform in the future on output channels.
324
+ * @param delay Delay between setting current values and setting future values.
325
+ * @param [unit=Units.NATIVE] Units of time.
358
326
  */
359
- async cancelDigitalOutputSchedule(channelNumber) {
327
+ async setAllDigitalOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
328
+ if (delay <= 0) {
329
+ throw new TypeError('Delay must be a positive value.');
330
+ }
360
331
  const request = {
361
- ...requests.DeviceCancelOutputScheduleRequest.DEFAULT,
332
+ ...requests.DeviceSetAllDigitalOutputsScheduleRequest.DEFAULT,
362
333
  interfaceId: this._device.connection.interfaceId,
363
334
  device: this._device.deviceAddress,
364
- analog: false,
365
- channelNumber: channelNumber,
335
+ values: values,
336
+ futureValues: futureValues,
337
+ delay: delay,
338
+ unit: unit,
366
339
  toBinary() {
367
- return requests.DeviceCancelOutputScheduleRequest.toBinary(this);
340
+ return requests.DeviceSetAllDigitalOutputsScheduleRequest.toBinary(this);
368
341
  },
369
342
  };
370
- await gateway.callAsync('device/cancel_output_schedule', request);
343
+ await gateway.callAsync('device/set_all_digital_outputs_schedule', request);
371
344
  }
372
345
  /**
373
- * Cancels a scheduled analog output value.
374
- * Requires at least Firmware 7.38.
346
+ * Sets value for the specified analog output channel.
375
347
  * @param channelNumber Channel number starting at 1.
348
+ * @param value Value to set the output channel voltage to.
376
349
  */
377
- async cancelAnalogOutputSchedule(channelNumber) {
350
+ async setAnalogOutput(channelNumber, value) {
378
351
  const request = {
379
- ...requests.DeviceCancelOutputScheduleRequest.DEFAULT,
352
+ ...requests.DeviceSetAnalogOutputRequest.DEFAULT,
380
353
  interfaceId: this._device.connection.interfaceId,
381
354
  device: this._device.deviceAddress,
382
- analog: true,
383
355
  channelNumber: channelNumber,
356
+ value: value,
384
357
  toBinary() {
385
- return requests.DeviceCancelOutputScheduleRequest.toBinary(this);
358
+ return requests.DeviceSetAnalogOutputRequest.toBinary(this);
386
359
  },
387
360
  };
388
- await gateway.callAsync('device/cancel_output_schedule', request);
361
+ await gateway.callAsync('device/set_analog_output', request);
389
362
  }
390
363
  /**
391
- * Sets value for the specified analog output channel.
392
- * @param channelNumber Channel number starting at 1.
393
- * @param value Value to set the output channel voltage to.
364
+ * Sets values for all analog output channels.
365
+ * @param values Voltage values to set the output channels to.
394
366
  */
395
- async setAnalogOutput(channelNumber, value) {
367
+ async setAllAnalogOutputs(values) {
396
368
  const request = {
397
- ...requests.DeviceSetAnalogOutputRequest.DEFAULT,
369
+ ...requests.DeviceSetAllAnalogOutputsRequest.DEFAULT,
398
370
  interfaceId: this._device.connection.interfaceId,
399
371
  device: this._device.deviceAddress,
400
- channelNumber: channelNumber,
401
- value: value,
372
+ values: values,
402
373
  toBinary() {
403
- return requests.DeviceSetAnalogOutputRequest.toBinary(this);
374
+ return requests.DeviceSetAllAnalogOutputsRequest.toBinary(this);
404
375
  },
405
376
  };
406
- await gateway.callAsync('device/set_analog_output', request);
377
+ await gateway.callAsync('device/set_all_analog_outputs', request);
407
378
  }
408
379
  /**
409
380
  * Sets current and future value for the specified analog output channel.
@@ -434,77 +405,106 @@ class DeviceIO {
434
405
  await gateway.callAsync('device/set_analog_output_schedule', request);
435
406
  }
436
407
  /**
437
- * Returns the number of I/O channels the device has.
438
- * @returns An object containing the number of I/O channels the device has.
408
+ * Sets current and future values for all analog output channels.
409
+ * Requires at least Firmware 7.38.
410
+ * @param values Voltage values to set the output channels to immediately.
411
+ * @param futureValues Voltage values to set the output channels to in the future.
412
+ * @param delay Delay between setting current values and setting future values.
413
+ * @param [unit=Units.NATIVE] Units of time.
439
414
  */
440
- async getChannelsInfo() {
415
+ async setAllAnalogOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
416
+ if (delay <= 0) {
417
+ throw new TypeError('Delay must be a positive value.');
418
+ }
441
419
  const request = {
442
- ...requests.DeviceEmptyRequest.DEFAULT,
420
+ ...requests.DeviceSetAllAnalogOutputsScheduleRequest.DEFAULT,
443
421
  interfaceId: this._device.connection.interfaceId,
444
422
  device: this._device.deviceAddress,
423
+ values: values,
424
+ futureValues: futureValues,
425
+ delay: delay,
426
+ unit: unit,
445
427
  toBinary() {
446
- return requests.DeviceEmptyRequest.toBinary(this);
428
+ return requests.DeviceSetAllAnalogOutputsScheduleRequest.toBinary(this);
447
429
  },
448
430
  };
449
- const response = await gateway.callAsync('device/get_io_info', request, device_io_info_1.DeviceIOInfo.fromBinary);
450
- return response;
431
+ await gateway.callAsync('device/set_all_analog_outputs_schedule', request);
451
432
  }
452
433
  /**
453
- * Sets the label of the specified channel.
454
- * @param portType The type of channel to set the label of.
434
+ * Cancels a scheduled digital output action.
435
+ * Requires at least Firmware 7.37.
455
436
  * @param channelNumber Channel number starting at 1.
456
- * @param label The label to set for the specified channel.
457
- * If no value or an empty string is provided, this label is deleted.
458
437
  */
459
- async setLabel(portType, channelNumber, label) {
438
+ async cancelDigitalOutputSchedule(channelNumber) {
460
439
  const request = {
461
- ...requests.SetIoPortLabelRequest.DEFAULT,
440
+ ...requests.DeviceCancelOutputScheduleRequest.DEFAULT,
462
441
  interfaceId: this._device.connection.interfaceId,
463
442
  device: this._device.deviceAddress,
464
- portType: portType,
443
+ analog: false,
465
444
  channelNumber: channelNumber,
466
- label: label,
467
445
  toBinary() {
468
- return requests.SetIoPortLabelRequest.toBinary(this);
446
+ return requests.DeviceCancelOutputScheduleRequest.toBinary(this);
469
447
  },
470
448
  };
471
- await gateway.callAsync('device/set_io_label', request);
449
+ await gateway.callAsync('device/cancel_output_schedule', request);
472
450
  }
473
451
  /**
474
- * Returns the label of the specified channel.
475
- * @param portType The type of channel to get the label of.
452
+ * Cancel all scheduled digital output actions.
453
+ * Requires at least Firmware 7.37.
454
+ * @param [channels=[]] Optionally specify which channels to cancel.
455
+ * Array length must be empty or equal to the number of channels on device.
456
+ * Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
457
+ */
458
+ async cancelAllDigitalOutputsSchedule(channels = []) {
459
+ const request = {
460
+ ...requests.DeviceCancelAllOutputsScheduleRequest.DEFAULT,
461
+ interfaceId: this._device.connection.interfaceId,
462
+ device: this._device.deviceAddress,
463
+ analog: false,
464
+ channels: channels,
465
+ toBinary() {
466
+ return requests.DeviceCancelAllOutputsScheduleRequest.toBinary(this);
467
+ },
468
+ };
469
+ await gateway.callAsync('device/cancel_all_outputs_schedule', request);
470
+ }
471
+ /**
472
+ * Cancels a scheduled analog output value.
473
+ * Requires at least Firmware 7.38.
476
474
  * @param channelNumber Channel number starting at 1.
477
- * @returns The label of the specified channel.
478
475
  */
479
- async getLabel(portType, channelNumber) {
476
+ async cancelAnalogOutputSchedule(channelNumber) {
480
477
  const request = {
481
- ...requests.GetIoPortLabelRequest.DEFAULT,
478
+ ...requests.DeviceCancelOutputScheduleRequest.DEFAULT,
482
479
  interfaceId: this._device.connection.interfaceId,
483
480
  device: this._device.deviceAddress,
484
- portType: portType,
481
+ analog: true,
485
482
  channelNumber: channelNumber,
486
483
  toBinary() {
487
- return requests.GetIoPortLabelRequest.toBinary(this);
484
+ return requests.DeviceCancelOutputScheduleRequest.toBinary(this);
488
485
  },
489
486
  };
490
- const response = await gateway.callAsync('device/get_io_label', request, requests.StringResponse.fromBinary);
491
- return response.value;
487
+ await gateway.callAsync('device/cancel_output_schedule', request);
492
488
  }
493
489
  /**
494
- * Returns every label assigned to an IO port on this device.
495
- * @returns The labels set for this device's IO.
490
+ * Cancel all scheduled analog output actions.
491
+ * Requires at least Firmware 7.38.
492
+ * @param [channels=[]] Optionally specify which channels to cancel.
493
+ * Array length must be empty or equal to the number of channels on device.
494
+ * Specifying "True" for a channel will cancel the scheduled analog output value for that channel.
496
495
  */
497
- async getAllLabels() {
496
+ async cancelAllAnalogOutputsSchedule(channels = []) {
498
497
  const request = {
499
- ...requests.DeviceEmptyRequest.DEFAULT,
498
+ ...requests.DeviceCancelAllOutputsScheduleRequest.DEFAULT,
500
499
  interfaceId: this._device.connection.interfaceId,
501
500
  device: this._device.deviceAddress,
501
+ analog: true,
502
+ channels: channels,
502
503
  toBinary() {
503
- return requests.DeviceEmptyRequest.toBinary(this);
504
+ return requests.DeviceCancelAllOutputsScheduleRequest.toBinary(this);
504
505
  },
505
506
  };
506
- const response = await gateway.callAsync('device/get_all_io_labels', request, requests.GetAllIoPortLabelsResponse.fromBinary);
507
- return response.labels;
507
+ await gateway.callAsync('device/cancel_all_outputs_schedule', request);
508
508
  }
509
509
  }
510
510
  exports.DeviceIO = DeviceIO;