@zaber/motion 2.11.2 → 2.13.1
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/LICENSE +1538 -3009
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/all_axes.js +8 -8
- package/dist/lib/ascii/all_axes.js.map +1 -1
- package/dist/lib/ascii/axis.d.ts +39 -6
- package/dist/lib/ascii/axis.js +77 -24
- package/dist/lib/ascii/axis.js.map +1 -1
- package/dist/lib/ascii/axis_settings.d.ts +19 -0
- package/dist/lib/ascii/axis_settings.js +48 -4
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/connection.d.ts +2 -0
- package/dist/lib/ascii/connection.js +13 -11
- package/dist/lib/ascii/connection.js.map +1 -1
- package/dist/lib/ascii/device.d.ts +7 -0
- package/dist/lib/ascii/device.js +22 -13
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/device_io.js +5 -5
- package/dist/lib/ascii/device_io.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +19 -0
- package/dist/lib/ascii/device_settings.js +45 -4
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +1 -0
- package/dist/lib/ascii/index.js +4 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +33 -6
- package/dist/lib/ascii/lockstep.js +61 -16
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/oscilloscope.js +5 -5
- package/dist/lib/ascii/oscilloscope.js.map +1 -1
- package/dist/lib/ascii/oscilloscope_data.d.ts +1 -7
- package/dist/lib/ascii/oscilloscope_data.js +7 -24
- package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
- package/dist/lib/ascii/servo_tuner.d.ts +11 -0
- package/dist/lib/ascii/servo_tuner.js +26 -4
- package/dist/lib/ascii/servo_tuner.js.map +1 -1
- package/dist/lib/ascii/setting_constants.d.ts +124 -0
- package/dist/lib/ascii/setting_constants.js +124 -0
- package/dist/lib/ascii/setting_constants.js.map +1 -1
- package/dist/lib/ascii/storage.d.ts +98 -0
- package/dist/lib/ascii/storage.js +220 -0
- package/dist/lib/ascii/storage.js.map +1 -0
- package/dist/lib/ascii/stream.d.ts +5 -5
- package/dist/lib/ascii/stream.js +19 -19
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii/transport.js +2 -2
- package/dist/lib/ascii/transport.js.map +1 -1
- package/dist/lib/ascii_ns.d.ts +4 -0
- package/dist/lib/ascii_ns.js +2 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/binary/connection.js +7 -7
- package/dist/lib/binary/connection.js.map +1 -1
- package/dist/lib/binary/device.js +30 -30
- package/dist/lib/binary/device.js.map +1 -1
- package/dist/lib/binary/device_settings.js +1 -1
- package/dist/lib/binary/device_settings.js.map +1 -1
- package/dist/lib/exceptions/command_too_long_exception.d.ts +14 -0
- package/dist/lib/exceptions/command_too_long_exception.js +32 -0
- package/dist/lib/exceptions/command_too_long_exception.js.map +1 -0
- package/dist/lib/exceptions/command_too_long_exception_data.d.ts +24 -0
- package/dist/lib/exceptions/command_too_long_exception_data.js +20 -0
- package/dist/lib/exceptions/command_too_long_exception_data.js.map +1 -0
- package/dist/lib/exceptions/index.d.ts +3 -0
- package/dist/lib/exceptions/index.js +8 -2
- package/dist/lib/exceptions/index.js.map +1 -1
- package/dist/lib/exceptions/no_value_for_key_exception.d.ts +7 -0
- package/dist/lib/exceptions/no_value_for_key_exception.js +17 -0
- package/dist/lib/exceptions/no_value_for_key_exception.js.map +1 -0
- package/dist/lib/gateway/convert_exceptions.js +2 -0
- package/dist/lib/gateway/convert_exceptions.js.map +1 -1
- package/dist/lib/gcode/offline_translator.js +3 -3
- package/dist/lib/gcode/offline_translator.js.map +1 -1
- package/dist/lib/gcode/translator.js +3 -3
- package/dist/lib/gcode/translator.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +564 -1738
- package/dist/lib/protobufs/main_pb.js +12002 -20930
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/dist/lib/tools.js +1 -1
- package/dist/lib/tools.js.map +1 -1
- package/dist/lib/units.d.ts +63 -1
- package/dist/lib/units.js +70 -1
- package/dist/lib/units.js.map +1 -1
- package/package.json +3 -2
|
Binary file
|
|
@@ -77,7 +77,7 @@ class AllAxes {
|
|
|
77
77
|
* It can later be powered on, unparked, and moved without first having to home it.
|
|
78
78
|
*/
|
|
79
79
|
async park() {
|
|
80
|
-
const request = new gateway.
|
|
80
|
+
const request = new gateway.AxisEmptyRequest();
|
|
81
81
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
82
82
|
request.setDevice(this.device.deviceAddress);
|
|
83
83
|
request.setAxis(0);
|
|
@@ -87,7 +87,7 @@ class AllAxes {
|
|
|
87
87
|
* Unparks the device. The device will now be able to move.
|
|
88
88
|
*/
|
|
89
89
|
async unpark() {
|
|
90
|
-
const request = new gateway.
|
|
90
|
+
const request = new gateway.AxisEmptyRequest();
|
|
91
91
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
92
92
|
request.setDevice(this.device.deviceAddress);
|
|
93
93
|
request.setAxis(0);
|
|
@@ -98,24 +98,24 @@ class AllAxes {
|
|
|
98
98
|
* @return True if any axis is currently executing a motion command.
|
|
99
99
|
*/
|
|
100
100
|
async isBusy() {
|
|
101
|
-
const request = new gateway.
|
|
101
|
+
const request = new gateway.AxisEmptyRequest();
|
|
102
102
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
103
103
|
request.setDevice(this.device.deviceAddress);
|
|
104
104
|
request.setAxis(0);
|
|
105
|
-
const response = await gateway.callAsync('device/is_busy', request, gateway.
|
|
106
|
-
return response.
|
|
105
|
+
const response = await gateway.callAsync('device/is_busy', request, gateway.BoolResponse);
|
|
106
|
+
return response.getValue();
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Returns a string that represents the axes.
|
|
110
110
|
* @return A string that represents the axes.
|
|
111
111
|
*/
|
|
112
112
|
toString() {
|
|
113
|
-
const request = new gateway.
|
|
113
|
+
const request = new gateway.AxisEmptyRequest();
|
|
114
114
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
115
115
|
request.setDevice(this.device.deviceAddress);
|
|
116
116
|
request.setAxis(0);
|
|
117
|
-
const response = gateway.callSync('device/all_axes_to_string', request, gateway.
|
|
118
|
-
return response.
|
|
117
|
+
const response = gateway.callSync('device/all_axes_to_string', request, gateway.StringResponse);
|
|
118
|
+
return response.getValue();
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
exports.AllAxes = AllAxes;
|
|
@@ -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;IASlB,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAVD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAOD;;;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;;;OAG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CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEnB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,gBAAgB,EAChB,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;AAvHD,0BAuHC","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 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"]}
|
package/dist/lib/ascii/axis.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { AxisIdentity } from './axis_identity';
|
|
|
3
3
|
import { AxisType } from './axis_type';
|
|
4
4
|
import { Warnings } from './warnings';
|
|
5
5
|
import { AxisSettings } from './axis_settings';
|
|
6
|
-
import { Angle, Length, Native, AngularVelocity, Velocity } from '../units';
|
|
6
|
+
import { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration } from '../units';
|
|
7
7
|
import { Response } from './response';
|
|
8
8
|
import { Measurement } from '../measurement';
|
|
9
|
+
import { AxisStorage } from './storage';
|
|
9
10
|
/**
|
|
10
11
|
* Represents an axis of motion associated with a device.
|
|
11
12
|
*/
|
|
@@ -26,6 +27,11 @@ export declare class Axis {
|
|
|
26
27
|
*/
|
|
27
28
|
get settings(): AxisSettings;
|
|
28
29
|
private _settings;
|
|
30
|
+
/**
|
|
31
|
+
* Key-value storage of this axis.
|
|
32
|
+
*/
|
|
33
|
+
get storage(): AxisStorage;
|
|
34
|
+
private _storage;
|
|
29
35
|
/**
|
|
30
36
|
* Warnings and faults of this axis.
|
|
31
37
|
*/
|
|
@@ -91,31 +97,58 @@ export declare class Axis {
|
|
|
91
97
|
* @param position Absolute position.
|
|
92
98
|
* @param unit Units of position.
|
|
93
99
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
100
|
+
* @param velocity Movement velocity.
|
|
101
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
102
|
+
* @param velocityUnit Units of velocity.
|
|
103
|
+
* @param acceleration Movement acceleration.
|
|
104
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
105
|
+
* @param accelerationUnit Units of acceleration.
|
|
94
106
|
*/
|
|
95
|
-
moveAbsolute(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean): Promise<void>;
|
|
107
|
+
moveAbsolute(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
96
108
|
/**
|
|
97
109
|
* Moves the axis to the maximum position as specified by limit.max.
|
|
98
110
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
111
|
+
* @param velocity Movement velocity.
|
|
112
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
113
|
+
* @param velocityUnit Units of velocity.
|
|
114
|
+
* @param acceleration Movement acceleration.
|
|
115
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
116
|
+
* @param accelerationUnit Units of acceleration.
|
|
99
117
|
*/
|
|
100
|
-
moveMax(waitUntilIdle?: boolean): Promise<void>;
|
|
118
|
+
moveMax(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
101
119
|
/**
|
|
102
120
|
* Moves the axis to the minimum position as specified by limit.min.
|
|
103
121
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
122
|
+
* @param velocity Movement velocity.
|
|
123
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
124
|
+
* @param velocityUnit Units of velocity.
|
|
125
|
+
* @param acceleration Movement acceleration.
|
|
126
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
127
|
+
* @param accelerationUnit Units of acceleration.
|
|
104
128
|
*/
|
|
105
|
-
moveMin(waitUntilIdle?: boolean): Promise<void>;
|
|
129
|
+
moveMin(waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
106
130
|
/**
|
|
107
131
|
* Move axis to position relative to current position.
|
|
108
132
|
* @param position Relative position.
|
|
109
133
|
* @param unit Units of position.
|
|
110
134
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
135
|
+
* @param velocity Movement velocity.
|
|
136
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
137
|
+
* @param velocityUnit Units of velocity.
|
|
138
|
+
* @param acceleration Movement acceleration.
|
|
139
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
140
|
+
* @param accelerationUnit Units of acceleration.
|
|
111
141
|
*/
|
|
112
|
-
moveRelative(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean): Promise<void>;
|
|
142
|
+
moveRelative(position: number, unit?: Length | Angle | Native, waitUntilIdle?: boolean, velocity?: number, velocityUnit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
113
143
|
/**
|
|
114
144
|
* Begins to move axis at specified speed.
|
|
115
145
|
* @param velocity Movement velocity.
|
|
116
146
|
* @param unit Units of velocity.
|
|
147
|
+
* @param acceleration Movement acceleration.
|
|
148
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
149
|
+
* @param accelerationUnit Units of acceleration.
|
|
117
150
|
*/
|
|
118
|
-
moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native): Promise<void>;
|
|
151
|
+
moveVelocity(velocity: number, unit?: Velocity | AngularVelocity | Native, acceleration?: number, accelerationUnit?: Acceleration | AngularAcceleration | Native): Promise<void>;
|
|
119
152
|
/**
|
|
120
153
|
* Returns current axis position.
|
|
121
154
|
* @param unit Units of position.
|
package/dist/lib/ascii/axis.js
CHANGED
|
@@ -29,6 +29,7 @@ const units_1 = require("../units");
|
|
|
29
29
|
const response_1 = require("./response");
|
|
30
30
|
const measurement_1 = require("../measurement");
|
|
31
31
|
const gateway = __importStar(require("../gateway"));
|
|
32
|
+
const storage_1 = require("./storage");
|
|
32
33
|
/**
|
|
33
34
|
* Represents an axis of motion associated with a device.
|
|
34
35
|
*/
|
|
@@ -37,6 +38,7 @@ class Axis {
|
|
|
37
38
|
this._device = device;
|
|
38
39
|
this._axisNumber = axisNumber;
|
|
39
40
|
this._settings = new axis_settings_1.AxisSettings(this);
|
|
41
|
+
this._storage = new storage_1.AxisStorage(this);
|
|
40
42
|
this._warnings = new warnings_1.Warnings(device, axisNumber);
|
|
41
43
|
}
|
|
42
44
|
/**
|
|
@@ -58,6 +60,12 @@ class Axis {
|
|
|
58
60
|
get settings() {
|
|
59
61
|
return this._settings;
|
|
60
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Key-value storage of this axis.
|
|
65
|
+
*/
|
|
66
|
+
get storage() {
|
|
67
|
+
return this._storage;
|
|
68
|
+
}
|
|
61
69
|
/**
|
|
62
70
|
* Warnings and faults of this axis.
|
|
63
71
|
*/
|
|
@@ -123,7 +131,7 @@ class Axis {
|
|
|
123
131
|
* It can later be powered on, unparked, and moved without first having to home it.
|
|
124
132
|
*/
|
|
125
133
|
async park() {
|
|
126
|
-
const request = new gateway.
|
|
134
|
+
const request = new gateway.AxisEmptyRequest();
|
|
127
135
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
128
136
|
request.setDevice(this.device.deviceAddress);
|
|
129
137
|
request.setAxis(this.axisNumber);
|
|
@@ -133,7 +141,7 @@ class Axis {
|
|
|
133
141
|
* Unparks axis. Axis will now be able to move.
|
|
134
142
|
*/
|
|
135
143
|
async unpark() {
|
|
136
|
-
const request = new gateway.
|
|
144
|
+
const request = new gateway.AxisEmptyRequest();
|
|
137
145
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
138
146
|
request.setDevice(this.device.deviceAddress);
|
|
139
147
|
request.setAxis(this.axisNumber);
|
|
@@ -144,12 +152,12 @@ class Axis {
|
|
|
144
152
|
* @return True if the axis is currently parked. False otherwise.
|
|
145
153
|
*/
|
|
146
154
|
async isParked() {
|
|
147
|
-
const request = new gateway.
|
|
155
|
+
const request = new gateway.AxisEmptyRequest();
|
|
148
156
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
149
157
|
request.setDevice(this.device.deviceAddress);
|
|
150
158
|
request.setAxis(this.axisNumber);
|
|
151
|
-
const response = await gateway.callAsync('device/is_parked', request, gateway.
|
|
152
|
-
return response.
|
|
159
|
+
const response = await gateway.callAsync('device/is_parked', request, gateway.BoolResponse);
|
|
160
|
+
return response.getValue();
|
|
153
161
|
}
|
|
154
162
|
/**
|
|
155
163
|
* Waits until axis stops moving.
|
|
@@ -168,20 +176,26 @@ class Axis {
|
|
|
168
176
|
* @return True if the axis is currently executing a motion command.
|
|
169
177
|
*/
|
|
170
178
|
async isBusy() {
|
|
171
|
-
const request = new gateway.
|
|
179
|
+
const request = new gateway.AxisEmptyRequest();
|
|
172
180
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
173
181
|
request.setDevice(this.device.deviceAddress);
|
|
174
182
|
request.setAxis(this.axisNumber);
|
|
175
|
-
const response = await gateway.callAsync('device/is_busy', request, gateway.
|
|
176
|
-
return response.
|
|
183
|
+
const response = await gateway.callAsync('device/is_busy', request, gateway.BoolResponse);
|
|
184
|
+
return response.getValue();
|
|
177
185
|
}
|
|
178
186
|
/**
|
|
179
187
|
* Move axis to absolute position.
|
|
180
188
|
* @param position Absolute position.
|
|
181
189
|
* @param unit Units of position.
|
|
182
190
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
191
|
+
* @param velocity Movement velocity.
|
|
192
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
193
|
+
* @param velocityUnit Units of velocity.
|
|
194
|
+
* @param acceleration Movement acceleration.
|
|
195
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
196
|
+
* @param accelerationUnit Units of acceleration.
|
|
183
197
|
*/
|
|
184
|
-
async moveAbsolute(position, unit = units_1.Units.NATIVE, waitUntilIdle = true) {
|
|
198
|
+
async moveAbsolute(position, unit = units_1.Units.NATIVE, waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
|
|
185
199
|
const request = new gateway.DeviceMoveRequest();
|
|
186
200
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
187
201
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -190,32 +204,56 @@ class Axis {
|
|
|
190
204
|
request.setArg(position);
|
|
191
205
|
request.setUnit(unit);
|
|
192
206
|
request.setWaitUntilIdle(waitUntilIdle);
|
|
207
|
+
request.setVelocity(velocity);
|
|
208
|
+
request.setVelocityUnit(velocityUnit);
|
|
209
|
+
request.setAcceleration(acceleration);
|
|
210
|
+
request.setAccelerationUnit(accelerationUnit);
|
|
193
211
|
await gateway.callAsync('device/move', request);
|
|
194
212
|
}
|
|
195
213
|
/**
|
|
196
214
|
* Moves the axis to the maximum position as specified by limit.max.
|
|
197
215
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
216
|
+
* @param velocity Movement velocity.
|
|
217
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
218
|
+
* @param velocityUnit Units of velocity.
|
|
219
|
+
* @param acceleration Movement acceleration.
|
|
220
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
221
|
+
* @param accelerationUnit Units of acceleration.
|
|
198
222
|
*/
|
|
199
|
-
async moveMax(waitUntilIdle = true) {
|
|
223
|
+
async moveMax(waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
|
|
200
224
|
const request = new gateway.DeviceMoveRequest();
|
|
201
225
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
202
226
|
request.setDevice(this.device.deviceAddress);
|
|
203
227
|
request.setAxis(this.axisNumber);
|
|
204
228
|
request.setType(gateway.DeviceMoveRequest.MoveType.MAX);
|
|
205
229
|
request.setWaitUntilIdle(waitUntilIdle);
|
|
230
|
+
request.setVelocity(velocity);
|
|
231
|
+
request.setVelocityUnit(velocityUnit);
|
|
232
|
+
request.setAcceleration(acceleration);
|
|
233
|
+
request.setAccelerationUnit(accelerationUnit);
|
|
206
234
|
await gateway.callAsync('device/move', request);
|
|
207
235
|
}
|
|
208
236
|
/**
|
|
209
237
|
* Moves the axis to the minimum position as specified by limit.min.
|
|
210
238
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
239
|
+
* @param velocity Movement velocity.
|
|
240
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
241
|
+
* @param velocityUnit Units of velocity.
|
|
242
|
+
* @param acceleration Movement acceleration.
|
|
243
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
244
|
+
* @param accelerationUnit Units of acceleration.
|
|
211
245
|
*/
|
|
212
|
-
async moveMin(waitUntilIdle = true) {
|
|
246
|
+
async moveMin(waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
|
|
213
247
|
const request = new gateway.DeviceMoveRequest();
|
|
214
248
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
215
249
|
request.setDevice(this.device.deviceAddress);
|
|
216
250
|
request.setAxis(this.axisNumber);
|
|
217
251
|
request.setType(gateway.DeviceMoveRequest.MoveType.MIN);
|
|
218
252
|
request.setWaitUntilIdle(waitUntilIdle);
|
|
253
|
+
request.setVelocity(velocity);
|
|
254
|
+
request.setVelocityUnit(velocityUnit);
|
|
255
|
+
request.setAcceleration(acceleration);
|
|
256
|
+
request.setAccelerationUnit(accelerationUnit);
|
|
219
257
|
await gateway.callAsync('device/move', request);
|
|
220
258
|
}
|
|
221
259
|
/**
|
|
@@ -223,8 +261,14 @@ class Axis {
|
|
|
223
261
|
* @param position Relative position.
|
|
224
262
|
* @param unit Units of position.
|
|
225
263
|
* @param waitUntilIdle Determines whether function should return after the movement is finished or just started.
|
|
264
|
+
* @param velocity Movement velocity.
|
|
265
|
+
* Default value of 0 indicates that the maxspeed setting is used instead.
|
|
266
|
+
* @param velocityUnit Units of velocity.
|
|
267
|
+
* @param acceleration Movement acceleration.
|
|
268
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
269
|
+
* @param accelerationUnit Units of acceleration.
|
|
226
270
|
*/
|
|
227
|
-
async moveRelative(position, unit = units_1.Units.NATIVE, waitUntilIdle = true) {
|
|
271
|
+
async moveRelative(position, unit = units_1.Units.NATIVE, waitUntilIdle = true, velocity = 0, velocityUnit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
|
|
228
272
|
const request = new gateway.DeviceMoveRequest();
|
|
229
273
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
230
274
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -233,14 +277,21 @@ class Axis {
|
|
|
233
277
|
request.setArg(position);
|
|
234
278
|
request.setUnit(unit);
|
|
235
279
|
request.setWaitUntilIdle(waitUntilIdle);
|
|
280
|
+
request.setVelocity(velocity);
|
|
281
|
+
request.setVelocityUnit(velocityUnit);
|
|
282
|
+
request.setAcceleration(acceleration);
|
|
283
|
+
request.setAccelerationUnit(accelerationUnit);
|
|
236
284
|
await gateway.callAsync('device/move', request);
|
|
237
285
|
}
|
|
238
286
|
/**
|
|
239
287
|
* Begins to move axis at specified speed.
|
|
240
288
|
* @param velocity Movement velocity.
|
|
241
289
|
* @param unit Units of velocity.
|
|
290
|
+
* @param acceleration Movement acceleration.
|
|
291
|
+
* Default value of 0 indicates that the accel setting is used instead.
|
|
292
|
+
* @param accelerationUnit Units of acceleration.
|
|
242
293
|
*/
|
|
243
|
-
async moveVelocity(velocity, unit = units_1.Units.NATIVE) {
|
|
294
|
+
async moveVelocity(velocity, unit = units_1.Units.NATIVE, acceleration = 0, accelerationUnit = units_1.Units.NATIVE) {
|
|
244
295
|
const request = new gateway.DeviceMoveRequest();
|
|
245
296
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
246
297
|
request.setDevice(this.device.deviceAddress);
|
|
@@ -248,6 +299,8 @@ class Axis {
|
|
|
248
299
|
request.setType(gateway.DeviceMoveRequest.MoveType.VEL);
|
|
249
300
|
request.setArg(velocity);
|
|
250
301
|
request.setUnit(unit);
|
|
302
|
+
request.setAcceleration(acceleration);
|
|
303
|
+
request.setAccelerationUnit(accelerationUnit);
|
|
251
304
|
await gateway.callAsync('device/move', request);
|
|
252
305
|
}
|
|
253
306
|
/**
|
|
@@ -262,7 +315,7 @@ class Axis {
|
|
|
262
315
|
request.setAxis(this.axisNumber);
|
|
263
316
|
request.setSetting('pos');
|
|
264
317
|
request.setUnit(unit);
|
|
265
|
-
const response = await gateway.callAsync('device/get_setting', request, gateway.
|
|
318
|
+
const response = await gateway.callAsync('device/get_setting', request, gateway.DoubleResponse);
|
|
266
319
|
return response.getValue();
|
|
267
320
|
}
|
|
268
321
|
/**
|
|
@@ -335,32 +388,32 @@ class Axis {
|
|
|
335
388
|
request.setAxis(this.axisNumber);
|
|
336
389
|
request.setCommandTemplate(commandTemplate);
|
|
337
390
|
request.setParametersList(parameters.map(measurement_1.Measurement.toProtobuf));
|
|
338
|
-
const response = gateway.callSync('device/prepare_command', request, gateway.
|
|
339
|
-
return response.
|
|
391
|
+
const response = gateway.callSync('device/prepare_command', request, gateway.StringResponse);
|
|
392
|
+
return response.getValue();
|
|
340
393
|
}
|
|
341
394
|
/**
|
|
342
395
|
* Returns a string that represents the axis.
|
|
343
396
|
* @return A string that represents the axis.
|
|
344
397
|
*/
|
|
345
398
|
toString() {
|
|
346
|
-
const request = new gateway.
|
|
399
|
+
const request = new gateway.AxisEmptyRequest();
|
|
347
400
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
348
401
|
request.setDevice(this.device.deviceAddress);
|
|
349
402
|
request.setAxis(this.axisNumber);
|
|
350
|
-
const response = gateway.callSync('device/axis_to_string', request, gateway.
|
|
351
|
-
return response.
|
|
403
|
+
const response = gateway.callSync('device/axis_to_string', request, gateway.StringResponse);
|
|
404
|
+
return response.getValue();
|
|
352
405
|
}
|
|
353
406
|
/**
|
|
354
407
|
* Returns a serialization of the current axis state that can be saved and reapplied.
|
|
355
408
|
* @return A serialization of the current state of the axis.
|
|
356
409
|
*/
|
|
357
410
|
async getState() {
|
|
358
|
-
const request = new gateway.
|
|
411
|
+
const request = new gateway.AxisEmptyRequest();
|
|
359
412
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
360
413
|
request.setDevice(this.device.deviceAddress);
|
|
361
414
|
request.setAxis(this.axisNumber);
|
|
362
|
-
const response = await gateway.callAsync('device/get_state', request, gateway.
|
|
363
|
-
return response.
|
|
415
|
+
const response = await gateway.callAsync('device/get_state', request, gateway.StringResponse);
|
|
416
|
+
return response.getValue();
|
|
364
417
|
}
|
|
365
418
|
/**
|
|
366
419
|
* Applies a saved state to an axis.
|
|
@@ -387,7 +440,7 @@ class Axis {
|
|
|
387
440
|
request.setDevice(this.device.deviceAddress);
|
|
388
441
|
request.setAxis(this.axisNumber);
|
|
389
442
|
request.setState(state);
|
|
390
|
-
const response = await gateway.callAsync('device/
|
|
443
|
+
const response = await gateway.callAsync('device/can_set_axis_state', request, gateway.CanSetStateAxisResponse);
|
|
391
444
|
return response.getError();
|
|
392
445
|
}
|
|
393
446
|
/**
|
|
@@ -395,7 +448,7 @@ class Axis {
|
|
|
395
448
|
* @return Axis identity.
|
|
396
449
|
*/
|
|
397
450
|
_retrieveIdentity() {
|
|
398
|
-
const request = new gateway.
|
|
451
|
+
const request = new gateway.AxisEmptyRequest();
|
|
399
452
|
request.setInterfaceId(this.device.connection.interfaceId);
|
|
400
453
|
request.setDevice(this.device.deviceAddress);
|
|
401
454
|
request.setAxis(this.axisNumber);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../../src/ascii/axis.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,mDAA+C;AAE/C,yCAAs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AAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,sBAAsB,EACtB,OAAO,EACP,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,iBAAiB;QACvB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,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,IAAI,CAAC,UAAU,CAAC,CAAC;QAEjC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,4BAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAjfD,oBAifC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { AxisIdentity } from './axis_identity';\nimport { AxisType } from './axis_type';\nimport { Warnings } from './warnings';\nimport { AxisSettings } from './axis_settings';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Units } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\n\n/**\n * Represents an axis of motion associated with a device.\n */\nexport class Axis {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The axis number identifies the axis on the device.\n * The first axis has the number one.\n */\n public get axisNumber(): number {\n return this._axisNumber;\n }\n private _axisNumber: number;\n\n /**\n * Settings and properties of this axis.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Warnings and faults of this axis.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the axis.\n */\n public get identity(): AxisIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Unique ID of the peripheral hardware.\n */\n public get peripheralId(): number {\n return this.identity.peripheralId;\n }\n\n /**\n * Name of the peripheral.\n */\n public get peripheralName(): string {\n return this.identity.peripheralName;\n }\n\n /**\n * Indicates whether the axis is a peripheral or part of an integrated device.\n */\n public get isPeripheral(): boolean {\n return this.identity.isPeripheral;\n }\n\n /**\n * Determines the type of an axis and units it accepts.\n */\n public get axisType(): AxisType {\n return this.identity.axisType;\n }\n\n constructor(device: Device, axisNumber: number) {\n this._device = device;\n this._axisNumber = axisNumber;\n this._settings = new AxisSettings(this);\n this._warnings = new Warnings(device, axisNumber);\n }\n\n /**\n * Homes axis. Axis returns to its homing position.\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(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axis 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(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Parks the axis 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.DeviceParkRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks axis. Axis will now be able to move.\n */\n public async unpark(): Promise<void> {\n const request = new gateway.DeviceParkRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether the axis is parked or not.\n * @return True if the axis is currently parked. False otherwise.\n */\n public async isParked(): Promise<boolean> {\n const request = new gateway.DeviceParkRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.DeviceIsParkedResponse>(\n 'device/is_parked',\n request,\n gateway.DeviceIsParkedResponse);\n return response.getIsParked();\n }\n\n /**\n * Waits until axis 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.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the axis is executing a motion command.\n * @return True if the axis is currently executing a motion command.\n */\n public async isBusy(): Promise<boolean> {\n const request = new gateway.DeviceIsBusyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.DeviceIsBusyResponse>(\n 'device/is_busy',\n request,\n gateway.DeviceIsBusyResponse);\n return response.getIsBusy();\n }\n\n /**\n * Move axis to absolute position.\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 */\n public async moveAbsolute(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.ABS);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the maximum position as specified by limit.max.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveMax(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MAX);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Moves the axis to the minimum position as specified by limit.min.\n * @param waitUntilIdle Determines whether function should return after the movement is finished or just started.\n */\n public async moveMin(\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.MIN);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Move axis to position relative to current position.\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 */\n public async moveRelative(\n position: number,\n unit: Length | Angle | Native = Units.NATIVE,\n waitUntilIdle: boolean = true\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.REL);\n request.setArg(position);\n request.setUnit(unit);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Begins to move axis at specified speed.\n * @param velocity Movement velocity.\n * @param unit Units of velocity.\n */\n public async moveVelocity(\n velocity: number,\n unit: Velocity | AngularVelocity | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Returns current axis position.\n * @param unit Units of position.\n * @return Axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setSetting('pos');\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DeviceGetSettingResponse>(\n 'device/get_setting',\n request,\n gateway.DeviceGetSettingResponse);\n return response.getValue();\n }\n\n /**\n * Sends a generic ASCII command to this axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this axis and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\n }\n\n /**\n * Sends a generic ASCII command to this axis without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this axis and this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @return Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.PrepareCommandResponse>(\n 'device/prepare_command',\n request,\n gateway.PrepareCommandResponse);\n return response.getCommand();\n }\n\n /**\n * Returns a string that represents the axis.\n * @return A string that represents the axis.\n */\n public toString(): string {\n const request = new gateway.ToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.ToStringResponse>(\n 'device/axis_to_string',\n request,\n gateway.ToStringResponse);\n return response.getToStr();\n }\n\n /**\n * Returns a serialization of the current axis state that can be saved and reapplied.\n * @return A serialization of the current state of the axis.\n */\n public async getState(): Promise<string> {\n const request = new gateway.GetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.GetStateResponse>(\n 'device/get_state',\n request,\n gateway.GetStateResponse);\n return response.getState();\n }\n\n /**\n * Applies a saved state to an axis.\n * @param state The state object to apply to this axis.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this axis.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @return An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string\n ): Promise<string> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateAxisResponse>(\n 'device/can_set_state',\n request,\n gateway.CanSetStateAxisResponse);\n return response.getError();\n }\n\n /**\n * Returns identity.\n * @return Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request = new gateway.DeviceGetAxisIdentityRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.DeviceGetAxisIdentityResponse>(\n 'device/get_axis_identity',\n request,\n gateway.DeviceGetAxisIdentityResponse);\n return AxisIdentity.fromProtobuf(response.getIdentity()!.toObject());\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../../src/ascii/axis.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAGtD,mDAA+C;AAE/C,yCAAsC;AACtC,mDAA+C;AAC/C,oCAAsH;AACtH,yCAAsC;AACtC,gDAA6C;AAC7C,oDAAsC;AACtC,uCAAwC;AAExC;;GAEG;AACH,MAAa,IAAI;IA6Ef,YAAY,MAAc,EAAE,UAAkB;QAC5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,qBAAW,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,IAAI,mBAAQ,CAAC,MAAM,EA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a,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACK,iBAAiB;QACvB,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,IAAI,CAAC,UAAU,CAAC,CAAC;QAEjC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,0BAA0B,EAC1B,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,4BAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,EAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAzjBD,oBAyjBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { AxisIdentity } from './axis_identity';\nimport { AxisType } from './axis_type';\nimport { Warnings } from './warnings';\nimport { AxisSettings } from './axis_settings';\nimport { Angle, Length, Native, AngularVelocity, Velocity, Acceleration, AngularAcceleration, Units } from '../units';\nimport { Response } from './response';\nimport { Measurement } from '../measurement';\nimport * as gateway from '../gateway';\nimport { AxisStorage } from './storage';\n\n/**\n * Represents an axis of motion associated with a device.\n */\nexport class Axis {\n /**\n * Device that controls this axis.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The axis number identifies the axis on the device.\n * The first axis has the number one.\n */\n public get axisNumber(): number {\n return this._axisNumber;\n }\n private _axisNumber: number;\n\n /**\n * Settings and properties of this axis.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this axis.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this axis.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n /**\n * Identity of the axis.\n */\n public get identity(): AxisIdentity {\n return this._retrieveIdentity();\n }\n\n /**\n * Unique ID of the peripheral hardware.\n */\n public get peripheralId(): number {\n return this.identity.peripheralId;\n }\n\n /**\n * Name of the peripheral.\n */\n public get peripheralName(): string {\n return this.identity.peripheralName;\n }\n\n /**\n * Indicates whether the axis is a peripheral or part of an integrated device.\n */\n public get isPeripheral(): boolean {\n return this.identity.isPeripheral;\n }\n\n /**\n * Determines the type of an axis and units it accepts.\n */\n public get axisType(): AxisType {\n return this.identity.axisType;\n }\n\n constructor(device: Device, axisNumber: number) {\n this._device = device;\n this._axisNumber = axisNumber;\n this._settings = new AxisSettings(this);\n this._storage = new AxisStorage(this);\n this._warnings = new Warnings(device, axisNumber);\n }\n\n /**\n * Homes axis. Axis returns to its homing position.\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(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/home', request);\n }\n\n /**\n * Stops ongoing axis 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(this.axisNumber);\n request.setWaitUntilIdle(waitUntilIdle);\n\n await gateway.callAsync('device/stop', request);\n }\n\n /**\n * Parks the axis 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(this.axisNumber);\n\n await gateway.callAsync('device/park', request);\n }\n\n /**\n * Unparks axis. Axis 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(this.axisNumber);\n\n await gateway.callAsync('device/unpark', request);\n }\n\n /**\n * Returns bool indicating whether the axis is parked or not.\n * @return True if the axis is currently parked. False otherwise.\n */\n public async isParked(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/is_parked',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Waits until axis 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.DeviceWaitUntilIdleRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setThrowErrorOnFault(throwErrorOnFault);\n\n await gateway.callAsync('device/wait_until_idle', request);\n }\n\n /**\n * Returns bool indicating whether the axis is executing a motion command.\n * @return True if the 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(this.axisNumber);\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 * Move axis to absolute position.\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 * @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.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.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/move', request);\n }\n\n /**\n * Moves the axis to the maximum position as specified by limit.max.\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 * @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.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.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/move', request);\n }\n\n /**\n * Moves the axis to the minimum position as specified by limit.min.\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 * @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.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.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/move', request);\n }\n\n /**\n * Move axis to position relative to current position.\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 * @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.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.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/move', request);\n }\n\n /**\n * Begins to move axis at specified speed.\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.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setType(gateway.DeviceMoveRequest.MoveType.VEL);\n request.setArg(velocity);\n request.setUnit(unit);\n request.setAcceleration(acceleration);\n request.setAccelerationUnit(accelerationUnit);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Returns current axis position.\n * @param unit Units of position.\n * @return Axis position.\n */\n public async getPosition(\n unit: Length | Angle | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setSetting('pos');\n request.setUnit(unit);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sends a generic ASCII command to this axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param checkErrors Controls whether to throw an exception when the device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return A response to the command.\n */\n public async genericCommand(\n command: string,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this axis and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param checkErrors Controls whether to throw an exception when a device rejects the command.\n * @param timeout The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @return All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n checkErrors: boolean = true,\n timeout: number = 0\n ): Promise<Response[]> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.toObject().responsesList.map(resp => Response.fromProtobuf(resp));\n }\n\n /**\n * Sends a generic ASCII command to this axis without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommand(command);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Formats parameters into a command and performs unit conversions.\n * Parameters in the command template are denoted by a question mark.\n * Command returned is only valid for this axis and this device.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param commandTemplate Template of a command to prepare. Parameters are denoted by question marks.\n * @param parameters Variable number of command parameters.\n * @return Command with converted parameters.\n */\n public prepareCommand(\n commandTemplate: string,\n ...parameters: Measurement[]\n ): string {\n const request = new gateway.PrepareCommandRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setCommandTemplate(commandTemplate);\n request.setParametersList(parameters.map(Measurement.toProtobuf));\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/prepare_command',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a string that represents the axis.\n * @return A string that represents the axis.\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(this.axisNumber);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/axis_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Returns a serialization of the current axis state that can be saved and reapplied.\n * @return A serialization of the current state of the axis.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to an axis.\n * @param state The state object to apply to this axis.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this axis.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @return An explanation of why this state cannot be set to this axis.\n */\n public async canSetState(\n state: string\n ): Promise<string> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n gateway.CanSetStateAxisResponse);\n return response.getError();\n }\n\n /**\n * Returns identity.\n * @return Axis identity.\n */\n private _retrieveIdentity(): AxisIdentity {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(this.axisNumber);\n\n const response = gateway.callSync<gateway.DeviceGetAxisIdentityResponse>(\n 'device/get_axis_identity',\n request,\n gateway.DeviceGetAxisIdentityResponse);\n return AxisIdentity.fromProtobuf(response.getIdentity()!.toObject());\n }\n}\n"]}
|
|
@@ -52,4 +52,23 @@ export declare class AxisSettings {
|
|
|
52
52
|
* @return Setting value.
|
|
53
53
|
*/
|
|
54
54
|
convertFromNativeUnits(setting: string, value: number, unit: Units): number;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the default value of a setting.
|
|
57
|
+
* @param setting Name of the setting.
|
|
58
|
+
* @param unit Units of setting.
|
|
59
|
+
* @return Default setting value.
|
|
60
|
+
*/
|
|
61
|
+
getDefault(setting: string, unit?: Units): number;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the default value of a setting as a string.
|
|
64
|
+
* @param setting Name of the setting.
|
|
65
|
+
* @return Default setting value.
|
|
66
|
+
*/
|
|
67
|
+
getDefaultString(setting: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* Indicates if given setting can be converted from and to native units.
|
|
70
|
+
* @param setting Name of the setting.
|
|
71
|
+
* @return True if unit conversion can be performed.
|
|
72
|
+
*/
|
|
73
|
+
canConvertNativeUnits(setting: string): boolean;
|
|
55
74
|
}
|