motion-master-client 0.0.11 → 0.0.13

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 (121) hide show
  1. package/.babelrc +3 -0
  2. package/.eslintrc.json +18 -0
  3. package/jest.config.ts +15 -0
  4. package/motion-master.proto +1822 -0
  5. package/package.json +2 -17
  6. package/project.json +41 -0
  7. package/src/lib/cia402.ts +112 -0
  8. package/src/lib/device-log-line.ts +5 -0
  9. package/src/lib/device-parameter.spec.ts +85 -0
  10. package/src/lib/device-parameter.ts +79 -0
  11. package/src/lib/device.ts +10 -0
  12. package/src/lib/examples/get-firmware-version-for-all-devices.ts +18 -0
  13. package/src/lib/hardware-description.spec.ts +253 -0
  14. package/src/lib/hardware-description.ts +84 -0
  15. package/src/lib/logger.ts +5 -0
  16. package/src/lib/monitoring-config.ts +6 -0
  17. package/src/lib/{monitoring-entry.d.ts → monitoring-entry.ts} +5 -4
  18. package/src/lib/motion-master-client.ts +126 -0
  19. package/src/lib/motion-master-pub-sub-client.ts +94 -0
  20. package/src/lib/motion-master-pub-sub-socket.ts +33 -0
  21. package/src/lib/motion-master-pub-sub-web-socket.ts +71 -0
  22. package/src/lib/motion-master-pub-sub-worker-socket.ts +46 -0
  23. package/src/lib/motion-master-req-res-client.spec.ts +740 -0
  24. package/src/lib/motion-master-req-res-client.ts +1974 -0
  25. package/src/lib/motion-master-req-res-socket.ts +55 -0
  26. package/src/lib/motion-master-req-res-web-socket.ts +131 -0
  27. package/src/lib/motion-master-req-res-worker-socket.ts +75 -0
  28. package/src/lib/operators.ts +93 -0
  29. package/src/lib/options.ts +38 -0
  30. package/src/lib/parameter.spec.ts +81 -0
  31. package/src/lib/parameter.ts +123 -0
  32. package/src/lib/product-id-range.ts +8 -0
  33. package/src/lib/request-status-resolver.ts +403 -0
  34. package/src/lib/system-log-line.ts +8 -0
  35. package/src/lib/types.ts +123 -0
  36. package/src/lib/urls.ts +6 -0
  37. package/src/lib/util.ts +267 -0
  38. package/tsconfig.json +23 -0
  39. package/tsconfig.lib.json +10 -0
  40. package/tsconfig.spec.json +20 -0
  41. package/typedoc.json +10 -0
  42. package/src/index.js +0 -27
  43. package/src/index.js.map +0 -1
  44. package/src/lib/cia402.d.ts +0 -30
  45. package/src/lib/cia402.js +0 -112
  46. package/src/lib/cia402.js.map +0 -1
  47. package/src/lib/device-log-line.d.ts +0 -5
  48. package/src/lib/device-log-line.js +0 -3
  49. package/src/lib/device-log-line.js.map +0 -1
  50. package/src/lib/device-parameter.d.ts +0 -56
  51. package/src/lib/device-parameter.js +0 -39
  52. package/src/lib/device-parameter.js.map +0 -1
  53. package/src/lib/device.d.ts +0 -9
  54. package/src/lib/device.js +0 -3
  55. package/src/lib/device.js.map +0 -1
  56. package/src/lib/examples/get-firmware-version-for-all-devices.d.ts +0 -1
  57. package/src/lib/examples/get-firmware-version-for-all-devices.js +0 -15
  58. package/src/lib/examples/get-firmware-version-for-all-devices.js.map +0 -1
  59. package/src/lib/hardware-description.d.ts +0 -37
  60. package/src/lib/hardware-description.js +0 -48
  61. package/src/lib/hardware-description.js.map +0 -1
  62. package/src/lib/logger.d.ts +0 -1
  63. package/src/lib/logger.js +0 -8
  64. package/src/lib/logger.js.map +0 -1
  65. package/src/lib/monitoring-config.d.ts +0 -6
  66. package/src/lib/monitoring-config.js +0 -3
  67. package/src/lib/monitoring-config.js.map +0 -1
  68. package/src/lib/monitoring-entry.js +0 -3
  69. package/src/lib/monitoring-entry.js.map +0 -1
  70. package/src/lib/motion-master-client.d.ts +0 -18
  71. package/src/lib/motion-master-client.js +0 -73
  72. package/src/lib/motion-master-client.js.map +0 -1
  73. package/src/lib/motion-master-pub-sub-client.d.ts +0 -16
  74. package/src/lib/motion-master-pub-sub-client.js +0 -68
  75. package/src/lib/motion-master-pub-sub-client.js.map +0 -1
  76. package/src/lib/motion-master-pub-sub-socket.d.ts +0 -28
  77. package/src/lib/motion-master-pub-sub-socket.js +0 -3
  78. package/src/lib/motion-master-pub-sub-socket.js.map +0 -1
  79. package/src/lib/motion-master-pub-sub-web-socket.d.ts +0 -13
  80. package/src/lib/motion-master-pub-sub-web-socket.js +0 -61
  81. package/src/lib/motion-master-pub-sub-web-socket.js.map +0 -1
  82. package/src/lib/motion-master-pub-sub-worker-socket.d.ts +0 -13
  83. package/src/lib/motion-master-pub-sub-worker-socket.js +0 -37
  84. package/src/lib/motion-master-pub-sub-worker-socket.js.map +0 -1
  85. package/src/lib/motion-master-req-res-client.d.ts +0 -956
  86. package/src/lib/motion-master-req-res-client.js +0 -1525
  87. package/src/lib/motion-master-req-res-client.js.map +0 -1
  88. package/src/lib/motion-master-req-res-socket.d.ts +0 -38
  89. package/src/lib/motion-master-req-res-socket.js +0 -3
  90. package/src/lib/motion-master-req-res-socket.js.map +0 -1
  91. package/src/lib/motion-master-req-res-web-socket.d.ts +0 -20
  92. package/src/lib/motion-master-req-res-web-socket.js +0 -100
  93. package/src/lib/motion-master-req-res-web-socket.js.map +0 -1
  94. package/src/lib/motion-master-req-res-worker-socket.d.ts +0 -15
  95. package/src/lib/motion-master-req-res-worker-socket.js +0 -53
  96. package/src/lib/motion-master-req-res-worker-socket.js.map +0 -1
  97. package/src/lib/operators.d.ts +0 -21
  98. package/src/lib/operators.js +0 -71
  99. package/src/lib/operators.js.map +0 -1
  100. package/src/lib/options.d.ts +0 -34
  101. package/src/lib/options.js +0 -38
  102. package/src/lib/options.js.map +0 -1
  103. package/src/lib/parameter.d.ts +0 -65
  104. package/src/lib/parameter.js +0 -70
  105. package/src/lib/parameter.js.map +0 -1
  106. package/src/lib/request-status-resolver.d.ts +0 -4
  107. package/src/lib/request-status-resolver.js +0 -345
  108. package/src/lib/request-status-resolver.js.map +0 -1
  109. package/src/lib/system-log-line.d.ts +0 -8
  110. package/src/lib/system-log-line.js +0 -3
  111. package/src/lib/system-log-line.js.map +0 -1
  112. package/src/lib/types.d.ts +0 -51
  113. package/src/lib/types.js +0 -23
  114. package/src/lib/types.js.map +0 -1
  115. package/src/lib/urls.d.ts +0 -3
  116. package/src/lib/urls.js +0 -10
  117. package/src/lib/urls.js.map +0 -1
  118. package/src/lib/util.d.ts +0 -30
  119. package/src/lib/util.js +0 -279
  120. package/src/lib/util.js.map +0 -1
  121. /package/src/{index.d.ts → index.ts} +0 -0
@@ -0,0 +1,403 @@
1
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
+ // @ts-nocheck
3
+
4
+ import { MotionMasterMessage, RequestStatus, StatusKey } from "./types";
5
+
6
+ export const requestStatusResolver: { [key in StatusKey]: <T>(status: T) => RequestStatus } = {
7
+ systemPong: () => 'succeeded',
8
+ systemVersion: (status: MotionMasterMessage.Status.ISystemVersion) => {
9
+ return status.version ? 'succeeded' : 'failed';
10
+ },
11
+ systemEvent: (status: MotionMasterMessage.Status.ISystemEvent) => {
12
+ if (status.error) {
13
+ return 'failed';
14
+ }
15
+
16
+ return 'succeeded';
17
+ },
18
+ deviceInfo: (status: MotionMasterMessage.Status.IDeviceInfo) => {
19
+ return status.devices ? 'succeeded' : 'failed';
20
+ },
21
+ deviceParameterInfo: (status: MotionMasterMessage.Status.IDeviceParameterInfo) => {
22
+ return status.parameters ? 'succeeded' : 'failed';
23
+ },
24
+ deviceParameterValues: (status: MotionMasterMessage.Status.IDeviceParameterValues) => {
25
+ if (status.progress) {
26
+ if (status.progress.percentage === 100) {
27
+ return 'succeeded';
28
+ } else {
29
+ return 'running';
30
+ }
31
+ }
32
+
33
+ if (status.parameterValues) {
34
+ const allSucceeded = status.parameterValues.every((value) => value.success);
35
+ if (allSucceeded) {
36
+ return 'succeeded';
37
+ }
38
+ }
39
+
40
+ return 'failed';
41
+ },
42
+ multiDeviceParameterValues: (status: MotionMasterMessage.Status.IMultiDeviceParameterValues) => {
43
+ if (status.collection) {
44
+ const items = status.collection.flat();
45
+ const allSucceeded = items.every((item) => item.parameterValues?.every(value => value.success));
46
+ if (allSucceeded) {
47
+ return 'succeeded';
48
+ }
49
+
50
+ if (items.every(item => item.progress === 100)) {
51
+ return 'succeeded';
52
+ } else {
53
+ return 'running';
54
+ };
55
+ }
56
+
57
+ return 'failed';
58
+ },
59
+ deviceFileList: (status: MotionMasterMessage.Status.IDeviceFileList) => {
60
+ if (status.error) {
61
+ return 'failed';
62
+ }
63
+
64
+ return 'succeeded';
65
+ },
66
+ deviceFile: (status: MotionMasterMessage.Status.IDeviceFile) => {
67
+ if (status.error) {
68
+ return 'failed';
69
+ }
70
+
71
+ return 'succeeded';
72
+ },
73
+ deviceEvent: (status: MotionMasterMessage.Status.IDeviceEvent) => {
74
+ if (status.error) {
75
+ return 'failed';
76
+ }
77
+
78
+ return 'succeeded';
79
+ },
80
+ deviceFirmwareInstallation: (status: MotionMasterMessage.Status.IDeviceFirmwareInstallation) => {
81
+ if (status.error) {
82
+ return 'failed';
83
+ }
84
+
85
+ if (status.success) {
86
+ if (status.success.code === MotionMasterMessage.Status.DeviceFirmwareInstallation.Success.Code.DONE) {
87
+ return 'succeeded';
88
+ }
89
+
90
+ if (status.success.code === MotionMasterMessage.Status.DeviceFirmwareInstallation.Success.Code.UNSPECIFIED) {
91
+ return 'succeeded';
92
+ }
93
+ }
94
+
95
+ return 'running';
96
+ },
97
+ deviceLog: (status: MotionMasterMessage.Status.IDeviceLog) => {
98
+ if (status.error) {
99
+ return 'failed';
100
+ }
101
+
102
+ return 'succeeded';
103
+ },
104
+ deviceFaultReset: (status: MotionMasterMessage.Status.IDeviceFaultReset) => {
105
+ if (status.error) {
106
+ return 'failed';
107
+ }
108
+
109
+ return 'succeeded';
110
+ },
111
+ coggingTorqueRecording: (status: MotionMasterMessage.Status.ICoggingTorqueRecording) => {
112
+ if (status.error) {
113
+ return 'failed';
114
+ }
115
+
116
+ if (status.success) {
117
+ if (status.success.code === MotionMasterMessage.Status.CoggingTorqueRecording.Success.Code.DONE) {
118
+ return 'succeeded';
119
+ }
120
+
121
+ if (status.success.code === MotionMasterMessage.Status.CoggingTorqueRecording.Success.Code.UNSPECIFIED) {
122
+ return 'succeeded';
123
+ }
124
+ }
125
+
126
+ return 'running';
127
+ },
128
+ coggingTorqueData: (status: MotionMasterMessage.Status.ICoggingTorqueData) => {
129
+ if (status.error) {
130
+ return 'failed';
131
+ }
132
+
133
+ return 'succeeded';
134
+ },
135
+ offsetDetection: (status: MotionMasterMessage.Status.IOffsetDetection) => {
136
+ if (status.error) {
137
+ return 'failed';
138
+ }
139
+
140
+ if (status.success) {
141
+ if (status.success.code === MotionMasterMessage.Status.OffsetDetection.Success.Code.DONE) {
142
+ return 'succeeded';
143
+ }
144
+
145
+ if (status.success.code === MotionMasterMessage.Status.OffsetDetection.Success.Code.UNSPECIFIED) {
146
+ return 'succeeded';
147
+ }
148
+ }
149
+
150
+ return 'running';
151
+ },
152
+ plantIdentification: (status: MotionMasterMessage.Status.IPlantIdentification) => {
153
+ if (status.error) {
154
+ return 'failed';
155
+ }
156
+
157
+ if (status.success) {
158
+ if (status.success.code === MotionMasterMessage.Status.PlantIdentification.Success.Code.DONE) {
159
+ return 'succeeded';
160
+ }
161
+
162
+ if (status.success.code === MotionMasterMessage.Status.PlantIdentification.Success.Code.UNSPECIFIED) {
163
+ return 'succeeded';
164
+ }
165
+ }
166
+
167
+ return 'running';
168
+ },
169
+ autoTuning: (status: MotionMasterMessage.Status.IAutoTuning) => {
170
+ if (status.error) {
171
+ return 'failed';
172
+ }
173
+
174
+ if (status.success) {
175
+ if (status.success.code === MotionMasterMessage.Status.AutoTuning.Success.Code.POSITION_DONE ||
176
+ status.success.code === MotionMasterMessage.Status.AutoTuning.Success.Code.VELOCITY_DONE) {
177
+ return 'succeeded';
178
+ }
179
+
180
+ if (status.success === MotionMasterMessage.Status.AutoTuning.Success.Code.UNSPECIFIED) {
181
+ return 'succeeded';
182
+ }
183
+ }
184
+
185
+ return 'running';
186
+ },
187
+ motionController: (status: MotionMasterMessage.Status.IMotionController) => {
188
+ if (status.error) {
189
+ return 'failed';
190
+ }
191
+
192
+ return 'succeeded';
193
+ },
194
+ signalGenerator: (status: MotionMasterMessage.Status.ISignalGenerator) => {
195
+ if (status.error) {
196
+ return 'failed';
197
+ }
198
+
199
+ if (status.success) {
200
+ if (status.success.code === MotionMasterMessage.Status.SignalGenerator.Success.Code.DONE) {
201
+ return 'succeeded';
202
+ }
203
+
204
+ if (status.success.code === MotionMasterMessage.Status.SignalGenerator.Success.Code.PARAMETERS_SET) {
205
+ return 'succeeded';
206
+ }
207
+
208
+ if (status.success.code === MotionMasterMessage.Status.SignalGenerator.Success.Code.UNSPECIFIED) {
209
+ return 'succeeded';
210
+ }
211
+ }
212
+
213
+ return 'running';
214
+ },
215
+ monitoringParameterValues: (status: MotionMasterMessage.Status.IMonitoringParameterValues) => {
216
+ if (status.error) {
217
+ return 'failed';
218
+ }
219
+
220
+ return 'succeeded';
221
+ },
222
+ deviceStop: (status: MotionMasterMessage.Status.IDeviceStop) => {
223
+ if (status.error) {
224
+ return 'failed';
225
+ }
226
+
227
+ return 'succeeded';
228
+ },
229
+ ethercatNetworkState: (status: MotionMasterMessage.Status.IEthercatNetworkState) => {
230
+ if (status.error) {
231
+ return 'failed';
232
+ }
233
+
234
+ return 'succeeded';
235
+ },
236
+ narrowAngleCalibration: (status: MotionMasterMessage.Status.INarrowAngleCalibration) => {
237
+ if (status.error) {
238
+ return 'failed';
239
+ }
240
+
241
+ if (status.success) {
242
+ if (status.success.code === MotionMasterMessage.Status.NarrowAngleCalibration.Success.Code.DONE) {
243
+ return 'succeeded';
244
+ }
245
+
246
+ if (status.success.code === MotionMasterMessage.Status.NarrowAngleCalibration.Success.Code.UNSPECIFIED) {
247
+ return 'succeeded';
248
+ }
249
+ }
250
+
251
+ return 'running';
252
+ },
253
+ systemIdentification: (status: MotionMasterMessage.Status.ISystemIdentification) => {
254
+ if (status.error) {
255
+ return 'failed';
256
+ }
257
+
258
+ if (status.success) {
259
+ if (status.success.code === MotionMasterMessage.Status.SystemIdentification.Success.Code.DONE) {
260
+ return 'succeeded';
261
+ }
262
+
263
+ if (status.success.code === MotionMasterMessage.Status.SystemIdentification.Success.Code.UNSPECIFIED) {
264
+ return 'succeeded';
265
+ }
266
+ }
267
+
268
+ return 'running';
269
+ },
270
+ circuloEncoderMagnetDistance: (status: MotionMasterMessage.Status.ICirculoEncoderMagnetDistance) => {
271
+ if (typeof status.distance === 'number' || typeof status.position === 'number') {
272
+ return 'succeeded';
273
+ }
274
+
275
+ return 'failed';
276
+ },
277
+ circuloEncoderNarrowAngleCalibrationProcedure: (status: MotionMasterMessage.Status.ICirculoEncoderNarrowAngleCalibrationProcedure) => {
278
+ if (status.error) {
279
+ return 'failed';
280
+ }
281
+
282
+ if (status.success) {
283
+ if (status.success.code === MotionMasterMessage.Status.CirculoEncoderNarrowAngleCalibrationProcedure.Success.Code.STOPPED) {
284
+ return 'failed';
285
+ }
286
+
287
+ if (status.success.code === MotionMasterMessage.Status.CirculoEncoderNarrowAngleCalibrationProcedure.Success.Code.DONE) {
288
+ return 'succeeded';
289
+ }
290
+
291
+ if (status.success === MotionMasterMessage.Status.CirculoEncoderNarrowAngleCalibrationProcedure.Success.Code.UNSPECIFIED) {
292
+ return 'succeeded';
293
+ }
294
+ }
295
+
296
+ return 'running';
297
+ },
298
+ deviceCia402State: (status: MotionMasterMessage.Status.IDeviceCiA402State) => {
299
+ if (status.error) {
300
+ return 'failed';
301
+ }
302
+
303
+ return 'succeeded';
304
+ },
305
+ systemLog: (status: MotionMasterMessage.Status.ISystemLog) => {
306
+ if (status.content) {
307
+ return 'succeeded';
308
+ }
309
+
310
+ return 'failed';
311
+ },
312
+ deviceSiiRestore: (status: MotionMasterMessage.Status.IDeviceSiiRestore) => {
313
+ if (status.error) {
314
+ return 'failed';
315
+ }
316
+
317
+ if (status.success) {
318
+ if (status.success.code === MotionMasterMessage.Status.DeviceSiiRestore.Success.Code.DONE) {
319
+ return 'succeeded';
320
+ }
321
+
322
+ if (status.success.code === MotionMasterMessage.Status.DeviceSiiRestore.Success.Code.UNSPECIFIED) {
323
+ return 'succeeded';
324
+ }
325
+ }
326
+
327
+ return 'running';
328
+ },
329
+ openLoopFieldControl: (status: MotionMasterMessage.Status.IOpenLoopFieldControl) => {
330
+ if (status.error) {
331
+ return 'failed';
332
+ }
333
+
334
+ if (status.success) {
335
+ if (status.success.code === MotionMasterMessage.Status.OpenLoopFieldControl.Success.Code.DONE) {
336
+ return 'succeeded';
337
+ }
338
+
339
+ if (status.success.code === MotionMasterMessage.Status.OpenLoopFieldControl.Success.Code.UNSPECIFIED) {
340
+ return 'succeeded';
341
+ }
342
+ }
343
+
344
+ return 'running';
345
+ },
346
+ fullAutoTuning: (status: MotionMasterMessage.Status.IFullAutoTuning) => {
347
+ if (status.error) {
348
+ return 'failed';
349
+ }
350
+
351
+ if (status.success) {
352
+ if (status.success.code === MotionMasterMessage.Status.FullAutoTuning.Success.Code.POSITION_STOPPED ||
353
+ status.success.code === MotionMasterMessage.Status.FullAutoTuning.Success.Code.VELOCITY_STOPPED) {
354
+ return 'failed';
355
+ }
356
+
357
+ if (status.success.code === MotionMasterMessage.Status.FullAutoTuning.Success.Code.POSITION_DONE ||
358
+ status.success.code === MotionMasterMessage.Status.FullAutoTuning.Success.Code.VELOCITY_DONE) {
359
+ return 'succeeded';
360
+ }
361
+
362
+ if (status.success === MotionMasterMessage.Status.FullAutoTuning.Success.Code.UNSPECIFIED) {
363
+ return 'succeeded';
364
+ }
365
+ }
366
+
367
+ return 'running';
368
+ },
369
+ circuloEncoderConfiguration: (status: MotionMasterMessage.Status.ICirculoEncoderConfiguration) => {
370
+ if (status.error) {
371
+ return 'failed';
372
+ }
373
+
374
+ if (status.success) {
375
+ if (status.success.code === MotionMasterMessage.Status.CirculoEncoderConfiguration.Success.Code.DONE) {
376
+ return 'succeeded'
377
+ }
378
+
379
+ if (status.success.code === MotionMasterMessage.Status.CirculoEncoderConfiguration.Success.Code.UNSPECIFIED) {
380
+ return 'succeeded'
381
+ }
382
+ }
383
+
384
+ return 'running';
385
+ },
386
+ osCommand: (status: MotionMasterMessage.Status.IOsCommand) => {
387
+ if (status.error) {
388
+ return 'failed';
389
+ }
390
+
391
+ if (status.success) {
392
+ if (status.success.code === MotionMasterMessage.Status.OsCommand.Success.Code.DONE) {
393
+ return 'succeeded';
394
+ }
395
+
396
+ if (status.success.code === MotionMasterMessage.Status.OsCommand.Success.Code.UNSPECIFIED) {
397
+ return 'succeeded';
398
+ }
399
+ }
400
+
401
+ return 'running';
402
+ },
403
+ };
@@ -0,0 +1,8 @@
1
+ export interface SystemLogLine {
2
+ date: Date;
3
+ uptime: string;
4
+ id: string;
5
+ file: string;
6
+ level: string;
7
+ message: string;
8
+ }
@@ -0,0 +1,123 @@
1
+ import { Long } from "protobufjs";
2
+ import { motionmaster } from "./motion-master.proto";
3
+
4
+ export import MotionMasterMessage = motionmaster.MotionMasterMessage;
5
+
6
+ export type StatusKey = keyof MotionMasterMessage.IStatus;
7
+
8
+ export type RequestStatus =
9
+ | 'succeeded'
10
+ | 'failed'
11
+ | 'running';
12
+
13
+ export class RequestError extends Error { }
14
+
15
+ export type ParameterAddress = [number, number]; // index, subindex
16
+ export type ParameterTypeValue = Omit<MotionMasterMessage.Request.SetDeviceParameterValues.IParameterValue, 'index' | 'subindex'>;
17
+ export type ParameterTypeValueKey = keyof ParameterTypeValue;
18
+ export type ParameterValueType = string | number | Long | Uint8Array;
19
+ export type ParameterAddressValue = [number, number, ParameterValueType, ParameterTypeValueKey?]; // index, subindex, value, typeValue
20
+
21
+ export type DeviceRefObj = {
22
+ deviceAddress?: (number | null); // already defined in the proto request messages
23
+ deviceSerialNumber?: (string | null);
24
+ devicePosition?: (number | null);
25
+ };
26
+
27
+ export type DeviceRef = number | string;
28
+
29
+ export type ParameterInfoAndValue = MotionMasterMessage.Status.DeviceParameterInfo.IParameter
30
+ & MotionMasterMessage.Status.DeviceParameterValues.IParameterValue;
31
+
32
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
+ export import EthercatNetworkState = MotionMasterMessage.Request.SetEthercatNetworkState.State;
34
+
35
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
36
+ export import ControllerType = MotionMasterMessage.Request.EnableMotionController.ControllerType;
37
+
38
+ export type GetDeviceParameterInfoRequest = MotionMasterMessage.Request.IGetDeviceParameterInfo & DeviceRefObj;
39
+ export type GetDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetDeviceParameterValues & DeviceRefObj;
40
+ export type GetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetMultiDeviceParameterValues;
41
+ export type SetDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetDeviceParameterValues & DeviceRefObj;
42
+ export type SetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetMultiDeviceParameterValues;
43
+ export type GetDeviceFileListRequest = MotionMasterMessage.Request.IGetDeviceFileList & DeviceRefObj;
44
+ export type GetDeviceFileRequest = MotionMasterMessage.Request.IGetDeviceFile & DeviceRefObj;
45
+ export type SetDeviceFileRequest = MotionMasterMessage.Request.ISetDeviceFile & DeviceRefObj;
46
+ export type DeleteDeviceFileRequest = MotionMasterMessage.Request.IDeleteDeviceFile & DeviceRefObj;
47
+ export type ResetDeviceFaultRequest = MotionMasterMessage.Request.IResetDeviceFault & DeviceRefObj;
48
+ export type StopDeviceRequest = MotionMasterMessage.Request.IStopDevice & DeviceRefObj;
49
+ export type StartDeviceFirmwareInstallationRequest = MotionMasterMessage.Request.IStartDeviceFirmwareInstallation & DeviceRefObj;
50
+ export type GetDeviceLogRequest = MotionMasterMessage.Request.IGetDeviceLog & DeviceRefObj;
51
+ export type StartCoggingTorqueRecordingRequest = MotionMasterMessage.Request.IStartCoggingTorqueRecording & DeviceRefObj;
52
+ export type GetCoggingTorqueDataRequest = MotionMasterMessage.Request.IGetCoggingTorqueData & DeviceRefObj;
53
+ export type StartOffsetDetectionRequest = MotionMasterMessage.Request.IStartOffsetDetection & DeviceRefObj;
54
+ export type StartPlantModelIdentificationRequest = MotionMasterMessage.Request.IStartPlantIdentification;
55
+ export type ComputeAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeAutoTuningGains & DeviceRefObj;
56
+ export type SetMotionControllerParametersRequest = MotionMasterMessage.Request.ISetMotionControllerParameters & DeviceRefObj;
57
+ export type EnableMotionControllerRequest = MotionMasterMessage.Request.IEnableMotionController & DeviceRefObj;
58
+ export type DisableMotionControllerRequest = MotionMasterMessage.Request.IDisableMotionController & DeviceRefObj;
59
+ export type SetSignalGeneratorParametersRequest = MotionMasterMessage.Request.ISetSignalGeneratorParameters & DeviceRefObj;
60
+ export type StartSignalGeneratorRequest = MotionMasterMessage.Request.IStartSignalGenerator & DeviceRefObj;
61
+ export type StopSignalGeneratorRequest = MotionMasterMessage.Request.IStopSignalGenerator & DeviceRefObj;
62
+ export type StartMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStartMonitoringDeviceParameterValues;
63
+ export type StopMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStopMonitoringDeviceParameterValues;
64
+ export type GetEthercatNetworkStateRequest = MotionMasterMessage.Request.IGetEthercatNetworkState & DeviceRefObj;
65
+ export type SetEthercatNetworkStateRequest = MotionMasterMessage.Request.ISetEthercatNetworkState & DeviceRefObj;
66
+ export type StartNarrowAngleCalibrationRequest = MotionMasterMessage.Request.IStartNarrowAngleCalibration & DeviceRefObj;
67
+ export type SetSystemClientTimeoutRequest = MotionMasterMessage.Request.ISetSystemClientTimeout;
68
+ export type StartSystemIdentificationRequest = MotionMasterMessage.Request.IStartSystemIdentification & DeviceRefObj;
69
+ export type GetCirculoEncoderMagnetDistanceRequest = MotionMasterMessage.Request.IGetCirculoEncoderMagnetDistance & DeviceRefObj;
70
+ export type StartCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStartCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
71
+ export type GetDeviceCiA402StateRequest = MotionMasterMessage.Request.IGetDeviceCiA402State & DeviceRefObj;
72
+ export type SetDeviceCiA402StateRequest = MotionMasterMessage.Request.ISetDeviceCiA402State & DeviceRefObj;
73
+ export type StartDeviceSiiRestoreRequest = MotionMasterMessage.Request.IStartDeviceSiiRestore;
74
+ export type StartOpenLoopFieldControlRequest = MotionMasterMessage.Request.IStartOpenLoopFieldControl & DeviceRefObj;
75
+ export type ComputeFullAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeFullAutoTuningGains & DeviceRefObj;
76
+ export type StartFullAutoTuningRequest = MotionMasterMessage.Request.IStartFullAutoTuning & DeviceRefObj;
77
+ export type StopFullAutoTuningRequest = MotionMasterMessage.Request.IStopFullAutoTuning & DeviceRefObj;
78
+ export type StartCirculoEncoderConfigurationRequest = MotionMasterMessage.Request.IStartCirculoEncoderConfiguration & DeviceRefObj;
79
+ export type StopCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStopCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
80
+ export type StartOsCommandRequest = MotionMasterMessage.Request.IStartOsCommand & DeviceRefObj;
81
+
82
+ export type SystemVersionStatus = MotionMasterMessage.Status.ISystemVersion & { request: RequestStatus, messageId?: string };
83
+ export type DeviceInfoStatus = MotionMasterMessage.Status.IDeviceInfo & { request: RequestStatus, messageId?: string };
84
+ export type DeviceParameterInfoStatus = MotionMasterMessage.Status.IDeviceParameterInfo & { request: RequestStatus, messageId?: string };
85
+ export type DeviceParameterValuesStatus = MotionMasterMessage.Status.IDeviceParameterValues & { request: RequestStatus, messageId?: string };
86
+ export type MultiDeviceParameterValuesStatus = MotionMasterMessage.Status.IMultiDeviceParameterValues & { request: RequestStatus, messageId?: string };
87
+ export type DeviceFileListStatus = MotionMasterMessage.Status.IDeviceFileList & { request: RequestStatus, messageId?: string };
88
+ export type DeviceFileStatus = MotionMasterMessage.Status.IDeviceFile & { request: RequestStatus, messageId?: string };
89
+ export type DeviceFaultResetStatus = MotionMasterMessage.Status.IDeviceFaultReset & { request: RequestStatus, messageId?: string };
90
+ export type DeviceStopStatus = MotionMasterMessage.Status.IDeviceStop & { request: RequestStatus, messageId?: string };
91
+ export type DeviceFirmwareInstallationStatus = MotionMasterMessage.Status.IDeviceFirmwareInstallation & { request: RequestStatus, messageId?: string };
92
+ export type DeviceLogStatus = MotionMasterMessage.Status.IDeviceLog & { request: RequestStatus, messageId?: string };
93
+ export type CoggingTorqueRecordingStatus = MotionMasterMessage.Status.ICoggingTorqueRecording & { request: RequestStatus, messageId?: string };
94
+ export type CoggingTorqueDataStatus = MotionMasterMessage.Status.ICoggingTorqueData & { request: RequestStatus, messageId?: string };
95
+ export type OffsetDetectionStatus = MotionMasterMessage.Status.IOffsetDetection & { request: RequestStatus, messageId?: string };
96
+ export type PlantIdentificationStatus = MotionMasterMessage.Status.IPlantIdentification & { request: RequestStatus, messageId?: string };
97
+ export type AutoTuningStatus = MotionMasterMessage.Status.IAutoTuning & { request: RequestStatus, messageId?: string };
98
+ export type MotionControllerStatus = MotionMasterMessage.Status.IMotionController & { request: RequestStatus, messageId?: string };
99
+ export type SignalGeneratorStatus = MotionMasterMessage.Status.ISignalGenerator & { request: RequestStatus, messageId?: string };
100
+ export type MonitoringParameterValuesStatus = MotionMasterMessage.Status.IMonitoringParameterValues & { request: RequestStatus, messageId?: string };
101
+ export type EthercatNetworkStateStatus = MotionMasterMessage.Status.IEthercatNetworkState & { request: RequestStatus, messageId?: string };
102
+ export type NarrowAngleCalibrationStatus = MotionMasterMessage.Status.INarrowAngleCalibration & { request: RequestStatus, messageId?: string };
103
+ export type SystemIdentificationStatus = MotionMasterMessage.Status.ISystemIdentification & { request: RequestStatus, messageId?: string };
104
+ export type CirculoEncoderMagnetDistanceStatus = MotionMasterMessage.Status.ICirculoEncoderMagnetDistance & { request: RequestStatus, messageId?: string };
105
+ export type CirculoEncoderNarrowAngleCalibrationProcedureStatus = MotionMasterMessage.Status.ICirculoEncoderNarrowAngleCalibrationProcedure & { request: RequestStatus, messageId?: string };
106
+ export type DeviceCiA402StateStatus = MotionMasterMessage.Status.IDeviceCiA402State & { request: RequestStatus, messageId?: string };
107
+ export type SystemLogStatus = MotionMasterMessage.Status.ISystemLog & { request: RequestStatus, messageId?: string };
108
+ export type DeviceSiiRestoreStatus = MotionMasterMessage.Status.IDeviceSiiRestore & { request: RequestStatus, messageId?: string };
109
+ export type OpenLoopFieldControlStatus = MotionMasterMessage.Status.IOpenLoopFieldControl & { request: RequestStatus, messageId?: string };
110
+ export type FullAutoTuningStatus = MotionMasterMessage.Status.IFullAutoTuning & { request: RequestStatus, messageId?: string };
111
+ export type CirculoEncoderConfigurationStatus = MotionMasterMessage.Status.ICirculoEncoderConfiguration & { request: RequestStatus, messageId?: string };
112
+ export type OsCommandStatus = MotionMasterMessage.Status.IOsCommand & { request: RequestStatus, messageId?: string };
113
+
114
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
115
+ export import ValueType = MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
116
+
117
+ export function isArrayOfDeviceSerialNumbers(ids: string[] | [DeviceRef, number, number][]): ids is string[] {
118
+ return ids.length > 0 && typeof ids[0] === 'string';
119
+ }
120
+
121
+ export function isObjectOfDeviceSerialNumberToValues(ids: { [deviceParameterId: string]: ParameterValueType } | [DeviceRef, number, number, ParameterValueType, ParameterTypeValueKey?][]): ids is { [deviceParameterId: string]: ParameterValueType } {
122
+ return !Array.isArray(ids);
123
+ }
@@ -0,0 +1,6 @@
1
+ export const firmwarePackageBaseUrl = 'https://synapticon.s3.amazonaws.com/somanet-software/releases/';
2
+ export const listFirmwarePackagesUrl = 'https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages';
3
+
4
+ export function getFirmwarePackageUrl(filename: string) {
5
+ return firmwarePackageBaseUrl + filename;
6
+ }