@zaber/motion 2.7.0-save-load → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/connection.js +3 -3
  3. package/dist/lib/ascii/connection.js.map +1 -1
  4. package/dist/lib/ascii/stream.d.ts +0 -6
  5. package/dist/lib/ascii/stream.js +0 -13
  6. package/dist/lib/ascii/stream.js.map +1 -1
  7. package/dist/lib/ascii/stream_axis_definition.d.ts +1 -1
  8. package/dist/lib/ascii/stream_axis_definition.js.map +1 -1
  9. package/dist/lib/ascii/stream_buffer.d.ts +0 -1
  10. package/dist/lib/ascii/stream_buffer.js +0 -1
  11. package/dist/lib/ascii/stream_buffer.js.map +1 -1
  12. package/dist/lib/binary/connection.js +3 -3
  13. package/dist/lib/binary/connection.js.map +1 -1
  14. package/dist/lib/exceptions/index.d.ts +0 -4
  15. package/dist/lib/exceptions/index.js +2 -10
  16. package/dist/lib/exceptions/index.js.map +1 -1
  17. package/dist/lib/gateway/call.js +7 -7
  18. package/dist/lib/gateway/call.js.map +1 -1
  19. package/dist/lib/gateway/convert_exceptions.js +0 -2
  20. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  21. package/dist/lib/gateway/events.js +5 -5
  22. package/dist/lib/gateway/events.js.map +1 -1
  23. package/dist/lib/gateway/wasm.js +1 -1
  24. package/dist/lib/gateway/wasm.js.map +1 -1
  25. package/dist/lib/index.d.ts +0 -1
  26. package/dist/lib/index.js +0 -1
  27. package/dist/lib/index.js.map +1 -1
  28. package/dist/lib/measurement.d.ts +1 -1
  29. package/dist/lib/measurement.js.map +1 -1
  30. package/dist/lib/protobufs/main_pb.d.ts +0 -478
  31. package/dist/lib/protobufs/main_pb.js +1 -3682
  32. package/dist/lib/protobufs/main_pb.js.map +1 -1
  33. package/dist/lib/wasm.js +3 -3
  34. package/dist/lib/wasm.js.map +1 -1
  35. package/package.json +3 -3
  36. package/dist/lib/exceptions/g_code_execution_exception.d.ts +0 -14
  37. package/dist/lib/exceptions/g_code_execution_exception.js +0 -32
  38. package/dist/lib/exceptions/g_code_execution_exception.js.map +0 -1
  39. package/dist/lib/exceptions/g_code_execution_exception_data.d.ts +0 -17
  40. package/dist/lib/exceptions/g_code_execution_exception_data.js +0 -18
  41. package/dist/lib/exceptions/g_code_execution_exception_data.js.map +0 -1
  42. package/dist/lib/exceptions/g_code_syntax_exception.d.ts +0 -14
  43. package/dist/lib/exceptions/g_code_syntax_exception.js +0 -32
  44. package/dist/lib/exceptions/g_code_syntax_exception.js.map +0 -1
  45. package/dist/lib/exceptions/g_code_syntax_exception_data.d.ts +0 -17
  46. package/dist/lib/exceptions/g_code_syntax_exception_data.js +0 -18
  47. package/dist/lib/exceptions/g_code_syntax_exception_data.js.map +0 -1
  48. package/dist/lib/finalizer.d.ts +0 -5
  49. package/dist/lib/finalizer.js +0 -21
  50. package/dist/lib/finalizer.js.map +0 -1
  51. package/dist/lib/gcode/axis_mapping.d.ts +0 -16
  52. package/dist/lib/gcode/axis_mapping.js +0 -38
  53. package/dist/lib/gcode/axis_mapping.js.map +0 -1
  54. package/dist/lib/gcode/index.d.ts +0 -8
  55. package/dist/lib/gcode/index.js +0 -20
  56. package/dist/lib/gcode/index.js.map +0 -1
  57. package/dist/lib/gcode/translate_message.d.ts +0 -21
  58. package/dist/lib/gcode/translate_message.js +0 -19
  59. package/dist/lib/gcode/translate_message.js.map +0 -1
  60. package/dist/lib/gcode/translate_result.d.ts +0 -17
  61. package/dist/lib/gcode/translate_result.js +0 -19
  62. package/dist/lib/gcode/translate_result.js.map +0 -1
  63. package/dist/lib/gcode/translator.d.ts +0 -68
  64. package/dist/lib/gcode/translator.js +0 -144
  65. package/dist/lib/gcode/translator.js.map +0 -1
  66. package/dist/lib/gcode/translator_axis_definition.d.ts +0 -20
  67. package/dist/lib/gcode/translator_axis_definition.js +0 -48
  68. package/dist/lib/gcode/translator_axis_definition.js.map +0 -1
  69. package/dist/lib/gcode/translator_config.d.ts +0 -18
  70. package/dist/lib/gcode/translator_config.js +0 -41
  71. package/dist/lib/gcode/translator_config.js.map +0 -1
  72. package/dist/lib/gcode/translator_definition.d.ts +0 -18
  73. package/dist/lib/gcode/translator_definition.js +0 -39
  74. package/dist/lib/gcode/translator_definition.js.map +0 -1
  75. package/dist/lib/gcode/translator_live.d.ts +0 -70
  76. package/dist/lib/gcode/translator_live.js +0 -147
  77. package/dist/lib/gcode/translator_live.js.map +0 -1
  78. package/dist/lib/gcode_ns.d.ts +0 -19
  79. package/dist/lib/gcode_ns.js +0 -35
  80. package/dist/lib/gcode_ns.js.map +0 -1
@@ -387,9 +387,9 @@ class Connection {
387
387
  return this._disconnected;
388
388
  }
389
389
  _subscribe() {
390
- this.unknownResponse = gateway_1.events.pipe(operators_1.takeUntil(this._disconnected), gateway_1.filterEvent('interface/unknown_response'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.map(event => unknown_response_event_1.UnknownResponseEvent.fromProtobuf(event)));
391
- this.alert = gateway_1.events.pipe(operators_1.takeUntil(this._disconnected), gateway_1.filterEvent('interface/alert'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.map(event => alert_event_1.AlertEvent.fromProtobuf(event)));
392
- gateway_1.events.pipe(gateway_1.filterEvent('interface/disconnected'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.take(1), operators_1.map(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))).subscribe(this._disconnected);
390
+ this.unknownResponse = gateway_1.events.pipe((0, operators_1.takeUntil)(this._disconnected), (0, gateway_1.filterEvent)('interface/unknown_response'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.map)(event => unknown_response_event_1.UnknownResponseEvent.fromProtobuf(event)));
391
+ this.alert = gateway_1.events.pipe((0, operators_1.takeUntil)(this._disconnected), (0, gateway_1.filterEvent)('interface/alert'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.map)(event => alert_event_1.AlertEvent.fromProtobuf(event)));
392
+ gateway_1.events.pipe((0, gateway_1.filterEvent)('interface/disconnected'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.take)(1), (0, operators_1.map)(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))).subscribe(this._disconnected);
393
393
  }
394
394
  }
395
395
  exports.Connection = Connection;
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/ascii/connection.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAEtD,+BAAiD;AACjD,8CAA8D;AAC9D,oDAAsC;AACtC,wCAAiD;AAEjD,qCAAkC;AAClC,yCAAsC;AACtC,qEAAgE;AAChE,+CAA2C;AAG3C;;GAEG;AACH,MAAa,UAAU;IAgDrB,YAAY,WAAmB;QAmdvB,kBAAa,GAAG,IAAI,oBAAa,EAAsB,CAAC;QAld9D,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAlCD;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;;OAGG;IACH,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,qBAAqB,CAAC,KAAa;QAC5C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACzC,CAAC;IAED,IAAW,eAAe,CAAC,KAAc;QACvC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAOD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,cAAc,CAChC,QAAgB,EAChB,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AC","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 { Transport } from './transport';\nimport { Device } from './device';\nimport { Response } from './response';\nimport { UnknownResponseEvent } from './unknown_response_event';\nimport { AlertEvent } from './alert_event';\nimport { MotionLibException } from '../exceptions';\n\n/**\n * Class representing access to particular connection (serial port, TCP connection).\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 an alert is received from a device.\n */\n public alert!: Observable<AlertEvent>;\n\n /**\n * Default baud rate for serial connections.\n */\n public static readonly DEFAULT_BAUD_RATE: number = 115200;\n\n /**\n * The interface ID identifies this Connection instance with the underlying library.\n */\n public get interfaceId(): number {\n return this._interfaceId;\n }\n private _interfaceId: number;\n\n /**\n * The default timeout, in milliseconds, for a device to respond to a request.\n * Setting the timeout to a too low value may cause request timeout exceptions.\n */\n public get defaultRequestTimeout(): number {\n return this._retrieveTimeout();\n }\n\n public set defaultRequestTimeout(value: number) {\n this._changeTimeout(value);\n }\n\n /**\n * Controls whether outgoing messages contain checksum.\n */\n public get checksumEnabled(): boolean {\n return this._retrieveChecksumEnabled();\n }\n\n public set checksumEnabled(value: boolean) {\n this._changeChecksumEnabled(value);\n }\n\n constructor(interfaceId: number) {\n this._interfaceId = interfaceId;\n this._subscribe();\n }\n\n /**\n * Opens a serial port, if Zaber Launcher controls the port, the port will be opened through Zaber Launcher.\n * Zaber Launcher allows sharing of the port between multiple applications.\n * Use openSerialPortDirectly if sharing is not desirable.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 115200).\n * @return An object representing the port.\n */\n public static async openSerialPort(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a serial port, bypassing Zaber Launcher.\n * If the port is already opened by Zaber Launcher, this will fail.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 115200).\n * @return An object representing the port.\n */\n public static async openSerialPortDirectly(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setRejectRoutedConnection(true);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n '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 Port number.\n * @return An object representing the connection.\n */\n public static async openTcp(\n hostName: string,\n port: number\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.TCP);\n request.setHostName(hostName);\n request.setPort(port);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a connection using a custom transport.\n * @param transport The custom connection transport.\n * @return An object representing the connection.\n */\n public static async openCustom(\n transport: Transport\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.CUSTOM);\n request.setTransport(transport.transportId);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a unauthenticated connection to a cloud connected device chain.\n * Use this method to connect to Virtual Device free trial instances.\n * The connection is not secured.\n * @param cloudId The cloud ID to connect to.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @param api The URL of the API to receive connection info from.\n * @return An object representing the connection.\n */\n public static async openIotUnauthenticated(\n cloudId: string,\n connectionName: string = '',\n api: string = 'https://api.zaber.io'\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.IOT);\n request.setRealm('unauthenticated');\n request.setToken('unauthenticated');\n request.setCloudId(cloudId);\n request.setConnectionName(connectionName);\n request.setApi(api);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a secured connection to a cloud connected device chain.\n * Use this method to connect to devices on your account.\n * @param cloudId The cloud ID to connect to.\n * @param token The token to authenticate with.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @param realm The realm to connect to.\n * Can be left empty for the default account realm.\n * @param api The URL of the API to receive connection info from.\n * @return An object representing the connection.\n */\n public static async openIotAuthenticated(\n cloudId: string,\n token: string,\n connectionName: string = '',\n realm: string = '',\n api: string = 'https://api.zaber.io'\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.IOT);\n request.setCloudId(cloudId);\n request.setToken(token);\n request.setConnectionName(connectionName);\n request.setRealm(realm);\n request.setApi(api);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a connection to Zaber Launcher in your Local Area Network.\n * The connection is not secured.\n * @param hostName Hostname or IP address.\n * @param port Port number.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @return An object representing the connection.\n */\n public static async openNetworkShare(\n hostName: string,\n port: number,\n connectionName: string = ''\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.NETWORK_SHARE);\n request.setHostName(hostName);\n request.setPort(port);\n request.setConnectionName(connectionName);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Sends a generic ASCII command to this connection.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n device: number = 0,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this connection without expecting a response and without adding a message ID.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n */\n public async genericCommandNoResponse(\n command: string,\n device: number = 0,\n axis: number = 0\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Sends a generic ASCII command to this connection and expect multiple responses,\n * either from one device or from many devices.\n * Responses are returned in order of arrival.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n device: number = 0,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\n }\n\n /**\n * Resets ASCII protocol message IDs. Only for testing purposes.\n */\n public resetIds(): void {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n gateway.callSync('interface/reset_ids', request);\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request = new gateway.CloseInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n await gateway.callAsync('interface/close', request);\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 * Renumbers devices present on this connection. After renumbering, devices need to be identified again.\n * @param firstAddress This is the address that the device closest to the computer is given.\n * Remaining devices are numbered consecutively.\n * @return Total number of devices that responded to the renumber.\n */\n public async renumberDevices(\n firstAddress: number = 1\n ): Promise<number> {\n if (firstAddress <= 0) {\n throw new TypeError('Invalid value; device addresses are numbered from 1.');\n }\n const request = new gateway.DeviceRenumberRequest();\n request.setInterfaceId(this.interfaceId);\n request.setFirstAddress(firstAddress);\n\n const response = await gateway.callAsync<gateway.DeviceRenumberResponse>(\n 'device/renumber',\n request,\n gateway.DeviceRenumberResponse);\n return response.getNumberDevices();\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.DeviceDetectRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIdentifyDevices(identifyDevices);\n\n const response = await gateway.callAsync<gateway.DeviceDetectResponse>(\n 'device/detect',\n request,\n gateway.DeviceDetectResponse);\n return response.getDevicesList().map(deviceAddress => this.getDevice(deviceAddress));\n }\n\n /**\n * Stops all of the devices on this connection.\n * @param waitUntilIdle Determines whether the function should return immediately\n * or wait until the devices are stopped.\n * @return The addresses of the devices that were stopped by this command.\n */\n public async stopAll(\n waitUntilIdle: boolean = true\n ): Promise<number[]> {\n const request = new gateway.DeviceOnAllRequest();\n request.setInterfaceId(this.interfaceId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n const response = await gateway.callAsync<gateway.DeviceOnAllResponse>(\n 'device/stop_all',\n request,\n gateway.DeviceOnAllResponse);\n return response.getDeviceAddressesList();\n }\n\n /**\n * Homes all of the devices on this connection.\n * @param waitUntilIdle Determines whether the function should return immediately\n * or wait until the devices are homed.\n * @return The addresses of the devices that were homed by this command.\n */\n public async homeAll(\n waitUntilIdle: boolean = true\n ): Promise<number[]> {\n const request = new gateway.DeviceOnAllRequest();\n request.setInterfaceId(this.interfaceId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n const response = await gateway.callAsync<gateway.DeviceOnAllResponse>(\n 'device/home_all',\n request,\n gateway.DeviceOnAllResponse);\n return response.getDeviceAddressesList();\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.ToStringRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.ToStringResponse>(\n 'interface/to_string',\n request,\n gateway.ToStringResponse);\n return response.getToStr();\n }\n\n /**\n * Returns default request timeout.\n * @return Default request timeout.\n */\n private _retrieveTimeout(): number {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.GetInterfaceTimeoutResponse>(\n 'interface/get_timeout',\n request,\n gateway.GetInterfaceTimeoutResponse);\n return response.getValue();\n }\n\n /**\n * Sets default request timeout.\n * @param timeout Default request timeout.\n */\n private _changeTimeout(\n timeout: number\n ): void {\n const request = new gateway.SetInterfaceTimeoutRequest();\n request.setInterfaceId(this.interfaceId);\n request.setTimeout(timeout);\n\n gateway.callSync('interface/set_timeout', request);\n }\n\n /**\n * Returns checksum enabled.\n * @return Checksum enabled.\n */\n private _retrieveChecksumEnabled(): boolean {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.GetInterfaceChecksumEnabledResponse>(\n 'interface/get_checksum_enabled',\n request,\n gateway.GetInterfaceChecksumEnabledResponse);\n return response.getValue();\n }\n\n /**\n * Sets checksum enabled.\n * @param isEnabled Checksum enabled.\n */\n private _changeChecksumEnabled(\n isEnabled: boolean\n ): void {\n const request = new gateway.SetInterfaceChecksumEnabledRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIsEnabled(isEnabled);\n\n gateway.callSync('interface/set_checksum_enabled', request);\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.UnknownResponseEvent.AsObject>('interface/unknown_response'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => UnknownResponseEvent.fromProtobuf(event))\n );\n\n this.alert = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.AlertEvent.AsObject>('interface/alert'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => AlertEvent.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/ascii/connection.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAEtD,+BAAiD;AACjD,8CAA8D;AAC9D,oDAAsC;AACtC,wCAAiD;AAEjD,qCAAkC;AAClC,yCAAsC;AACtC,qEAAgE;AAChE,+CAA2C;AAG3C;;GAEG;AACH,MAAa,UAAU;IAgDrB,YAAY,WAAmB;QAmdvB,kBAAa,GAAG,IAAI,oBAAa,EAAsB,CAAC;QAld9D,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAlCD;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD;;;OAGG;IACH,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,qBAAqB,CAAC,KAAa;QAC5C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,I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AC,EACvD,IAAA,gBAAI,EAAC,CAAC,CAAC,EACP,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;;AAjiBH,gCAkiBC;AAthBC;;GAEG;AACoB,4BAAiB,GAAW,MAAM,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 { Transport } from './transport';\nimport { Device } from './device';\nimport { Response } from './response';\nimport { UnknownResponseEvent } from './unknown_response_event';\nimport { AlertEvent } from './alert_event';\nimport { MotionLibException } from '../exceptions';\n\n/**\n * Class representing access to particular connection (serial port, TCP connection).\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 an alert is received from a device.\n */\n public alert!: Observable<AlertEvent>;\n\n /**\n * Default baud rate for serial connections.\n */\n public static readonly DEFAULT_BAUD_RATE: number = 115200;\n\n /**\n * The interface ID identifies this Connection instance with the underlying library.\n */\n public get interfaceId(): number {\n return this._interfaceId;\n }\n private _interfaceId: number;\n\n /**\n * The default timeout, in milliseconds, for a device to respond to a request.\n * Setting the timeout to a too low value may cause request timeout exceptions.\n */\n public get defaultRequestTimeout(): number {\n return this._retrieveTimeout();\n }\n\n public set defaultRequestTimeout(value: number) {\n this._changeTimeout(value);\n }\n\n /**\n * Controls whether outgoing messages contain checksum.\n */\n public get checksumEnabled(): boolean {\n return this._retrieveChecksumEnabled();\n }\n\n public set checksumEnabled(value: boolean) {\n this._changeChecksumEnabled(value);\n }\n\n constructor(interfaceId: number) {\n this._interfaceId = interfaceId;\n this._subscribe();\n }\n\n /**\n * Opens a serial port, if Zaber Launcher controls the port, the port will be opened through Zaber Launcher.\n * Zaber Launcher allows sharing of the port between multiple applications.\n * Use openSerialPortDirectly if sharing is not desirable.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 115200).\n * @return An object representing the port.\n */\n public static async openSerialPort(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a serial port, bypassing Zaber Launcher.\n * If the port is already opened by Zaber Launcher, this will fail.\n * @param portName Name of the port to open.\n * @param baudRate Optional baud rate (defaults to 115200).\n * @return An object representing the port.\n */\n public static async openSerialPortDirectly(\n portName: string,\n baudRate: number = Connection.DEFAULT_BAUD_RATE\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.SERIAL_PORT);\n request.setRejectRoutedConnection(true);\n request.setPortName(portName);\n request.setBaudRate(baudRate);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n '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 Port number.\n * @return An object representing the connection.\n */\n public static async openTcp(\n hostName: string,\n port: number\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.TCP);\n request.setHostName(hostName);\n request.setPort(port);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a connection using a custom transport.\n * @param transport The custom connection transport.\n * @return An object representing the connection.\n */\n public static async openCustom(\n transport: Transport\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.CUSTOM);\n request.setTransport(transport.transportId);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a unauthenticated connection to a cloud connected device chain.\n * Use this method to connect to Virtual Device free trial instances.\n * The connection is not secured.\n * @param cloudId The cloud ID to connect to.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @param api The URL of the API to receive connection info from.\n * @return An object representing the connection.\n */\n public static async openIotUnauthenticated(\n cloudId: string,\n connectionName: string = '',\n api: string = 'https://api.zaber.io'\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.IOT);\n request.setRealm('unauthenticated');\n request.setToken('unauthenticated');\n request.setCloudId(cloudId);\n request.setConnectionName(connectionName);\n request.setApi(api);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a secured connection to a cloud connected device chain.\n * Use this method to connect to devices on your account.\n * @param cloudId The cloud ID to connect to.\n * @param token The token to authenticate with.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @param realm The realm to connect to.\n * Can be left empty for the default account realm.\n * @param api The URL of the API to receive connection info from.\n * @return An object representing the connection.\n */\n public static async openIotAuthenticated(\n cloudId: string,\n token: string,\n connectionName: string = '',\n realm: string = '',\n api: string = 'https://api.zaber.io'\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.IOT);\n request.setCloudId(cloudId);\n request.setToken(token);\n request.setConnectionName(connectionName);\n request.setRealm(realm);\n request.setApi(api);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Opens a connection to Zaber Launcher in your Local Area Network.\n * The connection is not secured.\n * @param hostName Hostname or IP address.\n * @param port Port number.\n * @param connectionName The name of the connection to open.\n * Can be left empty to default to the only connection present.\n * Otherwise, use serial port name for serial port connection or hostname:port for TCP connection.\n * @return An object representing the connection.\n */\n public static async openNetworkShare(\n hostName: string,\n port: number,\n connectionName: string = ''\n ): Promise<Connection> {\n const request = new gateway.OpenInterfaceRequest();\n request.setInterfaceType(gateway.InterfaceType.NETWORK_SHARE);\n request.setHostName(hostName);\n request.setPort(port);\n request.setConnectionName(connectionName);\n\n const response = await gateway.callAsync<gateway.OpenInterfaceResponse>(\n 'interface/open',\n request,\n gateway.OpenInterfaceResponse);\n return new Connection(response.getInterfaceId());\n }\n\n /**\n * Sends a generic ASCII command to this connection.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n device: number = 0,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this connection without expecting a response and without adding a message ID.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n */\n public async genericCommandNoResponse(\n command: string,\n device: number = 0,\n axis: number = 0\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Sends a generic ASCII command to this connection and expect multiple responses,\n * either from one device or from many devices.\n * Responses are returned in order of arrival.\n * For more information refer to the [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param device Optional device address to send the command to.\n * @param axis Optional axis number to send the command to.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n device: number = 0,\n axis: number = 0,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.interfaceId);\n request.setCommand(command);\n request.setDevice(device);\n request.setAxis(axis);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\n }\n\n /**\n * Resets ASCII protocol message IDs. Only for testing purposes.\n */\n public resetIds(): void {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n gateway.callSync('interface/reset_ids', request);\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request = new gateway.CloseInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n await gateway.callAsync('interface/close', request);\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 * Renumbers devices present on this connection. After renumbering, devices need to be identified again.\n * @param firstAddress This is the address that the device closest to the computer is given.\n * Remaining devices are numbered consecutively.\n * @return Total number of devices that responded to the renumber.\n */\n public async renumberDevices(\n firstAddress: number = 1\n ): Promise<number> {\n if (firstAddress <= 0) {\n throw new TypeError('Invalid value; device addresses are numbered from 1.');\n }\n const request = new gateway.DeviceRenumberRequest();\n request.setInterfaceId(this.interfaceId);\n request.setFirstAddress(firstAddress);\n\n const response = await gateway.callAsync<gateway.DeviceRenumberResponse>(\n 'device/renumber',\n request,\n gateway.DeviceRenumberResponse);\n return response.getNumberDevices();\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.DeviceDetectRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIdentifyDevices(identifyDevices);\n\n const response = await gateway.callAsync<gateway.DeviceDetectResponse>(\n 'device/detect',\n request,\n gateway.DeviceDetectResponse);\n return response.getDevicesList().map(deviceAddress => this.getDevice(deviceAddress));\n }\n\n /**\n * Stops all of the devices on this connection.\n * @param waitUntilIdle Determines whether the function should return immediately\n * or wait until the devices are stopped.\n * @return The addresses of the devices that were stopped by this command.\n */\n public async stopAll(\n waitUntilIdle: boolean = true\n ): Promise<number[]> {\n const request = new gateway.DeviceOnAllRequest();\n request.setInterfaceId(this.interfaceId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n const response = await gateway.callAsync<gateway.DeviceOnAllResponse>(\n 'device/stop_all',\n request,\n gateway.DeviceOnAllResponse);\n return response.getDeviceAddressesList();\n }\n\n /**\n * Homes all of the devices on this connection.\n * @param waitUntilIdle Determines whether the function should return immediately\n * or wait until the devices are homed.\n * @return The addresses of the devices that were homed by this command.\n */\n public async homeAll(\n waitUntilIdle: boolean = true\n ): Promise<number[]> {\n const request = new gateway.DeviceOnAllRequest();\n request.setInterfaceId(this.interfaceId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n const response = await gateway.callAsync<gateway.DeviceOnAllResponse>(\n 'device/home_all',\n request,\n gateway.DeviceOnAllResponse);\n return response.getDeviceAddressesList();\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.ToStringRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.ToStringResponse>(\n 'interface/to_string',\n request,\n gateway.ToStringResponse);\n return response.getToStr();\n }\n\n /**\n * Returns default request timeout.\n * @return Default request timeout.\n */\n private _retrieveTimeout(): number {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.GetInterfaceTimeoutResponse>(\n 'interface/get_timeout',\n request,\n gateway.GetInterfaceTimeoutResponse);\n return response.getValue();\n }\n\n /**\n * Sets default request timeout.\n * @param timeout Default request timeout.\n */\n private _changeTimeout(\n timeout: number\n ): void {\n const request = new gateway.SetInterfaceTimeoutRequest();\n request.setInterfaceId(this.interfaceId);\n request.setTimeout(timeout);\n\n gateway.callSync('interface/set_timeout', request);\n }\n\n /**\n * Returns checksum enabled.\n * @return Checksum enabled.\n */\n private _retrieveChecksumEnabled(): boolean {\n const request = new gateway.EmptyInterfaceRequest();\n request.setInterfaceId(this.interfaceId);\n\n const response = gateway.callSync<gateway.GetInterfaceChecksumEnabledResponse>(\n 'interface/get_checksum_enabled',\n request,\n gateway.GetInterfaceChecksumEnabledResponse);\n return response.getValue();\n }\n\n /**\n * Sets checksum enabled.\n * @param isEnabled Checksum enabled.\n */\n private _changeChecksumEnabled(\n isEnabled: boolean\n ): void {\n const request = new gateway.SetInterfaceChecksumEnabledRequest();\n request.setInterfaceId(this.interfaceId);\n request.setIsEnabled(isEnabled);\n\n gateway.callSync('interface/set_checksum_enabled', request);\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.UnknownResponseEvent.AsObject>('interface/unknown_response'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => UnknownResponseEvent.fromProtobuf(event))\n );\n\n this.alert = events.pipe(\n takeUntil(this._disconnected),\n filterEvent<gateway.AlertEvent.AsObject>('interface/alert'),\n filter(event => event.interfaceId === this.interfaceId),\n map(event => AlertEvent.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"]}
@@ -294,12 +294,6 @@ export declare class Stream {
294
294
  * The stream will process the rest of the commands in the queue until it is empty.
295
295
  */
296
296
  disable(): Promise<void>;
297
- /**
298
- * Sends a generic ASCII command to the stream.
299
- * Keeps resending the command while the device rejects with AGAIN reason.
300
- * @param command Command and its parameters.
301
- */
302
- genericCommand(command: string): Promise<void>;
303
297
  /**
304
298
  * Gets the axes of the stream.
305
299
  * @return An array of axis numbers of the axes the stream is set up to control.
@@ -630,19 +630,6 @@ class Stream {
630
630
  request.setStreamId(this.streamId);
631
631
  await gateway.callAsync('device/stream_disable', request);
632
632
  }
633
- /**
634
- * Sends a generic ASCII command to the stream.
635
- * Keeps resending the command while the device rejects with AGAIN reason.
636
- * @param command Command and its parameters.
637
- */
638
- async genericCommand(command) {
639
- const request = new gateway.StreamGenericCommandRequest();
640
- request.setInterfaceId(this.device.connection.interfaceId);
641
- request.setDevice(this.device.deviceAddress);
642
- request.setStreamId(this.streamId);
643
- request.setCommand(command);
644
- await gateway.callAsync('device/stream_generic_command', request);
645
- }
646
633
  /**
647
634
  * Gets the axes of the stream.
648
635
  * @return An array of axis numbers of the axes the stream is set up to control.
@@ -1 +1 @@
1
- {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/ascii/stream.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAwF;AAExF,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,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CA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AM,OAAO,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACnD,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,qBAAqB,CAAC,CAAC;QACjC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,6CAAoB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3F,CAAC;IAED;;;OAGG;IACK,aAAa;QACnB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACnD,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,qBAAqB,CAAC,CAAC;QACjC,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;CACF;AA/0BD,wBA+0BC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Time, Native, Acceleration, 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 * 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.StreamCorkRequest();\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.StreamUncorkRequest();\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.StreamIsBusyRequest();\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.StreamIsBusyResponse>(\n 'device/stream_is_busy',\n request,\n gateway.StreamIsBusyResponse);\n return response.getIsBusy();\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.StreamGetMaxSpeedResponse>(\n 'device/stream_get_max_speed',\n request,\n gateway.StreamGetMaxSpeedResponse);\n return response.getMaxSpeed();\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 | 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.StreamGetMaxTangentialAccelerationResponse>(\n 'device/stream_get_max_tangential_acceleration',\n request,\n gateway.StreamGetMaxTangentialAccelerationResponse);\n return response.getMaxTangentialAcceleration();\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 | 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 | 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.StreamGetMaxCentripetalAccelerationResponse>(\n 'device/stream_get_max_centripetal_acceleration',\n request,\n gateway.StreamGetMaxCentripetalAccelerationResponse);\n return response.getMaxCentripetalAcceleration();\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 | 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.StreamToStringRequest();\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.StreamToStringResponse>(\n 'device/stream_to_string',\n request,\n gateway.StreamToStringResponse);\n return response.getToStr();\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.StreamDisableRequest();\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 * 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.StreamGetAxesRequest();\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.StreamGetModeRequest();\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.StreamGetModeResponse>(\n 'device/stream_get_mode',\n request,\n gateway.StreamGetModeResponse);\n return response.getMode();\n }\n}\n"]}
1
+ {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/ascii/stream.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAwF;AAExF,oDAAsC;AACtC,gDAA6C;AAG7C,qEAAgE;AAEhE;;;;GAIG;AACH,MAAa,MAAM;IA+BjB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;Q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ENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Time, Native, Acceleration, 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 * 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.StreamCorkRequest();\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.StreamUncorkRequest();\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.StreamIsBusyRequest();\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.StreamIsBusyResponse>(\n 'device/stream_is_busy',\n request,\n gateway.StreamIsBusyResponse);\n return response.getIsBusy();\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.StreamGetMaxSpeedResponse>(\n 'device/stream_get_max_speed',\n request,\n gateway.StreamGetMaxSpeedResponse);\n return response.getMaxSpeed();\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 | 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.StreamGetMaxTangentialAccelerationResponse>(\n 'device/stream_get_max_tangential_acceleration',\n request,\n gateway.StreamGetMaxTangentialAccelerationResponse);\n return response.getMaxTangentialAcceleration();\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 | 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 | 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.StreamGetMaxCentripetalAccelerationResponse>(\n 'device/stream_get_max_centripetal_acceleration',\n request,\n gateway.StreamGetMaxCentripetalAccelerationResponse);\n return response.getMaxCentripetalAcceleration();\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 | 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.StreamToStringRequest();\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.StreamToStringResponse>(\n 'device/stream_to_string',\n request,\n gateway.StreamToStringResponse);\n return response.getToStr();\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.StreamDisableRequest();\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 * 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.StreamGetAxesRequest();\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.StreamGetModeRequest();\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.StreamGetModeResponse>(\n 'device/stream_get_mode',\n request,\n gateway.StreamGetModeResponse);\n return response.getMode();\n }\n}\n"]}
@@ -10,7 +10,7 @@ export interface StreamAxisDefinition {
10
10
  /**
11
11
  * Defines the type of the axis.
12
12
  */
13
- axisType?: StreamAxisType;
13
+ axisType?: StreamAxisType | null;
14
14
  }
15
15
  export declare namespace StreamAxisDefinition {
16
16
  const __type = "StreamAxisDefinition";
@@ -1 +1 @@
1
- {"version":3,"file":"stream_axis_definition.js","sourceRoot":"","sources":["../../../src/ascii/stream_axis_definition.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAmBtC,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IACtB,2BAAM,GAAG,sBAAsB,CAAC;IAE7C,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAA6C;QACxE,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAe;SACjC,CAAC;IACJ,CAAC;IALe,iCAAY,eAK3B,CAAA;IACD,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA4B;QACrD,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAClD,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC;IAChB,CAAC;IALe,+BAAU,aAKzB,CAAA;AACH,CAAC,EAjBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAiBpC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { StreamAxisType } from './stream_axis_type';\n\n/**\n * Defines an axis of the stream.\n */\nexport interface StreamAxisDefinition {\n /**\n * Number of a physical axis or a lockstep group.\n */\n axisNumber: number;\n\n /**\n * Defines the type of the axis.\n */\n axisType?: StreamAxisType;\n\n}\n\nexport namespace StreamAxisDefinition {\n export const __type = 'StreamAxisDefinition';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.StreamAxisDefinition.AsObject): StreamAxisDefinition {\n return {\n axisNumber: pbData.axisNumber,\n axisType: pbData.axisType as any,\n };\n }\n /** @internal */\n export function toProtobuf(source: StreamAxisDefinition): gateway.StreamAxisDefinition {\n const pbData = new gateway.StreamAxisDefinition();\n pbData.setAxisNumber(source.axisNumber);\n pbData.setAxisType(source.axisType!);\n return pbData;\n }\n}\n"]}
1
+ {"version":3,"file":"stream_axis_definition.js","sourceRoot":"","sources":["../../../src/ascii/stream_axis_definition.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAmBtC,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IACtB,2BAAM,GAAG,sBAAsB,CAAC;IAE7C,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAA6C;QACxE,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAe;SACjC,CAAC;IACJ,CAAC;IALe,iCAAY,eAK3B,CAAA;IACD,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA4B;QACrD,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAClD,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC;IAChB,CAAC;IALe,+BAAU,aAKzB,CAAA;AACH,CAAC,EAjBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAiBpC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { StreamAxisType } from './stream_axis_type';\n\n/**\n * Defines an axis of the stream.\n */\nexport interface StreamAxisDefinition {\n /**\n * Number of a physical axis or a lockstep group.\n */\n axisNumber: number;\n\n /**\n * Defines the type of the axis.\n */\n axisType?: StreamAxisType | null;\n\n}\n\nexport namespace StreamAxisDefinition {\n export const __type = 'StreamAxisDefinition';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.StreamAxisDefinition.AsObject): StreamAxisDefinition {\n return {\n axisNumber: pbData.axisNumber,\n axisType: pbData.axisType as any,\n };\n }\n /** @internal */\n export function toProtobuf(source: StreamAxisDefinition): gateway.StreamAxisDefinition {\n const pbData = new gateway.StreamAxisDefinition();\n pbData.setAxisNumber(source.axisNumber);\n pbData.setAxisType(source.axisType!);\n return pbData;\n }\n}\n"]}
@@ -22,7 +22,6 @@ export declare class StreamBuffer {
22
22
  getContent(): Promise<string[]>;
23
23
  /**
24
24
  * Erase the contents of the buffer.
25
- * This method fails if there is a stream writing to the buffer.
26
25
  */
27
26
  erase(): Promise<void>;
28
27
  }
@@ -58,7 +58,6 @@ class StreamBuffer {
58
58
  }
59
59
  /**
60
60
  * Erase the contents of the buffer.
61
- * This method fails if there is a stream writing to the buffer.
62
61
  */
63
62
  async erase() {
64
63
  const request = new gateway.StreamBufferEraseRequest();
@@ -1 +1 @@
1
- {"version":3,"file":"stream_buffer.js","sourceRoot":"","sources":["../../../src/ascii/stream_buffer.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AAEtC;;;GAGG;AACH,MAAa,YAAY;IAiBvB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAnBD;;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;IAQD;;;OAGG;IACI,KAAK,CAAC,UAAU;QACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,6BAA6B,EAAE,CAAC;QAC5D,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,MAAM,OAAO,CAAC,SAAS,CACtC,kCAAkC,EAClC,OAAO,EACP,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC1C,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QAChB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;QACvD,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,OAAO,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAnDD,oCAmDC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Represents a stream buffer with this ID on a device.\n * A stream buffer is a place to store a queue of stream actions.\n */\nexport class StreamBuffer {\n /**\n * The Device this buffer exists on.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number identifying the buffer on the device.\n */\n public get bufferId(): number {\n return this._bufferId;\n }\n private _bufferId: number;\n\n constructor(device: Device, bufferId: number) {\n this._device = device;\n this._bufferId = bufferId;\n }\n\n /**\n * Get the buffer contents as an array of strings.\n * @return A string array containing all the stream commands stored in the buffer.\n */\n public async getContent(): Promise<string[]> {\n const request = new gateway.StreamBufferGetContentRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n\n const response = await gateway.callAsync<gateway.StreamBufferGetContentResponse>(\n 'device/stream_buffer_get_content',\n request,\n gateway.StreamBufferGetContentResponse);\n return response.getBufferLinesList();\n }\n\n /**\n * Erase the contents of the buffer.\n * This method fails if there is a stream writing to the buffer.\n */\n public async erase(): Promise<void> {\n const request = new gateway.StreamBufferEraseRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n\n await gateway.callAsync('device/stream_buffer_erase', request);\n }\n}\n"]}
1
+ {"version":3,"file":"stream_buffer.js","sourceRoot":"","sources":["../../../src/ascii/stream_buffer.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AAEtC;;;GAGG;AACH,MAAa,YAAY;IAiBvB,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAnBD;;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;IAQD;;;OAGG;IACI,KAAK,CAAC,UAAU;QACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,6BAA6B,EAAE,CAAC;QAC5D,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,MAAM,OAAO,CAAC,SAAS,CACtC,kCAAkC,EAClC,OAAO,EACP,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC1C,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,KAAK;QAChB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;QACvD,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,OAAO,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAlDD,oCAkDC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Represents a stream buffer with this ID on a device.\n * A stream buffer is a place to store a queue of stream actions.\n */\nexport class StreamBuffer {\n /**\n * The Device this buffer exists on.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number identifying the buffer on the device.\n */\n public get bufferId(): number {\n return this._bufferId;\n }\n private _bufferId: number;\n\n constructor(device: Device, bufferId: number) {\n this._device = device;\n this._bufferId = bufferId;\n }\n\n /**\n * Get the buffer contents as an array of strings.\n * @return A string array containing all the stream commands stored in the buffer.\n */\n public async getContent(): Promise<string[]> {\n const request = new gateway.StreamBufferGetContentRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n\n const response = await gateway.callAsync<gateway.StreamBufferGetContentResponse>(\n 'device/stream_buffer_get_content',\n request,\n gateway.StreamBufferGetContentResponse);\n return response.getBufferLinesList();\n }\n\n /**\n * Erase the contents of the buffer.\n */\n public async erase(): Promise<void> {\n const request = new gateway.StreamBufferEraseRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n\n await gateway.callAsync('device/stream_buffer_erase', request);\n }\n}\n"]}
@@ -197,9 +197,9 @@ class Connection {
197
197
  return this._disconnected;
198
198
  }
199
199
  _subscribe() {
200
- this.unknownResponse = gateway_1.events.pipe(operators_1.takeUntil(this._disconnected), gateway_1.filterEvent('binary/interface/unknown_response'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.map(event => unknown_response_event_1.UnknownResponseEvent.fromProtobuf(event)));
201
- this.replyOnly = gateway_1.events.pipe(operators_1.takeUntil(this._disconnected), gateway_1.filterEvent('binary/interface/reply_only'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.map(event => reply_only_event_1.ReplyOnlyEvent.fromProtobuf(event)));
202
- gateway_1.events.pipe(gateway_1.filterEvent('interface/disconnected'), operators_1.filter(event => event.interfaceId === this.interfaceId), operators_1.take(1), operators_1.map(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))).subscribe(this._disconnected);
200
+ this.unknownResponse = gateway_1.events.pipe((0, operators_1.takeUntil)(this._disconnected), (0, gateway_1.filterEvent)('binary/interface/unknown_response'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.map)(event => unknown_response_event_1.UnknownResponseEvent.fromProtobuf(event)));
201
+ this.replyOnly = gateway_1.events.pipe((0, operators_1.takeUntil)(this._disconnected), (0, gateway_1.filterEvent)('binary/interface/reply_only'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.map)(event => reply_only_event_1.ReplyOnlyEvent.fromProtobuf(event)));
202
+ gateway_1.events.pipe((0, gateway_1.filterEvent)('interface/disconnected'), (0, operators_1.filter)(event => event.interfaceId === this.interfaceId), (0, operators_1.take)(1), (0, operators_1.map)(({ errorMessage, errorType }) => gateway.convertToException(errorType, errorMessage))).subscribe(this._disconnected);
203
203
  }
204
204
  }
205
205
  exports.Connection = Connection;