@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
|
@@ -4,6 +4,7 @@ import { LockstepAxes } from './lockstep_axes';
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents a lockstep group with this ID on a device.
|
|
6
6
|
* A lockstep group is a movement synchronized pair of axes on a device.
|
|
7
|
+
* Requires at least Firmware 6.15 or 7.11.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Lockstep {
|
|
9
10
|
/**
|
|
@@ -28,124 +29,173 @@ export declare class Lockstep {
|
|
|
28
29
|
disable(): Promise<void>;
|
|
29
30
|
/**
|
|
30
31
|
* Stops ongoing lockstep group movement. Decelerates until zero speed.
|
|
31
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
32
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
32
33
|
*/
|
|
33
|
-
stop(
|
|
34
|
+
stop(options?: Lockstep.StopOptions): Promise<void>;
|
|
34
35
|
/**
|
|
35
36
|
* Retracts the axes of the lockstep group until a home associated with an individual axis is detected.
|
|
36
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
37
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
37
38
|
*/
|
|
38
|
-
home(
|
|
39
|
+
home(options?: Lockstep.HomeOptions): Promise<void>;
|
|
39
40
|
/**
|
|
40
41
|
* Move the first axis of the lockstep group to an absolute position.
|
|
41
42
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
42
43
|
* @param position Absolute position.
|
|
43
|
-
* @param unit Units of position.
|
|
44
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
45
|
-
* @param velocity Movement velocity.
|
|
44
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
45
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
46
|
+
* @param [options.velocity=0] Movement velocity.
|
|
46
47
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
47
|
-
*
|
|
48
|
-
* @param
|
|
48
|
+
* Requires at least Firmware 7.25.
|
|
49
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
50
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
49
51
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
50
|
-
*
|
|
51
|
-
* @param accelerationUnit Units of acceleration.
|
|
52
|
+
* Requires at least Firmware 7.25.
|
|
53
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
52
54
|
*/
|
|
53
|
-
moveAbsolute(position: number, unit?: Length | Angle | Native,
|
|
55
|
+
moveAbsolute(position: number, unit?: Length | Angle | Native, options?: Lockstep.MoveAbsoluteOptions): Promise<void>;
|
|
54
56
|
/**
|
|
55
57
|
* Move the first axis of the lockstep group to a position relative to its current position.
|
|
56
58
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
57
59
|
* @param position Relative position.
|
|
58
|
-
* @param unit Units of position.
|
|
59
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
60
|
-
* @param velocity Movement velocity.
|
|
60
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
61
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
62
|
+
* @param [options.velocity=0] Movement velocity.
|
|
61
63
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
62
|
-
*
|
|
63
|
-
* @param
|
|
64
|
+
* Requires at least Firmware 7.25.
|
|
65
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
66
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
64
67
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
65
|
-
*
|
|
66
|
-
* @param accelerationUnit Units of acceleration.
|
|
68
|
+
* Requires at least Firmware 7.25.
|
|
69
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
67
70
|
*/
|
|
68
|
-
moveRelative(position: number, unit?: Length | Angle | Native,
|
|
71
|
+
moveRelative(position: number, unit?: Length | Angle | Native, options?: Lockstep.MoveRelativeOptions): Promise<void>;
|
|
69
72
|
/**
|
|
70
73
|
* Moves the first axis of the lockstep group at the specified speed.
|
|
71
74
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
72
75
|
* @param velocity Movement velocity.
|
|
73
|
-
* @param unit Units of velocity.
|
|
74
|
-
* @param acceleration Movement acceleration.
|
|
76
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
77
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
75
78
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
76
|
-
*
|
|
79
|
+
* Requires at least Firmware 7.25.
|
|
80
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
77
81
|
*/
|
|
78
|
-
moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native,
|
|
82
|
+
moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, options?: Lockstep.MoveVelocityOptions): Promise<void>;
|
|
79
83
|
/**
|
|
80
84
|
* Moves the axes to the maximum valid position.
|
|
81
85
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
82
86
|
* Respects lim.max for all axes in the group.
|
|
83
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
84
|
-
* @param velocity Movement velocity.
|
|
87
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
88
|
+
* @param [options.velocity=0] Movement velocity.
|
|
85
89
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
86
|
-
*
|
|
87
|
-
* @param
|
|
90
|
+
* Requires at least Firmware 7.25.
|
|
91
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
92
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
88
93
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
89
|
-
*
|
|
90
|
-
* @param accelerationUnit Units of acceleration.
|
|
94
|
+
* Requires at least Firmware 7.25.
|
|
95
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
91
96
|
*/
|
|
92
|
-
moveMax(
|
|
97
|
+
moveMax(options?: Lockstep.MoveMaxOptions): Promise<void>;
|
|
93
98
|
/**
|
|
94
99
|
* Moves the axes to the minimum valid position.
|
|
95
100
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
96
101
|
* Respects lim.min for all axes in the group.
|
|
97
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
98
|
-
* @param velocity Movement velocity.
|
|
102
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
103
|
+
* @param [options.velocity=0] Movement velocity.
|
|
99
104
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
100
|
-
*
|
|
101
|
-
* @param
|
|
105
|
+
* Requires at least Firmware 7.25.
|
|
106
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
107
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
102
108
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
103
|
-
*
|
|
104
|
-
* @param accelerationUnit Units of acceleration.
|
|
109
|
+
* Requires at least Firmware 7.25.
|
|
110
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
105
111
|
*/
|
|
106
|
-
moveMin(
|
|
112
|
+
moveMin(options?: Lockstep.MoveMinOptions): Promise<void>;
|
|
107
113
|
/**
|
|
108
114
|
* Waits until the lockstep group stops moving.
|
|
109
|
-
* @param throwErrorOnFault Determines whether to throw error when fault is observed.
|
|
115
|
+
* @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
|
|
110
116
|
*/
|
|
111
|
-
waitUntilIdle(
|
|
117
|
+
waitUntilIdle(options?: Lockstep.WaitUntilIdleOptions): Promise<void>;
|
|
112
118
|
/**
|
|
113
119
|
* Returns bool indicating whether the lockstep group is executing a motion command.
|
|
114
|
-
* @
|
|
120
|
+
* @returns True if the axes are currently executing a motion command.
|
|
115
121
|
*/
|
|
116
122
|
isBusy(): Promise<boolean>;
|
|
117
123
|
/**
|
|
118
124
|
* @deprecated Use GetAxisNumbers instead.
|
|
119
125
|
*
|
|
120
126
|
* Gets the axes of the lockstep group.
|
|
121
|
-
* @
|
|
127
|
+
* @returns LockstepAxes instance which contains the axes numbers of the lockstep group.
|
|
122
128
|
*/
|
|
123
129
|
getAxes(): Promise<LockstepAxes>;
|
|
124
130
|
/**
|
|
125
131
|
* Gets the axis numbers of the lockstep group.
|
|
126
|
-
* @
|
|
132
|
+
* @returns Axis numbers in order specified when enabling lockstep.
|
|
127
133
|
*/
|
|
128
134
|
getAxisNumbers(): Promise<number[]>;
|
|
129
135
|
/**
|
|
130
136
|
* Gets the initial offsets of secondary axes of an enabled lockstep group.
|
|
131
|
-
* @param unit Units of position.
|
|
132
|
-
* @
|
|
137
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
138
|
+
* @returns Initial offset for each axis of the lockstep group.
|
|
133
139
|
*/
|
|
134
140
|
getOffsets(unit?: Length | Angle | Native): Promise<number[]>;
|
|
135
141
|
/**
|
|
136
142
|
* Gets the twists of secondary axes of an enabled lockstep group.
|
|
137
|
-
* @param unit Units of position.
|
|
138
|
-
* @
|
|
143
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
144
|
+
* @returns Difference between the initial offset and the actual offset for each axis of the lockstep group.
|
|
139
145
|
*/
|
|
140
146
|
getTwists(unit?: Length | Angle | Native): Promise<number[]>;
|
|
141
147
|
/**
|
|
142
148
|
* Checks if the lockstep group is currently enabled on the device.
|
|
143
|
-
* @
|
|
149
|
+
* @returns True if a lockstep group with this ID is enabled on the device.
|
|
144
150
|
*/
|
|
145
151
|
isEnabled(): Promise<boolean>;
|
|
146
152
|
/**
|
|
147
153
|
* Returns a string which represents the enabled lockstep group.
|
|
148
|
-
* @
|
|
154
|
+
* @returns String which represents the enabled lockstep group.
|
|
149
155
|
*/
|
|
150
156
|
toString(): string;
|
|
151
157
|
}
|
|
158
|
+
declare namespace Lockstep {
|
|
159
|
+
interface StopOptions {
|
|
160
|
+
waitUntilIdle?: boolean;
|
|
161
|
+
}
|
|
162
|
+
interface HomeOptions {
|
|
163
|
+
waitUntilIdle?: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface MoveAbsoluteOptions {
|
|
166
|
+
waitUntilIdle?: boolean;
|
|
167
|
+
velocity?: number;
|
|
168
|
+
velocityUnit?: Velocity | AngularVelocity | Native;
|
|
169
|
+
acceleration?: number;
|
|
170
|
+
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
171
|
+
}
|
|
172
|
+
interface MoveRelativeOptions {
|
|
173
|
+
waitUntilIdle?: boolean;
|
|
174
|
+
velocity?: number;
|
|
175
|
+
velocityUnit?: Velocity | AngularVelocity | Native;
|
|
176
|
+
acceleration?: number;
|
|
177
|
+
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
178
|
+
}
|
|
179
|
+
interface MoveVelocityOptions {
|
|
180
|
+
acceleration?: number;
|
|
181
|
+
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
182
|
+
}
|
|
183
|
+
interface MoveMaxOptions {
|
|
184
|
+
waitUntilIdle?: boolean;
|
|
185
|
+
velocity?: number;
|
|
186
|
+
velocityUnit?: Velocity | AngularVelocity | Native;
|
|
187
|
+
acceleration?: number;
|
|
188
|
+
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
189
|
+
}
|
|
190
|
+
interface MoveMinOptions {
|
|
191
|
+
waitUntilIdle?: boolean;
|
|
192
|
+
velocity?: number;
|
|
193
|
+
velocityUnit?: Velocity | AngularVelocity | Native;
|
|
194
|
+
acceleration?: number;
|
|
195
|
+
accelerationUnit?: Acceleration | AngularAcceleration | Native;
|
|
196
|
+
}
|
|
197
|
+
interface WaitUntilIdleOptions {
|
|
198
|
+
throwErrorOnFault?: boolean;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export {};
|
|
@@ -32,6 +32,7 @@ const lockstep_axes_1 = require("./lockstep_axes");
|
|
|
32
32
|
/**
|
|
33
33
|
* Represents a lockstep group with this ID on a device.
|
|
34
34
|
* A lockstep group is a movement synchronized pair of axes on a device.
|
|
35
|
+
* Requires at least Firmware 6.15 or 7.11.
|
|
35
36
|
*/
|
|
36
37
|
class Lockstep {
|
|
37
38
|
/**
|
|
@@ -74,9 +75,10 @@ class Lockstep {
|
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Stops ongoing lockstep group movement. Decelerates until zero speed.
|
|
77
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
78
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
78
79
|
*/
|
|
79
|
-
async stop(
|
|
80
|
+
async stop(options = {}) {
|
|
81
|
+
const { waitUntilIdle = true, } = options;
|
|
80
82
|
const request = new gateway.LockstepStopRequest();
|
|
81
83
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
82
84
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -86,9 +88,10 @@ class Lockstep {
|
|
|
86
88
|
}
|
|
87
89
|
/**
|
|
88
90
|
* Retracts the axes of the lockstep group until a home associated with an individual axis is detected.
|
|
89
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
91
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
90
92
|
*/
|
|
91
|
-
async home(
|
|
93
|
+
async home(options = {}) {
|
|
94
|
+
const { waitUntilIdle = true, } = options;
|
|
92
95
|
const request = new gateway.LockstepHomeRequest();
|
|
93
96
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
94
97
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -100,17 +103,19 @@ class Lockstep {
|
|
|
100
103
|
* Move the first axis of the lockstep group to an absolute position.
|
|
101
104
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
102
105
|
* @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.
|
|
106
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
107
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
108
|
+
* @param [options.velocity=0] Movement velocity.
|
|
106
109
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
107
|
-
*
|
|
108
|
-
* @param
|
|
110
|
+
* Requires at least Firmware 7.25.
|
|
111
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
112
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
109
113
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
110
|
-
*
|
|
111
|
-
* @param accelerationUnit Units of acceleration.
|
|
114
|
+
* Requires at least Firmware 7.25.
|
|
115
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
112
116
|
*/
|
|
113
|
-
async moveAbsolute(position, unit = units_1.Units.NATIVE,
|
|
117
|
+
async moveAbsolute(position, unit = units_1.Units.NATIVE, options = {}) {
|
|
118
|
+
const { waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE, } = options;
|
|
114
119
|
const request = new gateway.LockstepMoveRequest();
|
|
115
120
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
116
121
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -129,17 +134,19 @@ class Lockstep {
|
|
|
129
134
|
* Move the first axis of the lockstep group to a position relative to its current position.
|
|
130
135
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
131
136
|
* @param position Relative position.
|
|
132
|
-
* @param unit Units of position.
|
|
133
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
134
|
-
* @param velocity Movement velocity.
|
|
137
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
138
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
139
|
+
* @param [options.velocity=0] Movement velocity.
|
|
135
140
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
136
|
-
*
|
|
137
|
-
* @param
|
|
141
|
+
* Requires at least Firmware 7.25.
|
|
142
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
143
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
138
144
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
139
|
-
*
|
|
140
|
-
* @param accelerationUnit Units of acceleration.
|
|
145
|
+
* Requires at least Firmware 7.25.
|
|
146
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
141
147
|
*/
|
|
142
|
-
async moveRelative(position, unit = units_1.Units.NATIVE,
|
|
148
|
+
async moveRelative(position, unit = units_1.Units.NATIVE, options = {}) {
|
|
149
|
+
const { waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE, } = options;
|
|
143
150
|
const request = new gateway.LockstepMoveRequest();
|
|
144
151
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
145
152
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -158,12 +165,14 @@ class Lockstep {
|
|
|
158
165
|
* Moves the first axis of the lockstep group at the specified speed.
|
|
159
166
|
* The other axes in the lockstep group maintain their offsets throughout movement.
|
|
160
167
|
* @param velocity Movement velocity.
|
|
161
|
-
* @param unit Units of velocity.
|
|
162
|
-
* @param acceleration Movement acceleration.
|
|
168
|
+
* @param [unit=Units.NATIVE] Units of velocity.
|
|
169
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
163
170
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
164
|
-
*
|
|
171
|
+
* Requires at least Firmware 7.25.
|
|
172
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
165
173
|
*/
|
|
166
|
-
async moveVelocity(velocity, unit = units_1.Units.NATIVE,
|
|
174
|
+
async moveVelocity(velocity, unit = units_1.Units.NATIVE, options = {}) {
|
|
175
|
+
const { acceleration = 0, accelerationUnit = units_1.Units.NATIVE, } = options;
|
|
167
176
|
const request = new gateway.LockstepMoveRequest();
|
|
168
177
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
169
178
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -179,16 +188,18 @@ class Lockstep {
|
|
|
179
188
|
* Moves the axes to the maximum valid position.
|
|
180
189
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
181
190
|
* Respects lim.max for all axes in the group.
|
|
182
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
183
|
-
* @param velocity Movement velocity.
|
|
191
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
192
|
+
* @param [options.velocity=0] Movement velocity.
|
|
184
193
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
185
|
-
*
|
|
186
|
-
* @param
|
|
194
|
+
* Requires at least Firmware 7.25.
|
|
195
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
196
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
187
197
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
188
|
-
*
|
|
189
|
-
* @param accelerationUnit Units of acceleration.
|
|
198
|
+
* Requires at least Firmware 7.25.
|
|
199
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
190
200
|
*/
|
|
191
|
-
async moveMax(
|
|
201
|
+
async moveMax(options = {}) {
|
|
202
|
+
const { waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE, } = options;
|
|
192
203
|
const request = new gateway.LockstepMoveRequest();
|
|
193
204
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
194
205
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -205,16 +216,18 @@ class Lockstep {
|
|
|
205
216
|
* Moves the axes to the minimum valid position.
|
|
206
217
|
* The axes in the lockstep group maintain their offsets throughout movement.
|
|
207
218
|
* Respects lim.min for all axes in the group.
|
|
208
|
-
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
209
|
-
* @param velocity Movement velocity.
|
|
219
|
+
* @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
|
|
220
|
+
* @param [options.velocity=0] Movement velocity.
|
|
210
221
|
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
211
|
-
*
|
|
212
|
-
* @param
|
|
222
|
+
* Requires at least Firmware 7.25.
|
|
223
|
+
* @param [options.velocityUnit=Units.NATIVE] Units of velocity.
|
|
224
|
+
* @param [options.acceleration=0] Movement acceleration.
|
|
213
225
|
* Default value of 0 indicates that the accel setting is used instead.
|
|
214
|
-
*
|
|
215
|
-
* @param accelerationUnit Units of acceleration.
|
|
226
|
+
* Requires at least Firmware 7.25.
|
|
227
|
+
* @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.
|
|
216
228
|
*/
|
|
217
|
-
async moveMin(
|
|
229
|
+
async moveMin(options = {}) {
|
|
230
|
+
const { waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE, } = options;
|
|
218
231
|
const request = new gateway.LockstepMoveRequest();
|
|
219
232
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
220
233
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -229,9 +242,10 @@ class Lockstep {
|
|
|
229
242
|
}
|
|
230
243
|
/**
|
|
231
244
|
* Waits until the lockstep group stops moving.
|
|
232
|
-
* @param throwErrorOnFault Determines whether to throw error when fault is observed.
|
|
245
|
+
* @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
|
|
233
246
|
*/
|
|
234
|
-
async waitUntilIdle(
|
|
247
|
+
async waitUntilIdle(options = {}) {
|
|
248
|
+
const { throwErrorOnFault = true, } = options;
|
|
235
249
|
const request = new gateway.LockstepWaitUntilIdleRequest();
|
|
236
250
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
237
251
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -241,7 +255,7 @@ class Lockstep {
|
|
|
241
255
|
}
|
|
242
256
|
/**
|
|
243
257
|
* Returns bool indicating whether the lockstep group is executing a motion command.
|
|
244
|
-
* @
|
|
258
|
+
* @returns True if the axes are currently executing a motion command.
|
|
245
259
|
*/
|
|
246
260
|
async isBusy() {
|
|
247
261
|
const request = new gateway.LockstepEmptyRequest();
|
|
@@ -255,7 +269,7 @@ class Lockstep {
|
|
|
255
269
|
* @deprecated Use GetAxisNumbers instead.
|
|
256
270
|
*
|
|
257
271
|
* Gets the axes of the lockstep group.
|
|
258
|
-
* @
|
|
272
|
+
* @returns LockstepAxes instance which contains the axes numbers of the lockstep group.
|
|
259
273
|
*/
|
|
260
274
|
async getAxes() {
|
|
261
275
|
const request = new gateway.LockstepEmptyRequest();
|
|
@@ -267,7 +281,7 @@ class Lockstep {
|
|
|
267
281
|
}
|
|
268
282
|
/**
|
|
269
283
|
* Gets the axis numbers of the lockstep group.
|
|
270
|
-
* @
|
|
284
|
+
* @returns Axis numbers in order specified when enabling lockstep.
|
|
271
285
|
*/
|
|
272
286
|
async getAxisNumbers() {
|
|
273
287
|
const request = new gateway.LockstepEmptyRequest();
|
|
@@ -279,8 +293,8 @@ class Lockstep {
|
|
|
279
293
|
}
|
|
280
294
|
/**
|
|
281
295
|
* Gets the initial offsets of secondary axes of an enabled lockstep group.
|
|
282
|
-
* @param unit Units of position.
|
|
283
|
-
* @
|
|
296
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
297
|
+
* @returns Initial offset for each axis of the lockstep group.
|
|
284
298
|
*/
|
|
285
299
|
async getOffsets(unit = units_1.Units.NATIVE) {
|
|
286
300
|
const request = new gateway.LockstepGetOffsetsRequest();
|
|
@@ -293,8 +307,8 @@ class Lockstep {
|
|
|
293
307
|
}
|
|
294
308
|
/**
|
|
295
309
|
* Gets the twists of secondary axes of an enabled lockstep group.
|
|
296
|
-
* @param unit Units of position.
|
|
297
|
-
* @
|
|
310
|
+
* @param [unit=Units.NATIVE] Units of position.
|
|
311
|
+
* @returns Difference between the initial offset and the actual offset for each axis of the lockstep group.
|
|
298
312
|
*/
|
|
299
313
|
async getTwists(unit = units_1.Units.NATIVE) {
|
|
300
314
|
const request = new gateway.LockstepGetTwistsRequest();
|
|
@@ -307,7 +321,7 @@ class Lockstep {
|
|
|
307
321
|
}
|
|
308
322
|
/**
|
|
309
323
|
* Checks if the lockstep group is currently enabled on the device.
|
|
310
|
-
* @
|
|
324
|
+
* @returns True if a lockstep group with this ID is enabled on the device.
|
|
311
325
|
*/
|
|
312
326
|
async isEnabled() {
|
|
313
327
|
const request = new gateway.LockstepEmptyRequest();
|
|
@@ -319,7 +333,7 @@ class Lockstep {
|
|
|
319
333
|
}
|
|
320
334
|
/**
|
|
321
335
|
* Returns a string which represents the enabled lockstep group.
|
|
322
|
-
* @
|
|
336
|
+
* @returns String which represents the enabled lockstep group.
|
|
323
337
|
*/
|
|
324
338
|
toString() {
|
|
325
339
|
const request = new gateway.LockstepEmptyRequest();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAsH;AACtH,oDAAsC;AACtC,mDAA+C;AAE/C;;;GAGG;AACH,MAAa,QAAQ;IACnB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAGD,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAEjB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;QACpD,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,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjD,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAE1B,MAAM,OAAO,CAAC,SAAS,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;QAClB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC;QACrD,OAAO,C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CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAhZD,4BAgZC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.LockstepEnableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request = new gateway.LockstepDisableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group 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.LockstepStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\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.LockstepHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * If you provide acceleration, you must provide velocity as well.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param unit Units of position.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * If you provide acceleration, you must provide velocity as well.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param unit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * If you provide acceleration, you must provide velocity as well.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveMax(\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n * @param velocity Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * @param velocityUnit Units of velocity.\n * @param acceleration Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * If you provide acceleration, you must provide velocity as well.\n * @param accelerationUnit Units of acceleration.\n */\n public async moveMin(\n waitUntilIdle: boolean = true,\n velocity: number = 0,\n velocityUnit: Velocity | AngularVelocity | Native = Units.NATIVE,\n acceleration: number = 0,\n accelerationUnit: Acceleration | AngularAcceleration | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops 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.LockstepWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @return True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/lockstep_is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @return LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepAxes>(\n 'device/lockstep_get_axes',\n request,\n gateway.LockstepAxes);\n return LockstepAxes.fromProtobuf(response.toObject());\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @return Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n gateway.LockstepGetAxisNumbersResponse);\n return response.getAxesList();\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetOffsetsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetOffsetsResponse>(\n 'device/lockstep_get_offsets',\n request,\n gateway.LockstepGetOffsetsResponse);\n return response.getOffsetsList();\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param unit Units of position.\n * @return Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetTwistsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetTwistsResponse>(\n 'device/lockstep_get_twists',\n request,\n gateway.LockstepGetTwistsResponse);\n return response.getTwistsList();\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @return True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/lockstep_is_enabled',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @return String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/lockstep_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lockstep.js","sourceRoot":"","sources":["../../../src/ascii/lockstep.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oCAAsH;AACtH,oDAAsC;AACtC,mDAA+C;AAE/C;;;;GAIG;AACH,MAAa,QAAQ;IACnB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAGD,YAAY,MAAc,EAAE,eAAuB;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,GAAG,IAAc;QAEjB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;QACpD,OAAO,CAAC,cAAc,CAAC,IA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5B,OAAO,EACP,OAAO,CAAC,yBAAyB,CAAC,CAAC;QACrC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,SAAS;QACpB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACnD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,4BAA4B,EAC5B,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,oBAAoB,EAAE,CAAC;QACnD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEjD,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;AA7aD,4BA6aC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { LockstepAxes } from './lockstep_axes';\n\n/**\n * Represents a lockstep group with this ID on a device.\n * A lockstep group is a movement synchronized pair of axes on a device.\n * Requires at least Firmware 6.15 or 7.11.\n */\nexport class Lockstep {\n /**\n * Device that controls this lockstep group.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number that identifies the lockstep group on the device.\n */\n public get lockstepGroupId(): number {\n return this._lockstepGroupId;\n }\n private _lockstepGroupId: number;\n\n constructor(device: Device, lockstepGroupId: number) {\n this._device = device;\n this._lockstepGroupId = lockstepGroupId;\n }\n\n /**\n * Activate the lockstep group on the axes specified.\n * @param axes The numbers of axes in the lockstep group.\n */\n public async enable(\n ...axes: number[]\n ): Promise<void> {\n const request = new gateway.LockstepEnableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setAxesList(axes);\n\n await gateway.callAsync('device/lockstep_enable', request);\n }\n\n /**\n * Disable the lockstep group.\n */\n public async disable(): Promise<void> {\n const request = new gateway.LockstepDisableRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n await gateway.callAsync('device/lockstep_disable', request);\n }\n\n /**\n * Stops ongoing lockstep group 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: Lockstep.StopOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.LockstepStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_stop', request);\n }\n\n /**\n * Retracts the axes of the lockstep group until a home associated with an individual axis is detected.\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: Lockstep.HomeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n } = options;\n const request = new gateway.LockstepHomeRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/lockstep_home', request);\n }\n\n /**\n * Move the first axis of the lockstep group to an absolute position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Absolute position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveAbsoluteOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Move the first axis of the lockstep group to a position relative to its current position.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param position Relative position.\n * @param [unit=Units.NATIVE] Units of position.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n options: Lockstep.MoveRelativeOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the first axis of the lockstep group at the specified speed.\n * The other axes in the lockstep group maintain their offsets throughout movement.\n * @param velocity Movement velocity.\n * @param [unit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE,\n options: Lockstep.MoveVelocityOptions = {}\n ): Promise<void> {\n const {\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the maximum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.max for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMax(\n options: Lockstep.MoveMaxOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Moves the axes to the minimum valid position.\n * The axes in the lockstep group maintain their offsets throughout movement.\n * Respects lim.min for all axes in the group.\n * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.\n * @param [options.velocity=0] Movement velocity.\n * Default value of 0 indicates that the maxspeed setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.velocityUnit=Units.NATIVE] Units of velocity.\n * @param [options.acceleration=0] Movement acceleration.\n * Default value of 0 indicates that the accel setting is used instead.\n * Requires at least Firmware 7.25.\n * @param [options.accelerationUnit=Units.NATIVE] Units of acceleration.\n */\n public async moveMin(\n options: Lockstep.MoveMinOptions = {}\n ): Promise<void> {\n const {\n waitUntilIdle = true,\n velocity = 0,\n velocityUnit = Units.NATIVE,\n acceleration = 0,\n accelerationUnit = Units.NATIVE,\n } = options;\n const request = new gateway.LockstepMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setType(gateway.LockstepMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n request.setVelocity(velocity);\n request.setVelocityUnit(velocityUnit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/lockstep_move', request);\n }\n\n /**\n * Waits until the lockstep group stops moving.\n * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.\n */\n public async waitUntilIdle(\n options: Lockstep.WaitUntilIdleOptions = {}\n ): Promise<void> {\n const {\n throwErrorOnFault = true,\n } = options;\n const request = new gateway.LockstepWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/lockstep_wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the lockstep group is executing a motion command.\n * @returns True if the axes are currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/lockstep_is_busy',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * @deprecated Use GetAxisNumbers instead.\n *\n * Gets the axes of the lockstep group.\n * @returns LockstepAxes instance which contains the axes numbers of the lockstep group.\n */\n public async getAxes(): Promise<LockstepAxes> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepAxes>(\n 'device/lockstep_get_axes',\n request,\n gateway.LockstepAxes);\n return LockstepAxes.fromProtobuf(response.toObject());\n }\n\n /**\n * Gets the axis numbers of the lockstep group.\n * @returns Axis numbers in order specified when enabling lockstep.\n */\n public async getAxisNumbers(): Promise<number[]> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.LockstepGetAxisNumbersResponse>(\n 'device/lockstep_get_axis_numbers',\n request,\n gateway.LockstepGetAxisNumbersResponse);\n return response.getAxesList();\n }\n\n /**\n * Gets the initial offsets of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * @returns Initial offset for each axis of the lockstep group.\n */\n public async getOffsets(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetOffsetsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetOffsetsResponse>(\n 'device/lockstep_get_offsets',\n request,\n gateway.LockstepGetOffsetsResponse);\n return response.getOffsetsList();\n }\n\n /**\n * Gets the twists of secondary axes of an enabled lockstep group.\n * @param [unit=Units.NATIVE] Units of position.\n * @returns Difference between the initial offset and the actual offset for each axis of the lockstep group.\n */\n public async getTwists(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number[]> {\n const request = new gateway.LockstepGetTwistsRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.LockstepGetTwistsResponse>(\n 'device/lockstep_get_twists',\n request,\n gateway.LockstepGetTwistsResponse);\n return response.getTwistsList();\n }\n\n /**\n * Checks if the lockstep group is currently enabled on the device.\n * @returns True if a lockstep group with this ID is enabled on the device.\n */\n public async isEnabled(): Promise<boolean> {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/lockstep_is_enabled',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string which represents the enabled lockstep group.\n * @returns String which represents the enabled lockstep group.\n */\n public toString(): string {\n const request = new gateway.LockstepEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setLockstepGroupId(this.lockstepGroupId);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/lockstep_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n\nnamespace Lockstep {\n export interface StopOptions {\n waitUntilIdle?: boolean;\n }\n export interface HomeOptions {\n waitUntilIdle?: boolean;\n }\n export interface MoveAbsoluteOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveRelativeOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveVelocityOptions {\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMaxOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface MoveMinOptions {\n waitUntilIdle?: boolean;\n velocity?: number;\n velocityUnit?: Velocity | AngularVelocity | Native;\n acceleration?: number;\n accelerationUnit?: Acceleration | AngularAcceleration | Native;\n }\n export interface WaitUntilIdleOptions {\n throwErrorOnFault?: boolean;\n }\n}\n"]}
|