@zaber/motion 2.13.2 → 2.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/all_axes.d.ts +5 -0
- package/dist/lib/ascii/all_axes.js +12 -0
- package/dist/lib/ascii/all_axes.js.map +1 -1
- package/dist/lib/ascii/axis.d.ts +5 -0
- package/dist/lib/ascii/axis.js +15 -3
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_settings.d.ts +7 -0
- package/dist/lib/ascii/axis_settings.js +14 -0
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/connection.js +1 -1
- package/dist/lib/ascii/connection.js.map +1 -1
- package/dist/lib/ascii/conversion_factor.d.ts +21 -0
- package/dist/lib/ascii/conversion_factor.js +46 -0
- package/dist/lib/ascii/conversion_factor.js.map +1 -0
- package/dist/lib/ascii/device.js +3 -3
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +2 -1
- package/dist/lib/ascii/index.js +5 -3
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/lockstep.js +2 -2
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/oscilloscope_data.js +2 -2
- package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
- package/dist/lib/ascii/paramset_info.d.ts +4 -0
- package/dist/lib/ascii/paramset_info.js +1 -0
- package/dist/lib/ascii/paramset_info.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +2 -2
- package/dist/lib/ascii/servo_tuner.js +4 -4
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii/setting_constants.d.ts +4 -0
- package/dist/lib/ascii/setting_constants.js +4 -0
- package/dist/lib/ascii/setting_constants.js.map +1 -1
- package/dist/lib/ascii/{simple_tuning_param.d.ts → simple_tuning_param_definition.d.ts} +3 -3
- package/dist/lib/ascii/simple_tuning_param_definition.js +20 -0
- package/dist/lib/ascii/simple_tuning_param_definition.js.map +1 -0
- package/dist/lib/ascii/storage.d.ts +12 -0
- package/dist/lib/ascii/storage.js +31 -4
- package/dist/lib/ascii/storage.js.map +1 -1
- package/dist/lib/ascii/stream.d.ts +7 -0
- package/dist/lib/ascii/stream.js +15 -1
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii_ns.d.ts +4 -2
- package/dist/lib/ascii_ns.js +2 -1
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/binary/binary_settings.d.ts +2 -1
- package/dist/lib/binary/binary_settings.js +2 -1
- package/dist/lib/binary/binary_settings.js.map +1 -1
- package/dist/lib/binary/command_code.d.ts +2 -1
- package/dist/lib/binary/command_code.js +1 -0
- package/dist/lib/binary/command_code.js.map +1 -1
- package/dist/lib/binary/connection.js +1 -1
- package/dist/lib/binary/connection.js.map +1 -1
- package/dist/lib/binary/device.js +2 -2
- package/dist/lib/binary/device.js.map +1 -1
- package/dist/lib/binary/reply_code.d.ts +1 -0
- package/dist/lib/binary/reply_code.js +1 -0
- package/dist/lib/binary/reply_code.js.map +1 -1
- package/dist/lib/can_set_state_axis_response.d.ts +1 -1
- package/dist/lib/can_set_state_axis_response.js.map +1 -1
- package/dist/lib/can_set_state_device_response.d.ts +2 -2
- package/dist/lib/can_set_state_device_response.js +1 -1
- package/dist/lib/can_set_state_device_response.js.map +1 -1
- package/dist/lib/exceptions/device_db_failed_exception.d.ts +8 -1
- package/dist/lib/exceptions/device_db_failed_exception.js +16 -1
- package/dist/lib/exceptions/device_db_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/device_db_failed_exception_data.d.ts +12 -0
- package/dist/lib/exceptions/device_db_failed_exception_data.js +17 -0
- package/dist/lib/exceptions/device_db_failed_exception_data.js.map +1 -0
- package/dist/lib/exceptions/index.d.ts +1 -0
- package/dist/lib/exceptions/index.js +4 -2
- package/dist/lib/exceptions/index.js.map +1 -1
- package/dist/lib/gateway/wasm-exec.js +58 -53
- package/dist/lib/gateway/wasm-exec.js.map +1 -1
- package/dist/lib/gcode/offline_translator.d.ts +10 -0
- package/dist/lib/gcode/offline_translator.js +17 -0
- package/dist/lib/gcode/offline_translator.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +142 -158
- package/dist/lib/protobufs/main_pb.js +1059 -1179
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/ascii/simple_tuning_param.js +0 -20
- package/dist/lib/ascii/simple_tuning_param.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/ascii/stream.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAA6G;AAE7G,oDAAsC;AACtC,gDAA6C;AAG7C,qEAAgE;AAEhE;;;;GAIG;AACH,MAAa,MAAM;IA+BjB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAjCD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,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;IAOD;;;;OAIG;IACI,KAAK,CAAC,kBAAkB,CAC7B,GAAG,IAA4B;QAE/B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,+BAA+B,EAAE,CAAC;QAC9D,OAAO,CAAC,cAAc,CAAC,IAA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AAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAj4BD,wBAi4BC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Time, Native, Acceleration, AngularAcceleration, AngularVelocity, Velocity, Units } from '../units';\nimport { RotationDirection } from '../rotation_direction';\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\nimport { StreamBuffer } from './stream_buffer';\nimport { StreamMode } from './stream_mode';\nimport { StreamAxisDefinition } from './stream_axis_definition';\n\n/**\n * A handle for a stream with this ID on the device.\n * Streams provide a way to execute or store a sequence of actions.\n * Stream methods append actions to a queue which executes or stores actions in a first in, first out order.\n */\nexport class Stream {\n /**\n * Device that controls this stream.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the stream on the device.\n */\n public get streamId(): number {\n return this._streamId;\n }\n private _streamId: number;\n\n /**\n * Current mode of the stream.\n */\n public get mode(): StreamMode {\n return this._retrieveMode();\n }\n\n /**\n * An array of axes definitions the stream is set up to control.\n */\n public get axes(): StreamAxisDefinition[] {\n return this._retrieveAxes();\n }\n\n constructor(device: Device, streamId: number) {\n this._device = device;\n this._streamId = streamId;\n }\n\n /**\n * Setup the stream to control the specified axes and to queue actions on the device.\n * Allows use of lockstep axes in a stream.\n * @param axes Definition of the stream axes.\n */\n public async setupLiveComposite(\n ...axes: StreamAxisDefinition[]\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.streamId);\n request.setAxesList(axes.map(StreamAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_live_composite', request);\n }\n\n /**\n * Setup the stream to control the specified axes and to queue actions on the device.\n * @param axes Numbers of physical axes to setup the stream 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.streamId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_live', request);\n }\n\n /**\n * Setup the stream to control the specified axes and queue actions into a stream buffer.\n * Allows use of lockstep axes in a stream.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axes Definition of the stream axes.\n */\n public async setupStoreComposite(\n streamBuffer: StreamBuffer,\n ...axes: StreamAxisDefinition[]\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesList(axes.map(StreamAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_store_composite', request);\n }\n\n /**\n * Setup the stream to control the specified axes and queue actions into a stream buffer.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axes Numbers of physical axes to setup the stream on.\n */\n public async setupStore(\n streamBuffer: StreamBuffer,\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_store', request);\n }\n\n /**\n * Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.\n * Afterwards, you may call the resulting stream buffer on arbitrary axes.\n * This mode does not allow for unit conversions.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axesCount The number of axes in the stream.\n */\n public async setupStoreArbitraryAxes(\n streamBuffer: StreamBuffer,\n axesCount: number\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreArbitraryAxesRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesCount(axesCount);\n\n await gateway.callAsync('device/stream_setup_store_arbitrary_axes', request);\n }\n\n /**\n * Append the actions in a stream buffer to the queue.\n * @param streamBuffer The stream buffer to call.\n */\n public async call(\n streamBuffer: StreamBuffer\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n\n await gateway.callAsync('device/stream_call', request);\n }\n\n /**\n * Queue an absolute line movement in the stream.\n * @param endpoint Positions for the axes to move to, relative to their home positions.\n */\n public async lineAbsolute(\n ...endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.ABS);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue a relative line movement in the stream.\n * @param endpoint Positions for the axes to move to, relative to their positions before movement.\n */\n public async lineRelative(\n ...endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.REL);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue an absolute line movement in the stream, targeting a subset of the stream axes.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param endpoint Positions for the axes to move to, relative to their home positions.\n */\n public async lineAbsoluteOn(\n targetAxesIndices: number[],\n endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue a relative line movement in the stream, targeting a subset of the stream axes.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param endpoint Positions for the axes to move to, relative to their positions before movement.\n */\n public async lineRelativeOn(\n targetAxesIndices: number[],\n endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue an absolute arc movement on the first two axes of the stream.\n * Absolute meaning that the home positions of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcAbsolute(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.ABS);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue a relative arc movement on the first two axes of the stream.\n * Relative meaning that the current position of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcRelative(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.REL);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue an absolute arc movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcAbsoluteOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue a relative arc movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcRelativeOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue an absolute circle movement on the first two axes of the stream.\n * Absolute meaning that the home positions of the axes are treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleAbsolute(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.ABS);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue a relative circle movement on the first two axes of the stream.\n * Relative meaning that the current position of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleRelative(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.REL);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue an absolute circle movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleAbsoluteOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue a relative circle movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleRelativeOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Wait for a digital input channel to reach a given value.\n * @param channelNumber The number of the digital input channel.\n * Channel numbers are numbered from one.\n * @param value The value that the stream should wait for.\n */\n public async waitDigitalInput(\n channelNumber: number,\n value: boolean\n ): Promise<void> {\n const request = new gateway.StreamWaitDigitalInputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_wait_digital_input', request);\n }\n\n /**\n * Wait for the value of a analog input channel to reach a condition concerning a given value.\n * @param channelNumber The number of the analog input channel.\n * Channel numbers are numbered from one.\n * @param condition A condition (e.g. <, <=, ==, !=).\n * @param value The value that the condition concerns, in volts.\n */\n public async waitAnalogInput(\n channelNumber: number,\n condition: string,\n value: number\n ): Promise<void> {\n const request = new gateway.StreamWaitAnalogInputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n request.setCondition(condition);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_wait_analog_input', 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.streamId);\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.streamId);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_set_analog_output', request);\n }\n\n /**\n * Toggle 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 */\n public async toggleDigitalOutput(\n channelNumber: number\n ): Promise<void> {\n const request = new gateway.StreamToggleDigitalOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n\n await gateway.callAsync('device/stream_toggle_digital_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.streamId);\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 Voltage values to set the output channels to.\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.streamId);\n request.setValuesList(values);\n\n await gateway.callAsync('device/stream_set_all_analog_outputs', request);\n }\n\n /**\n * Wait a specified time.\n * @param time Amount of time to wait.\n * @param unit Units of time.\n */\n public async wait(\n time: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamWaitRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setTime(time);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_wait', request);\n }\n\n /**\n * Waits until the live stream executes all queued actions.\n * @param throwErrorOnFault Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n throwErrorOnFault: boolean = true\n ): Promise<void> {\n const request = new gateway.StreamWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/stream_wait_until_idle', request);\n }\n\n /**\n * Cork the front of the stream'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 stream commands reaching the device late.\n * You can only cork an idle live stream.\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.streamId);\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 stream 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.streamId);\n\n await gateway.callAsync('device/stream_uncork', request);\n }\n\n /**\n * Returns a boolean value indicating whether the live stream is executing a queued action.\n * @return True if the stream 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.streamId);\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 * Gets the maximum speed of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of velocity.\n * @return The maximum speed of the stream.\n */\n public async getMaxSpeed(\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxSpeedRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_speed',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum speed of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxSpeed Maximum speed at which any stream action is executed.\n * @param unit Units of velocity.\n */\n public async setMaxSpeed(\n maxSpeed: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxSpeedRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxSpeed(maxSpeed);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_speed', request);\n }\n\n /**\n * Gets the maximum tangential acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of acceleration.\n * @return The maximum tangential acceleration of the live stream.\n */\n public async getMaxTangentialAcceleration(\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxTangentialAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_tangential_acceleration',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum tangential acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxTangentialAcceleration Maximum tangential acceleration at which any stream action is executed.\n * @param unit Units of acceleration.\n */\n public async setMaxTangentialAcceleration(\n maxTangentialAcceleration: number,\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxTangentialAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxTangentialAcceleration(maxTangentialAcceleration);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_tangential_acceleration', request);\n }\n\n /**\n * Gets the maximum centripetal acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of acceleration.\n * @return The maximum centripetal acceleration of the live stream.\n */\n public async getMaxCentripetalAcceleration(\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxCentripetalAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_centripetal_acceleration',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum centripetal acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxCentripetalAcceleration Maximum centripetal acceleration at which any stream action is executed.\n * @param unit Units of acceleration.\n */\n public async setMaxCentripetalAcceleration(\n maxCentripetalAcceleration: number,\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxCentripetalAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxCentripetalAcceleration(maxCentripetalAcceleration);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_centripetal_acceleration', request);\n }\n\n /**\n * Returns a string which represents the stream.\n * @return String which represents the stream.\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.streamId);\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 * Disable the stream.\n * If the stream is not setup, this command does nothing.\n * Once disabled, the stream will no longer accept stream commands.\n * The stream 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.streamId);\n\n await gateway.callAsync('device/stream_disable', request);\n }\n\n /**\n * Sends a generic ASCII command to the stream.\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.streamId);\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 stream.\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.streamId);\n request.setBatchList(batch);\n\n await gateway.callAsync('device/stream_generic_command_batch', request);\n }\n\n /**\n * Gets the axes of the stream.\n * @return An array of axis numbers of the axes the stream is set up to control.\n */\n private _retrieveAxes(): StreamAxisDefinition[] {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n\n const response = gateway.callSync<gateway.StreamGetAxesResponse>(\n 'device/stream_get_axes',\n request,\n gateway.StreamGetAxesResponse);\n return response.toObject().axesList.map(resp => StreamAxisDefinition.fromProtobuf(resp));\n }\n\n /**\n * Get the mode of the stream.\n * @return Mode of the stream.\n */\n private _retrieveMode(): StreamMode {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\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"]}
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/ascii/stream.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAA6G;AAE7G,oDAAsC;AACtC,gDAA6C;AAG7C,qEAAgE;AAEhE;;;;GAIG;AACH,MAAa,MAAM;IA+BjB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAjCD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD;;OAEG;IAC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C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEnC,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,6CAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC1F,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,QAAQ,CAAC,CAAC;QAEnC,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;AAp5BD,wBAo5BC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Time, Native, Acceleration, AngularAcceleration, AngularVelocity, Velocity, Units } from '../units';\nimport { RotationDirection } from '../rotation_direction';\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\nimport { StreamBuffer } from './stream_buffer';\nimport { StreamMode } from './stream_mode';\nimport { StreamAxisDefinition } from './stream_axis_definition';\n\n/**\n * A handle for a stream with this ID on the device.\n * Streams provide a way to execute or store a sequence of actions.\n * Stream methods append actions to a queue which executes or stores actions in a first in, first out order.\n */\nexport class Stream {\n /**\n * Device that controls this stream.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the stream on the device.\n */\n public get streamId(): number {\n return this._streamId;\n }\n private _streamId: number;\n\n /**\n * Current mode of the stream.\n */\n public get mode(): StreamMode {\n return this._retrieveMode();\n }\n\n /**\n * An array of axes definitions the stream is set up to control.\n */\n public get axes(): StreamAxisDefinition[] {\n return this._retrieveAxes();\n }\n\n constructor(device: Device, streamId: number) {\n this._device = device;\n this._streamId = streamId;\n }\n\n /**\n * Setup the stream to control the specified axes and to queue actions on the device.\n * Allows use of lockstep axes in a stream.\n * @param axes Definition of the stream axes.\n */\n public async setupLiveComposite(\n ...axes: StreamAxisDefinition[]\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.streamId);\n request.setAxesList(axes.map(StreamAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_live_composite', request);\n }\n\n /**\n * Setup the stream to control the specified axes and to queue actions on the device.\n * @param axes Numbers of physical axes to setup the stream 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.streamId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_live', request);\n }\n\n /**\n * Setup the stream to control the specified axes and queue actions into a stream buffer.\n * Allows use of lockstep axes in a stream.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axes Definition of the stream axes.\n */\n public async setupStoreComposite(\n streamBuffer: StreamBuffer,\n ...axes: StreamAxisDefinition[]\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesList(axes.map(StreamAxisDefinition.toProtobuf));\n\n await gateway.callAsync('device/stream_setup_store_composite', request);\n }\n\n /**\n * Setup the stream to control the specified axes and queue actions into a stream buffer.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axes Numbers of physical axes to setup the stream on.\n */\n public async setupStore(\n streamBuffer: StreamBuffer,\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/stream_setup_store', request);\n }\n\n /**\n * Setup the stream to use a specified number of axes, and to queue actions in a stream buffer.\n * Afterwards, you may call the resulting stream buffer on arbitrary axes.\n * This mode does not allow for unit conversions.\n * @param streamBuffer The stream buffer to queue actions in.\n * @param axesCount The number of axes in the stream.\n */\n public async setupStoreArbitraryAxes(\n streamBuffer: StreamBuffer,\n axesCount: number\n ): Promise<void> {\n const request = new gateway.StreamSetupStoreArbitraryAxesRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n request.setAxesCount(axesCount);\n\n await gateway.callAsync('device/stream_setup_store_arbitrary_axes', request);\n }\n\n /**\n * Append the actions in a stream buffer to the queue.\n * @param streamBuffer The stream buffer to call.\n */\n public async call(\n streamBuffer: StreamBuffer\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.streamId);\n request.setStreamBuffer(streamBuffer.bufferId);\n\n await gateway.callAsync('device/stream_call', request);\n }\n\n /**\n * Queue an absolute line movement in the stream.\n * @param endpoint Positions for the axes to move to, relative to their home positions.\n */\n public async lineAbsolute(\n ...endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.ABS);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue a relative line movement in the stream.\n * @param endpoint Positions for the axes to move to, relative to their positions before movement.\n */\n public async lineRelative(\n ...endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.REL);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue an absolute line movement in the stream, targeting a subset of the stream axes.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param endpoint Positions for the axes to move to, relative to their home positions.\n */\n public async lineAbsoluteOn(\n targetAxesIndices: number[],\n endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue a relative line movement in the stream, targeting a subset of the stream axes.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param endpoint Positions for the axes to move to, relative to their positions before movement.\n */\n public async lineRelativeOn(\n targetAxesIndices: number[],\n endpoint: Measurement[]\n ): Promise<void> {\n const request = new gateway.StreamLineRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamLineRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setEndpointList(endpoint.map(Measurement.toProtobuf));\n\n await gateway.callAsync('device/stream_line', request);\n }\n\n /**\n * Queue an absolute arc movement on the first two axes of the stream.\n * Absolute meaning that the home positions of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcAbsolute(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.ABS);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue a relative arc movement on the first two axes of the stream.\n * Relative meaning that the current position of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcRelative(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.REL);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue an absolute arc movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcAbsoluteOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue a relative arc movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimensions of the position of the center of the circle on which the arc exists.\n * @param centerY The second dimensions of the position of the center of the circle on which the arc exists.\n * @param endX The first dimensions of the end position of the arc.\n * @param endY The second dimensions of the end position of the arc.\n */\n public async arcRelativeOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement,\n endX: Measurement,\n endY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamArcRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamArcRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n request.setEndX(Measurement.toProtobuf(endX));\n request.setEndY(Measurement.toProtobuf(endY));\n\n await gateway.callAsync('device/stream_arc', request);\n }\n\n /**\n * Queue an absolute circle movement on the first two axes of the stream.\n * Absolute meaning that the home positions of the axes are treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleAbsolute(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.ABS);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue a relative circle movement on the first two axes of the stream.\n * Relative meaning that the current position of the axes is treated as the origin.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleRelative(\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.REL);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue an absolute circle movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleAbsoluteOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.ABS);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Queue a relative circle movement in the stream.\n * The movement will only target the specified subset of axes in the stream.\n * @param targetAxesIndices Indices of the axes in the stream the movement targets.\n * Refers to the axes provided during the stream setup or further execution.\n * Indices are zero-based.\n * @param rotationDirection The direction of the rotation.\n * @param centerX The first dimension of the position of the center of the circle.\n * @param centerY The second dimension of the position of the center of the circle.\n */\n public async circleRelativeOn(\n targetAxesIndices: number[],\n rotationDirection: RotationDirection,\n centerX: Measurement,\n centerY: Measurement\n ): Promise<void> {\n const request = new gateway.StreamCircleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setType(gateway.StreamCircleRequest.Type.REL);\n request.setTargetAxesIndicesList(targetAxesIndices);\n request.setRotationDirection(rotationDirection as any);\n request.setCenterX(Measurement.toProtobuf(centerX));\n request.setCenterY(Measurement.toProtobuf(centerY));\n\n await gateway.callAsync('device/stream_circle', request);\n }\n\n /**\n * Wait for a digital input channel to reach a given value.\n * @param channelNumber The number of the digital input channel.\n * Channel numbers are numbered from one.\n * @param value The value that the stream should wait for.\n */\n public async waitDigitalInput(\n channelNumber: number,\n value: boolean\n ): Promise<void> {\n const request = new gateway.StreamWaitDigitalInputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_wait_digital_input', request);\n }\n\n /**\n * Wait for the value of a analog input channel to reach a condition concerning a given value.\n * @param channelNumber The number of the analog input channel.\n * Channel numbers are numbered from one.\n * @param condition A condition (e.g. <, <=, ==, !=).\n * @param value The value that the condition concerns, in volts.\n */\n public async waitAnalogInput(\n channelNumber: number,\n condition: string,\n value: number\n ): Promise<void> {\n const request = new gateway.StreamWaitAnalogInputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n request.setCondition(condition);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_wait_analog_input', 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.streamId);\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.streamId);\n request.setChannelNumber(channelNumber);\n request.setValue(value);\n\n await gateway.callAsync('device/stream_set_analog_output', request);\n }\n\n /**\n * Toggle 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 */\n public async toggleDigitalOutput(\n channelNumber: number\n ): Promise<void> {\n const request = new gateway.StreamToggleDigitalOutputRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setChannelNumber(channelNumber);\n\n await gateway.callAsync('device/stream_toggle_digital_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.streamId);\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 Voltage values to set the output channels to.\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.streamId);\n request.setValuesList(values);\n\n await gateway.callAsync('device/stream_set_all_analog_outputs', request);\n }\n\n /**\n * Wait a specified time.\n * @param time Amount of time to wait.\n * @param unit Units of time.\n */\n public async wait(\n time: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamWaitRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setTime(time);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_wait', request);\n }\n\n /**\n * Waits until the live stream executes all queued actions.\n * @param throwErrorOnFault Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n throwErrorOnFault: boolean = true\n ): Promise<void> {\n const request = new gateway.StreamWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/stream_wait_until_idle', request);\n }\n\n /**\n * Cork the front of the stream'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 stream commands reaching the device late.\n * You can only cork an idle live stream.\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.streamId);\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 stream 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.streamId);\n\n await gateway.callAsync('device/stream_uncork', request);\n }\n\n /**\n * Returns a boolean value indicating whether the live stream is executing a queued action.\n * @return True if the stream 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.streamId);\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 * Gets the maximum speed of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of velocity.\n * @return The maximum speed of the stream.\n */\n public async getMaxSpeed(\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxSpeedRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_speed',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum speed of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxSpeed Maximum speed at which any stream action is executed.\n * @param unit Units of velocity.\n */\n public async setMaxSpeed(\n maxSpeed: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxSpeedRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxSpeed(maxSpeed);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_speed', request);\n }\n\n /**\n * Gets the maximum tangential acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of acceleration.\n * @return The maximum tangential acceleration of the live stream.\n */\n public async getMaxTangentialAcceleration(\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxTangentialAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_tangential_acceleration',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum tangential acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxTangentialAcceleration Maximum tangential acceleration at which any stream action is executed.\n * @param unit Units of acceleration.\n */\n public async setMaxTangentialAcceleration(\n maxTangentialAcceleration: number,\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxTangentialAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxTangentialAcceleration(maxTangentialAcceleration);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_tangential_acceleration', request);\n }\n\n /**\n * Gets the maximum centripetal acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param unit Units of acceleration.\n * @return The maximum centripetal acceleration of the live stream.\n */\n public async getMaxCentripetalAcceleration(\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.StreamGetMaxCentripetalAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/stream_get_max_centripetal_acceleration',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the maximum centripetal acceleration of the live stream.\n * Converts the units using the first axis of the stream.\n * @param maxCentripetalAcceleration Maximum centripetal acceleration at which any stream action is executed.\n * @param unit Units of acceleration.\n */\n public async setMaxCentripetalAcceleration(\n maxCentripetalAcceleration: number,\n unit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.StreamSetMaxCentripetalAccelerationRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n request.setMaxCentripetalAcceleration(maxCentripetalAcceleration);\n request.setUnit(unit);\n\n await gateway.callAsync('device/stream_set_max_centripetal_acceleration', request);\n }\n\n /**\n * Returns a string which represents the stream.\n * @return String which represents the stream.\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.streamId);\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 * Disable the stream.\n * If the stream is not setup, this command does nothing.\n * Once disabled, the stream will no longer accept stream commands.\n * The stream 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.streamId);\n\n await gateway.callAsync('device/stream_disable', request);\n }\n\n /**\n * Sends a generic ASCII command to the stream.\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.streamId);\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 stream.\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.streamId);\n request.setBatchList(batch);\n\n await gateway.callAsync('device/stream_generic_command_batch', request);\n }\n\n /**\n * Queries the stream status from the device\n * and returns boolean indicating whether the stream is disabled.\n * Useful to determine if streaming was interrupted by other movements.\n * @return True if the stream 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.streamId);\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 * Gets the axes of the stream.\n * @return An array of axis numbers of the axes the stream is set up to control.\n */\n private _retrieveAxes(): StreamAxisDefinition[] {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\n\n const response = gateway.callSync<gateway.StreamGetAxesResponse>(\n 'device/stream_get_axes',\n request,\n gateway.StreamGetAxesResponse);\n return response.getAxesList().map(a => StreamAxisDefinition.fromProtobuf(a.toObject()));\n }\n\n /**\n * Get the mode of the stream.\n * @return Mode of the stream.\n */\n private _retrieveMode(): StreamMode {\n const request = new gateway.StreamEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStreamId(this.streamId);\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"]}
|
package/dist/lib/ascii_ns.d.ts
CHANGED
|
@@ -68,10 +68,12 @@ export declare namespace ascii {
|
|
|
68
68
|
type PidTuning = asciiImport.PidTuning;
|
|
69
69
|
const ServoTuningParam: typeof asciiImport.ServoTuningParam;
|
|
70
70
|
type ServoTuningParam = asciiImport.ServoTuningParam;
|
|
71
|
-
const
|
|
72
|
-
type
|
|
71
|
+
const SimpleTuningParamDefinition: typeof asciiImport.SimpleTuningParamDefinition;
|
|
72
|
+
type SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;
|
|
73
73
|
const AxisStorage: typeof asciiImport.AxisStorage;
|
|
74
74
|
type AxisStorage = asciiImport.AxisStorage;
|
|
75
75
|
const DeviceStorage: typeof asciiImport.DeviceStorage;
|
|
76
76
|
type DeviceStorage = asciiImport.DeviceStorage;
|
|
77
|
+
const ConversionFactor: typeof asciiImport.ConversionFactor;
|
|
78
|
+
type ConversionFactor = asciiImport.ConversionFactor;
|
|
77
79
|
}
|
package/dist/lib/ascii_ns.js
CHANGED
|
@@ -61,8 +61,9 @@ var ascii;
|
|
|
61
61
|
ascii.ParamsetInfo = asciiImport.ParamsetInfo;
|
|
62
62
|
ascii.PidTuning = asciiImport.PidTuning;
|
|
63
63
|
ascii.ServoTuningParam = asciiImport.ServoTuningParam;
|
|
64
|
-
ascii.
|
|
64
|
+
ascii.SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;
|
|
65
65
|
ascii.AxisStorage = asciiImport.AxisStorage;
|
|
66
66
|
ascii.DeviceStorage = asciiImport.DeviceStorage;
|
|
67
|
+
ascii.ConversionFactor = asciiImport.ConversionFactor;
|
|
67
68
|
})(ascii = exports.ascii || (exports.ascii = {}));
|
|
68
69
|
//# sourceMappingURL=ascii_ns.js.map
|
package/dist/lib/ascii_ns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ascii_ns.js","sourceRoot":"","sources":["../../src/ascii_ns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAEvC,IAAiB,KAAK,
|
|
1
|
+
{"version":3,"file":"ascii_ns.js","sourceRoot":"","sources":["../../src/ascii_ns.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AAEvC,IAAiB,KAAK,CA6ErB;AA7ED,WAAiB,KAAK;IACP,gBAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEpC,aAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE9B,UAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAExB,kBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAExC,kBAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IAExC,cAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAEhC,gBAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEpC,YAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAE5B,cAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAEhC,kBAAY,GAAG,WAA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,CAAC;IAE1C,sBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AAE/D,CAAC,EA7EgB,KAAK,GAAL,aAAK,KAAL,aAAK,QA6ErB","sourcesContent":["import * as asciiImport from './ascii';\n\nexport namespace ascii {\n export const AlertEvent = asciiImport.AlertEvent;\n export type AlertEvent = asciiImport.AlertEvent;\n export const AllAxes = asciiImport.AllAxes;\n export type AllAxes = asciiImport.AllAxes;\n export const Axis = asciiImport.Axis;\n export type Axis = asciiImport.Axis;\n export const AxisIdentity = asciiImport.AxisIdentity;\n export type AxisIdentity = asciiImport.AxisIdentity;\n export const AxisSettings = asciiImport.AxisSettings;\n export type AxisSettings = asciiImport.AxisSettings;\n export const AxisType = asciiImport.AxisType;\n export type AxisType = asciiImport.AxisType;\n export const Connection = asciiImport.Connection;\n export type Connection = asciiImport.Connection;\n export const Device = asciiImport.Device;\n export type Device = asciiImport.Device;\n export const DeviceIO = asciiImport.DeviceIO;\n export type DeviceIO = asciiImport.DeviceIO;\n export const DeviceIOInfo = asciiImport.DeviceIOInfo;\n export type DeviceIOInfo = asciiImport.DeviceIOInfo;\n export const DeviceIdentity = asciiImport.DeviceIdentity;\n export type DeviceIdentity = asciiImport.DeviceIdentity;\n export const DeviceSettings = asciiImport.DeviceSettings;\n export type DeviceSettings = asciiImport.DeviceSettings;\n export const Lockstep = asciiImport.Lockstep;\n export type Lockstep = asciiImport.Lockstep;\n export const LockstepAxes = asciiImport.LockstepAxes;\n export type LockstepAxes = asciiImport.LockstepAxes;\n export const Oscilloscope = asciiImport.Oscilloscope;\n export type Oscilloscope = asciiImport.Oscilloscope;\n export const OscilloscopeData = asciiImport.OscilloscopeData;\n export type OscilloscopeData = asciiImport.OscilloscopeData;\n export const OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export type OscilloscopeCaptureProperties = asciiImport.OscilloscopeCaptureProperties;\n export const MessageType = asciiImport.MessageType;\n export type MessageType = asciiImport.MessageType;\n export const Response = asciiImport.Response;\n export type Response = asciiImport.Response;\n export const SettingConstants = asciiImport.SettingConstants;\n export type SettingConstants = asciiImport.SettingConstants;\n export const UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export type UnknownResponseEvent = asciiImport.UnknownResponseEvent;\n export const Warnings = asciiImport.Warnings;\n export type Warnings = asciiImport.Warnings;\n export const WarningFlags = asciiImport.WarningFlags;\n export type WarningFlags = asciiImport.WarningFlags;\n export const Stream = asciiImport.Stream;\n export type Stream = asciiImport.Stream;\n export const StreamBuffer = asciiImport.StreamBuffer;\n export type StreamBuffer = asciiImport.StreamBuffer;\n export const StreamMode = asciiImport.StreamMode;\n export type StreamMode = asciiImport.StreamMode;\n export const StreamAxisType = asciiImport.StreamAxisType;\n export type StreamAxisType = asciiImport.StreamAxisType;\n export const StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export type StreamAxisDefinition = asciiImport.StreamAxisDefinition;\n export const Transport = asciiImport.Transport;\n export type Transport = asciiImport.Transport;\n export const ServoTuner = asciiImport.ServoTuner;\n export type ServoTuner = asciiImport.ServoTuner;\n export const ServoTuningParamset = asciiImport.ServoTuningParamset;\n export type ServoTuningParamset = asciiImport.ServoTuningParamset;\n export const ParamsetInfo = asciiImport.ParamsetInfo;\n export type ParamsetInfo = asciiImport.ParamsetInfo;\n export const PidTuning = asciiImport.PidTuning;\n export type PidTuning = asciiImport.PidTuning;\n export const ServoTuningParam = asciiImport.ServoTuningParam;\n export type ServoTuningParam = asciiImport.ServoTuningParam;\n export const SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export type SimpleTuningParamDefinition = asciiImport.SimpleTuningParamDefinition;\n export const AxisStorage = asciiImport.AxisStorage;\n export type AxisStorage = asciiImport.AxisStorage;\n export const DeviceStorage = asciiImport.DeviceStorage;\n export type DeviceStorage = asciiImport.DeviceStorage;\n export const ConversionFactor = asciiImport.ConversionFactor;\n export type ConversionFactor = asciiImport.ConversionFactor;\n}\n"]}
|
|
@@ -72,6 +72,7 @@ var BinarySettings;
|
|
|
72
72
|
BinarySettings[BinarySettings["SLIP_TRACKING_PERIOD"] = 61] = "SLIP_TRACKING_PERIOD";
|
|
73
73
|
BinarySettings[BinarySettings["STALL_TIMEOUT"] = 62] = "STALL_TIMEOUT";
|
|
74
74
|
BinarySettings[BinarySettings["STATUS"] = 63] = "STATUS";
|
|
75
|
-
BinarySettings[BinarySettings["
|
|
75
|
+
BinarySettings[BinarySettings["SYSTEM_ERROR_PRESENT"] = 64] = "SYSTEM_ERROR_PRESENT";
|
|
76
|
+
BinarySettings[BinarySettings["TARGET_SPEED"] = 65] = "TARGET_SPEED";
|
|
76
77
|
})(BinarySettings = exports.BinarySettings || (exports.BinarySettings = {}));
|
|
77
78
|
//# sourceMappingURL=binary_settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary_settings.js","sourceRoot":"","sources":["../../../src/binary/binary_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"binary_settings.js","sourceRoot":"","sources":["../../../src/binary/binary_settings.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,cAmEX;AAnED,WAAY,cAAc;IACxB,mEAAgB,CAAA;IAChB,6EAAqB,CAAA;IACrB,iEAAe,CAAA;IACf,mEAAgB,CAAA;IAChB,+EAAsB,CAAA;IACtB,iFAAuB,CAAA;IACvB,yFAA2B,CAAA;IAC3B,2FAA4B,CAAA;IAC5B,+EAAsB,CAAA;IACtB,uEAAkB,CAAA;IAClB,sFAA0B,CAAA;IAC1B,kFAAwB,CAAA;IACxB,8DAAc,CAAA;IACd,4FAA6B,CAAA;IAC7B,8EAAsB,CAAA;IACtB,4EAAqB,CAAA;IACrB,4EAAqB,CAAA;IACrB,4EAAqB,CAAA;IACrB,wEAAmB,CAAA;IACnB,8EAAsB,CAAA;IACtB,4EAAqB,CAAA;IACrB,8DAAc,CAAA;IACd,kEAAgB,CAAA;IAChB,kFAAwB,CAAA;IACxB,oFAAyB,CAAA;IACzB,sEAAkB,CAAA;IAClB,4EAAqB,CAAA;IACrB,4EAAqB,CAAA;IACrB,wEAAmB,CAAA;IACnB,4EAAqB,CAAA;IACrB,oEAAiB,CAAA;IACjB,kEAAgB,CAAA;IAChB,4EAAqB,CAAA;IACrB,gEAAe,CAAA;IACf,kEAAgB,CAAA;IAChB,wEAAmB,CAAA;IACnB,8FAA8B,CAAA;IAC9B,wEAAmB,CAAA;IACnB,gFAAuB,CAAA;IACvB,sEAAkB,CAAA;IAClB,gFAAuB,CAAA;IACvB,sFAA0B,CAAA;IAC1B,kFAAwB,CAAA;IACxB,gEAAe,CAAA;IACf,gHAAuC,CAAA;IACvC,4EAAqB,CAAA;IACrB,sFAA0B,CAAA;IAC1B,0EAAoB,CAAA;IACpB,oFAAyB,CAAA;IACzB,4EAAqB,CAAA;IACrB,gFAAuB,CAAA;IACvB,oFAAyB,CAAA;IACzB,gEAAe,CAAA;IACf,sEAAkB,CAAA;IAClB,sFAA0B,CAAA;IAC1B,4FAA6B,CAAA;IAC7B,8FAA8B,CAAA;IAC9B,oFAAyB,CAAA;IACzB,4DAAa,CAAA;IACb,0EAAoB,CAAA;IACpB,sEAAkB,CAAA;IAClB,oFAAyB,CAAA;IACzB,sEAAkB,CAAA;IAClB,wDAAW,CAAA;IACX,oFAAyB,CAAA;IACzB,oEAAiB,CAAA;AACnB,CAAC,EAnEW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAmEzB","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Named constants for all Zaber Binary protocol settings.\n */\nexport enum BinarySettings {\n ACCELERATION = 0,\n ACCELERATION_ONLY = 1,\n ACTIVE_AXIS = 2,\n ALIAS_NUMBER = 3,\n ANALOG_INPUT_COUNT = 4,\n ANALOG_OUTPUT_COUNT = 5,\n AUTO_HOME_DISABLED_MODE = 6,\n AUTO_REPLY_DISABLED_MODE = 7,\n AXIS_DEVICE_NUMBER = 8,\n AXIS_INVERSION = 9,\n AXIS_VELOCITY_PROFILE = 10,\n AXIS_VELOCITY_SCALE = 11,\n BAUD_RATE = 12,\n CALIBRATED_ENCODER_COUNT = 13,\n CALIBRATION_ERROR = 14,\n CALIBRATION_TYPE = 15,\n CLOSED_LOOP_MODE = 16,\n CURRENT_POSITION = 17,\n CYCLE_DISTANCE = 18,\n DECELERATION_ONLY = 19,\n DEVICE_DIRECTION = 20,\n DEVICE_ID = 21,\n DEVICE_MODE = 22,\n DIGITAL_INPUT_COUNT = 23,\n DIGITAL_OUTPUT_COUNT = 24,\n ENCODER_COUNT = 25,\n ENCODER_POSITION = 26,\n FILTER_HOLDER_ID = 27,\n FIRMWARE_BUILD = 28,\n FIRMWARE_VERSION = 29,\n HOLD_CURRENT = 30,\n HOME_OFFSET = 31,\n HOME_SENSOR_TYPE = 32,\n HOME_SPEED = 33,\n HOME_STATUS = 34,\n INDEX_DISTANCE = 35,\n JOYSTICK_CALIBRATION_MODE = 36,\n KNOB_DIRECTION = 37,\n KNOB_DISABLED_MODE = 38,\n KNOB_JOG_SIZE = 39,\n KNOB_MOVEMENT_MODE = 40,\n KNOB_VELOCITY_PROFILE = 41,\n KNOB_VELOCITY_SCALE = 42,\n LOCK_STATE = 43,\n MANUAL_MOVE_TRACKING_DISABLED_MODE = 44,\n MAXIMUM_POSITION = 45,\n MAXIMUM_RELATIVE_MOVE = 46,\n MESSAGE_ID_MODE = 47,\n MICROSTEP_RESOLUTION = 48,\n MINIMUM_POSITION = 49,\n MOVE_TRACKING_MODE = 50,\n MOVE_TRACKING_PERIOD = 51,\n PARK_STATE = 52,\n PERIPHERAL_ID = 53,\n PERIPHERAL_ID_PENDING = 54,\n PERIPHERAL_SERIAL_NUMBER = 55,\n PERIPHERAL_SERIAL_PENDING = 56,\n POWER_SUPPLY_VOLTAGE = 57,\n PROTOCOL = 58,\n RUNNING_CURRENT = 59,\n SERIAL_NUMBER = 60,\n SLIP_TRACKING_PERIOD = 61,\n STALL_TIMEOUT = 62,\n STATUS = 63,\n SYSTEM_ERROR_PRESENT = 64,\n TARGET_SPEED = 65,\n}\n"]}
|
|
@@ -105,5 +105,6 @@ var CommandCode;
|
|
|
105
105
|
CommandCode[CommandCode["SET_BAUDRATE"] = 122] = "SET_BAUDRATE";
|
|
106
106
|
CommandCode[CommandCode["SET_PROTOCOL"] = 123] = "SET_PROTOCOL";
|
|
107
107
|
CommandCode[CommandCode["CONVERT_TO_ASCII"] = 124] = "CONVERT_TO_ASCII";
|
|
108
|
+
CommandCode[CommandCode["RETURN_SYSTEM_ERROR_PRESENT"] = 126] = "RETURN_SYSTEM_ERROR_PRESENT";
|
|
108
109
|
})(CommandCode = exports.CommandCode || (exports.CommandCode = {}));
|
|
109
110
|
//# sourceMappingURL=command_code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command_code.js","sourceRoot":"","sources":["../../../src/binary/command_code.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"command_code.js","sourceRoot":"","sources":["../../../src/binary/command_code.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,WAmGX;AAnGD,WAAY,WAAW;IACrB,+CAAS,CAAA;IACT,6CAAQ,CAAA;IACR,qDAAY,CAAA;IACZ,kFAA2B,CAAA;IAC3B,kFAA2B,CAAA;IAC3B,oFAA4B,CAAA;IAC5B,gEAAkB,CAAA;IAClB,gEAAkB,CAAA;IAClB,kFAA2B,CAAA;IAC3B,8CAAS,CAAA;IACT,oEAAoB,CAAA;IACpB,kFAA2B,CAAA;IAC3B,0EAAuB,CAAA;IACvB,wFAA8B,CAAA;IAC9B,oFAA4B,CAAA;IAC5B,kFAA2B,CAAA;IAC3B,sFA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+EAA0B,CAAA;IAC1B,6FAAiC,CAAA;IACjC,+EAA0B,CAAA;IAC1B,mFAA4B,CAAA;IAC5B,2EAAwB,CAAA;IACxB,mFAA4B,CAAA;IAC5B,yEAAuB,CAAA;IACvB,qFAA6B,CAAA;IAC7B,yFAA+B,CAAA;IAC/B,iFAA2B,CAAA;IAC3B,iFAA2B,CAAA;IAC3B,mFAA4B,CAAA;IAC5B,mHAA4C,CAAA;IAC5C,uFAA8B,CAAA;IAC9B,+EAA0B,CAAA;IAC1B,uFAA8B,CAAA;IAC9B,yEAAuB,CAAA;IACvB,+EAA0B,CAAA;IAC1B,+DAAkB,CAAA;IAClB,+DAAkB,CAAA;IAClB,uEAAsB,CAAA;IACtB,6FAAiC,CAAA;AACnC,CAAC,EAnGW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAmGtB","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Named constants for all Zaber Binary protocol commands.\n */\nexport enum CommandCode {\n RESET = 0,\n HOME = 1,\n RENUMBER = 2,\n STORE_CURRENT_POSITION = 16,\n RETURN_STORED_POSITION = 17,\n MOVE_TO_STORED_POSITION = 18,\n MOVE_ABSOLUTE = 20,\n MOVE_RELATIVE = 21,\n MOVE_AT_CONSTANT_SPEED = 22,\n STOP = 23,\n SET_ACTIVE_AXIS = 25,\n SET_AXIS_DEVICE_NUMBER = 26,\n SET_AXIS_INVERSION = 27,\n SET_AXIS_VELOCITY_PROFILE = 28,\n SET_AXIS_VELOCITY_SCALE = 29,\n LOAD_EVENT_INSTRUCTION = 30,\n RETURN_EVENT_INSTRUCTION = 31,\n SET_CALIBRATION_MODE = 33,\n SET_JOYSTICK_CALIBRATION_MODE = 33,\n READ_OR_WRITE_MEMORY = 35,\n RESTORE_SETTINGS = 36,\n SET_MICROSTEP_RESOLUTION = 37,\n SET_RUNNING_CURRENT = 38,\n SET_HOLD_CURRENT = 39,\n SET_DEVICE_MODE = 40,\n SET_HOME_SPEED = 41,\n SET_START_SPEED = 41,\n SET_TARGET_SPEED = 42,\n SET_ACCELERATION = 43,\n SET_MAXIMUM_POSITION = 44,\n SET_CURRENT_POSITION = 45,\n SET_MAXIMUM_RELATIVE_MOVE = 46,\n SET_HOME_OFFSET = 47,\n SET_ALIAS_NUMBER = 48,\n SET_LOCK_STATE = 49,\n RETURN_DEVICE_ID = 50,\n RETURN_FIRMWARE_VERSION = 51,\n RETURN_POWER_SUPPLY_VOLTAGE = 52,\n RETURN_SETTING = 53,\n RETURN_STATUS = 54,\n ECHO_DATA = 55,\n RETURN_FIRMWARE_BUILD = 56,\n RETURN_CURRENT_POSITION = 60,\n RETURN_SERIAL_NUMBER = 63,\n SET_PARK_STATE = 65,\n SET_PERIPHERAL_ID = 66,\n RETURN_DIGITAL_INPUT_COUNT = 67,\n READ_DIGITAL_INPUT = 68,\n READ_ALL_DIGITAL_INPUTS = 69,\n RETURN_DIGITAL_OUTPUT_COUNT = 70,\n READ_DIGITAL_OUTPUT = 71,\n READ_ALL_DIGITAL_OUTPUTS = 72,\n WRITE_DIGITAL_OUTPUT = 73,\n WRITE_ALL_DIGITAL_OUTPUTS = 74,\n RETURN_ANALOG_INPUT_COUNT = 75,\n READ_ANALOG_INPUT = 76,\n RETURN_ANALOG_OUTPUT_COUNT = 77,\n MOVE_INDEX = 78,\n SET_INDEX_DISTANCE = 79,\n SET_CYCLE_DISTANCE = 80,\n SET_FILTER_HOLDER_ID = 81,\n RETURN_ENCODER_COUNT = 82,\n RETURN_CALIBRATED_ENCODER_COUNT = 83,\n RETURN_CALIBRATION_TYPE = 84,\n RETURN_CALIBRATION_ERROR = 85,\n RETURN_PERIPHERAL_SERIAL_NUMBER = 86,\n SET_PERIPHERAL_SERIAL_NUMBER = 86,\n FORCE_ABSOLUTE = 87,\n FORCE_OFF = 88,\n RETURN_ENCODER_POSITION = 89,\n RETURN_PERIPHERAL_ID_PENDING = 91,\n RETURN_PERIPHERAL_SERIAL_PENDING = 92,\n ACTIVATE = 93,\n SET_AUTO_REPLY_DISABLED_MODE = 101,\n SET_MESSAGE_ID_MODE = 102,\n SET_HOME_STATUS = 103,\n SET_HOME_SENSOR_TYPE = 104,\n SET_AUTO_HOME_DISABLED_MODE = 105,\n SET_MINIMUM_POSITION = 106,\n SET_KNOB_DISABLED_MODE = 107,\n SET_KNOB_DIRECTION = 108,\n SET_KNOB_MOVEMENT_MODE = 109,\n SET_KNOB_JOG_SIZE = 110,\n SET_KNOB_VELOCITY_SCALE = 111,\n SET_KNOB_VELOCITY_PROFILE = 112,\n SET_ACCELERATION_ONLY = 113,\n SET_DECELERATION_ONLY = 114,\n SET_MOVE_TRACKING_MODE = 115,\n SET_MANUAL_MOVE_TRACKING_DISABLED_MODE = 116,\n SET_MOVE_TRACKING_PERIOD = 117,\n SET_CLOSED_LOOP_MODE = 118,\n SET_SLIP_TRACKING_PERIOD = 119,\n SET_STALL_TIMEOUT = 120,\n SET_DEVICE_DIRECTION = 121,\n SET_BAUDRATE = 122,\n SET_PROTOCOL = 123,\n CONVERT_TO_ASCII = 124,\n RETURN_SYSTEM_ERROR_PRESENT = 126,\n}\n"]}
|
|
@@ -148,7 +148,7 @@ class Connection {
|
|
|
148
148
|
request.setTimeout(timeout);
|
|
149
149
|
request.setCheckErrors(checkErrors);
|
|
150
150
|
const response = await gateway.callAsync('binary/interface/generic_command_multi_response', request, gateway.BinaryMessageCollection);
|
|
151
|
-
return response.
|
|
151
|
+
return response.getMessagesList().map(a => message_1.Message.fromProtobuf(a.toObject()));
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Renumbers devices present on this connection. After renumbering, you must identify devices again.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/binary/connection.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,+BAAiD;AACjD,8CAA8D;AA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G;AACoB,4BAAiB,GAAW,IAAI,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { map, filter, takeUntil, take } from 'rxjs/operators';\nimport * as gateway from '../gateway';\nimport { events, filterEvent } from '../gateway';\nimport { Device } from './device';\nimport { UnknownResponseEvent } from './unknown_response_event';\nimport { ReplyOnlyEvent } from './reply_only_event';\nimport { CommandCode } from './command_code';\nimport { Message } from './message';\nimport { MotionLibException } from '../exceptions';\n\n/**\n * Class representing access to particular connection (serial port, TCP connection) using the legacy Binary protocol.\n */\nexport class Connection {\n\n /**\n * Event invoked when a response from a device cannot be matched to any known request.\n */\n public unknownResponse!: Observable<UnknownResponseEvent>;\n\n /**\n * Event invoked when a reply-only command such as a move tracking message is received from a device.\n */\n public replyOnly!: Observable<ReplyOnlyEvent>;\n\n /**\n * Default baud rate for serial connections.\n */\n public static readonly DEFAULT_BAUD_RATE: number = 9600;\n\n /**\n * The interface ID identifies thisConnection instance with the underlying library.\n */\n public get interfaceId(): number {\n return this._interfaceId;\n }\n private _interfaceId: number;\n\n constructor(interfaceId: number) {\n this._interfaceId = interfaceId;\n this._subscribe();\n }\n\n /**\n * Opens a serial port.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 9600).\n * @param useMessageIds Enable use of message IDs (defaults to disabled).\n * All your devices must be pre-configured to match.\n * @return An object representing the port.\n */\n public static async openSerialPort(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE,\n useMessageIds: boolean = false\n ): Promise<Connection> {\n const request = new gateway.OpenBinaryInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n request.setUseMessageIds(useMessageIds);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'binary/interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a TCP connection.\n * @param hostName Hostname or IP address.\n * @param port Optional port number (defaults to 8657).\n * @param useMessageIds Enable use of message IDs (defaults to disabled).\n * All your devices must be pre-configured to match.\n * @return An object representing the connection.\n */\n public static async openTcp(\n hostName: string,\n port: number = 0,\n useMessageIds: boolean = false\n ): Promise<Connection> {\n const request = new gateway.OpenBinaryInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.TCP);\n request.setHostName(hostName);\n request.setPort(port);\n request.setUseMessageIds(useMessageIds);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'binary/interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n await gateway.callAsync('interface/close', request);\n }\n\n /**\n * Sends a generic Binary command to this connection.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param device Device address to send the command to. Use zero for broadcast.\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n * @param timeout Number of seconds to wait for a response from the device. 0 or negative defaults to 0.5s.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @return A response to the command.\n */\n public async genericCommand(\n device: number,\n command: CommandCode,\n data: number = 0,\n timeout: number = 0.0,\n checkErrors: boolean = true\n ): Promise<Message> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setDevice(device);\n request.setCommand(command as any);\n request.setData(data);\n request.setTimeout(timeout);\n request.setCheckErrors(checkErrors);\n\n const response = await gateway.callAsync<gateway.BinaryMessage>(\n 'binary/interface/generic_command',\n request,\n gateway.BinaryMessage);\n return Message.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic Binary command to this connection without expecting a response.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param device Device address to send the command to. Use zero for broadcast.\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n */\n public async genericCommandNoResponse(\n device: number,\n command: CommandCode,\n data: number = 0\n ): Promise<void> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setDevice(device);\n request.setCommand(command as any);\n request.setData(data);\n\n await gateway.callAsync('binary/interface/generic_command_no_response', request);\n }\n\n /**\n * Sends a generic Binary command to this connection and expects responses from one or more devices.\n * Responses are returned in order of arrival.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n * @param timeout Number of seconds to wait for all responses from the device chain. 0 or negative defaults to 0.5s.\n * @param checkErrors Controls whether to throw an exception when any device rejects the command.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: CommandCode,\n data: number = 0,\n timeout: number = 0.0,\n checkErrors: boolean = true\n ): Promise<Message[]> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command as any);\n request.setData(data);\n request.setTimeout(timeout);\n request.setCheckErrors(checkErrors);\n\n const response = await gateway.callAsync<gateway.BinaryMessageCollection>(\n 'binary/interface/generic_command_multi_response',\n request,\n gateway.BinaryMessageCollection);\n return response.toObject().messagesList.map(resp => Message.fromProtobuf(resp));\n }\n\n /**\n * Renumbers devices present on this connection. After renumbering, you must identify devices again.\n * @return Total number of devices that responded to the renumber.\n */\n public async renumberDevices(): Promise<number> {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'binary/device/renumber',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Attempts to detect any devices present on this connection.\n * @param identifyDevices Determines whether device identification should be performed as well.\n * @return Array of detected devices.\n */\n public async detectDevices(\n identifyDevices: boolean = true\n ): Promise<Device[]> {\n const request = new gateway.BinaryDeviceDetectRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIdentifyDevices(identifyDevices);\n\n const response = await gateway.callAsync<gateway.BinaryDeviceDetectResponse>(\n 'binary/device/detect',\n request,\n gateway.BinaryDeviceDetectResponse);\n return response.getDevicesList().map(deviceAddress => this.getDevice(deviceAddress));\n }\n\n /**\n * Gets a Device class instance which allows you to control a particular device on this connection.\n * Devices are numbered from 1.\n * @param deviceAddress Address of device intended to control. Address is configured for each device.\n * @return Device instance.\n */\n public getDevice(\n deviceAddress: number\n ): Device {\n if (deviceAddress <= 0) {\n throw new TypeError('Invalid value; physical devices are numbered from 1.');\n }\n return new Device(this, deviceAddress);\n }\n\n /**\n * Returns a string that represents the connection.\n * @return A string that represents the connection.\n */\n public toString(): string {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'interface/to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n private _disconnected = new ReplaySubject<MotionLibException>();\n\n /**\n * Event invoked when connection is interrupted or closed.\n */\n public get disconnected(): Observable<MotionLibException> {\n return this._disconnected;\n }\n\n private _subscribe(): void {\n this.unknownResponse = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.UnknownBinaryResponseEvent.AsObject>('binary/interface/unknown_response'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => UnknownResponseEvent.fromProtobuf(event))\n );\n\n this.replyOnly = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.BinaryReplyOnlyEvent.AsObject>('binary/interface/reply_only'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => ReplyOnlyEvent.fromProtobuf(event))\n );\n\n events.pipe(\n filterEvent<gateway.DisconnectedEvent.AsObject>('interface/disconnected'),\n filter(event => event.interfaceId === this.interfaceId),\n take(1),\n map(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))\n ).subscribe(this._disconnected);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/binary/connection.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,+BAAiD;AACjD,8CAA8D;AAC9D,oDAAsC;AACtC,wCAAiD;AACjD,qCAAkC;AAClC,qEAAgE;AAChE,yDAAoD;AAEpD,uCAAoC;AAGpC;;GAEG;AACH,MAAa,UAAU;IAyBrB,YAAY,WAAmB;QAyNvB,kBAAa,GAAG,IAAI,oBAAa,EAAsB,CAAC;QAxN9D,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAXD;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAQD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,cAAc,CAChC,QAAgB,EAChB,WAAmB,UAAU,CAAC,iBAAiB,EAC/C,gBAAyB,KAAK;QAE9B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,uBAAuB,EACvB,OAAO,EACP,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACjC,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC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P,IAAA,eAAG,EAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAC1F,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC;;AAhRH,gCAiRC;AArQC;;GAEG;AACoB,4BAAiB,GAAW,IAAI,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { map, filter, takeUntil, take } from 'rxjs/operators';\nimport * as gateway from '../gateway';\nimport { events, filterEvent } from '../gateway';\nimport { Device } from './device';\nimport { UnknownResponseEvent } from './unknown_response_event';\nimport { ReplyOnlyEvent } from './reply_only_event';\nimport { CommandCode } from './command_code';\nimport { Message } from './message';\nimport { MotionLibException } from '../exceptions';\n\n/**\n * Class representing access to particular connection (serial port, TCP connection) using the legacy Binary protocol.\n */\nexport class Connection {\n\n /**\n * Event invoked when a response from a device cannot be matched to any known request.\n */\n public unknownResponse!: Observable<UnknownResponseEvent>;\n\n /**\n * Event invoked when a reply-only command such as a move tracking message is received from a device.\n */\n public replyOnly!: Observable<ReplyOnlyEvent>;\n\n /**\n * Default baud rate for serial connections.\n */\n public static readonly DEFAULT_BAUD_RATE: number = 9600;\n\n /**\n * The interface ID identifies thisConnection instance with the underlying library.\n */\n public get interfaceId(): number {\n return this._interfaceId;\n }\n private _interfaceId: number;\n\n constructor(interfaceId: number) {\n this._interfaceId = interfaceId;\n this._subscribe();\n }\n\n /**\n * Opens a serial port.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 9600).\n * @param useMessageIds Enable use of message IDs (defaults to disabled).\n * All your devices must be pre-configured to match.\n * @return An object representing the port.\n */\n public static async openSerialPort(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE,\n useMessageIds: boolean = false\n ): Promise<Connection> {\n const request = new gateway.OpenBinaryInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n request.setUseMessageIds(useMessageIds);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'binary/interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a TCP connection.\n * @param hostName Hostname or IP address.\n * @param port Optional port number (defaults to 8657).\n * @param useMessageIds Enable use of message IDs (defaults to disabled).\n * All your devices must be pre-configured to match.\n * @return An object representing the connection.\n */\n public static async openTcp(\n hostName: string,\n port: number = 0,\n useMessageIds: boolean = false\n ): Promise<Connection> {\n const request = new gateway.OpenBinaryInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.TCP);\n request.setHostName(hostName);\n request.setPort(port);\n request.setUseMessageIds(useMessageIds);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'binary/interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n await gateway.callAsync('interface/close', request);\n }\n\n /**\n * Sends a generic Binary command to this connection.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param device Device address to send the command to. Use zero for broadcast.\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n * @param timeout Number of seconds to wait for a response from the device. 0 or negative defaults to 0.5s.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @return A response to the command.\n */\n public async genericCommand(\n device: number,\n command: CommandCode,\n data: number = 0,\n timeout: number = 0.0,\n checkErrors: boolean = true\n ): Promise<Message> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setDevice(device);\n request.setCommand(command as any);\n request.setData(data);\n request.setTimeout(timeout);\n request.setCheckErrors(checkErrors);\n\n const response = await gateway.callAsync<gateway.BinaryMessage>(\n 'binary/interface/generic_command',\n request,\n gateway.BinaryMessage);\n return Message.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic Binary command to this connection without expecting a response.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param device Device address to send the command to. Use zero for broadcast.\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n */\n public async genericCommandNoResponse(\n device: number,\n command: CommandCode,\n data: number = 0\n ): Promise<void> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setDevice(device);\n request.setCommand(command as any);\n request.setData(data);\n\n await gateway.callAsync('binary/interface/generic_command_no_response', request);\n }\n\n /**\n * Sends a generic Binary command to this connection and expects responses from one or more devices.\n * Responses are returned in order of arrival.\n * For more information please refer to the\n * [Binary Protocol Manual](https://www.zaber.com/protocol-manual?protocol=Binary#topic_quick_command_reference).\n * @param command Command to send.\n * @param data Optional data argument to the command. Defaults to zero.\n * @param timeout Number of seconds to wait for all responses from the device chain. 0 or negative defaults to 0.5s.\n * @param checkErrors Controls whether to throw an exception when any device rejects the command.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: CommandCode,\n data: number = 0,\n timeout: number = 0.0,\n checkErrors: boolean = true\n ): Promise<Message[]> {\n const request = new gateway.GenericBinaryRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command as any);\n request.setData(data);\n request.setTimeout(timeout);\n request.setCheckErrors(checkErrors);\n\n const response = await gateway.callAsync<gateway.BinaryMessageCollection>(\n 'binary/interface/generic_command_multi_response',\n request,\n gateway.BinaryMessageCollection);\n return response.getMessagesList().map(a => Message.fromProtobuf(a.toObject()));\n }\n\n /**\n * Renumbers devices present on this connection. After renumbering, you must identify devices again.\n * @return Total number of devices that responded to the renumber.\n */\n public async renumberDevices(): Promise<number> {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'binary/device/renumber',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Attempts to detect any devices present on this connection.\n * @param identifyDevices Determines whether device identification should be performed as well.\n * @return Array of detected devices.\n */\n public async detectDevices(\n identifyDevices: boolean = true\n ): Promise<Device[]> {\n const request = new gateway.BinaryDeviceDetectRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIdentifyDevices(identifyDevices);\n\n const response = await gateway.callAsync<gateway.BinaryDeviceDetectResponse>(\n 'binary/device/detect',\n request,\n gateway.BinaryDeviceDetectResponse);\n return response.getDevicesList().map(deviceAddress => this.getDevice(deviceAddress));\n }\n\n /**\n * Gets a Device class instance which allows you to control a particular device on this connection.\n * Devices are numbered from 1.\n * @param deviceAddress Address of device intended to control. Address is configured for each device.\n * @return Device instance.\n */\n public getDevice(\n deviceAddress: number\n ): Device {\n if (deviceAddress <= 0) {\n throw new TypeError('Invalid value; physical devices are numbered from 1.');\n }\n return new Device(this, deviceAddress);\n }\n\n /**\n * Returns a string that represents the connection.\n * @return A string that represents the connection.\n */\n public toString(): string {\n const request = new gateway.InterfaceEmptyRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'interface/to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n private _disconnected = new ReplaySubject<MotionLibException>();\n\n /**\n * Event invoked when connection is interrupted or closed.\n */\n public get disconnected(): Observable<MotionLibException> {\n return this._disconnected;\n }\n\n private _subscribe(): void {\n this.unknownResponse = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.UnknownBinaryResponseEvent.AsObject>('binary/interface/unknown_response'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => UnknownResponseEvent.fromProtobuf(event))\n );\n\n this.replyOnly = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.BinaryReplyOnlyEvent.AsObject>('binary/interface/reply_only'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => ReplyOnlyEvent.fromProtobuf(event))\n );\n\n events.pipe(\n filterEvent<gateway.DisconnectedEvent.AsObject>('interface/disconnected'),\n filter(event => event.interfaceId === this.interfaceId),\n take(1),\n map(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))\n ).subscribe(this._disconnected);\n }\n}\n"]}
|
|
@@ -356,8 +356,8 @@ class Device {
|
|
|
356
356
|
const request = new gateway.DeviceEmptyRequest();
|
|
357
357
|
request.setInterfaceId(this.connection.interfaceId);
|
|
358
358
|
request.setDevice(this.deviceAddress);
|
|
359
|
-
const response = gateway.callSync('binary/device/get_identity', request, gateway.
|
|
360
|
-
return device_identity_1.DeviceIdentity.fromProtobuf(response.
|
|
359
|
+
const response = gateway.callSync('binary/device/get_identity', request, gateway.BinaryDeviceIdentity);
|
|
360
|
+
return device_identity_1.DeviceIdentity.fromProtobuf(response.toObject());
|
|
361
361
|
}
|
|
362
362
|
/**
|
|
363
363
|
* Returns whether or not the device have been identified.
|