@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.
Files changed (82) hide show
  1. package/LICENSE +1538 -3009
  2. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  3. package/dist/lib/ascii/all_axes.js +8 -8
  4. package/dist/lib/ascii/all_axes.js.map +1 -1
  5. package/dist/lib/ascii/axis.d.ts +39 -6
  6. package/dist/lib/ascii/axis.js +77 -24
  7. package/dist/lib/ascii/axis.js.map +1 -1
  8. package/dist/lib/ascii/axis_settings.d.ts +19 -0
  9. package/dist/lib/ascii/axis_settings.js +48 -4
  10. package/dist/lib/ascii/axis_settings.js.map +1 -1
  11. package/dist/lib/ascii/connection.d.ts +2 -0
  12. package/dist/lib/ascii/connection.js +13 -11
  13. package/dist/lib/ascii/connection.js.map +1 -1
  14. package/dist/lib/ascii/device.d.ts +7 -0
  15. package/dist/lib/ascii/device.js +22 -13
  16. package/dist/lib/ascii/device.js.map +1 -1
  17. package/dist/lib/ascii/device_io.js +5 -5
  18. package/dist/lib/ascii/device_io.js.map +1 -1
  19. package/dist/lib/ascii/device_settings.d.ts +19 -0
  20. package/dist/lib/ascii/device_settings.js +45 -4
  21. package/dist/lib/ascii/device_settings.js.map +1 -1
  22. package/dist/lib/ascii/index.d.ts +1 -0
  23. package/dist/lib/ascii/index.js +4 -1
  24. package/dist/lib/ascii/index.js.map +1 -1
  25. package/dist/lib/ascii/lockstep.d.ts +33 -6
  26. package/dist/lib/ascii/lockstep.js +61 -16
  27. package/dist/lib/ascii/lockstep.js.map +1 -1
  28. package/dist/lib/ascii/oscilloscope.js +5 -5
  29. package/dist/lib/ascii/oscilloscope.js.map +1 -1
  30. package/dist/lib/ascii/oscilloscope_data.d.ts +1 -7
  31. package/dist/lib/ascii/oscilloscope_data.js +7 -24
  32. package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
  33. package/dist/lib/ascii/servo_tuner.d.ts +11 -0
  34. package/dist/lib/ascii/servo_tuner.js +26 -4
  35. package/dist/lib/ascii/servo_tuner.js.map +1 -1
  36. package/dist/lib/ascii/setting_constants.d.ts +124 -0
  37. package/dist/lib/ascii/setting_constants.js +124 -0
  38. package/dist/lib/ascii/setting_constants.js.map +1 -1
  39. package/dist/lib/ascii/storage.d.ts +98 -0
  40. package/dist/lib/ascii/storage.js +220 -0
  41. package/dist/lib/ascii/storage.js.map +1 -0
  42. package/dist/lib/ascii/stream.d.ts +5 -5
  43. package/dist/lib/ascii/stream.js +19 -19
  44. package/dist/lib/ascii/stream.js.map +1 -1
  45. package/dist/lib/ascii/transport.js +2 -2
  46. package/dist/lib/ascii/transport.js.map +1 -1
  47. package/dist/lib/ascii_ns.d.ts +4 -0
  48. package/dist/lib/ascii_ns.js +2 -0
  49. package/dist/lib/ascii_ns.js.map +1 -1
  50. package/dist/lib/binary/connection.js +7 -7
  51. package/dist/lib/binary/connection.js.map +1 -1
  52. package/dist/lib/binary/device.js +30 -30
  53. package/dist/lib/binary/device.js.map +1 -1
  54. package/dist/lib/binary/device_settings.js +1 -1
  55. package/dist/lib/binary/device_settings.js.map +1 -1
  56. package/dist/lib/exceptions/command_too_long_exception.d.ts +14 -0
  57. package/dist/lib/exceptions/command_too_long_exception.js +32 -0
  58. package/dist/lib/exceptions/command_too_long_exception.js.map +1 -0
  59. package/dist/lib/exceptions/command_too_long_exception_data.d.ts +24 -0
  60. package/dist/lib/exceptions/command_too_long_exception_data.js +20 -0
  61. package/dist/lib/exceptions/command_too_long_exception_data.js.map +1 -0
  62. package/dist/lib/exceptions/index.d.ts +3 -0
  63. package/dist/lib/exceptions/index.js +8 -2
  64. package/dist/lib/exceptions/index.js.map +1 -1
  65. package/dist/lib/exceptions/no_value_for_key_exception.d.ts +7 -0
  66. package/dist/lib/exceptions/no_value_for_key_exception.js +17 -0
  67. package/dist/lib/exceptions/no_value_for_key_exception.js.map +1 -0
  68. package/dist/lib/gateway/convert_exceptions.js +2 -0
  69. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  70. package/dist/lib/gcode/offline_translator.js +3 -3
  71. package/dist/lib/gcode/offline_translator.js.map +1 -1
  72. package/dist/lib/gcode/translator.js +3 -3
  73. package/dist/lib/gcode/translator.js.map +1 -1
  74. package/dist/lib/protobufs/main_pb.d.ts +564 -1738
  75. package/dist/lib/protobufs/main_pb.js +12002 -20930
  76. package/dist/lib/protobufs/main_pb.js.map +1 -1
  77. package/dist/lib/tools.js +1 -1
  78. package/dist/lib/tools.js.map +1 -1
  79. package/dist/lib/units.d.ts +63 -1
  80. package/dist/lib/units.js +70 -1
  81. package/dist/lib/units.js.map +1 -1
  82. package/package.json +3 -2
@@ -0,0 +1,98 @@
1
+ import { Axis } from './axis';
2
+ import { Device } from './device';
3
+ /**
4
+ * Class providing access to axis storage.
5
+ */
6
+ export declare class AxisStorage {
7
+ private _axis;
8
+ constructor(axis: Axis);
9
+ /**
10
+ * Sets the axis value stored at the provided key.
11
+ * @param key Key to set the value at.
12
+ * @param value Value to set.
13
+ * @param encode Whether the stored value should be base64 encoded before being stored.
14
+ * This makes the string unreadable to humans using the ASCII protocol,
15
+ * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.
16
+ */
17
+ setString(key: string, value: string, encode?: boolean): Promise<void>;
18
+ /**
19
+ * Gets the axis value stored with the provided key.
20
+ * @param key Key to read the value of.
21
+ * @param decode Whether the stored value should be decoded.
22
+ * Only use this when reading values set by storage.set with "encode" true.
23
+ * @return Stored value.
24
+ */
25
+ getString(key: string, decode?: boolean): Promise<string>;
26
+ /**
27
+ * Sets the value at the provided key to the provided number.
28
+ * @param key Key to set the value at.
29
+ * @param value Value to set.
30
+ */
31
+ setNumber(key: string, value: number): Promise<void>;
32
+ /**
33
+ * Gets the value at the provided key interpreted as a number.
34
+ * @param key Key to get the value at.
35
+ * @return Stored value.
36
+ */
37
+ getNumber(key: string): Promise<number>;
38
+ /**
39
+ * Sets the value at the provided key to the provided boolean.
40
+ * @param key Key to set the value at.
41
+ * @param value Value to set.
42
+ */
43
+ setBool(key: string, value: boolean): Promise<void>;
44
+ /**
45
+ * Gets the value at the provided key interpreted as a boolean.
46
+ * @param key Key to get the value at.
47
+ * @return Stored value.
48
+ */
49
+ getBool(key: string): Promise<boolean>;
50
+ }
51
+ /**
52
+ * Class providing access to device storage.
53
+ */
54
+ export declare class DeviceStorage {
55
+ private _device;
56
+ constructor(device: Device);
57
+ /**
58
+ * Sets the device value stored at the provided key.
59
+ * @param key Key to set the value at.
60
+ * @param value Value to set.
61
+ * @param encode Whether the stored value should be base64 encoded before being stored.
62
+ * This makes the string unreadable to humans using the ASCII protocol,
63
+ * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.
64
+ */
65
+ setString(key: string, value: string, encode?: boolean): Promise<void>;
66
+ /**
67
+ * Gets the device value stored with the provided key.
68
+ * @param key Key to read the value of.
69
+ * @param decode Whether the stored value should be decoded.
70
+ * Only use this when reading values set by storage.set with "encode" true.
71
+ * @return Stored value.
72
+ */
73
+ getString(key: string, decode?: boolean): Promise<string>;
74
+ /**
75
+ * Sets the value at the provided key to the provided number.
76
+ * @param key Key to set the value at.
77
+ * @param value Value to set.
78
+ */
79
+ setNumber(key: string, value: number): Promise<void>;
80
+ /**
81
+ * Gets the value at the provided key interpreted as a number.
82
+ * @param key Key to get the value at.
83
+ * @return Stored value.
84
+ */
85
+ getNumber(key: string): Promise<number>;
86
+ /**
87
+ * Sets the value at the provided key to the provided boolean.
88
+ * @param key Key to set the value at.
89
+ * @param value Value to set.
90
+ */
91
+ setBool(key: string, value: boolean): Promise<void>;
92
+ /**
93
+ * Gets the value at the provided key interpreted as a boolean.
94
+ * @param key Key to get the value at.
95
+ * @return Stored value.
96
+ */
97
+ getBool(key: string): Promise<boolean>;
98
+ }
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7
+ }) : (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ o[k2] = m[k];
10
+ }));
11
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
12
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
13
+ }) : function(o, v) {
14
+ o["default"] = v;
15
+ });
16
+ var __importStar = (this && this.__importStar) || function (mod) {
17
+ if (mod && mod.__esModule) return mod;
18
+ var result = {};
19
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
20
+ __setModuleDefault(result, mod);
21
+ return result;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.DeviceStorage = exports.AxisStorage = void 0;
25
+ const gateway = __importStar(require("../gateway"));
26
+ /**
27
+ * Class providing access to axis storage.
28
+ */
29
+ class AxisStorage {
30
+ constructor(axis) {
31
+ this._axis = axis;
32
+ }
33
+ /**
34
+ * Sets the axis value stored at the provided key.
35
+ * @param key Key to set the value at.
36
+ * @param value Value to set.
37
+ * @param encode Whether the stored value should be base64 encoded before being stored.
38
+ * This makes the string unreadable to humans using the ASCII protocol,
39
+ * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.
40
+ */
41
+ async setString(key, value, encode = false) {
42
+ const request = new gateway.DeviceSetStorageRequest();
43
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
44
+ request.setDevice(this._axis.device.deviceAddress);
45
+ request.setAxis(this._axis.axisNumber);
46
+ request.setKey(key);
47
+ request.setValue(value);
48
+ request.setEncode(encode);
49
+ await gateway.callAsync('device/set_storage', request);
50
+ }
51
+ /**
52
+ * Gets the axis value stored with the provided key.
53
+ * @param key Key to read the value of.
54
+ * @param decode Whether the stored value should be decoded.
55
+ * Only use this when reading values set by storage.set with "encode" true.
56
+ * @return Stored value.
57
+ */
58
+ async getString(key, decode = false) {
59
+ const request = new gateway.DeviceGetStorageRequest();
60
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
61
+ request.setDevice(this._axis.device.deviceAddress);
62
+ request.setAxis(this._axis.axisNumber);
63
+ request.setKey(key);
64
+ request.setDecode(decode);
65
+ const response = await gateway.callAsync('device/get_storage', request, gateway.StringResponse);
66
+ return response.getValue();
67
+ }
68
+ /**
69
+ * Sets the value at the provided key to the provided number.
70
+ * @param key Key to set the value at.
71
+ * @param value Value to set.
72
+ */
73
+ async setNumber(key, value) {
74
+ const request = new gateway.DeviceSetStorageNumberRequest();
75
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
76
+ request.setDevice(this._axis.device.deviceAddress);
77
+ request.setAxis(this._axis.axisNumber);
78
+ request.setKey(key);
79
+ request.setValue(value);
80
+ await gateway.callAsync('device/set_storage_number', request);
81
+ }
82
+ /**
83
+ * Gets the value at the provided key interpreted as a number.
84
+ * @param key Key to get the value at.
85
+ * @return Stored value.
86
+ */
87
+ async getNumber(key) {
88
+ const request = new gateway.DeviceGetStorageNumberRequest();
89
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
90
+ request.setDevice(this._axis.device.deviceAddress);
91
+ request.setAxis(this._axis.axisNumber);
92
+ request.setKey(key);
93
+ const response = await gateway.callAsync('device/get_storage_number', request, gateway.DoubleResponse);
94
+ return response.getValue();
95
+ }
96
+ /**
97
+ * Sets the value at the provided key to the provided boolean.
98
+ * @param key Key to set the value at.
99
+ * @param value Value to set.
100
+ */
101
+ async setBool(key, value) {
102
+ const request = new gateway.DeviceSetStorageBoolRequest();
103
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
104
+ request.setDevice(this._axis.device.deviceAddress);
105
+ request.setAxis(this._axis.axisNumber);
106
+ request.setKey(key);
107
+ request.setValue(value);
108
+ await gateway.callAsync('device/set_storage_bool', request);
109
+ }
110
+ /**
111
+ * Gets the value at the provided key interpreted as a boolean.
112
+ * @param key Key to get the value at.
113
+ * @return Stored value.
114
+ */
115
+ async getBool(key) {
116
+ const request = new gateway.DeviceGetStorageBoolRequest();
117
+ request.setInterfaceId(this._axis.device.connection.interfaceId);
118
+ request.setDevice(this._axis.device.deviceAddress);
119
+ request.setAxis(this._axis.axisNumber);
120
+ request.setKey(key);
121
+ const response = await gateway.callAsync('device/get_storage_bool', request, gateway.BoolResponse);
122
+ return response.getValue();
123
+ }
124
+ }
125
+ exports.AxisStorage = AxisStorage;
126
+ /**
127
+ * Class providing access to device storage.
128
+ */
129
+ class DeviceStorage {
130
+ constructor(device) {
131
+ this._device = device;
132
+ }
133
+ /**
134
+ * Sets the device value stored at the provided key.
135
+ * @param key Key to set the value at.
136
+ * @param value Value to set.
137
+ * @param encode Whether the stored value should be base64 encoded before being stored.
138
+ * This makes the string unreadable to humans using the ASCII protocol,
139
+ * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.
140
+ */
141
+ async setString(key, value, encode = false) {
142
+ const request = new gateway.DeviceSetStorageRequest();
143
+ request.setInterfaceId(this._device.connection.interfaceId);
144
+ request.setDevice(this._device.deviceAddress);
145
+ request.setKey(key);
146
+ request.setValue(value);
147
+ request.setEncode(encode);
148
+ await gateway.callAsync('device/set_storage', request);
149
+ }
150
+ /**
151
+ * Gets the device value stored with the provided key.
152
+ * @param key Key to read the value of.
153
+ * @param decode Whether the stored value should be decoded.
154
+ * Only use this when reading values set by storage.set with "encode" true.
155
+ * @return Stored value.
156
+ */
157
+ async getString(key, decode = false) {
158
+ const request = new gateway.DeviceGetStorageRequest();
159
+ request.setInterfaceId(this._device.connection.interfaceId);
160
+ request.setDevice(this._device.deviceAddress);
161
+ request.setKey(key);
162
+ request.setDecode(decode);
163
+ const response = await gateway.callAsync('device/get_storage', request, gateway.StringResponse);
164
+ return response.getValue();
165
+ }
166
+ /**
167
+ * Sets the value at the provided key to the provided number.
168
+ * @param key Key to set the value at.
169
+ * @param value Value to set.
170
+ */
171
+ async setNumber(key, value) {
172
+ const request = new gateway.DeviceSetStorageNumberRequest();
173
+ request.setInterfaceId(this._device.connection.interfaceId);
174
+ request.setDevice(this._device.deviceAddress);
175
+ request.setKey(key);
176
+ request.setValue(value);
177
+ await gateway.callAsync('device/set_storage_number', request);
178
+ }
179
+ /**
180
+ * Gets the value at the provided key interpreted as a number.
181
+ * @param key Key to get the value at.
182
+ * @return Stored value.
183
+ */
184
+ async getNumber(key) {
185
+ const request = new gateway.DeviceGetStorageNumberRequest();
186
+ request.setInterfaceId(this._device.connection.interfaceId);
187
+ request.setDevice(this._device.deviceAddress);
188
+ request.setKey(key);
189
+ const response = await gateway.callAsync('device/get_storage_number', request, gateway.DoubleResponse);
190
+ return response.getValue();
191
+ }
192
+ /**
193
+ * Sets the value at the provided key to the provided boolean.
194
+ * @param key Key to set the value at.
195
+ * @param value Value to set.
196
+ */
197
+ async setBool(key, value) {
198
+ const request = new gateway.DeviceSetStorageBoolRequest();
199
+ request.setInterfaceId(this._device.connection.interfaceId);
200
+ request.setDevice(this._device.deviceAddress);
201
+ request.setKey(key);
202
+ request.setValue(value);
203
+ await gateway.callAsync('device/set_storage_bool', request);
204
+ }
205
+ /**
206
+ * Gets the value at the provided key interpreted as a boolean.
207
+ * @param key Key to get the value at.
208
+ * @return Stored value.
209
+ */
210
+ async getBool(key) {
211
+ const request = new gateway.DeviceGetStorageBoolRequest();
212
+ request.setInterfaceId(this._device.connection.interfaceId);
213
+ request.setDevice(this._device.deviceAddress);
214
+ request.setKey(key);
215
+ const response = await gateway.callAsync('device/get_storage_bool', request, gateway.BoolResponse);
216
+ return response.getValue();
217
+ }
218
+ }
219
+ exports.DeviceStorage = DeviceStorage;
220
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/ascii/storage.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAItD,oDAAsC;AAEtC;;GA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,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,OAAO,CAAC,SAAS,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CAClB,GAAW;QAEX,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC;QAC1D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9C,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,yBAAyB,EACzB,OAAO,EACP,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AAjID,sCAiIC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Axis } from './axis';\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Class providing access to axis storage.\n */\nexport class AxisStorage {\n private _axis: Axis;\n\n constructor(axis: Axis) {\n this._axis = axis;\n }\n\n /**\n * Sets the axis value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param encode Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n encode: boolean = false\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the axis value stored with the provided key.\n * @param key Key to read the value of.\n * @param decode Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @return Stored value.\n */\n public async getString(\n key: string,\n decode: boolean = false\n ): Promise<string> {\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceGetStorageNumberRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceGetStorageBoolRequest();\n request.setInterfaceId(this._axis.device.connection.interfaceId);\n request.setDevice(this._axis.device.deviceAddress);\n request.setAxis(this._axis.axisNumber);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n\n/**\n * Class providing access to device storage.\n */\nexport class DeviceStorage {\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Sets the device value stored at the provided key.\n * @param key Key to set the value at.\n * @param value Value to set.\n * @param encode Whether the stored value should be base64 encoded before being stored.\n * This makes the string unreadable to humans using the ASCII protocol,\n * however, values stored this way can be of any length and use non-ASCII and protocol reserved characters.\n */\n public async setString(\n key: string,\n value: string,\n encode: boolean = false\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n request.setEncode(encode);\n\n await gateway.callAsync('device/set_storage', request);\n }\n\n /**\n * Gets the device value stored with the provided key.\n * @param key Key to read the value of.\n * @param decode Whether the stored value should be decoded.\n * Only use this when reading values set by storage.set with \"encode\" true.\n * @return Stored value.\n */\n public async getString(\n key: string,\n decode: boolean = false\n ): Promise<string> {\n const request = new gateway.DeviceGetStorageRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setDecode(decode);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_storage',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided number.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setNumber(\n key: string,\n value: number\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageNumberRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_number', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a number.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getNumber(\n key: string\n ): Promise<number> {\n const request = new gateway.DeviceGetStorageNumberRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_storage_number',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Sets the value at the provided key to the provided boolean.\n * @param key Key to set the value at.\n * @param value Value to set.\n */\n public async setBool(\n key: string,\n value: boolean\n ): Promise<void> {\n const request = new gateway.DeviceSetStorageBoolRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n request.setValue(value);\n\n await gateway.callAsync('device/set_storage_bool', request);\n }\n\n /**\n * Gets the value at the provided key interpreted as a boolean.\n * @param key Key to get the value at.\n * @return Stored value.\n */\n public async getBool(\n key: string\n ): Promise<boolean> {\n const request = new gateway.DeviceGetStorageBoolRequest();\n request.setInterfaceId(this._device.connection.interfaceId);\n request.setDevice(this._device.deviceAddress);\n request.setKey(key);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'device/get_storage_bool',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Device } from './device';
2
- import { Time, Native, Acceleration, AngularVelocity, Velocity } from '../units';
2
+ import { Time, Native, Acceleration, AngularAcceleration, AngularVelocity, Velocity } from '../units';
3
3
  import { RotationDirection } from '../rotation_direction';
4
4
  import { Measurement } from '../measurement';
5
5
  import { StreamBuffer } from './stream_buffer';
@@ -270,28 +270,28 @@ export declare class Stream {
270
270
  * @param unit Units of acceleration.
271
271
  * @return The maximum tangential acceleration of the live stream.
272
272
  */
273
- getMaxTangentialAcceleration(unit?: Acceleration | Native): Promise<number>;
273
+ getMaxTangentialAcceleration(unit?: Acceleration | AngularAcceleration | Native): Promise<number>;
274
274
  /**
275
275
  * Sets the maximum tangential acceleration of the live stream.
276
276
  * Converts the units using the first axis of the stream.
277
277
  * @param maxTangentialAcceleration Maximum tangential acceleration at which any stream action is executed.
278
278
  * @param unit Units of acceleration.
279
279
  */
280
- setMaxTangentialAcceleration(maxTangentialAcceleration: number, unit?: Acceleration | Native): Promise<void>;
280
+ setMaxTangentialAcceleration(maxTangentialAcceleration: number, unit?: Acceleration | AngularAcceleration | Native): Promise<void>;
281
281
  /**
282
282
  * Gets the maximum centripetal acceleration of the live stream.
283
283
  * Converts the units using the first axis of the stream.
284
284
  * @param unit Units of acceleration.
285
285
  * @return The maximum centripetal acceleration of the live stream.
286
286
  */
287
- getMaxCentripetalAcceleration(unit?: Acceleration | Native): Promise<number>;
287
+ getMaxCentripetalAcceleration(unit?: Acceleration | AngularAcceleration | Native): Promise<number>;
288
288
  /**
289
289
  * Sets the maximum centripetal acceleration of the live stream.
290
290
  * Converts the units using the first axis of the stream.
291
291
  * @param maxCentripetalAcceleration Maximum centripetal acceleration at which any stream action is executed.
292
292
  * @param unit Units of acceleration.
293
293
  */
294
- setMaxCentripetalAcceleration(maxCentripetalAcceleration: number, unit?: Acceleration | Native): Promise<void>;
294
+ setMaxCentripetalAcceleration(maxCentripetalAcceleration: number, unit?: Acceleration | AngularAcceleration | Native): Promise<void>;
295
295
  /**
296
296
  * Returns a string which represents the stream.
297
297
  * @return String which represents the stream.
@@ -510,7 +510,7 @@ class Stream {
510
510
  * You can only cork an idle live stream.
511
511
  */
512
512
  async cork() {
513
- const request = new gateway.StreamCorkRequest();
513
+ const request = new gateway.StreamEmptyRequest();
514
514
  request.setInterfaceId(this.device.connection.interfaceId);
515
515
  request.setDevice(this.device.deviceAddress);
516
516
  request.setStreamId(this.streamId);
@@ -521,7 +521,7 @@ class Stream {
521
521
  * You can only uncork an idle live stream that is corked.
522
522
  */
523
523
  async uncork() {
524
- const request = new gateway.StreamUncorkRequest();
524
+ const request = new gateway.StreamEmptyRequest();
525
525
  request.setInterfaceId(this.device.connection.interfaceId);
526
526
  request.setDevice(this.device.deviceAddress);
527
527
  request.setStreamId(this.streamId);
@@ -532,12 +532,12 @@ class Stream {
532
532
  * @return True if the stream is executing a queued action.
533
533
  */
534
534
  async isBusy() {
535
- const request = new gateway.StreamIsBusyRequest();
535
+ const request = new gateway.StreamEmptyRequest();
536
536
  request.setInterfaceId(this.device.connection.interfaceId);
537
537
  request.setDevice(this.device.deviceAddress);
538
538
  request.setStreamId(this.streamId);
539
- const response = await gateway.callAsync('device/stream_is_busy', request, gateway.StreamIsBusyResponse);
540
- return response.getIsBusy();
539
+ const response = await gateway.callAsync('device/stream_is_busy', request, gateway.BoolResponse);
540
+ return response.getValue();
541
541
  }
542
542
  /**
543
543
  * Gets the maximum speed of the live stream.
@@ -551,8 +551,8 @@ class Stream {
551
551
  request.setDevice(this.device.deviceAddress);
552
552
  request.setStreamId(this.streamId);
553
553
  request.setUnit(unit);
554
- const response = await gateway.callAsync('device/stream_get_max_speed', request, gateway.StreamGetMaxSpeedResponse);
555
- return response.getMaxSpeed();
554
+ const response = await gateway.callAsync('device/stream_get_max_speed', request, gateway.DoubleResponse);
555
+ return response.getValue();
556
556
  }
557
557
  /**
558
558
  * Sets the maximum speed of the live stream.
@@ -581,8 +581,8 @@ class Stream {
581
581
  request.setDevice(this.device.deviceAddress);
582
582
  request.setStreamId(this.streamId);
583
583
  request.setUnit(unit);
584
- const response = await gateway.callAsync('device/stream_get_max_tangential_acceleration', request, gateway.StreamGetMaxTangentialAccelerationResponse);
585
- return response.getMaxTangentialAcceleration();
584
+ const response = await gateway.callAsync('device/stream_get_max_tangential_acceleration', request, gateway.DoubleResponse);
585
+ return response.getValue();
586
586
  }
587
587
  /**
588
588
  * Sets the maximum tangential acceleration of the live stream.
@@ -611,8 +611,8 @@ class Stream {
611
611
  request.setDevice(this.device.deviceAddress);
612
612
  request.setStreamId(this.streamId);
613
613
  request.setUnit(unit);
614
- const response = await gateway.callAsync('device/stream_get_max_centripetal_acceleration', request, gateway.StreamGetMaxCentripetalAccelerationResponse);
615
- return response.getMaxCentripetalAcceleration();
614
+ const response = await gateway.callAsync('device/stream_get_max_centripetal_acceleration', request, gateway.DoubleResponse);
615
+ return response.getValue();
616
616
  }
617
617
  /**
618
618
  * Sets the maximum centripetal acceleration of the live stream.
@@ -634,12 +634,12 @@ class Stream {
634
634
  * @return String which represents the stream.
635
635
  */
636
636
  toString() {
637
- const request = new gateway.StreamToStringRequest();
637
+ const request = new gateway.StreamEmptyRequest();
638
638
  request.setInterfaceId(this.device.connection.interfaceId);
639
639
  request.setDevice(this.device.deviceAddress);
640
640
  request.setStreamId(this.streamId);
641
- const response = gateway.callSync('device/stream_to_string', request, gateway.StreamToStringResponse);
642
- return response.getToStr();
641
+ const response = gateway.callSync('device/stream_to_string', request, gateway.StringResponse);
642
+ return response.getValue();
643
643
  }
644
644
  /**
645
645
  * Disable the stream.
@@ -648,7 +648,7 @@ class Stream {
648
648
  * The stream will process the rest of the commands in the queue until it is empty.
649
649
  */
650
650
  async disable() {
651
- const request = new gateway.StreamDisableRequest();
651
+ const request = new gateway.StreamEmptyRequest();
652
652
  request.setInterfaceId(this.device.connection.interfaceId);
653
653
  request.setDevice(this.device.deviceAddress);
654
654
  request.setStreamId(this.streamId);
@@ -686,7 +686,7 @@ class Stream {
686
686
  * @return An array of axis numbers of the axes the stream is set up to control.
687
687
  */
688
688
  _retrieveAxes() {
689
- const request = new gateway.StreamGetAxesRequest();
689
+ const request = new gateway.StreamEmptyRequest();
690
690
  request.setInterfaceId(this.device.connection.interfaceId);
691
691
  request.setDevice(this.device.deviceAddress);
692
692
  request.setStreamId(this.streamId);
@@ -698,12 +698,12 @@ class Stream {
698
698
  * @return Mode of the stream.
699
699
  */
700
700
  _retrieveMode() {
701
- const request = new gateway.StreamGetModeRequest();
701
+ const request = new gateway.StreamEmptyRequest();
702
702
  request.setInterfaceId(this.device.connection.interfaceId);
703
703
  request.setDevice(this.device.deviceAddress);
704
704
  request.setStreamId(this.streamId);
705
- const response = gateway.callSync('device/stream_get_mode', request, gateway.StreamGetModeResponse);
706
- return response.getMode();
705
+ const response = gateway.callSync('device/stream_get_mode', request, gateway.IntResponse);
706
+ return response.getValue();
707
707
  }
708
708
  }
709
709
  exports.Stream = Stream;