@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.
Files changed (126) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/all_axes.d.ts +21 -9
  3. package/dist/lib/ascii/all_axes.js +12 -9
  4. package/dist/lib/ascii/all_axes.js.map +1 -1
  5. package/dist/lib/ascii/axis.d.ts +116 -58
  6. package/dist/lib/ascii/axis.js +74 -58
  7. package/dist/lib/ascii/axis.js.map +1 -1
  8. package/dist/lib/ascii/axis_settings.d.ts +11 -10
  9. package/dist/lib/ascii/axis_settings.js +11 -10
  10. package/dist/lib/ascii/axis_settings.js.map +1 -1
  11. package/dist/lib/ascii/connection.d.ts +91 -68
  12. package/dist/lib/ascii/connection.js +60 -86
  13. package/dist/lib/ascii/connection.js.map +1 -1
  14. package/dist/lib/ascii/device.d.ts +46 -25
  15. package/dist/lib/ascii/device.js +31 -25
  16. package/dist/lib/ascii/device.js.map +1 -1
  17. package/dist/lib/ascii/device_io.d.ts +9 -9
  18. package/dist/lib/ascii/device_io.js +9 -9
  19. package/dist/lib/ascii/device_io.js.map +1 -1
  20. package/dist/lib/ascii/device_settings.d.ts +10 -10
  21. package/dist/lib/ascii/device_settings.js +10 -10
  22. package/dist/lib/ascii/device_settings.js.map +1 -1
  23. package/dist/lib/ascii/lockstep.d.ts +99 -49
  24. package/dist/lib/ascii/lockstep.js +63 -49
  25. package/dist/lib/ascii/lockstep.js.map +1 -1
  26. package/dist/lib/ascii/oscilloscope.d.ts +14 -13
  27. package/dist/lib/ascii/oscilloscope.js +14 -13
  28. package/dist/lib/ascii/oscilloscope.js.map +1 -1
  29. package/dist/lib/ascii/oscilloscope_data.d.ts +9 -9
  30. package/dist/lib/ascii/oscilloscope_data.js +9 -9
  31. package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
  32. package/dist/lib/ascii/servo_tuner.d.ts +20 -10
  33. package/dist/lib/ascii/servo_tuner.js +13 -10
  34. package/dist/lib/ascii/servo_tuner.js.map +1 -1
  35. package/dist/lib/ascii/setting_constants.d.ts +2 -2
  36. package/dist/lib/ascii/setting_constants.js +2 -2
  37. package/dist/lib/ascii/setting_constants.js.map +1 -1
  38. package/dist/lib/ascii/storage.d.ts +49 -24
  39. package/dist/lib/ascii/storage.js +32 -24
  40. package/dist/lib/ascii/storage.js.map +1 -1
  41. package/dist/lib/ascii/stream.d.ts +29 -17
  42. package/dist/lib/ascii/stream.js +24 -17
  43. package/dist/lib/ascii/stream.js.map +1 -1
  44. package/dist/lib/ascii/stream_buffer.d.ts +1 -1
  45. package/dist/lib/ascii/stream_buffer.js +1 -1
  46. package/dist/lib/ascii/stream_buffer.js.map +1 -1
  47. package/dist/lib/ascii/transport.d.ts +2 -2
  48. package/dist/lib/ascii/transport.js +2 -2
  49. package/dist/lib/ascii/transport.js.map +1 -1
  50. package/dist/lib/ascii/warnings.d.ts +2 -2
  51. package/dist/lib/ascii/warnings.js +2 -2
  52. package/dist/lib/ascii/warnings.js.map +1 -1
  53. package/dist/lib/binary/connection.d.ts +46 -25
  54. package/dist/lib/binary/connection.js +30 -25
  55. package/dist/lib/binary/connection.js.map +1 -1
  56. package/dist/lib/binary/device.d.ts +66 -38
  57. package/dist/lib/binary/device.js +48 -38
  58. package/dist/lib/binary/device.js.map +1 -1
  59. package/dist/lib/binary/device_identity.d.ts +1 -0
  60. package/dist/lib/binary/device_identity.js.map +1 -1
  61. package/dist/lib/binary/device_settings.d.ts +3 -3
  62. package/dist/lib/binary/device_settings.js +3 -3
  63. package/dist/lib/binary/device_settings.js.map +1 -1
  64. package/dist/lib/exceptions/binary_command_failed_exception.js.map +1 -1
  65. package/dist/lib/exceptions/command_failed_exception.js.map +1 -1
  66. package/dist/lib/exceptions/command_preempted_exception.js.map +1 -1
  67. package/dist/lib/exceptions/command_too_long_exception.js.map +1 -1
  68. package/dist/lib/exceptions/connection_closed_exception.js.map +1 -1
  69. package/dist/lib/exceptions/connection_failed_exception.js.map +1 -1
  70. package/dist/lib/exceptions/conversion_failed_exception.js.map +1 -1
  71. package/dist/lib/exceptions/device_address_conflict_exception.js.map +1 -1
  72. package/dist/lib/exceptions/device_busy_exception.js.map +1 -1
  73. package/dist/lib/exceptions/device_db_failed_exception.js.map +1 -1
  74. package/dist/lib/exceptions/device_failed_exception.js.map +1 -1
  75. package/dist/lib/exceptions/device_not_identified_exception.js.map +1 -1
  76. package/dist/lib/exceptions/g_code_execution_exception.js.map +1 -1
  77. package/dist/lib/exceptions/g_code_syntax_exception.js.map +1 -1
  78. package/dist/lib/exceptions/internal_error_exception.js.map +1 -1
  79. package/dist/lib/exceptions/invalid_argument_exception.js.map +1 -1
  80. package/dist/lib/exceptions/invalid_data_exception.js.map +1 -1
  81. package/dist/lib/exceptions/invalid_operation_exception.js.map +1 -1
  82. package/dist/lib/exceptions/invalid_packet_exception.js.map +1 -1
  83. package/dist/lib/exceptions/invalid_park_state_exception.js.map +1 -1
  84. package/dist/lib/exceptions/invalid_response_exception.js.map +1 -1
  85. package/dist/lib/exceptions/io_channel_out_of_range_exception.js.map +1 -1
  86. package/dist/lib/exceptions/io_failed_exception.js.map +1 -1
  87. package/dist/lib/exceptions/lockstep_enabled_exception.js.map +1 -1
  88. package/dist/lib/exceptions/lockstep_not_enabled_exception.js.map +1 -1
  89. package/dist/lib/exceptions/motion_lib_exception.js.map +1 -1
  90. package/dist/lib/exceptions/movement_failed_exception.js.map +1 -1
  91. package/dist/lib/exceptions/movement_interrupted_exception.js.map +1 -1
  92. package/dist/lib/exceptions/no_device_found_exception.js.map +1 -1
  93. package/dist/lib/exceptions/no_value_for_key_exception.js.map +1 -1
  94. package/dist/lib/exceptions/not_supported_exception.js.map +1 -1
  95. package/dist/lib/exceptions/os_failed_exception.js.map +1 -1
  96. package/dist/lib/exceptions/out_of_request_ids_exception.js.map +1 -1
  97. package/dist/lib/exceptions/request_timeout_exception.js.map +1 -1
  98. package/dist/lib/exceptions/serial_port_busy_exception.js.map +1 -1
  99. package/dist/lib/exceptions/set_device_state_failed_exception.js.map +1 -1
  100. package/dist/lib/exceptions/set_peripheral_state_failed_exception.js.map +1 -1
  101. package/dist/lib/exceptions/setting_not_found_exception.js.map +1 -1
  102. package/dist/lib/exceptions/stream_execution_exception.js.map +1 -1
  103. package/dist/lib/exceptions/stream_mode_exception.js.map +1 -1
  104. package/dist/lib/exceptions/stream_movement_failed_exception.js.map +1 -1
  105. package/dist/lib/exceptions/stream_movement_interrupted_exception.js.map +1 -1
  106. package/dist/lib/exceptions/stream_setup_failed_exception.js.map +1 -1
  107. package/dist/lib/exceptions/transport_already_used_exception.js.map +1 -1
  108. package/dist/lib/exceptions/unknown_request_exception.js.map +1 -1
  109. package/dist/lib/gateway/events.js +4 -5
  110. package/dist/lib/gateway/events.js.map +1 -1
  111. package/dist/lib/gateway/serialization.js.map +1 -1
  112. package/dist/lib/gcode/offline_translator.d.ts +8 -7
  113. package/dist/lib/gcode/offline_translator.js +8 -7
  114. package/dist/lib/gcode/offline_translator.js.map +1 -1
  115. package/dist/lib/gcode/translator.d.ts +15 -8
  116. package/dist/lib/gcode/translator.js +10 -8
  117. package/dist/lib/gcode/translator.js.map +1 -1
  118. package/dist/lib/library.d.ts +3 -3
  119. package/dist/lib/library.js +3 -3
  120. package/dist/lib/library.js.map +1 -1
  121. package/dist/lib/tools.d.ts +3 -3
  122. package/dist/lib/tools.js +3 -3
  123. package/dist/lib/tools.js.map +1 -1
  124. package/dist/lib/wasm.js +1 -3
  125. package/dist/lib/wasm.js.map +1 -1
  126. package/package.json +2 -2
@@ -11,19 +11,19 @@ export declare class AllAxes {
11
11
  constructor(device: Device);
12
12
  /**
13
13
  * Homes all axes. Axes return to their homing positions.
14
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
14
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
15
15
  */
16
- home(waitUntilIdle?: boolean): Promise<void>;
16
+ home(options?: AllAxes.HomeOptions): Promise<void>;
17
17
  /**
18
18
  * Stops ongoing axes movement. Decelerates until zero speed.
19
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
19
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
20
20
  */
21
- stop(waitUntilIdle?: boolean): Promise<void>;
21
+ stop(options?: AllAxes.StopOptions): Promise<void>;
22
22
  /**
23
23
  * Waits until all axes of device stop moving.
24
- * @param throwErrorOnFault Determines whether to throw error when fault is observed.
24
+ * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
25
25
  */
26
- waitUntilIdle(throwErrorOnFault?: boolean): Promise<void>;
26
+ waitUntilIdle(options?: AllAxes.WaitUntilIdleOptions): Promise<void>;
27
27
  /**
28
28
  * Parks the device in anticipation of turning the power off.
29
29
  * It can later be powered on, unparked, and moved without first having to home it.
@@ -35,17 +35,29 @@ export declare class AllAxes {
35
35
  unpark(): Promise<void>;
36
36
  /**
37
37
  * Returns bool indicating whether any axis is executing a motion command.
38
- * @return True if any axis is currently executing a motion command.
38
+ * @returns True if any axis is currently executing a motion command.
39
39
  */
40
40
  isBusy(): Promise<boolean>;
41
41
  /**
42
42
  * Returns bool indicating whether all axes have position reference and were homed.
43
- * @return True if all axes have position reference and were homed.
43
+ * @returns True if all axes have position reference and were homed.
44
44
  */
45
45
  isHomed(): Promise<boolean>;
46
46
  /**
47
47
  * Returns a string that represents the axes.
48
- * @return A string that represents the axes.
48
+ * @returns A string that represents the axes.
49
49
  */
50
50
  toString(): string;
51
51
  }
52
+ declare namespace AllAxes {
53
+ interface HomeOptions {
54
+ waitUntilIdle?: boolean;
55
+ }
56
+ interface StopOptions {
57
+ waitUntilIdle?: boolean;
58
+ }
59
+ interface WaitUntilIdleOptions {
60
+ throwErrorOnFault?: boolean;
61
+ }
62
+ }
63
+ export {};
@@ -42,9 +42,10 @@ class AllAxes {
42
42
  }
43
43
  /**
44
44
  * Homes all axes. Axes return to their homing positions.
45
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
45
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
46
46
  */
47
- async home(waitUntilIdle = true) {
47
+ async home(options = {}) {
48
+ const { waitUntilIdle = true, } = options;
48
49
  const request = new gateway.DeviceHomeRequest();
49
50
  request.setInterfaceId(this.device.connection.interfaceId);
50
51
  request.setDevice(this.device.deviceAddress);
@@ -54,9 +55,10 @@ class AllAxes {
54
55
  }
55
56
  /**
56
57
  * Stops ongoing axes movement. Decelerates until zero speed.
57
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
58
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
58
59
  */
59
- async stop(waitUntilIdle = true) {
60
+ async stop(options = {}) {
61
+ const { waitUntilIdle = true, } = options;
60
62
  const request = new gateway.DeviceStopRequest();
61
63
  request.setInterfaceId(this.device.connection.interfaceId);
62
64
  request.setDevice(this.device.deviceAddress);
@@ -66,9 +68,10 @@ class AllAxes {
66
68
  }
67
69
  /**
68
70
  * Waits until all axes of device stop moving.
69
- * @param throwErrorOnFault Determines whether to throw error when fault is observed.
71
+ * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
70
72
  */
71
- async waitUntilIdle(throwErrorOnFault = true) {
73
+ async waitUntilIdle(options = {}) {
74
+ const { throwErrorOnFault = true, } = options;
72
75
  const request = new gateway.DeviceWaitUntilIdleRequest();
73
76
  request.setInterfaceId(this.device.connection.interfaceId);
74
77
  request.setDevice(this.device.deviceAddress);
@@ -99,7 +102,7 @@ class AllAxes {
99
102
  }
100
103
  /**
101
104
  * Returns bool indicating whether any axis is executing a motion command.
102
- * @return True if any axis is currently executing a motion command.
105
+ * @returns True if any axis is currently executing a motion command.
103
106
  */
104
107
  async isBusy() {
105
108
  const request = new gateway.AxisEmptyRequest();
@@ -111,7 +114,7 @@ class AllAxes {
111
114
  }
112
115
  /**
113
116
  * Returns bool indicating whether all axes have position reference and were homed.
114
- * @return True if all axes have position reference and were homed.
117
+ * @returns True if all axes have position reference and were homed.
115
118
  */
116
119
  async isHomed() {
117
120
  const request = new gateway.AxisEmptyRequest();
@@ -123,7 +126,7 @@ class AllAxes {
123
126
  }
124
127
  /**
125
128
  * Returns a string that represents the axes.
126
- * @return A string that represents the axes.
129
+ * @returns A string that represents the axes.
127
130
  */
128
131
  toString() {
129
132
  const request = new gateway.AxisEmptyRequest();
@@ -1 +1 @@
1
- {"version":3,"file":"all_axes.js","sourceRoot":"","sources":["../../../src/ascii/all_axes.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AAEtC;;GAEG;AACH,MAAa,OAAO;IAClB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CACf,gBAAyB,IAAI;QAE7B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAChD,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,OAAO,CAAC,CAAC,CAAC,CAAC;QACnB,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CACf,gBAAyB,IAAI;QAE7B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAChD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,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AGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC/C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAxID,0BAwIC","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 all axes of motion associated with a device.\n */\nexport class AllAxes {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Homes all axes. Axes return to their homing positions.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axes movement. Decelerates until zero speed.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Waits until all axes of device stop moving.\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.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Parks the device in anticipation of turning the power off.\n * It can later be powered on, unparked, and moved without first having to home it.\n */\n public async park(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks the device. The device will now be able to move.\n */\n public async unpark(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether any axis is executing a motion command.\n * @return True if any axis is currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns bool indicating whether all axes have position reference and were homed.\n * @return True if all axes have position reference and were homed.\n */\n public async isHomed(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_homed',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the axes.\n * @return A string that represents the axes.\n */\n public toString(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/all_axes_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n"]}
1
+ {"version":3,"file":"all_axes.js","sourceRoot":"","sources":["../../../src/ascii/all_axes.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AAEtC;;GAEG;AACH,MAAa,OAAO;IAClB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CACf,UAA+B,EAAE;QAEjC,MAAM,EACJ,aAAa,GAAG,IAAI,GACrB,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAChD,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,OAAO,CAAC,CAAC,CAAC,CAAC;QACnB,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CACf,UAA+B,EAAE;QAEjC,MAAM,EACJ,aAAa,GAAG,IAAI,GACrB,GAAG,OAAO,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,iBAAiB,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CAAC,SAAS,CACtC,iBAAiB,EACjB,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC/C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAjJD,0BAiJC","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 all axes of motion associated with a device.\n */\nexport class AllAxes {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Homes all axes. Axes return to their homing positions.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async home(\n options: AllAxes.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axes movement. Decelerates until zero speed.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n */\n public async stop(\n options: AllAxes.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.DeviceStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Waits until all axes of device stop moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: AllAxes.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Parks the device in anticipation of turning the power off.\n * It can later be powered on, unparked, and moved without first having to home it.\n */\n public async park(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks the device. The device will now be able to move.\n */\n public async unpark(): Promise<void> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether any axis is executing a motion command.\n * @returns True if any axis is currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns bool indicating whether all axes have position reference and were homed.\n * @returns True if all axes have position reference and were homed.\n */\n public async isHomed(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_homed',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the axes.\n * @returns A string that represents the axes.\n */\n public toString(): string {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(0);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/all_axes_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n\nnamespace AllAxes {\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n}\n"]}
@@ -29,6 +29,7 @@ export declare class Axis {
29
29
  private _settings;
30
30
  /**
31
31
  * Key-value storage of this axis.
32
+ * Requires at least Firmware 7.30.
32
33
  */
33
34
  get storage(): AxisStorage;
34
35
  private _storage;
@@ -60,14 +61,14 @@ export declare class Axis {
60
61
  constructor(device: Device, axisNumber: number);
61
62
  /**
62
63
  * Homes axis. Axis returns to its homing position.
63
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
64
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
64
65
  */
65
- home(waitUntilIdle?: boolean): Promise<void>;
66
+ home(options?: Axis.HomeOptions): Promise<void>;
66
67
  /**
67
68
  * Stops ongoing axis movement. Decelerates until zero speed.
68
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
69
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
69
70
  */
70
- stop(waitUntilIdle?: boolean): Promise<void>;
71
+ stop(options?: Axis.StopOptions): Promise<void>;
71
72
  /**
72
73
  * Parks the axis in anticipation of turning the power off.
73
74
  * It can later be powered on, unparked, and moved without first having to home it.
@@ -79,112 +80,117 @@ export declare class Axis {
79
80
  unpark(): Promise<void>;
80
81
  /**
81
82
  * Returns bool indicating whether the axis is parked or not.
82
- * @return True if the axis is currently parked. False otherwise.
83
+ * @returns True if the axis is currently parked. False otherwise.
83
84
  */
84
85
  isParked(): Promise<boolean>;
85
86
  /**
86
87
  * Waits until axis stops moving.
87
- * @param throwErrorOnFault Determines whether to throw error when fault is observed.
88
+ * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
88
89
  */
89
- waitUntilIdle(throwErrorOnFault?: boolean): Promise<void>;
90
+ waitUntilIdle(options?: Axis.WaitUntilIdleOptions): Promise<void>;
90
91
  /**
91
92
  * Returns bool indicating whether the axis is executing a motion command.
92
- * @return True if the axis is currently executing a motion command.
93
+ * @returns True if the axis is currently executing a motion command.
93
94
  */
94
95
  isBusy(): Promise<boolean>;
95
96
  /**
96
97
  * Returns bool indicating whether the axis has position reference and was homed.
97
- * @return True if the axis has position reference and was homed.
98
+ * @returns True if the axis has position reference and was homed.
98
99
  */
99
100
  isHomed(): Promise<boolean>;
100
101
  /**
101
102
  * Move axis to absolute position.
102
103
  * @param position Absolute position.
103
- * @param unit Units of position.
104
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
105
- * @param velocity Movement velocity.
104
+ * @param [unit=Units.NATIVE] Units of position.
105
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
106
+ * @param [options.velocity=0] Movement velocity.
106
107
  * Default value of 0 indicates that the maxspeed setting is used instead.
107
- * @param velocityUnit Units of velocity.
108
- * @param acceleration Movement acceleration.
108
+ * Requires at least Firmware 7.25.
109
+ * @param [options.velocityUnit=Units.NATIVE] Units of velocity.
110
+ * @param [options.acceleration=0] Movement acceleration.
109
111
  * Default value of 0 indicates that the accel setting is used instead.
110
- * If you provide acceleration, you must provide velocity as well.
111
- * @param accelerationUnit Units of acceleration.
112
+ * Requires at least Firmware 7.25.
113
+ * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
112
114
  */
113
- moveAbsolute(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
115
+ moveAbsolute(position: number, unit?: Length | Angle | Native, options?: Axis.MoveAbsoluteOptions): Promise<void>;
114
116
  /**
115
117
  * Moves the axis to the maximum position as specified by limit.max.
116
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
117
- * @param velocity Movement velocity.
118
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
119
+ * @param [options.velocity=0] Movement velocity.
118
120
  * Default value of 0 indicates that the maxspeed setting is used instead.
119
- * @param velocityUnit Units of velocity.
120
- * @param acceleration Movement acceleration.
121
+ * Requires at least Firmware 7.25.
122
+ * @param [options.velocityUnit=Units.NATIVE] Units of velocity.
123
+ * @param [options.acceleration=0] Movement acceleration.
121
124
  * Default value of 0 indicates that the accel setting is used instead.
122
- * If you provide acceleration, you must provide velocity as well.
123
- * @param accelerationUnit Units of acceleration.
125
+ * Requires at least Firmware 7.25.
126
+ * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
124
127
  */
125
- moveMax(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
128
+ moveMax(options?: Axis.MoveMaxOptions): Promise<void>;
126
129
  /**
127
130
  * Moves the axis to the minimum position as specified by limit.min.
128
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
129
- * @param velocity Movement velocity.
131
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
132
+ * @param [options.velocity=0] Movement velocity.
130
133
  * Default value of 0 indicates that the maxspeed setting is used instead.
131
- * @param velocityUnit Units of velocity.
132
- * @param acceleration Movement acceleration.
134
+ * Requires at least Firmware 7.25.
135
+ * @param [options.velocityUnit=Units.NATIVE] Units of velocity.
136
+ * @param [options.acceleration=0] Movement acceleration.
133
137
  * Default value of 0 indicates that the accel setting is used instead.
134
- * If you provide acceleration, you must provide velocity as well.
135
- * @param accelerationUnit Units of acceleration.
138
+ * Requires at least Firmware 7.25.
139
+ * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
136
140
  */
137
- moveMin(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
141
+ moveMin(options?: Axis.MoveMinOptions): Promise<void>;
138
142
  /**
139
143
  * Move axis to position relative to current position.
140
144
  * @param position Relative position.
141
- * @param unit Units of position.
142
- * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
143
- * @param velocity Movement velocity.
145
+ * @param [unit=Units.NATIVE] Units of position.
146
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
147
+ * @param [options.velocity=0] Movement velocity.
144
148
  * Default value of 0 indicates that the maxspeed setting is used instead.
145
- * @param velocityUnit Units of velocity.
146
- * @param acceleration Movement acceleration.
149
+ * Requires at least Firmware 7.25.
150
+ * @param [options.velocityUnit=Units.NATIVE] Units of velocity.
151
+ * @param [options.acceleration=0] Movement acceleration.
147
152
  * Default value of 0 indicates that the accel setting is used instead.
148
- * If you provide acceleration, you must provide velocity as well.
149
- * @param accelerationUnit Units of acceleration.
153
+ * Requires at least Firmware 7.25.
154
+ * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
150
155
  */
151
- moveRelative(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
156
+ moveRelative(position: number, unit?: Length | Angle | Native, options?: Axis.MoveRelativeOptions): Promise<void>;
152
157
  /**
153
158
  * Begins to move axis at specified speed.
154
159
  * @param velocity Movement velocity.
155
- * @param unit Units of velocity.
156
- * @param acceleration Movement acceleration.
160
+ * @param [unit=Units.NATIVE] Units of velocity.
161
+ * @param [options.acceleration=0] Movement acceleration.
157
162
  * Default value of 0 indicates that the accel setting is used instead.
158
- * @param accelerationUnit Units of acceleration.
163
+ * Requires at least Firmware 7.25.
164
+ * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
159
165
  */
160
- moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
166
+ moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, options?: Axis.MoveVelocityOptions): Promise<void>;
161
167
  /**
162
168
  * Returns current axis position.
163
- * @param unit Units of position.
164
- * @return Axis position.
169
+ * @param [unit=Units.NATIVE] Units of position.
170
+ * @returns Axis position.
165
171
  */
166
172
  getPosition(unit?: Length | Angle | Native): Promise<number>;
167
173
  /**
168
174
  * Sends a generic ASCII command to this axis.
169
175
  * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
170
176
  * @param command Command and its parameters.
171
- * @param checkErrors Controls whether to throw an exception when the device rejects the command.
172
- * @param timeout The timeout, in milliseconds, for a device to respond to the command.
177
+ * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.
178
+ * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.
173
179
  * Overrides the connection default request timeout.
174
- * @return A response to the command.
180
+ * @returns A response to the command.
175
181
  */
176
- genericCommand(command: string, checkErrors?: boolean, timeout?: number): Promise<Response>;
182
+ genericCommand(command: string, options?: Axis.GenericCommandOptions): Promise<Response>;
177
183
  /**
178
184
  * Sends a generic ASCII command to this axis and expect multiple responses.
179
185
  * Responses are returned in order of arrival.
180
186
  * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
181
187
  * @param command Command and its parameters.
182
- * @param checkErrors Controls whether to throw an exception when a device rejects the command.
183
- * @param timeout The timeout, in milliseconds, for a device to respond to the command.
188
+ * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.
189
+ * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.
184
190
  * Overrides the connection default request timeout.
185
- * @return All responses to the command.
191
+ * @returns All responses to the command.
186
192
  */
187
- genericCommandMultiResponse(command: string, checkErrors?: boolean, timeout?: number): Promise<Response[]>;
193
+ genericCommandMultiResponse(command: string, options?: Axis.GenericCommandMultiResponseOptions): Promise<Response[]>;
188
194
  /**
189
195
  * Sends a generic ASCII command to this axis without expecting a response and without adding a message ID
190
196
  * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
@@ -198,17 +204,17 @@ export declare class Axis {
198
204
  * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).
199
205
  * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.
200
206
  * @param parameters Variable number of command parameters.
201
- * @return Command with converted parameters.
207
+ * @returns Command with converted parameters.
202
208
  */
203
209
  prepareCommand(commandTemplate: string, ...parameters: Measurement[]): string;
204
210
  /**
205
211
  * Returns a string that represents the axis.
206
- * @return A string that represents the axis.
212
+ * @returns A string that represents the axis.
207
213
  */
208
214
  toString(): string;
209
215
  /**
210
216
  * Returns a serialization of the current axis state that can be saved and reapplied.
211
- * @return A serialization of the current state of the axis.
217
+ * @returns A serialization of the current state of the axis.
212
218
  */
213
219
  getState(): Promise<string>;
214
220
  /**
@@ -221,12 +227,64 @@ export declare class Axis {
221
227
  * This only covers exceptions that can be determined statically such as mismatches of ID or version,
222
228
  * the process of applying the state can still fail when running.
223
229
  * @param state The state object to check against.
224
- * @return An explanation of why this state cannot be set to this axis.
230
+ * @returns An explanation of why this state cannot be set to this axis.
225
231
  */
226
232
  canSetState(state: string): Promise<string>;
227
233
  /**
228
234
  * Returns identity.
229
- * @return Axis identity.
235
+ * @returns Axis identity.
230
236
  */
231
237
  private _retrieveIdentity;
232
238
  }
239
+ declare namespace Axis {
240
+ interface HomeOptions {
241
+ waitUntilIdle?: boolean;
242
+ }
243
+ interface StopOptions {
244
+ waitUntilIdle?: boolean;
245
+ }
246
+ interface WaitUntilIdleOptions {
247
+ throwErrorOnFault?: boolean;
248
+ }
249
+ interface MoveAbsoluteOptions {
250
+ waitUntilIdle?: boolean;
251
+ velocity?: number;
252
+ velocityUnit?: Velocity | AngularVelocity | Native;
253
+ acceleration?: number;
254
+ accelerationUnit?: Acceleration | AngularAcceleration | Native;
255
+ }
256
+ interface MoveMaxOptions {
257
+ waitUntilIdle?: boolean;
258
+ velocity?: number;
259
+ velocityUnit?: Velocity | AngularVelocity | Native;
260
+ acceleration?: number;
261
+ accelerationUnit?: Acceleration | AngularAcceleration | Native;
262
+ }
263
+ interface MoveMinOptions {
264
+ waitUntilIdle?: boolean;
265
+ velocity?: number;
266
+ velocityUnit?: Velocity | AngularVelocity | Native;
267
+ acceleration?: number;
268
+ accelerationUnit?: Acceleration | AngularAcceleration | Native;
269
+ }
270
+ interface MoveRelativeOptions {
271
+ waitUntilIdle?: boolean;
272
+ velocity?: number;
273
+ velocityUnit?: Velocity | AngularVelocity | Native;
274
+ acceleration?: number;
275
+ accelerationUnit?: Acceleration | AngularAcceleration | Native;
276
+ }
277
+ interface MoveVelocityOptions {
278
+ acceleration?: number;
279
+ accelerationUnit?: Acceleration | AngularAcceleration | Native;
280
+ }
281
+ interface GenericCommandOptions {
282
+ checkErrors?: boolean;
283
+ timeout?: number;
284
+ }
285
+ interface GenericCommandMultiResponseOptions {
286
+ checkErrors?: boolean;
287
+ timeout?: number;
288
+ }
289
+ }
290
+ export {};