@zaber/motion 6.3.0 → 6.4.1

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
@@ -0,0 +1,318 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.PvtIo = void 0;
29
+ const units_1 = require("../units");
30
+ const gateway = __importStar(require("../gateway"));
31
+ const requests = __importStar(require("../requests"));
32
+ /**
33
+ * Class providing access to I/O for a PVT sequence.
34
+ */
35
+ class PvtIo {
36
+ constructor(device, streamId) {
37
+ this._device = device;
38
+ this._streamId = streamId;
39
+ }
40
+ /**
41
+ * Sets value for the specified digital output channel.
42
+ * @param channelNumber Channel number starting at 1.
43
+ * @param value The type of action to perform on the channel.
44
+ */
45
+ async setDigitalOutput(channelNumber, value) {
46
+ const request = {
47
+ ...requests.StreamSetDigitalOutputRequest.DEFAULT,
48
+ interfaceId: this._device.connection.interfaceId,
49
+ device: this._device.deviceAddress,
50
+ streamId: this._streamId,
51
+ pvt: true,
52
+ channelNumber: channelNumber,
53
+ value: value,
54
+ toBinary() {
55
+ return requests.StreamSetDigitalOutputRequest.toBinary(this);
56
+ },
57
+ };
58
+ await gateway.callAsync('device/stream_set_digital_output', request);
59
+ }
60
+ /**
61
+ * Sets values for all digital output channels.
62
+ * @param values The type of action to perform on the channel.
63
+ */
64
+ async setAllDigitalOutputs(values) {
65
+ const request = {
66
+ ...requests.StreamSetAllDigitalOutputsRequest.DEFAULT,
67
+ interfaceId: this._device.connection.interfaceId,
68
+ device: this._device.deviceAddress,
69
+ streamId: this._streamId,
70
+ pvt: true,
71
+ values: values,
72
+ toBinary() {
73
+ return requests.StreamSetAllDigitalOutputsRequest.toBinary(this);
74
+ },
75
+ };
76
+ await gateway.callAsync('device/stream_set_all_digital_outputs', request);
77
+ }
78
+ /**
79
+ * Sets value for the specified analog output channel.
80
+ * @param channelNumber Channel number starting at 1.
81
+ * @param value Value to set the output channel voltage to.
82
+ */
83
+ async setAnalogOutput(channelNumber, value) {
84
+ const request = {
85
+ ...requests.StreamSetAnalogOutputRequest.DEFAULT,
86
+ interfaceId: this._device.connection.interfaceId,
87
+ device: this._device.deviceAddress,
88
+ streamId: this._streamId,
89
+ pvt: true,
90
+ channelNumber: channelNumber,
91
+ value: value,
92
+ toBinary() {
93
+ return requests.StreamSetAnalogOutputRequest.toBinary(this);
94
+ },
95
+ };
96
+ await gateway.callAsync('device/stream_set_analog_output', request);
97
+ }
98
+ /**
99
+ * Sets values for all analog output channels.
100
+ * @param values Voltage values to set the output channels to.
101
+ */
102
+ async setAllAnalogOutputs(values) {
103
+ const request = {
104
+ ...requests.StreamSetAllAnalogOutputsRequest.DEFAULT,
105
+ interfaceId: this._device.connection.interfaceId,
106
+ device: this._device.deviceAddress,
107
+ streamId: this._streamId,
108
+ pvt: true,
109
+ values: values,
110
+ toBinary() {
111
+ return requests.StreamSetAllAnalogOutputsRequest.toBinary(this);
112
+ },
113
+ };
114
+ await gateway.callAsync('device/stream_set_all_analog_outputs', request);
115
+ }
116
+ /**
117
+ * Sets current and future value for the specified digital output channel.
118
+ * Requires at least Firmware 7.37.
119
+ * @param channelNumber Channel number starting at 1.
120
+ * @param value The type of action to perform immediately on the channel.
121
+ * @param futureValue The type of action to perform in the future on the channel.
122
+ * @param delay Delay between setting current value and setting future value.
123
+ * @param [unit=Units.NATIVE] Units of time.
124
+ */
125
+ async setDigitalOutputSchedule(channelNumber, value, futureValue, delay, unit = units_1.Units.NATIVE) {
126
+ if (delay <= 0) {
127
+ throw new TypeError('Delay must be a positive value.');
128
+ }
129
+ const request = {
130
+ ...requests.StreamSetDigitalOutputScheduleRequest.DEFAULT,
131
+ interfaceId: this._device.connection.interfaceId,
132
+ device: this._device.deviceAddress,
133
+ streamId: this._streamId,
134
+ pvt: true,
135
+ channelNumber: channelNumber,
136
+ value: value,
137
+ futureValue: futureValue,
138
+ delay: delay,
139
+ unit: unit,
140
+ toBinary() {
141
+ return requests.StreamSetDigitalOutputScheduleRequest.toBinary(this);
142
+ },
143
+ };
144
+ await gateway.callAsync('device/stream_set_digital_output_schedule', request);
145
+ }
146
+ /**
147
+ * Sets current and future values for all digital output channels.
148
+ * Requires at least Firmware 7.37.
149
+ * @param values The type of actions to perform immediately on output channels.
150
+ * @param futureValues The type of actions to perform in the future on output channels.
151
+ * @param delay Delay between setting current values and setting future values.
152
+ * @param [unit=Units.NATIVE] Units of time.
153
+ */
154
+ async setAllDigitalOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
155
+ if (delay <= 0) {
156
+ throw new TypeError('Delay must be a positive value.');
157
+ }
158
+ const request = {
159
+ ...requests.StreamSetAllDigitalOutputsScheduleRequest.DEFAULT,
160
+ interfaceId: this._device.connection.interfaceId,
161
+ device: this._device.deviceAddress,
162
+ streamId: this._streamId,
163
+ pvt: true,
164
+ values: values,
165
+ futureValues: futureValues,
166
+ delay: delay,
167
+ unit: unit,
168
+ toBinary() {
169
+ return requests.StreamSetAllDigitalOutputsScheduleRequest.toBinary(this);
170
+ },
171
+ };
172
+ await gateway.callAsync('device/stream_set_all_digital_outputs_schedule', request);
173
+ }
174
+ /**
175
+ * Sets current and future value for the specified analog output channel.
176
+ * Requires at least Firmware 7.38.
177
+ * @param channelNumber Channel number starting at 1.
178
+ * @param value Value to set the output channel voltage to immediately.
179
+ * @param futureValue Value to set the output channel voltage to in the future.
180
+ * @param delay Delay between setting current value and setting future value.
181
+ * @param [unit=Units.NATIVE] Units of time.
182
+ */
183
+ async setAnalogOutputSchedule(channelNumber, value, futureValue, delay, unit = units_1.Units.NATIVE) {
184
+ if (delay <= 0) {
185
+ throw new TypeError('Delay must be a positive value.');
186
+ }
187
+ const request = {
188
+ ...requests.StreamSetAnalogOutputScheduleRequest.DEFAULT,
189
+ interfaceId: this._device.connection.interfaceId,
190
+ device: this._device.deviceAddress,
191
+ streamId: this._streamId,
192
+ pvt: true,
193
+ channelNumber: channelNumber,
194
+ value: value,
195
+ futureValue: futureValue,
196
+ delay: delay,
197
+ unit: unit,
198
+ toBinary() {
199
+ return requests.StreamSetAnalogOutputScheduleRequest.toBinary(this);
200
+ },
201
+ };
202
+ await gateway.callAsync('device/stream_set_analog_output_schedule', request);
203
+ }
204
+ /**
205
+ * Sets current and future values for all analog output channels.
206
+ * Requires at least Firmware 7.38.
207
+ * @param values Voltage values to set the output channels to immediately.
208
+ * @param futureValues Voltage values to set the output channels to in the future.
209
+ * @param delay Delay between setting current values and setting future values.
210
+ * @param [unit=Units.NATIVE] Units of time.
211
+ */
212
+ async setAllAnalogOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
213
+ if (delay <= 0) {
214
+ throw new TypeError('Delay must be a positive value.');
215
+ }
216
+ const request = {
217
+ ...requests.StreamSetAllAnalogOutputsScheduleRequest.DEFAULT,
218
+ interfaceId: this._device.connection.interfaceId,
219
+ device: this._device.deviceAddress,
220
+ streamId: this._streamId,
221
+ pvt: true,
222
+ values: values,
223
+ futureValues: futureValues,
224
+ delay: delay,
225
+ unit: unit,
226
+ toBinary() {
227
+ return requests.StreamSetAllAnalogOutputsScheduleRequest.toBinary(this);
228
+ },
229
+ };
230
+ await gateway.callAsync('device/stream_set_all_analog_outputs_schedule', request);
231
+ }
232
+ /**
233
+ * Cancels a scheduled digital output action.
234
+ * Requires at least Firmware 7.37.
235
+ * @param channelNumber Channel number starting at 1.
236
+ */
237
+ async cancelDigitalOutputSchedule(channelNumber) {
238
+ const request = {
239
+ ...requests.StreamCancelOutputScheduleRequest.DEFAULT,
240
+ interfaceId: this._device.connection.interfaceId,
241
+ device: this._device.deviceAddress,
242
+ analog: false,
243
+ streamId: this._streamId,
244
+ pvt: true,
245
+ channelNumber: channelNumber,
246
+ toBinary() {
247
+ return requests.StreamCancelOutputScheduleRequest.toBinary(this);
248
+ },
249
+ };
250
+ await gateway.callAsync('device/stream_cancel_output_schedule', request);
251
+ }
252
+ /**
253
+ * Cancel all scheduled digital output actions.
254
+ * Requires at least Firmware 7.37.
255
+ * @param [channels=[]] Optionally specify which channels to cancel.
256
+ * Array length must be empty or equal to the number of channels on device.
257
+ * Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
258
+ */
259
+ async cancelAllDigitalOutputsSchedule(channels = []) {
260
+ const request = {
261
+ ...requests.StreamCancelAllOutputsScheduleRequest.DEFAULT,
262
+ interfaceId: this._device.connection.interfaceId,
263
+ device: this._device.deviceAddress,
264
+ analog: false,
265
+ streamId: this._streamId,
266
+ pvt: true,
267
+ channels: channels,
268
+ toBinary() {
269
+ return requests.StreamCancelAllOutputsScheduleRequest.toBinary(this);
270
+ },
271
+ };
272
+ await gateway.callAsync('device/stream_cancel_all_outputs_schedule', request);
273
+ }
274
+ /**
275
+ * Cancels a scheduled analog output value.
276
+ * Requires at least Firmware 7.38.
277
+ * @param channelNumber Channel number starting at 1.
278
+ */
279
+ async cancelAnalogOutputSchedule(channelNumber) {
280
+ const request = {
281
+ ...requests.StreamCancelOutputScheduleRequest.DEFAULT,
282
+ interfaceId: this._device.connection.interfaceId,
283
+ device: this._device.deviceAddress,
284
+ analog: true,
285
+ streamId: this._streamId,
286
+ pvt: true,
287
+ channelNumber: channelNumber,
288
+ toBinary() {
289
+ return requests.StreamCancelOutputScheduleRequest.toBinary(this);
290
+ },
291
+ };
292
+ await gateway.callAsync('device/stream_cancel_output_schedule', request);
293
+ }
294
+ /**
295
+ * Cancel all scheduled analog output actions.
296
+ * Requires at least Firmware 7.38.
297
+ * @param [channels=[]] Optionally specify which channels to cancel.
298
+ * Array length must be empty or equal to the number of channels on device.
299
+ * Specifying "True" for a channel will cancel the scheduled analog output value for that channel.
300
+ */
301
+ async cancelAllAnalogOutputsSchedule(channels = []) {
302
+ const request = {
303
+ ...requests.StreamCancelAllOutputsScheduleRequest.DEFAULT,
304
+ interfaceId: this._device.connection.interfaceId,
305
+ device: this._device.deviceAddress,
306
+ analog: true,
307
+ streamId: this._streamId,
308
+ pvt: true,
309
+ channels: channels,
310
+ toBinary() {
311
+ return requests.StreamCancelAllOutputsScheduleRequest.toBinary(this);
312
+ },
313
+ };
314
+ await gateway.callAsync('device/stream_cancel_all_outputs_schedule', request);
315
+ }
316
+ }
317
+ exports.PvtIo = PvtIo;
318
+ //# sourceMappingURL=pvt_io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pvt_io.js","sourceRoot":"","sources":["../../../src/ascii/pvt_io.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAA+C;AAC/C,oDAAsC;AACtC,sDAAwC;AAGxC;;GAEG;AACH,MAAa,KAAK;IAKhB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,gBAAgB,CAC3B,aAAqB,EACrB,KAA0B;QAE1B,MAAM,OAAO,GAA6D;YACxE,GAAG,QAAQ,CAAC,6BAA6B,CAAC,OAAO;YACjD,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC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AAC,OAAO,CAAC,UAAU,CAAC,WAAW;YAChD,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YAClC,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,GAAG,EAAE,IAAI;YACT,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,iCAAiC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACnE,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,sCAAsC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,8BAA8B,CACzC,WAAsB,EAAE;QAExB,MAAM,OAAO,GAAqE;YAChF,GAAG,QAAQ,CAAC,qCAAqC,CAAC,OAAO;YACzD,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW;YAChD,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YAClC,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,qCAAqC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvE,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,2CAA2C,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AA7VD,sBA6VC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Time, Native, Units } from '../units';\nimport * as gateway from '../gateway';\nimport * as requests from '../requests';\nimport { DigitalOutputAction } from './digital_output_action';\n\n/**\n * Class providing access to I/O for a PVT sequence.\n */\nexport class PvtIo {\n private _device: Device;\n\n private _streamId: number;\n\n constructor(device: Device, streamId: number) {\n this._device = device;\n this._streamId = streamId;\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: requests.StreamSetDigitalOutputRequest & gateway.Message = {\n ...requests.StreamSetDigitalOutputRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n value: value,\n toBinary() {\n return requests.StreamSetDigitalOutputRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_digital_output', request);\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: requests.StreamSetAllDigitalOutputsRequest & gateway.Message = {\n ...requests.StreamSetAllDigitalOutputsRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n values: values,\n toBinary() {\n return requests.StreamSetAllDigitalOutputsRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_all_digital_outputs', 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: requests.StreamSetAnalogOutputRequest & gateway.Message = {\n ...requests.StreamSetAnalogOutputRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n value: value,\n toBinary() {\n return requests.StreamSetAnalogOutputRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_analog_output', 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: requests.StreamSetAllAnalogOutputsRequest & gateway.Message = {\n ...requests.StreamSetAllAnalogOutputsRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n values: values,\n toBinary() {\n return requests.StreamSetAllAnalogOutputsRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_all_analog_outputs', 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: requests.StreamSetDigitalOutputScheduleRequest & gateway.Message = {\n ...requests.StreamSetDigitalOutputScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n value: value,\n futureValue: futureValue,\n delay: delay,\n unit: unit,\n toBinary() {\n return requests.StreamSetDigitalOutputScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_digital_output_schedule', request);\n }\n\n /**\n * Sets current and future values 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: requests.StreamSetAllDigitalOutputsScheduleRequest & gateway.Message = {\n ...requests.StreamSetAllDigitalOutputsScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n values: values,\n futureValues: futureValues,\n delay: delay,\n unit: unit,\n toBinary() {\n return requests.StreamSetAllDigitalOutputsScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_all_digital_outputs_schedule', 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: requests.StreamSetAnalogOutputScheduleRequest & gateway.Message = {\n ...requests.StreamSetAnalogOutputScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n value: value,\n futureValue: futureValue,\n delay: delay,\n unit: unit,\n toBinary() {\n return requests.StreamSetAnalogOutputScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_analog_output_schedule', 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: requests.StreamSetAllAnalogOutputsScheduleRequest & gateway.Message = {\n ...requests.StreamSetAllAnalogOutputsScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n streamId: this._streamId,\n pvt: true,\n values: values,\n futureValues: futureValues,\n delay: delay,\n unit: unit,\n toBinary() {\n return requests.StreamSetAllAnalogOutputsScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_set_all_analog_outputs_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: requests.StreamCancelOutputScheduleRequest & gateway.Message = {\n ...requests.StreamCancelOutputScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n analog: false,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n toBinary() {\n return requests.StreamCancelOutputScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_cancel_output_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: requests.StreamCancelAllOutputsScheduleRequest & gateway.Message = {\n ...requests.StreamCancelAllOutputsScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n analog: false,\n streamId: this._streamId,\n pvt: true,\n channels: channels,\n toBinary() {\n return requests.StreamCancelAllOutputsScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_cancel_all_outputs_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: requests.StreamCancelOutputScheduleRequest & gateway.Message = {\n ...requests.StreamCancelOutputScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n analog: true,\n streamId: this._streamId,\n pvt: true,\n channelNumber: channelNumber,\n toBinary() {\n return requests.StreamCancelOutputScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_cancel_output_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: requests.StreamCancelAllOutputsScheduleRequest & gateway.Message = {\n ...requests.StreamCancelAllOutputsScheduleRequest.DEFAULT,\n interfaceId: this._device.connection.interfaceId,\n device: this._device.deviceAddress,\n analog: true,\n streamId: this._streamId,\n pvt: true,\n channels: channels,\n toBinary() {\n return requests.StreamCancelAllOutputsScheduleRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_cancel_all_outputs_schedule', request);\n }\n}\n\nnamespace PvtIo {\n}\n"]}
@@ -3,6 +3,7 @@ import { Measurement } from '../measurement';
3
3
  import { PvtBuffer } from './pvt_buffer';
4
4
  import { PvtMode } from './pvt_mode';
5
5
  import { PvtAxisDefinition } from './pvt_axis_definition';
6
+ import { PvtIo } from './pvt_io';
6
7
  import { DigitalOutputAction } from './digital_output_action';
7
8
  /**
8
9
  * A handle for a PVT sequence with this number on the device.
@@ -30,6 +31,11 @@ export declare class PvtSequence {
30
31
  * An array of axes definitions the PVT sequence is set up to control.
31
32
  */
32
33
  get axes(): PvtAxisDefinition[];
34
+ /**
35
+ * Gets an object that provides access to I/O for this sequence.
36
+ */
37
+ get io(): PvtIo;
38
+ private _io;
33
39
  constructor(device: Device, pvtId: number);
34
40
  /**
35
41
  * Setup the PVT sequence to control the specified axes and to queue actions on the device.
@@ -82,30 +88,6 @@ export declare class PvtSequence {
82
88
  * @param time The duration between the previous point in the sequence and this one.
83
89
  */
84
90
  pointRelative(positions: Measurement[], velocities: (Measurement | null)[], time: Measurement): Promise<void>;
85
- /**
86
- * Set the value of a digital output channel.
87
- * @param channelNumber The number of the digital output channel.
88
- * Channel numbers are numbered from one.
89
- * @param value The type of action to perform on the channel.
90
- */
91
- setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
92
- /**
93
- * Set the value of an analog output channel.
94
- * @param channelNumber The number of the analog output channel.
95
- * Channel numbers are numbered from one.
96
- * @param value The value to set the channel to, in Volts.
97
- */
98
- setAnalogOutput(channelNumber: number, value: number): Promise<void>;
99
- /**
100
- * Sets values for all digital output channels.
101
- * @param values The type of action to perform on the channel.
102
- */
103
- setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
104
- /**
105
- * Sets values for all analog output channels.
106
- * @param values The values to set the output channels to, in Volts.
107
- */
108
- setAllAnalogOutputs(values: number[]): Promise<void>;
109
91
  /**
110
92
  * Waits until the live PVT sequence executes all queued actions.
111
93
  * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
@@ -178,6 +160,36 @@ export declare class PvtSequence {
178
160
  * @returns Mode of the PVT sequence.
179
161
  */
180
162
  private _retrieveMode;
163
+ /**
164
+ * @deprecated Use PvtSequence.Io.SetDigitalOutput instead.
165
+ *
166
+ * Sets value for the specified digital output channel.
167
+ * @param channelNumber Channel number starting at 1.
168
+ * @param value The type of action to perform on the channel.
169
+ */
170
+ setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
171
+ /**
172
+ * @deprecated Use PvtSequence.Io.SetAllDigitalOutputs instead.
173
+ *
174
+ * Sets values for all digital output channels.
175
+ * @param values The type of action to perform on the channel.
176
+ */
177
+ setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
178
+ /**
179
+ * @deprecated Use PvtSequence.Io.SetAnalogOutput instead.
180
+ *
181
+ * Sets value for the specified analog output channel.
182
+ * @param channelNumber Channel number starting at 1.
183
+ * @param value Value to set the output channel voltage to.
184
+ */
185
+ setAnalogOutput(channelNumber: number, value: number): Promise<void>;
186
+ /**
187
+ * @deprecated Use PvtSequence.Io.SetAllAnalogOutputs instead.
188
+ *
189
+ * Sets values for all analog output channels.
190
+ * @param values Voltage values to set the output channels to.
191
+ */
192
+ setAllAnalogOutputs(values: number[]): Promise<void>;
181
193
  }
182
194
  declare namespace PvtSequence {
183
195
  interface WaitUntilIdleOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"pvt_sequence.d.ts","sourceRoot":"","sources":["../../../src/ascii/pvt_sequence.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;GAMG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,IAAW,MAAM,IAAI,MAAM,CAE1B;IACD,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,IAAW,KAAK,IAAI,MAAM,CAEzB;IACD,OAAO,CAAC,MAAM,CAAS;IAEvB;;OAEG;IACH,IAAW,IAAI,IAAI,OAAO,CAEzB;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,iBAAiB,EAAE,CAErC;gBAEW,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAKzC;;;;OAIG;IACU,kBAAkB,CAC7B,GAAG,OAAO,EAAE,iBAAiB,EAAE,GAC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EAAE,MAAM,EAAE,GACf,OAAO,CAAC,IAAI,CAAC;CAejB;AAED,kBAAU,WAAW,CAAC;IACpB,UAAiB,oBAAoB;QACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC/B;CACF"}
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.PvtSequence = void 0;
29
29
  const gateway = __importStar(require("../gateway"));
30
30
  const requests = __importStar(require("../requests"));
31
+ const pvt_io_1 = require("./pvt_io");
31
32
  /**
32
33
  * A handle for a PVT sequence with this number on the device.
33
34
  * PVT sequences provide a way execute or store trajectory
@@ -60,9 +61,16 @@ class PvtSequence {
60
61
  get axes() {
61
62
  return this._retrieveAxes();
62
63
  }
64
+ /**
65
+ * Gets an object that provides access to I/O for this sequence.
66
+ */
67
+ get io() {
68
+ return this._io;
69
+ }
63
70
  constructor(device, pvtId) {
64
71
  this._device = device;
65
72
  this._pvtId = pvtId;
73
+ this._io = new pvt_io_1.PvtIo(device, pvtId);
66
74
  }
67
75
  /**
68
76
  * Setup the PVT sequence to control the specified axes and to queue actions on the device.
@@ -214,84 +222,6 @@ class PvtSequence {
214
222
  };
215
223
  await gateway.callAsync('device/stream_point', request);
216
224
  }
217
- /**
218
- * Set the value of a digital output channel.
219
- * @param channelNumber The number of the digital output channel.
220
- * Channel numbers are numbered from one.
221
- * @param value The type of action to perform on the channel.
222
- */
223
- async setDigitalOutput(channelNumber, value) {
224
- const request = {
225
- ...requests.StreamSetDigitalOutputRequest.DEFAULT,
226
- interfaceId: this.device.connection.interfaceId,
227
- device: this.device.deviceAddress,
228
- streamId: this.pvtId,
229
- pvt: true,
230
- channelNumber: channelNumber,
231
- value: value,
232
- toBinary() {
233
- return requests.StreamSetDigitalOutputRequest.toBinary(this);
234
- },
235
- };
236
- await gateway.callAsync('device/stream_set_digital_output', request);
237
- }
238
- /**
239
- * Set the value of an analog output channel.
240
- * @param channelNumber The number of the analog output channel.
241
- * Channel numbers are numbered from one.
242
- * @param value The value to set the channel to, in Volts.
243
- */
244
- async setAnalogOutput(channelNumber, value) {
245
- const request = {
246
- ...requests.StreamSetAnalogOutputRequest.DEFAULT,
247
- interfaceId: this.device.connection.interfaceId,
248
- device: this.device.deviceAddress,
249
- streamId: this.pvtId,
250
- pvt: true,
251
- channelNumber: channelNumber,
252
- value: value,
253
- toBinary() {
254
- return requests.StreamSetAnalogOutputRequest.toBinary(this);
255
- },
256
- };
257
- await gateway.callAsync('device/stream_set_analog_output', request);
258
- }
259
- /**
260
- * Sets values for all digital output channels.
261
- * @param values The type of action to perform on the channel.
262
- */
263
- async setAllDigitalOutputs(values) {
264
- const request = {
265
- ...requests.StreamSetAllDigitalOutputsRequest.DEFAULT,
266
- interfaceId: this.device.connection.interfaceId,
267
- device: this.device.deviceAddress,
268
- streamId: this.pvtId,
269
- pvt: true,
270
- values: values,
271
- toBinary() {
272
- return requests.StreamSetAllDigitalOutputsRequest.toBinary(this);
273
- },
274
- };
275
- await gateway.callAsync('device/stream_set_all_digital_outputs', request);
276
- }
277
- /**
278
- * Sets values for all analog output channels.
279
- * @param values The values to set the output channels to, in Volts.
280
- */
281
- async setAllAnalogOutputs(values) {
282
- const request = {
283
- ...requests.StreamSetAllAnalogOutputsRequest.DEFAULT,
284
- interfaceId: this.device.connection.interfaceId,
285
- device: this.device.deviceAddress,
286
- streamId: this.pvtId,
287
- pvt: true,
288
- values: values,
289
- toBinary() {
290
- return requests.StreamSetAllAnalogOutputsRequest.toBinary(this);
291
- },
292
- };
293
- await gateway.callAsync('device/stream_set_all_analog_outputs', request);
294
- }
295
225
  /**
296
226
  * Waits until the live PVT sequence executes all queued actions.
297
227
  * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
@@ -529,6 +459,90 @@ class PvtSequence {
529
459
  const response = gateway.callSync('device/stream_get_mode', request, requests.StreamModeResponse.fromBinary);
530
460
  return response.pvtMode;
531
461
  }
462
+ /**
463
+ * @deprecated Use PvtSequence.Io.SetDigitalOutput instead.
464
+ *
465
+ * Sets value for the specified digital output channel.
466
+ * @param channelNumber Channel number starting at 1.
467
+ * @param value The type of action to perform on the channel.
468
+ */
469
+ async setDigitalOutput(channelNumber, value) {
470
+ const request = {
471
+ ...requests.StreamSetDigitalOutputRequest.DEFAULT,
472
+ interfaceId: this.device.connection.interfaceId,
473
+ device: this.device.deviceAddress,
474
+ streamId: this.pvtId,
475
+ pvt: true,
476
+ channelNumber: channelNumber,
477
+ value: value,
478
+ toBinary() {
479
+ return requests.StreamSetDigitalOutputRequest.toBinary(this);
480
+ },
481
+ };
482
+ await gateway.callAsync('device/stream_set_digital_output', request);
483
+ }
484
+ /**
485
+ * @deprecated Use PvtSequence.Io.SetAllDigitalOutputs instead.
486
+ *
487
+ * Sets values for all digital output channels.
488
+ * @param values The type of action to perform on the channel.
489
+ */
490
+ async setAllDigitalOutputs(values) {
491
+ const request = {
492
+ ...requests.StreamSetAllDigitalOutputsRequest.DEFAULT,
493
+ interfaceId: this.device.connection.interfaceId,
494
+ device: this.device.deviceAddress,
495
+ streamId: this.pvtId,
496
+ pvt: true,
497
+ values: values,
498
+ toBinary() {
499
+ return requests.StreamSetAllDigitalOutputsRequest.toBinary(this);
500
+ },
501
+ };
502
+ await gateway.callAsync('device/stream_set_all_digital_outputs', request);
503
+ }
504
+ /**
505
+ * @deprecated Use PvtSequence.Io.SetAnalogOutput instead.
506
+ *
507
+ * Sets value for the specified analog output channel.
508
+ * @param channelNumber Channel number starting at 1.
509
+ * @param value Value to set the output channel voltage to.
510
+ */
511
+ async setAnalogOutput(channelNumber, value) {
512
+ const request = {
513
+ ...requests.StreamSetAnalogOutputRequest.DEFAULT,
514
+ interfaceId: this.device.connection.interfaceId,
515
+ device: this.device.deviceAddress,
516
+ streamId: this.pvtId,
517
+ pvt: true,
518
+ channelNumber: channelNumber,
519
+ value: value,
520
+ toBinary() {
521
+ return requests.StreamSetAnalogOutputRequest.toBinary(this);
522
+ },
523
+ };
524
+ await gateway.callAsync('device/stream_set_analog_output', request);
525
+ }
526
+ /**
527
+ * @deprecated Use PvtSequence.Io.SetAllAnalogOutputs instead.
528
+ *
529
+ * Sets values for all analog output channels.
530
+ * @param values Voltage values to set the output channels to.
531
+ */
532
+ async setAllAnalogOutputs(values) {
533
+ const request = {
534
+ ...requests.StreamSetAllAnalogOutputsRequest.DEFAULT,
535
+ interfaceId: this.device.connection.interfaceId,
536
+ device: this.device.deviceAddress,
537
+ streamId: this.pvtId,
538
+ pvt: true,
539
+ values: values,
540
+ toBinary() {
541
+ return requests.StreamSetAllAnalogOutputsRequest.toBinary(this);
542
+ },
543
+ };
544
+ await gateway.callAsync('device/stream_set_all_analog_outputs', request);
545
+ }
532
546
  }
533
547
  exports.PvtSequence = PvtSequence;
534
548
  //# sourceMappingURL=pvt_sequence.js.map