@zaber/motion 4.8.0 → 5.0.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 (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 +5 -4
  9. package/dist/lib/ascii/device_io.js +2 -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 +74 -60
  40. package/dist/lib/protobufs/main_pb.js +544 -424
  41. package/dist/lib/protobufs/main_pb.js.map +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"device_io.js","sourceRoot":"","sources":["../../../src/ascii/device_io.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,qDAAgD;AAEhD;;GAEG;AACH,MAAa,QAAQ;IAGnB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,mBAAmB;QAC9B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB;QAC/B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU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AW,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;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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AAO,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;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';\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 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 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,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;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","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,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S,OAAA;AAClB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,qCAAuD;AAA9C,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,OAAA;AACnC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,iFAA4E;AAAnE,0IAAA,yBAAyB,OAAA;AAClC,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { GetSetting } from './get_setting';\nexport { GetAxisSetting } from './get_axis_setting';\nexport { GetSettingResult } from './get_setting_result';\nexport { GetAxisSettingResult } from './get_axis_setting_result';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { IoPortType } from './io_port_type';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeDataSource } from './oscilloscope_data_source';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { Pvt } from './pvt';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { 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
+ //# sourceMappingURL=pvt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pvt.js","sourceRoot":"","sources":["../../../src/ascii/pvt.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAEtC,iDAA6C;AAC7C,6CAAyC;AAEzC;;;GAGG;AACH,MAAa,GAAG;IACd;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAChB,KAAa;QAEb,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,MAAM,IAAI,SAAS,CAAC,mDAAmD,CAAC,CAAC;SAC1E;QACD,OAAO,IAAI,0BAAW,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,SAAS,CACd,WAAmB;QAEnB,IAAI,WAAW,IAAI,CAAC,EAAE;YACpB,MAAM,IAAI,SAAS,CAAC,iDAAiD,CAAC,CAAC;SACxE;QACD,OAAO,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa;QACxB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC/C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,gBAAgB,CAAC,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();
@@ -1 +1 @@
1
- {"version":3,"file":"pvt_sequence.js","sourceRoot":"","sources":["../../../src/ascii/pvt_sequence.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,gDAA6C;AAG7C,+DAA0D;AAE1D;;;;;;GAMG;AACH,MAAa,WAAW;IACtB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAGD;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED,YAAY,MAAc,EAAE,KAAa;QACvC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,kBAAkB,CAC7B,GAAG,IAAyB;QAE5B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,+BAA+B,EAAE,CAAC;QAC9D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,uCAAiB,CAAC,UAAU,CAAC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,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,wBAAwB,EACxB,OAAO,EACP,OAAO,CAAC,WAAW,CAAC,CAAC;QACvB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAjeD,kCAieC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\nimport { PvtBuffer } from './pvt_buffer';\nimport { PvtMode } from './pvt_mode';\nimport { PvtAxisDefinition } from './pvt_axis_definition';\n\n/**\n * A handle for a PVT sequence with this number on the device.\n * PVT sequences provide a way execute or store trajectory\n * consisting of points with defined position, velocity, and time.\n * PVT sequence methods append actions to a queue which executes\n * or stores actions in a first in, first out order.\n */\nexport class PvtSequence {\n /**\n * Device that controls this PVT sequence.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the PVT sequence on the device.\n */\n public get pvtId(): number {\n return this._pvtId;\n }\n private _pvtId: number;\n\n /**\n * Current mode of the PVT sequence.\n */\n public get mode(): PvtMode {\n return this._retrieveMode();\n }\n\n /**\n * An array of axes definitions the PVT sequence is set up to control.\n */\n public get axes(): PvtAxisDefinition[] {\n return this._retrieveAxes();\n }\n\n constructor(device: Device, pvtId: number) {\n this._device = device;\n this._pvtId = pvtId;\n }\n\n /**\n * Setup the PVT sequence to control the specified axes and to queue actions on the device.\n * Allows use of lockstep axes in a PVT sequence.\n * @param axes Definition of the PVT sequence axes.\n */\n public async setupLiveComposite(\n ...axes: PvtAxisDefinition[]\n ): Promise<void> {\n const request = new gateway.StreamSetupLiveCompositeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setAxesList(axes.map(PvtAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_live_composite', request);\n }\n\n /**\n * Setup the PVT sequence to control the specified axes and to queue actions on the device.\n * @param axes Numbers of physical axes to setup the PVT sequence on.\n */\n public async setupLive(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetupLiveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_live', request);\n }\n\n /**\n * Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.\n * Allows use of lockstep axes in a PVT sequence.\n * @param pvtBuffer The PVT buffer to queue actions in.\n * @param axes Definition of the PVT sequence axes.\n */\n public async setupStoreComposite(\n pvtBuffer: PvtBuffer,\n ...axes: PvtAxisDefinition[]\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreCompositeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n request.setAxesList(axes.map(PvtAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_store_composite', request);\n }\n\n /**\n * Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.\n * @param pvtBuffer The PVT buffer to queue actions in.\n * @param axes Numbers of physical axes to setup the PVT sequence on.\n */\n public async setupStore(\n pvtBuffer: PvtBuffer,\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_store', request);\n }\n\n /**\n * Append the actions in a PVT buffer to the sequence's queue.\n * @param pvtBuffer The PVT buffer to call.\n */\n public async call(\n pvtBuffer: PvtBuffer\n ): Promise<void> {\n const request = new gateway.StreamCallRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n\n await gateway.callAsync('device/stream_call', request);\n }\n\n /**\n * Queues a point with absolute coordinates in the PVT sequence.\n * If some or all velocities are not provided, the sequence calculates the velocities\n * from surrounding points using finite difference.\n * The last point of the sequence must have defined velocity (likely zero).\n * @param positions Positions for the axes to move through, relative to their home positions.\n * @param velocities The axes velocities at the given point.\n * Specify an empty array or null for specific axes to make the sequence calculate the velocity.\n * @param time The duration between the previous point in the sequence and this one.\n */\n public async point(\n positions: Measurement[],\n velocities: (Measurement | null)[],\n time: Measurement\n ): Promise<void> {\n const request = new gateway.PvtPointRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setType(gateway.PvtPointRequest.Type.ABS);\n request.setPositionsList(positions.map(Measurement.toProtobuf));\n request.setVelocitiesList(velocities.map(Measurement.toProtobuf));\n request.setTime(Measurement.toProtobuf(time));\n\n await gateway.callAsync('device/stream_point', request);\n }\n\n /**\n * Queues a point with coordinates relative to the previous point in the PVT sequence.\n * If some or all velocities are not provided, the sequence calculates the velocities\n * from surrounding points using finite difference.\n * The last point of the sequence must have defined velocity (likely zero).\n * @param positions Positions for the axes to move through, relative to the previous point.\n * @param velocities The axes velocities at the given point.\n * Specify an empty array or null for specific axes to make the sequence calculate the velocity.\n * @param time The duration between the previous point in the sequence and this one.\n */\n public async pointRelative(\n positions: Measurement[],\n velocities: (Measurement | null)[],\n time: Measurement\n ): Promise<void> {\n const request = new gateway.PvtPointRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setType(gateway.PvtPointRequest.Type.REL);\n request.setPositionsList(positions.map(Measurement.toProtobuf));\n request.setVelocitiesList(velocities.map(Measurement.toProtobuf));\n request.setTime(Measurement.toProtobuf(time));\n\n await gateway.callAsync('device/stream_point', request);\n }\n\n /**\n * Set the value of a digital output channel.\n * @param channelNumber The number of the digital output channel.\n * Channel numbers are numbered from one.\n * @param value The value to set the channel to.\n */\n public async setDigitalOutput(\n channelNumber: number,\n value: boolean\n ): Promise<void> {\n const request = new gateway.StreamSetDigitalOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_set_digital_output', request);\n }\n\n /**\n * Set the value of an analog output channel.\n * @param channelNumber The number of the analog output channel.\n * Channel numbers are numbered from one.\n * @param value The value to set the channel to, in Volts.\n */\n public async setAnalogOutput(\n channelNumber: number,\n value: number\n ): Promise<void> {\n const request = new gateway.StreamSetAnalogOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_set_analog_output', request);\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.StreamSetAllDigitalOutputsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setValuesList(values);\n\n await gateway.callAsync('device/stream_set_all_digital_outputs', request);\n }\n\n /**\n * Sets values for all analog output channels.\n * @param values The values to set the output channels to, in Volts.\n */\n public async setAllAnalogOutputs(\n values: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetAllAnalogOutputsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setValuesList(values);\n\n await gateway.callAsync('device/stream_set_all_analog_outputs', request);\n }\n\n /**\n * Waits until the live PVT sequence executes all queued actions.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: PvtSequence.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.StreamWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/stream_wait_until_idle', request);\n }\n\n /**\n * Cork the front of the PVT sequences's action queue, blocking execution.\n * Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.\n * Corking eliminates discontinuities in motion due to subsequent PVT commands reaching the device late.\n * You can only cork an idle live PVT sequence.\n */\n public async cork(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_cork', request);\n }\n\n /**\n * Uncork the front of the queue, unblocking command execution.\n * You can only uncork an idle live PVT sequence that is corked.\n */\n public async uncork(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_uncork', request);\n }\n\n /**\n * Returns a boolean value indicating whether the live PVT sequence is executing a queued action.\n * @returns True if the PVT sequence is executing a queued action.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/stream_is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string which represents the PVT sequence.\n * @returns String which represents the PVT sequence.\n */\n public toString(): string {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/stream_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Disables the PVT sequence.\n * If the PVT sequence is not setup, this command does nothing.\n * Once disabled, the PVT sequence will no longer accept PVT commands.\n * The PVT sequence will process the rest of the commands in the queue until it is empty.\n */\n public async disable(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_disable', request);\n }\n\n /**\n * Sends a generic ASCII command to the PVT sequence.\n * Keeps resending the command while the device rejects with AGAIN reason.\n * @param command Command and its parameters.\n */\n public async genericCommand(\n command: string\n ): Promise<void> {\n const request = new gateway.StreamGenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setCommand(command);\n\n await gateway.callAsync('device/stream_generic_command', request);\n }\n\n /**\n * Sends a batch of generic ASCII commands to the PVT sequence.\n * Keeps resending command while the device rejects with AGAIN reason.\n * The batch is atomic in terms of thread safety.\n * @param batch Array of commands.\n */\n public async genericCommandBatch(\n batch: string[]\n ): Promise<void> {\n const request = new gateway.StreamGenericCommandBatchRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setBatchList(batch);\n\n await gateway.callAsync('device/stream_generic_command_batch', request);\n }\n\n /**\n * Queries the PVT sequence status from the device\n * and returns boolean indicating whether the PVT sequence is disabled.\n * Useful to determine if execution was interrupted by other movements.\n * @returns True if the PVT sequence is disabled.\n */\n public async checkDisabled(): Promise<boolean> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/stream_check_disabled',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Makes the PVT sequence throw PvtDiscontinuityException when it encounters discontinuities (ND warning flag).\n */\n public treatDiscontinuitiesAsError(): void {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n gateway.callSync('device/stream_treat_discontinuities', request);\n }\n\n /**\n * Prevents PvtDiscontinuityException as a result of expected discontinuity when resuming the sequence.\n */\n public ignoreCurrentDiscontinuity(): void {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n gateway.callSync('device/stream_ignore_discontinuity', request);\n }\n\n /**\n * Gets the axes of the PVT sequence.\n * @returns An array of axis numbers of the axes the PVT sequence is set up to control.\n */\n private _retrieveAxes(): PvtAxisDefinition[] {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.StreamGetAxesResponse>(\n 'device/stream_get_axes',\n request,\n gateway.StreamGetAxesResponse);\n return response.getAxesList().map(a => PvtAxisDefinition.fromProtobuf(a.toObject()));\n }\n\n /**\n * Get the mode of the PVT sequence.\n * @returns Mode of the PVT sequence.\n */\n private _retrieveMode(): PvtMode {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.IntResponse>(\n 'device/stream_get_mode',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n}\n\nnamespace PvtSequence {\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n}\n"]}
1
+ {"version":3,"file":"pvt_sequence.js","sourceRoot":"","sources":["../../../src/ascii/pvt_sequence.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,gDAA6C;AAG7C,+DAA0D;AAG1D;;;;;;GAMG;AACH,MAAa,WAAW;IACtB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAGD;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED,YAAY,MAAc,EAAE,KAAa;QACvC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;;;O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,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,wBAAwB,EACxB,OAAO,EACP,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACjC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,uCAAiB,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACK,aAAa;QACnB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,wBAAwB,EACxB,OAAO,EACP,OAAO,CAAC,WAAW,CAAC,CAAC;QACvB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAjeD,kCAieC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\nimport { PvtBuffer } from './pvt_buffer';\nimport { PvtMode } from './pvt_mode';\nimport { PvtAxisDefinition } from './pvt_axis_definition';\nimport { DigitalOutputAction } from './digital_output_action';\n\n/**\n * A handle for a PVT sequence with this number on the device.\n * PVT sequences provide a way execute or store trajectory\n * consisting of points with defined position, velocity, and time.\n * PVT sequence methods append actions to a queue which executes\n * or stores actions in a first in, first out order.\n */\nexport class PvtSequence {\n /**\n * Device that controls this PVT sequence.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the PVT sequence on the device.\n */\n public get pvtId(): number {\n return this._pvtId;\n }\n private _pvtId: number;\n\n /**\n * Current mode of the PVT sequence.\n */\n public get mode(): PvtMode {\n return this._retrieveMode();\n }\n\n /**\n * An array of axes definitions the PVT sequence is set up to control.\n */\n public get axes(): PvtAxisDefinition[] {\n return this._retrieveAxes();\n }\n\n constructor(device: Device, pvtId: number) {\n this._device = device;\n this._pvtId = pvtId;\n }\n\n /**\n * Setup the PVT sequence to control the specified axes and to queue actions on the device.\n * Allows use of lockstep axes in a PVT sequence.\n * @param axes Definition of the PVT sequence axes.\n */\n public async setupLiveComposite(\n ...axes: PvtAxisDefinition[]\n ): Promise<void> {\n const request = new gateway.StreamSetupLiveCompositeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setAxesList(axes.map(PvtAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_live_composite', request);\n }\n\n /**\n * Setup the PVT sequence to control the specified axes and to queue actions on the device.\n * @param axes Numbers of physical axes to setup the PVT sequence on.\n */\n public async setupLive(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetupLiveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_live', request);\n }\n\n /**\n * Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.\n * Allows use of lockstep axes in a PVT sequence.\n * @param pvtBuffer The PVT buffer to queue actions in.\n * @param axes Definition of the PVT sequence axes.\n */\n public async setupStoreComposite(\n pvtBuffer: PvtBuffer,\n ...axes: PvtAxisDefinition[]\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreCompositeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n request.setAxesList(axes.map(PvtAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_store_composite', request);\n }\n\n /**\n * Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.\n * @param pvtBuffer The PVT buffer to queue actions in.\n * @param axes Numbers of physical axes to setup the PVT sequence on.\n */\n public async setupStore(\n pvtBuffer: PvtBuffer,\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_store', request);\n }\n\n /**\n * Append the actions in a PVT buffer to the sequence's queue.\n * @param pvtBuffer The PVT buffer to call.\n */\n public async call(\n pvtBuffer: PvtBuffer\n ): Promise<void> {\n const request = new gateway.StreamCallRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setPvtBuffer(pvtBuffer.bufferId);\n\n await gateway.callAsync('device/stream_call', request);\n }\n\n /**\n * Queues a point with absolute coordinates in the PVT sequence.\n * If some or all velocities are not provided, the sequence calculates the velocities\n * from surrounding points using finite difference.\n * The last point of the sequence must have defined velocity (likely zero).\n * @param positions Positions for the axes to move through, relative to their home positions.\n * @param velocities The axes velocities at the given point.\n * Specify an empty array or null for specific axes to make the sequence calculate the velocity.\n * @param time The duration between the previous point in the sequence and this one.\n */\n public async point(\n positions: Measurement[],\n velocities: (Measurement | null)[],\n time: Measurement\n ): Promise<void> {\n const request = new gateway.PvtPointRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setType(gateway.PvtPointRequest.Type.ABS);\n request.setPositionsList(positions.map(Measurement.toProtobuf));\n request.setVelocitiesList(velocities.map(Measurement.toProtobuf));\n request.setTime(Measurement.toProtobuf(time));\n\n await gateway.callAsync('device/stream_point', request);\n }\n\n /**\n * Queues a point with coordinates relative to the previous point in the PVT sequence.\n * If some or all velocities are not provided, the sequence calculates the velocities\n * from surrounding points using finite difference.\n * The last point of the sequence must have defined velocity (likely zero).\n * @param positions Positions for the axes to move through, relative to the previous point.\n * @param velocities The axes velocities at the given point.\n * Specify an empty array or null for specific axes to make the sequence calculate the velocity.\n * @param time The duration between the previous point in the sequence and this one.\n */\n public async pointRelative(\n positions: Measurement[],\n velocities: (Measurement | null)[],\n time: Measurement\n ): Promise<void> {\n const request = new gateway.PvtPointRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setType(gateway.PvtPointRequest.Type.REL);\n request.setPositionsList(positions.map(Measurement.toProtobuf));\n request.setVelocitiesList(velocities.map(Measurement.toProtobuf));\n request.setTime(Measurement.toProtobuf(time));\n\n await gateway.callAsync('device/stream_point', request);\n }\n\n /**\n * Set the value of a digital output channel.\n * @param channelNumber The number of the digital output channel.\n * Channel numbers are numbered from one.\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.StreamSetDigitalOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setChannelNumber(channelNumber);\n request.setValue(value as any);\n\n await gateway.callAsync('device/stream_set_digital_output', request);\n }\n\n /**\n * Set the value of an analog output channel.\n * @param channelNumber The number of the analog output channel.\n * Channel numbers are numbered from one.\n * @param value The value to set the channel to, in Volts.\n */\n public async setAnalogOutput(\n channelNumber: number,\n value: number\n ): Promise<void> {\n const request = new gateway.StreamSetAnalogOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_set_analog_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 = new gateway.StreamSetAllDigitalOutputsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setValuesList(values as any);\n\n await gateway.callAsync('device/stream_set_all_digital_outputs', request);\n }\n\n /**\n * Sets values for all analog output channels.\n * @param values The values to set the output channels to, in Volts.\n */\n public async setAllAnalogOutputs(\n values: number[]\n ): Promise<void> {\n const request = new gateway.StreamSetAllAnalogOutputsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setValuesList(values);\n\n await gateway.callAsync('device/stream_set_all_analog_outputs', request);\n }\n\n /**\n * Waits until the live PVT sequence executes all queued actions.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: PvtSequence.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.StreamWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/stream_wait_until_idle', request);\n }\n\n /**\n * Cork the front of the PVT sequences's action queue, blocking execution.\n * Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.\n * Corking eliminates discontinuities in motion due to subsequent PVT commands reaching the device late.\n * You can only cork an idle live PVT sequence.\n */\n public async cork(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_cork', request);\n }\n\n /**\n * Uncork the front of the queue, unblocking command execution.\n * You can only uncork an idle live PVT sequence that is corked.\n */\n public async uncork(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_uncork', request);\n }\n\n /**\n * Returns a boolean value indicating whether the live PVT sequence is executing a queued action.\n * @returns True if the PVT sequence is executing a queued action.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/stream_is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string which represents the PVT sequence.\n * @returns String which represents the PVT sequence.\n */\n public toString(): string {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/stream_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Disables the PVT sequence.\n * If the PVT sequence is not setup, this command does nothing.\n * Once disabled, the PVT sequence will no longer accept PVT commands.\n * The PVT sequence will process the rest of the commands in the queue until it is empty.\n */\n public async disable(): Promise<void> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_disable', request);\n }\n\n /**\n * Sends a generic ASCII command to the PVT sequence.\n * Keeps resending the command while the device rejects with AGAIN reason.\n * @param command Command and its parameters.\n */\n public async genericCommand(\n command: string\n ): Promise<void> {\n const request = new gateway.StreamGenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setCommand(command);\n\n await gateway.callAsync('device/stream_generic_command', request);\n }\n\n /**\n * Sends a batch of generic ASCII commands to the PVT sequence.\n * Keeps resending command while the device rejects with AGAIN reason.\n * The batch is atomic in terms of thread safety.\n * @param batch Array of commands.\n */\n public async genericCommandBatch(\n batch: string[]\n ): Promise<void> {\n const request = new gateway.StreamGenericCommandBatchRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n request.setBatchList(batch);\n\n await gateway.callAsync('device/stream_generic_command_batch', request);\n }\n\n /**\n * Queries the PVT sequence status from the device\n * and returns boolean indicating whether the PVT sequence is disabled.\n * Useful to determine if execution was interrupted by other movements.\n * @returns True if the PVT sequence is disabled.\n */\n public async checkDisabled(): Promise<boolean> {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/stream_check_disabled',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Makes the PVT sequence throw PvtDiscontinuityException when it encounters discontinuities (ND warning flag).\n */\n public treatDiscontinuitiesAsError(): void {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n gateway.callSync('device/stream_treat_discontinuities', request);\n }\n\n /**\n * Prevents PvtDiscontinuityException as a result of expected discontinuity when resuming the sequence.\n */\n public ignoreCurrentDiscontinuity(): void {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n gateway.callSync('device/stream_ignore_discontinuity', request);\n }\n\n /**\n * Gets the axes of the PVT sequence.\n * @returns An array of axis numbers of the axes the PVT sequence is set up to control.\n */\n private _retrieveAxes(): PvtAxisDefinition[] {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.StreamGetAxesResponse>(\n 'device/stream_get_axes',\n request,\n gateway.StreamGetAxesResponse);\n return response.getAxesList().map(a => PvtAxisDefinition.fromProtobuf(a.toObject()));\n }\n\n /**\n * Get the mode of the PVT sequence.\n * @returns Mode of the PVT sequence.\n */\n private _retrieveMode(): PvtMode {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.pvtId);\n request.setPvt(true);\n\n const response = gateway.callSync<gateway.IntResponse>(\n 'device/stream_get_mode',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n}\n\nnamespace PvtSequence {\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n}\n"]}
@@ -5,6 +5,7 @@ import { Measurement } from '../measurement';
5
5
  import { StreamBuffer } from './stream_buffer';
6
6
  import { StreamMode } from './stream_mode';
7
7
  import { StreamAxisDefinition } from './stream_axis_definition';
8
+ import { DigitalOutputAction } from './digital_output_action';
8
9
  /**
9
10
  * A handle for a stream with this number on the device.
10
11
  * Streams provide a way to execute or store a sequence of actions.
@@ -234,9 +235,9 @@ export declare class Stream {
234
235
  * Set the value of a digital output channel.
235
236
  * @param channelNumber The number of the digital output channel.
236
237
  * Channel numbers are numbered from one.
237
- * @param value The value to set the channel to.
238
+ * @param value The type of action to perform on the channel.
238
239
  */
239
- setDigitalOutput(channelNumber: number, value: boolean): Promise<void>;
240
+ setDigitalOutput(channelNumber: number, value: DigitalOutputAction): Promise<void>;
240
241
  /**
241
242
  * Set the value of an analog output channel.
242
243
  * @param channelNumber The number of the analog output channel.
@@ -244,17 +245,11 @@ export declare class Stream {
244
245
  * @param value The value to set the channel to, in Volts.
245
246
  */
246
247
  setAnalogOutput(channelNumber: number, value: number): Promise<void>;
247
- /**
248
- * Toggle the value of a digital output channel.
249
- * @param channelNumber The number of the digital output channel.
250
- * Channel numbers are numbered from one.
251
- */
252
- toggleDigitalOutput(channelNumber: number): Promise<void>;
253
248
  /**
254
249
  * Sets values for all digital output channels.
255
- * @param values True to set the output channel to conducting and false to turn it off.
250
+ * @param values The type of action to perform on the channel.
256
251
  */
257
- setAllDigitalOutputs(values: boolean[]): Promise<void>;
252
+ setAllDigitalOutputs(values: DigitalOutputAction[]): Promise<void>;
258
253
  /**
259
254
  * Sets values for all analog output channels.
260
255
  * @param values The values to set the output channels to, in Volts.
@@ -484,7 +484,7 @@ class Stream {
484
484
  * Set the value of a digital output channel.
485
485
  * @param channelNumber The number of the digital output channel.
486
486
  * Channel numbers are numbered from one.
487
- * @param value The value to set the channel to.
487
+ * @param value The type of action to perform on the channel.
488
488
  */
489
489
  async setDigitalOutput(channelNumber, value) {
490
490
  const request = new gateway.StreamSetDigitalOutputRequest();
@@ -510,22 +510,9 @@ class Stream {
510
510
  request.setValue(value);
511
511
  await gateway.callAsync('device/stream_set_analog_output', request);
512
512
  }
513
- /**
514
- * Toggle the value of a digital output channel.
515
- * @param channelNumber The number of the digital output channel.
516
- * Channel numbers are numbered from one.
517
- */
518
- async toggleDigitalOutput(channelNumber) {
519
- const request = new gateway.StreamToggleDigitalOutputRequest();
520
- request.setInterfaceId(this.device.connection.interfaceId);
521
- request.setDevice(this.device.deviceAddress);
522
- request.setStreamId(this.streamId);
523
- request.setChannelNumber(channelNumber);
524
- await gateway.callAsync('device/stream_toggle_digital_output', request);
525
- }
526
513
  /**
527
514
  * Sets values for all digital output channels.
528
- * @param values True to set the output channel to conducting and false to turn it off.
515
+ * @param values The type of action to perform on the channel.
529
516
  */
530
517
  async setAllDigitalOutputs(values) {
531
518
  const request = new gateway.StreamSetAllDigitalOutputsRequest();