@zaber/motion 2.15.3 → 3.0.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.
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/all_axes.d.ts +21 -9
- package/dist/lib/ascii/all_axes.js +12 -9
- package/dist/lib/ascii/all_axes.js.map +1 -1
- package/dist/lib/ascii/axis.d.ts +116 -58
- package/dist/lib/ascii/axis.js +74 -58
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_settings.d.ts +11 -10
- package/dist/lib/ascii/axis_settings.js +11 -10
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/connection.d.ts +91 -68
- package/dist/lib/ascii/connection.js +60 -86
- package/dist/lib/ascii/connection.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +46 -25
- package/dist/lib/ascii/device.js +31 -25
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_io.d.ts +9 -9
- package/dist/lib/ascii/device_io.js +9 -9
- package/dist/lib/ascii/device_io.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +10 -10
- package/dist/lib/ascii/device_settings.js +10 -10
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +99 -49
- package/dist/lib/ascii/lockstep.js +63 -49
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/oscilloscope.d.ts +14 -13
- package/dist/lib/ascii/oscilloscope.js +14 -13
- package/dist/lib/ascii/oscilloscope.js.map +1 -1
- package/dist/lib/ascii/oscilloscope_data.d.ts +9 -9
- package/dist/lib/ascii/oscilloscope_data.js +9 -9
- package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +20 -10
- package/dist/lib/ascii/servo_tuner.js +13 -10
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii/setting_constants.d.ts +2 -2
- package/dist/lib/ascii/setting_constants.js +2 -2
- package/dist/lib/ascii/setting_constants.js.map +1 -1
- package/dist/lib/ascii/storage.d.ts +49 -24
- package/dist/lib/ascii/storage.js +32 -24
- package/dist/lib/ascii/storage.js.map +1 -1
- package/dist/lib/ascii/stream.d.ts +29 -17
- package/dist/lib/ascii/stream.js +24 -17
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii/stream_buffer.d.ts +1 -1
- package/dist/lib/ascii/stream_buffer.js +1 -1
- package/dist/lib/ascii/stream_buffer.js.map +1 -1
- package/dist/lib/ascii/transport.d.ts +2 -2
- package/dist/lib/ascii/transport.js +2 -2
- package/dist/lib/ascii/transport.js.map +1 -1
- package/dist/lib/ascii/warnings.d.ts +2 -2
- package/dist/lib/ascii/warnings.js +2 -2
- package/dist/lib/ascii/warnings.js.map +1 -1
- package/dist/lib/binary/connection.d.ts +46 -25
- package/dist/lib/binary/connection.js +30 -25
- package/dist/lib/binary/connection.js.map +1 -1
- package/dist/lib/binary/device.d.ts +66 -38
- package/dist/lib/binary/device.js +48 -38
- package/dist/lib/binary/device.js.map +1 -1
- package/dist/lib/binary/device_identity.d.ts +1 -0
- package/dist/lib/binary/device_identity.js.map +1 -1
- package/dist/lib/binary/device_settings.d.ts +3 -3
- package/dist/lib/binary/device_settings.js +3 -3
- package/dist/lib/binary/device_settings.js.map +1 -1
- package/dist/lib/exceptions/binary_command_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/command_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/command_preempted_exception.js.map +1 -1
- package/dist/lib/exceptions/command_too_long_exception.js.map +1 -1
- package/dist/lib/exceptions/connection_closed_exception.js.map +1 -1
- package/dist/lib/exceptions/connection_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/conversion_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/device_address_conflict_exception.js.map +1 -1
- package/dist/lib/exceptions/device_busy_exception.js.map +1 -1
- package/dist/lib/exceptions/device_db_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/device_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/device_not_identified_exception.js.map +1 -1
- package/dist/lib/exceptions/g_code_execution_exception.js.map +1 -1
- package/dist/lib/exceptions/g_code_syntax_exception.js.map +1 -1
- package/dist/lib/exceptions/internal_error_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_argument_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_data_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_operation_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_packet_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_park_state_exception.js.map +1 -1
- package/dist/lib/exceptions/invalid_response_exception.js.map +1 -1
- package/dist/lib/exceptions/io_channel_out_of_range_exception.js.map +1 -1
- package/dist/lib/exceptions/io_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/lockstep_enabled_exception.js.map +1 -1
- package/dist/lib/exceptions/lockstep_not_enabled_exception.js.map +1 -1
- package/dist/lib/exceptions/motion_lib_exception.js.map +1 -1
- package/dist/lib/exceptions/movement_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/movement_interrupted_exception.js.map +1 -1
- package/dist/lib/exceptions/no_device_found_exception.js.map +1 -1
- package/dist/lib/exceptions/no_value_for_key_exception.js.map +1 -1
- package/dist/lib/exceptions/not_supported_exception.js.map +1 -1
- package/dist/lib/exceptions/os_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/out_of_request_ids_exception.js.map +1 -1
- package/dist/lib/exceptions/request_timeout_exception.js.map +1 -1
- package/dist/lib/exceptions/serial_port_busy_exception.js.map +1 -1
- package/dist/lib/exceptions/set_device_state_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/set_peripheral_state_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/setting_not_found_exception.js.map +1 -1
- package/dist/lib/exceptions/stream_execution_exception.js.map +1 -1
- package/dist/lib/exceptions/stream_mode_exception.js.map +1 -1
- package/dist/lib/exceptions/stream_movement_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/stream_movement_interrupted_exception.js.map +1 -1
- package/dist/lib/exceptions/stream_setup_failed_exception.js.map +1 -1
- package/dist/lib/exceptions/transport_already_used_exception.js.map +1 -1
- package/dist/lib/exceptions/unknown_request_exception.js.map +1 -1
- package/dist/lib/gateway/events.js +4 -5
- package/dist/lib/gateway/events.js.map +1 -1
- package/dist/lib/gateway/serialization.js.map +1 -1
- package/dist/lib/gcode/offline_translator.d.ts +8 -7
- package/dist/lib/gcode/offline_translator.js +8 -7
- package/dist/lib/gcode/offline_translator.js.map +1 -1
- package/dist/lib/gcode/translator.d.ts +15 -8
- package/dist/lib/gcode/translator.js +10 -8
- package/dist/lib/gcode/translator.js.map +1 -1
- package/dist/lib/library.d.ts +3 -3
- package/dist/lib/library.js +3 -3
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/tools.d.ts +3 -3
- package/dist/lib/tools.js +3 -3
- package/dist/lib/tools.js.map +1 -1
- package/dist/lib/wasm.js +1 -3
- package/dist/lib/wasm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/ascii/storage.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAItD,oDAAsC;AAEtC;;GAEG;AACH,MAAa,WAAW;IAGtB,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,SAAS,CACpB,GAAW,EACX,KAAa,EACb,SAAkB,KAAK;QAEvB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACtD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACjE,OAAO,CAAC,SAAS,CAAC,IA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,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CACnB,SAAiB,EAAE;QAEnB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE1B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,SAAS,CACpB,GAAW;QAEX,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACnD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA9LD,sCA8LC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Class providing access to axis storage.\n */\nexport class AxisStorage {\n private _axis: Axis;\n\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Sets the axis value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param encode Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n encode: boolean = false\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the axis value stored with the provided key.\n * @param key Key to read the value of.\n * @param decode Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @return Stored value.\n */\n public async getString(\n key: string,\n decode: boolean = false\n ): Promise<string> {\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Erases the axis value stored at the provided key.\n * @param key Key to erase.\n * @return A boolean indicating if the key existed.\n */\n public async eraseKey(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/erase_storage',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Lists the axis storage keys matching a given prefix.\n * Omit the prefix to list all the keys.\n * @param prefix Optional key prefix.\n * @return Storage keys matching the given prefix.\n */\n public async listKeys(\n prefix: string = ''\n ): Promise<string[]> {\n const request = new gateway.DeviceStorageListKeysRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setPrefix(prefix);\n\n const response = await gateway.callAsync<gateway.StringArrayResponse>(\n 'device/storage_list_keys',\n request,\n gateway.StringArrayResponse);\n return response.getValuesList();\n }\n\n /**\n * Determines whether a given key exists in axis storage.\n * @param key Key which existence to determine.\n * @return True indicating that the key exists, false otherwise.\n */\n public async keyExists(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/storage_key_exists',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\n/**\n * Class providing access to device storage.\n */\nexport class DeviceStorage {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Sets the device value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param encode Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n encode: boolean = false\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the device value stored with the provided key.\n * @param key Key to read the value of.\n * @param decode Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @return Stored value.\n */\n public async getString(\n key: string,\n decode: boolean = false\n ): Promise<string> {\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Erases the device value stored at the provided key.\n * @param key Key to erase.\n * @return A boolean indicating if the key existed.\n */\n public async eraseKey(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/erase_storage',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Lists the device storage keys matching a given prefix.\n * Omit the prefix to list all the keys.\n * @param prefix Optional key prefix.\n * @return Storage keys matching the given prefix.\n */\n public async listKeys(\n prefix: string = ''\n ): Promise<string[]> {\n const request = new gateway.DeviceStorageListKeysRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setPrefix(prefix);\n\n const response = await gateway.callAsync<gateway.StringArrayResponse>(\n 'device/storage_list_keys',\n request,\n gateway.StringArrayResponse);\n return response.getValuesList();\n }\n\n /**\n * Determines whether a given key exists in device storage.\n * @param key Key which existence to determine.\n * @return True indicating that the key exists, false otherwise.\n */\n public async keyExists(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/storage_key_exists',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/ascii/storage.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAItD,oDAAsC;AAEtC;;;GAGG;AACH,MAAa,WAAW;IAGtB,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,SAAS,CACpB,GAAW,EACX,KAAa,EACb,UAAwC,EAAE;QAE1C,MAAM,EACJ,MAAM,GAAG,KAAK,GACf,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,uBAAuB,EA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AAC;QAC9C,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAvMD,sCAuMC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Class providing access to axis storage.\n * Requires at least Firmware 7.30.\n */\nexport class AxisStorage {\n private _axis: Axis;\n\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Sets the axis value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param [options.encode=false] Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n options: AxisStorage.SetStringOptions = {}\n ): Promise<void> {\n const {\n encode = false,\n } = options;\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the axis value stored with the provided key.\n * @param key Key to read the value of.\n * @param [options.decode=false] Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @returns Stored value.\n */\n public async getString(\n key: string,\n options: AxisStorage.GetStringOptions = {}\n ): Promise<string> {\n const {\n decode = false,\n } = options;\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @returns Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @returns Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Erases the axis value stored at the provided key.\n * @param key Key to erase.\n * @returns A boolean indicating if the key existed.\n */\n public async eraseKey(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/erase_storage',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Lists the axis storage keys matching a given prefix.\n * Omit the prefix to list all the keys.\n * @param [options.prefix=''] Optional key prefix.\n * @returns Storage keys matching the given prefix.\n */\n public async listKeys(\n options: AxisStorage.ListKeysOptions = {}\n ): Promise<string[]> {\n const {\n prefix = '',\n } = options;\n const request = new gateway.DeviceStorageListKeysRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setPrefix(prefix);\n\n const response = await gateway.callAsync<gateway.StringArrayResponse>(\n 'device/storage_list_keys',\n request,\n gateway.StringArrayResponse);\n return response.getValuesList();\n }\n\n /**\n * Determines whether a given key exists in axis storage.\n * @param key Key which existence to determine.\n * @returns True indicating that the key exists, false otherwise.\n */\n public async keyExists(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/storage_key_exists',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\nnamespace AxisStorage {\n export interface SetStringOptions {\n encode?: boolean;\n }\n export interface GetStringOptions {\n decode?: boolean;\n }\n export interface ListKeysOptions {\n prefix?: string;\n }\n}\n\n/**\n * Class providing access to device storage.\n * Requires at least Firmware 7.30.\n */\nexport class DeviceStorage {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Sets the device value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param [options.encode=false] Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n options: DeviceStorage.SetStringOptions = {}\n ): Promise<void> {\n const {\n encode = false,\n } = options;\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the device value stored with the provided key.\n * @param key Key to read the value of.\n * @param [options.decode=false] Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @returns Stored value.\n */\n public async getString(\n key: string,\n options: DeviceStorage.GetStringOptions = {}\n ): Promise<string> {\n const {\n decode = false,\n } = options;\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @returns Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @returns Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Erases the device value stored at the provided key.\n * @param key Key to erase.\n * @returns A boolean indicating if the key existed.\n */\n public async eraseKey(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/erase_storage',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Lists the device storage keys matching a given prefix.\n * Omit the prefix to list all the keys.\n * @param [options.prefix=''] Optional key prefix.\n * @returns Storage keys matching the given prefix.\n */\n public async listKeys(\n options: DeviceStorage.ListKeysOptions = {}\n ): Promise<string[]> {\n const {\n prefix = '',\n } = options;\n const request = new gateway.DeviceStorageListKeysRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setPrefix(prefix);\n\n const response = await gateway.callAsync<gateway.StringArrayResponse>(\n 'device/storage_list_keys',\n request,\n gateway.StringArrayResponse);\n return response.getValuesList();\n }\n\n /**\n * Determines whether a given key exists in device storage.\n * @param key Key which existence to determine.\n * @returns True indicating that the key exists, false otherwise.\n */\n public async keyExists(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/storage_key_exists',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\nnamespace DeviceStorage {\n export interface SetStringOptions {\n encode?: boolean;\n }\n export interface GetStringOptions {\n decode?: boolean;\n }\n export interface ListKeysOptions {\n prefix?: string;\n }\n}\n"]}
|
|
@@ -79,6 +79,7 @@ export declare class Stream {
|
|
|
79
79
|
lineRelative(...endpoint: Measurement[]): Promise<void>;
|
|
80
80
|
/**
|
|
81
81
|
* Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
82
|
+
* Requires at least Firmware 7.11.
|
|
82
83
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
83
84
|
* Refers to the axes provided during the stream setup or further execution.
|
|
84
85
|
* Indices are zero-based.
|
|
@@ -87,6 +88,7 @@ export declare class Stream {
|
|
|
87
88
|
lineAbsoluteOn(targetAxesIndices: number[], endpoint: Measurement[]): Promise<void>;
|
|
88
89
|
/**
|
|
89
90
|
* Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
91
|
+
* Requires at least Firmware 7.11.
|
|
90
92
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
91
93
|
* Refers to the axes provided during the stream setup or further execution.
|
|
92
94
|
* Indices are zero-based.
|
|
@@ -116,6 +118,7 @@ export declare class Stream {
|
|
|
116
118
|
/**
|
|
117
119
|
* Queue an absolute arc movement in the stream.
|
|
118
120
|
* The movement will only target the specified subset of axes in the stream.
|
|
121
|
+
* Requires at least Firmware 7.11.
|
|
119
122
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
120
123
|
* Refers to the axes provided during the stream setup or further execution.
|
|
121
124
|
* Indices are zero-based.
|
|
@@ -129,6 +132,7 @@ export declare class Stream {
|
|
|
129
132
|
/**
|
|
130
133
|
* Queue a relative arc movement in the stream.
|
|
131
134
|
* The movement will only target the specified subset of axes in the stream.
|
|
135
|
+
* Requires at least Firmware 7.11.
|
|
132
136
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
133
137
|
* Refers to the axes provided during the stream setup or further execution.
|
|
134
138
|
* Indices are zero-based.
|
|
@@ -158,6 +162,7 @@ export declare class Stream {
|
|
|
158
162
|
/**
|
|
159
163
|
* Queue an absolute circle movement in the stream.
|
|
160
164
|
* The movement will only target the specified subset of axes in the stream.
|
|
165
|
+
* Requires at least Firmware 7.11.
|
|
161
166
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
162
167
|
* Refers to the axes provided during the stream setup or further execution.
|
|
163
168
|
* Indices are zero-based.
|
|
@@ -169,6 +174,7 @@ export declare class Stream {
|
|
|
169
174
|
/**
|
|
170
175
|
* Queue a relative circle movement in the stream.
|
|
171
176
|
* The movement will only target the specified subset of axes in the stream.
|
|
177
|
+
* Requires at least Firmware 7.11.
|
|
172
178
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
173
179
|
* Refers to the axes provided during the stream setup or further execution.
|
|
174
180
|
* Indices are zero-based.
|
|
@@ -225,14 +231,14 @@ export declare class Stream {
|
|
|
225
231
|
/**
|
|
226
232
|
* Wait a specified time.
|
|
227
233
|
* @param time Amount of time to wait.
|
|
228
|
-
* @param unit Units of time.
|
|
234
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
229
235
|
*/
|
|
230
236
|
wait(time: number, unit?: Time | Native): Promise<void>;
|
|
231
237
|
/**
|
|
232
238
|
* Waits until the live stream executes all queued actions.
|
|
233
|
-
* @param throwErrorOnFault Determines whether to throw error when fault is observed.
|
|
239
|
+
* @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
|
|
234
240
|
*/
|
|
235
|
-
waitUntilIdle(
|
|
241
|
+
waitUntilIdle(options?: Stream.WaitUntilIdleOptions): Promise<void>;
|
|
236
242
|
/**
|
|
237
243
|
* Cork the front of the stream's action queue, blocking execution.
|
|
238
244
|
* Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
@@ -247,54 +253,54 @@ export declare class Stream {
|
|
|
247
253
|
uncork(): Promise<void>;
|
|
248
254
|
/**
|
|
249
255
|
* Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
250
|
-
* @
|
|
256
|
+
* @returns True if the stream is executing a queued action.
|
|
251
257
|
*/
|
|
252
258
|
isBusy(): Promise<boolean>;
|
|
253
259
|
/**
|
|
254
260
|
* Gets the maximum speed of the live stream.
|
|
255
261
|
* Converts the units using the first axis of the stream.
|
|
256
|
-
* @param unit Units of velocity.
|
|
257
|
-
* @
|
|
262
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
263
|
+
* @returns The maximum speed of the stream.
|
|
258
264
|
*/
|
|
259
265
|
getMaxSpeed(unit?: Velocity | AngularVelocity | Native): Promise<number>;
|
|
260
266
|
/**
|
|
261
267
|
* Sets the maximum speed of the live stream.
|
|
262
268
|
* Converts the units using the first axis of the stream.
|
|
263
269
|
* @param maxSpeed Maximum speed at which any stream action is executed.
|
|
264
|
-
* @param unit Units of velocity.
|
|
270
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
265
271
|
*/
|
|
266
272
|
setMaxSpeed(maxSpeed: number, unit?: Velocity | AngularVelocity | Native): Promise<void>;
|
|
267
273
|
/**
|
|
268
274
|
* Gets the maximum tangential acceleration of the live stream.
|
|
269
275
|
* Converts the units using the first axis of the stream.
|
|
270
|
-
* @param unit Units of acceleration.
|
|
271
|
-
* @
|
|
276
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
277
|
+
* @returns The maximum tangential acceleration of the live stream.
|
|
272
278
|
*/
|
|
273
279
|
getMaxTangentialAcceleration(unit?: Acceleration | AngularAcceleration | Native): Promise<number>;
|
|
274
280
|
/**
|
|
275
281
|
* Sets the maximum tangential acceleration of the live stream.
|
|
276
282
|
* Converts the units using the first axis of the stream.
|
|
277
283
|
* @param maxTangentialAcceleration Maximum tangential acceleration at which any stream action is executed.
|
|
278
|
-
* @param unit Units of acceleration.
|
|
284
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
279
285
|
*/
|
|
280
286
|
setMaxTangentialAcceleration(maxTangentialAcceleration: number, unit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
281
287
|
/**
|
|
282
288
|
* Gets the maximum centripetal acceleration of the live stream.
|
|
283
289
|
* Converts the units using the first axis of the stream.
|
|
284
|
-
* @param unit Units of acceleration.
|
|
285
|
-
* @
|
|
290
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
291
|
+
* @returns The maximum centripetal acceleration of the live stream.
|
|
286
292
|
*/
|
|
287
293
|
getMaxCentripetalAcceleration(unit?: Acceleration | AngularAcceleration | Native): Promise<number>;
|
|
288
294
|
/**
|
|
289
295
|
* Sets the maximum centripetal acceleration of the live stream.
|
|
290
296
|
* Converts the units using the first axis of the stream.
|
|
291
297
|
* @param maxCentripetalAcceleration Maximum centripetal acceleration at which any stream action is executed.
|
|
292
|
-
* @param unit Units of acceleration.
|
|
298
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
293
299
|
*/
|
|
294
300
|
setMaxCentripetalAcceleration(maxCentripetalAcceleration: number, unit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
295
301
|
/**
|
|
296
302
|
* Returns a string which represents the stream.
|
|
297
|
-
* @
|
|
303
|
+
* @returns String which represents the stream.
|
|
298
304
|
*/
|
|
299
305
|
toString(): string;
|
|
300
306
|
/**
|
|
@@ -321,17 +327,23 @@ export declare class Stream {
|
|
|
321
327
|
* Queries the stream status from the device
|
|
322
328
|
* and returns boolean indicating whether the stream is disabled.
|
|
323
329
|
* Useful to determine if streaming was interrupted by other movements.
|
|
324
|
-
* @
|
|
330
|
+
* @returns True if the stream is disabled.
|
|
325
331
|
*/
|
|
326
332
|
checkDisabled(): Promise<boolean>;
|
|
327
333
|
/**
|
|
328
334
|
* Gets the axes of the stream.
|
|
329
|
-
* @
|
|
335
|
+
* @returns An array of axis numbers of the axes the stream is set up to control.
|
|
330
336
|
*/
|
|
331
337
|
private _retrieveAxes;
|
|
332
338
|
/**
|
|
333
339
|
* Get the mode of the stream.
|
|
334
|
-
* @
|
|
340
|
+
* @returns Mode of the stream.
|
|
335
341
|
*/
|
|
336
342
|
private _retrieveMode;
|
|
337
343
|
}
|
|
344
|
+
declare namespace Stream {
|
|
345
|
+
interface WaitUntilIdleOptions {
|
|
346
|
+
throwErrorOnFault?: boolean;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
export {};
|
package/dist/lib/ascii/stream.js
CHANGED
|
@@ -174,6 +174,7 @@ class Stream {
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Queue an absolute line movement in the stream, targeting a subset of the stream axes.
|
|
177
|
+
* Requires at least Firmware 7.11.
|
|
177
178
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
178
179
|
* Refers to the axes provided during the stream setup or further execution.
|
|
179
180
|
* Indices are zero-based.
|
|
@@ -191,6 +192,7 @@ class Stream {
|
|
|
191
192
|
}
|
|
192
193
|
/**
|
|
193
194
|
* Queue a relative line movement in the stream, targeting a subset of the stream axes.
|
|
195
|
+
* Requires at least Firmware 7.11.
|
|
194
196
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
195
197
|
* Refers to the axes provided during the stream setup or further execution.
|
|
196
198
|
* Indices are zero-based.
|
|
@@ -253,6 +255,7 @@ class Stream {
|
|
|
253
255
|
/**
|
|
254
256
|
* Queue an absolute arc movement in the stream.
|
|
255
257
|
* The movement will only target the specified subset of axes in the stream.
|
|
258
|
+
* Requires at least Firmware 7.11.
|
|
256
259
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
257
260
|
* Refers to the axes provided during the stream setup or further execution.
|
|
258
261
|
* Indices are zero-based.
|
|
@@ -279,6 +282,7 @@ class Stream {
|
|
|
279
282
|
/**
|
|
280
283
|
* Queue a relative arc movement in the stream.
|
|
281
284
|
* The movement will only target the specified subset of axes in the stream.
|
|
285
|
+
* Requires at least Firmware 7.11.
|
|
282
286
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
283
287
|
* Refers to the axes provided during the stream setup or further execution.
|
|
284
288
|
* Indices are zero-based.
|
|
@@ -341,6 +345,7 @@ class Stream {
|
|
|
341
345
|
/**
|
|
342
346
|
* Queue an absolute circle movement in the stream.
|
|
343
347
|
* The movement will only target the specified subset of axes in the stream.
|
|
348
|
+
* Requires at least Firmware 7.11.
|
|
344
349
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
345
350
|
* Refers to the axes provided during the stream setup or further execution.
|
|
346
351
|
* Indices are zero-based.
|
|
@@ -363,6 +368,7 @@ class Stream {
|
|
|
363
368
|
/**
|
|
364
369
|
* Queue a relative circle movement in the stream.
|
|
365
370
|
* The movement will only target the specified subset of axes in the stream.
|
|
371
|
+
* Requires at least Firmware 7.11.
|
|
366
372
|
* @param targetAxesIndices Indices of the axes in the stream the movement targets.
|
|
367
373
|
* Refers to the axes provided during the stream setup or further execution.
|
|
368
374
|
* Indices are zero-based.
|
|
@@ -484,7 +490,7 @@ class Stream {
|
|
|
484
490
|
/**
|
|
485
491
|
* Wait a specified time.
|
|
486
492
|
* @param time Amount of time to wait.
|
|
487
|
-
* @param unit Units of time.
|
|
493
|
+
* @param [unit=Units.NATIVE] Units of time.
|
|
488
494
|
*/
|
|
489
495
|
async wait(time, unit = units_1.Units.NATIVE) {
|
|
490
496
|
const request = new gateway.StreamWaitRequest();
|
|
@@ -497,9 +503,10 @@ class Stream {
|
|
|
497
503
|
}
|
|
498
504
|
/**
|
|
499
505
|
* Waits until the live stream executes all queued actions.
|
|
500
|
-
* @param throwErrorOnFault Determines whether to throw error when fault is observed.
|
|
506
|
+
* @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
|
|
501
507
|
*/
|
|
502
|
-
async waitUntilIdle(
|
|
508
|
+
async waitUntilIdle(options = {}) {
|
|
509
|
+
const { throwErrorOnFault = true, } = options;
|
|
503
510
|
const request = new gateway.StreamWaitUntilIdleRequest();
|
|
504
511
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
505
512
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -533,7 +540,7 @@ class Stream {
|
|
|
533
540
|
}
|
|
534
541
|
/**
|
|
535
542
|
* Returns a boolean value indicating whether the live stream is executing a queued action.
|
|
536
|
-
* @
|
|
543
|
+
* @returns True if the stream is executing a queued action.
|
|
537
544
|
*/
|
|
538
545
|
async isBusy() {
|
|
539
546
|
const request = new gateway.StreamEmptyRequest();
|
|
@@ -546,8 +553,8 @@ class Stream {
|
|
|
546
553
|
/**
|
|
547
554
|
* Gets the maximum speed of the live stream.
|
|
548
555
|
* Converts the units using the first axis of the stream.
|
|
549
|
-
* @param unit Units of velocity.
|
|
550
|
-
* @
|
|
556
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
557
|
+
* @returns The maximum speed of the stream.
|
|
551
558
|
*/
|
|
552
559
|
async getMaxSpeed(unit = units_1.Units.NATIVE) {
|
|
553
560
|
const request = new gateway.StreamGetMaxSpeedRequest();
|
|
@@ -562,7 +569,7 @@ class Stream {
|
|
|
562
569
|
* Sets the maximum speed of the live stream.
|
|
563
570
|
* Converts the units using the first axis of the stream.
|
|
564
571
|
* @param maxSpeed Maximum speed at which any stream action is executed.
|
|
565
|
-
* @param unit Units of velocity.
|
|
572
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
566
573
|
*/
|
|
567
574
|
async setMaxSpeed(maxSpeed, unit = units_1.Units.NATIVE) {
|
|
568
575
|
const request = new gateway.StreamSetMaxSpeedRequest();
|
|
@@ -576,8 +583,8 @@ class Stream {
|
|
|
576
583
|
/**
|
|
577
584
|
* Gets the maximum tangential acceleration of the live stream.
|
|
578
585
|
* Converts the units using the first axis of the stream.
|
|
579
|
-
* @param unit Units of acceleration.
|
|
580
|
-
* @
|
|
586
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
587
|
+
* @returns The maximum tangential acceleration of the live stream.
|
|
581
588
|
*/
|
|
582
589
|
async getMaxTangentialAcceleration(unit = units_1.Units.NATIVE) {
|
|
583
590
|
const request = new gateway.StreamGetMaxTangentialAccelerationRequest();
|
|
@@ -592,7 +599,7 @@ class Stream {
|
|
|
592
599
|
* Sets the maximum tangential acceleration of the live stream.
|
|
593
600
|
* Converts the units using the first axis of the stream.
|
|
594
601
|
* @param maxTangentialAcceleration Maximum tangential acceleration at which any stream action is executed.
|
|
595
|
-
* @param unit Units of acceleration.
|
|
602
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
596
603
|
*/
|
|
597
604
|
async setMaxTangentialAcceleration(maxTangentialAcceleration, unit = units_1.Units.NATIVE) {
|
|
598
605
|
const request = new gateway.StreamSetMaxTangentialAccelerationRequest();
|
|
@@ -606,8 +613,8 @@ class Stream {
|
|
|
606
613
|
/**
|
|
607
614
|
* Gets the maximum centripetal acceleration of the live stream.
|
|
608
615
|
* Converts the units using the first axis of the stream.
|
|
609
|
-
* @param unit Units of acceleration.
|
|
610
|
-
* @
|
|
616
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
617
|
+
* @returns The maximum centripetal acceleration of the live stream.
|
|
611
618
|
*/
|
|
612
619
|
async getMaxCentripetalAcceleration(unit = units_1.Units.NATIVE) {
|
|
613
620
|
const request = new gateway.StreamGetMaxCentripetalAccelerationRequest();
|
|
@@ -622,7 +629,7 @@ class Stream {
|
|
|
622
629
|
* Sets the maximum centripetal acceleration of the live stream.
|
|
623
630
|
* Converts the units using the first axis of the stream.
|
|
624
631
|
* @param maxCentripetalAcceleration Maximum centripetal acceleration at which any stream action is executed.
|
|
625
|
-
* @param unit Units of acceleration.
|
|
632
|
+
* @param [unit=Units.NATIVE] Units of acceleration.
|
|
626
633
|
*/
|
|
627
634
|
async setMaxCentripetalAcceleration(maxCentripetalAcceleration, unit = units_1.Units.NATIVE) {
|
|
628
635
|
const request = new gateway.StreamSetMaxCentripetalAccelerationRequest();
|
|
@@ -635,7 +642,7 @@ class Stream {
|
|
|
635
642
|
}
|
|
636
643
|
/**
|
|
637
644
|
* Returns a string which represents the stream.
|
|
638
|
-
* @
|
|
645
|
+
* @returns String which represents the stream.
|
|
639
646
|
*/
|
|
640
647
|
toString() {
|
|
641
648
|
const request = new gateway.StreamEmptyRequest();
|
|
@@ -689,7 +696,7 @@ class Stream {
|
|
|
689
696
|
* Queries the stream status from the device
|
|
690
697
|
* and returns boolean indicating whether the stream is disabled.
|
|
691
698
|
* Useful to determine if streaming was interrupted by other movements.
|
|
692
|
-
* @
|
|
699
|
+
* @returns True if the stream is disabled.
|
|
693
700
|
*/
|
|
694
701
|
async checkDisabled() {
|
|
695
702
|
const request = new gateway.StreamEmptyRequest();
|
|
@@ -701,7 +708,7 @@ class Stream {
|
|
|
701
708
|
}
|
|
702
709
|
/**
|
|
703
710
|
* Gets the axes of the stream.
|
|
704
|
-
* @
|
|
711
|
+
* @returns An array of axis numbers of the axes the stream is set up to control.
|
|
705
712
|
*/
|
|
706
713
|
_retrieveAxes() {
|
|
707
714
|
const request = new gateway.StreamEmptyRequest();
|
|
@@ -713,7 +720,7 @@ class Stream {
|
|
|
713
720
|
}
|
|
714
721
|
/**
|
|
715
722
|
* Get the mode of the stream.
|
|
716
|
-
* @
|
|
723
|
+
* @returns Mode of the stream.
|
|
717
724
|
*/
|
|
718
725
|
_retrieveMode() {
|
|
719
726
|
const request = new gateway.StreamEmptyRequest();
|