@zaber/motion 4.8.0 → 5.1.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 (42) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/axis.d.ts +6 -0
  3. package/dist/lib/ascii/axis.js +12 -0
  4. package/dist/lib/ascii/axis.js.map +1 -1
  5. package/dist/lib/ascii/device.d.ts +16 -28
  6. package/dist/lib/ascii/device.js +20 -48
  7. package/dist/lib/ascii/device.js.map +1 -1
  8. package/dist/lib/ascii/device_io.d.ts +39 -4
  9. package/dist/lib/ascii/device_io.js +73 -2
  10. package/dist/lib/ascii/device_io.js.map +1 -1
  11. package/dist/lib/ascii/digital_output_action.d.ts +9 -0
  12. package/dist/lib/ascii/digital_output_action.js +16 -0
  13. package/dist/lib/ascii/digital_output_action.js.map +1 -0
  14. package/dist/lib/ascii/index.d.ts +3 -0
  15. package/dist/lib/ascii/index.js +8 -2
  16. package/dist/lib/ascii/index.js.map +1 -1
  17. package/dist/lib/ascii/pvt.d.ts +32 -0
  18. package/dist/lib/ascii/pvt.js +82 -0
  19. package/dist/lib/ascii/pvt.js.map +1 -0
  20. package/dist/lib/ascii/pvt_sequence.d.ts +5 -4
  21. package/dist/lib/ascii/pvt_sequence.js +2 -2
  22. package/dist/lib/ascii/pvt_sequence.js.map +1 -1
  23. package/dist/lib/ascii/stream.d.ts +5 -10
  24. package/dist/lib/ascii/stream.js +2 -15
  25. package/dist/lib/ascii/stream.js.map +1 -1
  26. package/dist/lib/ascii/streams.d.ts +32 -0
  27. package/dist/lib/ascii/streams.js +82 -0
  28. package/dist/lib/ascii/streams.js.map +1 -0
  29. package/dist/lib/ascii/trigger.d.ts +4 -4
  30. package/dist/lib/ascii/trigger.js +14 -14
  31. package/dist/lib/ascii/trigger.js.map +1 -1
  32. package/dist/lib/ascii/trigger_enabled_state.d.ts +1 -1
  33. package/dist/lib/ascii/trigger_enabled_state.js.map +1 -1
  34. package/dist/lib/ascii/trigger_state.d.ts +2 -0
  35. package/dist/lib/ascii/trigger_state.js.map +1 -1
  36. package/dist/lib/ascii_ns.d.ts +6 -0
  37. package/dist/lib/ascii_ns.js +3 -0
  38. package/dist/lib/ascii_ns.js.map +1 -1
  39. package/dist/lib/protobufs/main_pb.d.ts +220 -60
  40. package/dist/lib/protobufs/main_pb.js +1679 -424
  41. package/dist/lib/protobufs/main_pb.js.map +1 -1
  42. package/package.json +8 -2
@@ -1,5 +1,7 @@
1
1
  import { Device } from './device';
2
+ import { Native, Time } from '../units';
2
3
  import { DeviceIOInfo } from './device_io_info';
4
+ import { DigitalOutputAction } from './digital_output_action';
3
5
  /**
4
6
  * Class providing access to the I/O channels of the device.
5
7
  */
@@ -52,9 +54,26 @@ export declare class DeviceIO {
52
54
  getAnalogOutput(channelNumber: number): Promise<number>;
53
55
  /**
54
56
  * Sets values for all digital output channels.
55
- * @param values True to set the output channel to conducting and false to turn it off.
57
+ * @param values The type of action to perform on the channel.
56
58
  */
57
- setAllDigitalOutputs(values: boolean[]): Promise<void>;
59
+ setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
60
+ /**
61
+ * Sets current and future value for all digital output channels.
62
+ * Requires at least Firmware 7.37.
63
+ * @param values The type of actions to perform immediately on output channels.
64
+ * @param futureValues The type of actions to perform in the future on output channels.
65
+ * @param delay Delay between setting current values and setting future values.
66
+ * @param [unit=Units.NATIVE] Units of time.
67
+ */
68
+ setAllDigitalOutputsSchedule(values: DigitalOutputAction[], futureValues: DigitalOutputAction[], delay: number, unit?: Time | Native): Promise<void>;
69
+ /**
70
+ * Cancel all scheduled digital output actions.
71
+ * Requires at least Firmware 7.37.
72
+ * @param [channels=[]] Optionally specify which channels to cancel.
73
+ * Array length must be empty or equal to the number of channels on device.
74
+ * Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
75
+ */
76
+ cancelAllDigitalOutputsSchedule(channels?: boolean[]): Promise<void>;
58
77
  /**
59
78
  * Sets values for all analog output channels.
60
79
  * @param values Voltage values to set the output channels to.
@@ -63,9 +82,25 @@ export declare class DeviceIO {
63
82
  /**
64
83
  * Sets value for the specified digital output channel.
65
84
  * @param channelNumber Channel number starting at 1.
66
- * @param value True to set the output channel to conducting and false to turn it off.
85
+ * @param value The type of action to perform on the channel.
86
+ */
87
+ setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
88
+ /**
89
+ * Sets current and future value for the specified digital output channel.
90
+ * Requires at least Firmware 7.37.
91
+ * @param channelNumber Channel number starting at 1.
92
+ * @param value The type of action to perform immediately on the channel.
93
+ * @param futureValue The type of action to perform in the future on the channel.
94
+ * @param delay Delay between setting current value and setting future value.
95
+ * @param [unit=Units.NATIVE] Units of time.
96
+ */
97
+ setDigitalOutputSchedule(channelNumber: number, value: DigitalOutputAction, futureValue: DigitalOutputAction, delay: number, unit?: Time | Native): Promise<void>;
98
+ /**
99
+ * Cancels a scheduled digital output action.
100
+ * Requires at least Firmware 7.37.
101
+ * @param channelNumber Channel number starting at 1.
67
102
  */
68
- setDigitalOutput(channelNumber: number, value: boolean): Promise<void>;
103
+ cancelDigitalOutputSchedule(channelNumber: number): Promise<void>;
69
104
  /**
70
105
  * Sets value for the specified analog output channel.
71
106
  * @param channelNumber Channel number starting at 1.
@@ -27,6 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.DeviceIO = void 0;
29
29
  const gateway = __importStar(require("../gateway"));
30
+ const units_1 = require("../units");
30
31
  const device_io_info_1 = require("./device_io_info");
31
32
  /**
32
33
  * Class providing access to the I/O channels of the device.
@@ -141,7 +142,7 @@ class DeviceIO {
141
142
  }
142
143
  /**
143
144
  * Sets values for all digital output channels.
144
- * @param values True to set the output channel to conducting and false to turn it off.
145
+ * @param values The type of action to perform on the channel.
145
146
  */
146
147
  async setAllDigitalOutputs(values) {
147
148
  const request = new gateway.DeviceSetAllDigitalOutputsRequest();
@@ -150,6 +151,41 @@ class DeviceIO {
150
151
  request.setValuesList(values);
151
152
  await gateway.callAsync('device/set_all_digital_outputs', request);
152
153
  }
154
+ /**
155
+ * Sets current and future value for all digital output channels.
156
+ * Requires at least Firmware 7.37.
157
+ * @param values The type of actions to perform immediately on output channels.
158
+ * @param futureValues The type of actions to perform in the future on output channels.
159
+ * @param delay Delay between setting current values and setting future values.
160
+ * @param [unit=Units.NATIVE] Units of time.
161
+ */
162
+ async setAllDigitalOutputsSchedule(values, futureValues, delay, unit = units_1.Units.NATIVE) {
163
+ if (delay <= 0) {
164
+ throw new TypeError('Delay must be a positive value.');
165
+ }
166
+ const request = new gateway.DeviceSetAllDigitalOutputsScheduleRequest();
167
+ request.setInterfaceId(this._device.connection.interfaceId);
168
+ request.setDevice(this._device.deviceAddress);
169
+ request.setValuesList(values);
170
+ request.setFutureValuesList(futureValues);
171
+ request.setDelay(delay);
172
+ request.setUnit(unit);
173
+ await gateway.callAsync('device/set_all_digital_outputs_schedule', request);
174
+ }
175
+ /**
176
+ * Cancel all scheduled digital output actions.
177
+ * Requires at least Firmware 7.37.
178
+ * @param [channels=[]] Optionally specify which channels to cancel.
179
+ * Array length must be empty or equal to the number of channels on device.
180
+ * Specifying "True" for a channel will cancel the scheduled digital output action for that channel.
181
+ */
182
+ async cancelAllDigitalOutputsSchedule(channels = []) {
183
+ const request = new gateway.DeviceCancelAllDigitalOutputsScheduleRequest();
184
+ request.setInterfaceId(this._device.connection.interfaceId);
185
+ request.setDevice(this._device.deviceAddress);
186
+ request.setChannelsList(channels);
187
+ await gateway.callAsync('device/cancel_all_digital_outputs_schedule', request);
188
+ }
153
189
  /**
154
190
  * Sets values for all analog output channels.
155
191
  * @param values Voltage values to set the output channels to.
@@ -164,7 +200,7 @@ class DeviceIO {
164
200
  /**
165
201
  * Sets value for the specified digital output channel.
166
202
  * @param channelNumber Channel number starting at 1.
167
- * @param value True to set the output channel to conducting and false to turn it off.
203
+ * @param value The type of action to perform on the channel.
168
204
  */
169
205
  async setDigitalOutput(channelNumber, value) {
170
206
  const request = new gateway.DeviceSetDigitalOutputRequest();
@@ -174,6 +210,41 @@ class DeviceIO {
174
210
  request.setValue(value);
175
211
  await gateway.callAsync('device/set_digital_output', request);
176
212
  }
213
+ /**
214
+ * Sets current and future value for the specified digital output channel.
215
+ * Requires at least Firmware 7.37.
216
+ * @param channelNumber Channel number starting at 1.
217
+ * @param value The type of action to perform immediately on the channel.
218
+ * @param futureValue The type of action to perform in the future on the channel.
219
+ * @param delay Delay between setting current value and setting future value.
220
+ * @param [unit=Units.NATIVE] Units of time.
221
+ */
222
+ async setDigitalOutputSchedule(channelNumber, value, futureValue, delay, unit = units_1.Units.NATIVE) {
223
+ if (delay <= 0) {
224
+ throw new TypeError('Delay must be a positive value.');
225
+ }
226
+ const request = new gateway.DeviceSetDigitalOutputScheduleRequest();
227
+ request.setInterfaceId(this._device.connection.interfaceId);
228
+ request.setDevice(this._device.deviceAddress);
229
+ request.setChannelNumber(channelNumber);
230
+ request.setValue(value);
231
+ request.setFutureValue(futureValue);
232
+ request.setDelay(delay);
233
+ request.setUnit(unit);
234
+ await gateway.callAsync('device/set_digital_output_schedule', request);
235
+ }
236
+ /**
237
+ * Cancels a scheduled digital output action.
238
+ * Requires at least Firmware 7.37.
239
+ * @param channelNumber Channel number starting at 1.
240
+ */
241
+ async cancelDigitalOutputSchedule(channelNumber) {
242
+ const request = new gateway.DeviceCancelDigitalOutputScheduleRequest();
243
+ request.setInterfaceId(this._device.connection.interfaceId);
244
+ request.setDevice(this._device.deviceAddress);
245
+ request.setChannelNumber(channelNumber);
246
+ await gateway.callAsync('device/cancel_digital_output_schedule', request);
247
+ }
177
248
  /**
178
249
  * Sets value for the specified analog output channel.
179
250
  * @param channelNumber Channel number starting at 1.
@@ -1 +1 @@
1
- {"version":3,"file":"device_io.js","sourceRoot":"","sources":["../../../src/ascii/device_io.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;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AAC,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;AAhPD,4BAgPC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { DeviceIOInfo } from './device_io_info';\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 True to set the output channel to conducting and false to turn it off.\n */\n public async setAllDigitalOutputs(\n values: boolean[]\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);\n\n await gateway.callAsync('device/set_all_digital_outputs', 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 True to set the output channel to conducting and false to turn it off.\n */\n public async setDigitalOutput(\n channelNumber: number,\n value: boolean\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);\n\n await gateway.callAsync('device/set_digital_output', 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;;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,WA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AgB,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,OAAO,CAAC,SAAS,CAAC,uCAAuC,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAC1B,aAAqB,EACrB,KAAa;QAEb,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,gBAAgB,CAAC,aAAa,CAAC,CAAC;QACxC,OAAO,CAAC,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"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Action type for digital output.
3
+ */
4
+ export declare enum DigitalOutputAction {
5
+ OFF = 0,
6
+ ON = 1,
7
+ TOGGLE = 2,
8
+ KEEP = 3
9
+ }
@@ -0,0 +1,16 @@
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.DigitalOutputAction = void 0;
6
+ /**
7
+ * Action type for digital output.
8
+ */
9
+ var DigitalOutputAction;
10
+ (function (DigitalOutputAction) {
11
+ DigitalOutputAction[DigitalOutputAction["OFF"] = 0] = "OFF";
12
+ DigitalOutputAction[DigitalOutputAction["ON"] = 1] = "ON";
13
+ DigitalOutputAction[DigitalOutputAction["TOGGLE"] = 2] = "TOGGLE";
14
+ DigitalOutputAction[DigitalOutputAction["KEEP"] = 3] = "KEEP";
15
+ })(DigitalOutputAction = exports.DigitalOutputAction || (exports.DigitalOutputAction = {}));
16
+ //# sourceMappingURL=digital_output_action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digital_output_action.js","sourceRoot":"","sources":["../../../src/ascii/digital_output_action.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,2DAAO,CAAA;IACP,yDAAM,CAAA;IACN,iEAAU,CAAA;IACV,6DAAQ,CAAA;AACV,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Action type for digital output.\n */\nexport enum DigitalOutputAction {\n OFF = 0,\n ON = 1,\n TOGGLE = 2,\n KEEP = 3,\n}\n"]}
@@ -32,6 +32,7 @@ export { StreamBuffer } from './stream_buffer';
32
32
  export { StreamMode } from './stream_mode';
33
33
  export { StreamAxisType } from './stream_axis_type';
34
34
  export { StreamAxisDefinition } from './stream_axis_definition';
35
+ export { Pvt } from './pvt';
35
36
  export { PvtSequence } from './pvt_sequence';
36
37
  export { PvtBuffer } from './pvt_buffer';
37
38
  export { PvtMode } from './pvt_mode';
@@ -56,3 +57,5 @@ export { TriggerEnabledState } from './trigger_enabled_state';
56
57
  export { TriggerAction } from './trigger_action';
57
58
  export { TriggerCondition } from './trigger_condition';
58
59
  export { TriggerOperation } from './trigger_operation';
60
+ export { Streams } from './streams';
61
+ export { DigitalOutputAction } from './digital_output_action';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.PvtMode = exports.PvtBuffer = exports.PvtSequence = 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.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.TriggerOperation = exports.TriggerCondition = exports.TriggerAction = exports.TriggerEnabledState = exports.TriggerState = exports.Trigger = exports.Triggers = exports.AxisGroup = exports.PvtAxisType = void 0;
3
+ exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = 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.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 = 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");
@@ -70,6 +70,8 @@ var stream_axis_type_1 = require("./stream_axis_type");
70
70
  Object.defineProperty(exports, "StreamAxisType", { enumerable: true, get: function () { return stream_axis_type_1.StreamAxisType; } });
71
71
  var stream_axis_definition_1 = require("./stream_axis_definition");
72
72
  Object.defineProperty(exports, "StreamAxisDefinition", { enumerable: true, get: function () { return stream_axis_definition_1.StreamAxisDefinition; } });
73
+ var pvt_1 = require("./pvt");
74
+ Object.defineProperty(exports, "Pvt", { enumerable: true, get: function () { return pvt_1.Pvt; } });
73
75
  var pvt_sequence_1 = require("./pvt_sequence");
74
76
  Object.defineProperty(exports, "PvtSequence", { enumerable: true, get: function () { return pvt_sequence_1.PvtSequence; } });
75
77
  var pvt_buffer_1 = require("./pvt_buffer");
@@ -119,4 +121,8 @@ var trigger_condition_1 = require("./trigger_condition");
119
121
  Object.defineProperty(exports, "TriggerCondition", { enumerable: true, get: function () { return trigger_condition_1.TriggerCondition; } });
120
122
  var trigger_operation_1 = require("./trigger_operation");
121
123
  Object.defineProperty(exports, "TriggerOperation", { enumerable: true, get: function () { return trigger_operation_1.TriggerOperation; } });
124
+ var streams_1 = require("./streams");
125
+ Object.defineProperty(exports, "Streams", { enumerable: true, get: function () { return streams_1.Streams; } });
126
+ var digital_output_action_1 = require("./digital_output_action");
127
+ Object.defineProperty(exports, "DigitalOutputAction", { enumerable: true, get: function () { return digital_output_action_1.DigitalOutputAction; } });
122
128
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,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,+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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A,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","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 { 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 { 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';\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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AtE,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 { 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,32 @@
1
+ import { Device } from './device';
2
+ import { PvtSequence } from './pvt_sequence';
3
+ import { PvtBuffer } from './pvt_buffer';
4
+ /**
5
+ * Class providing access to device PVT (Position-Velocity-Time) features.
6
+ * Requires at least Firmware 7.33.
7
+ */
8
+ export declare class Pvt {
9
+ /**
10
+ * Device that this PVT belongs to.
11
+ */
12
+ get device(): Device;
13
+ private _device;
14
+ constructor(device: Device);
15
+ /**
16
+ * Gets a PvtSequence class instance which allows you to control a particular PVT sequence on the device.
17
+ * @param pvtId The ID of the PVT sequence to control. The IDs start at 1.
18
+ * @returns PvtSequence instance.
19
+ */
20
+ getSequence(pvtId: number): PvtSequence;
21
+ /**
22
+ * Gets a PvtBuffer class instance which is a handle for a PVT buffer on the device.
23
+ * @param pvtBufferId The ID of the PVT buffer to control. PVT buffer IDs start at one.
24
+ * @returns PvtBuffer instance.
25
+ */
26
+ getBuffer(pvtBufferId: number): PvtBuffer;
27
+ /**
28
+ * Get a list of buffer IDs that are currently in use.
29
+ * @returns List of buffer IDs.
30
+ */
31
+ listBufferIds(): Promise<number[]>;
32
+ }
@@ -0,0 +1,82 @@
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.Pvt = void 0;
29
+ const gateway = __importStar(require("../gateway"));
30
+ const pvt_sequence_1 = require("./pvt_sequence");
31
+ const pvt_buffer_1 = require("./pvt_buffer");
32
+ /**
33
+ * Class providing access to device PVT (Position-Velocity-Time) features.
34
+ * Requires at least Firmware 7.33.
35
+ */
36
+ class Pvt {
37
+ /**
38
+ * Device that this PVT belongs to.
39
+ */
40
+ get device() {
41
+ return this._device;
42
+ }
43
+ constructor(device) {
44
+ this._device = device;
45
+ }
46
+ /**
47
+ * Gets a PvtSequence class instance which allows you to control a particular PVT sequence on the device.
48
+ * @param pvtId The ID of the PVT sequence to control. The IDs start at 1.
49
+ * @returns PvtSequence instance.
50
+ */
51
+ getSequence(pvtId) {
52
+ if (pvtId <= 0) {
53
+ throw new TypeError('Invalid value; PVT sequences are numbered from 1.');
54
+ }
55
+ return new pvt_sequence_1.PvtSequence(this.device, pvtId);
56
+ }
57
+ /**
58
+ * Gets a PvtBuffer class instance which is a handle for a PVT buffer on the device.
59
+ * @param pvtBufferId The ID of the PVT buffer to control. PVT buffer IDs start at one.
60
+ * @returns PvtBuffer instance.
61
+ */
62
+ getBuffer(pvtBufferId) {
63
+ if (pvtBufferId <= 0) {
64
+ throw new TypeError('Invalid value; PVT buffers are numbered from 1.');
65
+ }
66
+ return new pvt_buffer_1.PvtBuffer(this.device, pvtBufferId);
67
+ }
68
+ /**
69
+ * Get a list of buffer IDs that are currently in use.
70
+ * @returns List of buffer IDs.
71
+ */
72
+ async listBufferIds() {
73
+ const request = new gateway.StreamBufferList();
74
+ request.setInterfaceId(this.device.connection.interfaceId);
75
+ request.setDevice(this.device.deviceAddress);
76
+ request.setPvt(true);
77
+ const response = await gateway.callAsync('device/stream_buffer_list', request, gateway.IntArrayResponse);
78
+ return response.getValuesList();
79
+ }
80
+ }
81
+ exports.Pvt = Pvt;
82
+ //# sourceMappingUR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C,CAAC;QAC5B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;CACF;AAzDD,kBAyDC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Device } from './device';\nimport { PvtSequence } from './pvt_sequence';\nimport { PvtBuffer } from './pvt_buffer';\n\n/**\n * Class providing access to device PVT (Position-Velocity-Time) features.\n * Requires at least Firmware 7.33.\n */\nexport class Pvt {\n /**\n * Device that this PVT belongs to.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Gets a PvtSequence class instance which allows you to control a particular PVT sequence on the device.\n * @param pvtId The ID of the PVT sequence to control. The IDs start at 1.\n * @returns PvtSequence instance.\n */\n public getSequence(\n pvtId: number\n ): PvtSequence {\n if (pvtId <= 0) {\n throw new TypeError('Invalid value; PVT sequences are numbered from 1.');\n }\n return new PvtSequence(this.device, pvtId);\n }\n\n /**\n * Gets a PvtBuffer class instance which is a handle for a PVT buffer on the device.\n * @param pvtBufferId The ID of the PVT buffer to control. PVT buffer IDs start at one.\n * @returns PvtBuffer instance.\n */\n public getBuffer(\n pvtBufferId: number\n ): PvtBuffer {\n if (pvtBufferId <= 0) {\n throw new TypeError('Invalid value; PVT buffers are numbered from 1.');\n }\n return new PvtBuffer(this.device, pvtBufferId);\n }\n\n /**\n * Get a list of buffer IDs that are currently in use.\n * @returns List of buffer IDs.\n */\n public async listBufferIds(): Promise<number[]> {\n const request = new gateway.StreamBufferList();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.IntArrayResponse>(\n 'device/stream_buffer_list',\n request,\n gateway.IntArrayResponse);\n return response.getValuesList();\n }\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 { DigitalOutputAction } from './digital_output_action';
6
7
  /**
7
8
  * A handle for a PVT sequence with this number on the device.
8
9
  * PVT sequences provide a way execute or store trajectory
@@ -85,9 +86,9 @@ export declare class PvtSequence {
85
86
  * Set the value of a digital output channel.
86
87
  * @param channelNumber The number of the digital output channel.
87
88
  * Channel numbers are numbered from one.
88
- * @param value The value to set the channel to.
89
+ * @param value The type of action to perform on the channel.
89
90
  */
90
- setDigitalOutput(channelNumber: number, value: boolean): Promise<void>;
91
+ setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
91
92
  /**
92
93
  * Set the value of an analog output channel.
93
94
  * @param channelNumber The number of the analog output channel.
@@ -97,9 +98,9 @@ export declare class PvtSequence {
97
98
  setAnalogOutput(channelNumber: number, value: number): Promise<void>;
98
99
  /**
99
100
  * Sets values for all digital output channels.
100
- * @param values True to set the output channel to conducting and false to turn it off.
101
+ * @param values The type of action to perform on the channel.
101
102
  */
102
- setAllDigitalOutputs(values: boolean[]): Promise<void>;
103
+ setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
103
104
  /**
104
105
  * Sets values for all analog output channels.
105
106
  * @param values The values to set the output channels to, in Volts.
@@ -184,7 +184,7 @@ class PvtSequence {
184
184
  * Set the value of a digital output channel.
185
185
  * @param channelNumber The number of the digital output channel.
186
186
  * Channel numbers are numbered from one.
187
- * @param value The value to set the channel to.
187
+ * @param value The type of action to perform on the channel.
188
188
  */
189
189
  async setDigitalOutput(channelNumber, value) {
190
190
  const request = new gateway.StreamSetDigitalOutputRequest();
@@ -214,7 +214,7 @@ class PvtSequence {
214
214
  }
215
215
  /**
216
216
  * Sets values for all digital output channels.
217
- * @param values True to set the output channel to conducting and false to turn it off.
217
+ * @param values The type of action to perform on the channel.
218
218
  */
219
219
  async setAllDigitalOutputs(values) {
220
220
  const request = new gateway.StreamSetAllDigitalOutputsRequest();