motion-master-client 0.0.427 → 0.0.429

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.
@@ -1659,7 +1659,29 @@ class MotionMasterReqResClient {
1659
1659
  }
1660
1660
  return { deviceRefObj, index, subindex, value, valueTypeKey, requestTimeout, messageId };
1661
1661
  }
1662
- setParameterValues(ids, requestTimeout = 9000, messageId) {
1662
+ /**
1663
+ * Writes several parameter values, on one or more devices, in one request.
1664
+ *
1665
+ * The values are grouped by device and sent with `setMultiDeviceParameterValues`. Before anything is sent,
1666
+ * the type of each value is resolved from the device parameter info, unless it is given; a parameter that
1667
+ * Motion Master does not list fails the call at this point, and no value is written.
1668
+ *
1669
+ * By default the call succeeds when Motion Master replies with a list of parameter values for every device.
1670
+ * It does **not** check the status of each value, so a value the drive refused (for example `NOT_CHANGED`
1671
+ * for a read-only object, or a value outside the accepted range) is not reported. Set
1672
+ * `options.failOnRefused` to make the call fail with {@link ParameterValuesRefusedError} in that case. That
1673
+ * error lists each value that was not applied, with the error code and message, and the values that were
1674
+ * applied. Applied values are not rolled back. Use {@link download} when one value must be applied before
1675
+ * the next step can run.
1676
+ *
1677
+ * @param ids - The values to write, as device parameter ids mapped to values, or as tuples of device
1678
+ * reference, index, subindex, value and optional type value key.
1679
+ * @param requestTimeout - The time to wait for the reply, in milliseconds.
1680
+ * @param messageId - The id of the request message.
1681
+ * @param options - `failOnRefused`: fail when any value was not applied. Defaults to `false`.
1682
+ * @returns An observable that emits once, when the reply has arrived, and then completes.
1683
+ */
1684
+ setParameterValues(ids, requestTimeout = 9000, messageId, options = {}) {
1663
1685
  if (ids.length === 0) {
1664
1686
  return (0, rxjs_1.throwError)(() => new Error('The provided array of device parameter ids or addresses is empty!'));
1665
1687
  }
@@ -1700,12 +1722,39 @@ class MotionMasterReqResClient {
1700
1722
  throw new Error(`No parameterValues for device ${deviceAddress}`);
1701
1723
  }
1702
1724
  });
1725
+ if (options.failOnRefused) {
1726
+ const written = tuples.map(([deviceAddress, index, subindex, value], i) => ({
1727
+ deviceRef: refs[i][0],
1728
+ deviceAddress,
1729
+ index,
1730
+ subindex,
1731
+ value,
1732
+ }));
1733
+ const { refused, applied } = classifyWrittenParameterValues(written, multiDeviceParameterValues);
1734
+ if (refused.length > 0) {
1735
+ throw new types_1.ParameterValuesRefusedError(refused, applied);
1736
+ }
1737
+ }
1703
1738
  }));
1704
1739
  }));
1705
1740
  });
1706
1741
  }
1707
- downloadMany(ids, requestTimeout = 9000, messageId) {
1708
- return (0, rxjs_1.lastValueFrom)(this.setParameterValues(ids, requestTimeout, messageId));
1742
+ /**
1743
+ * Writes several parameter values, on one or more devices, in one request, and resolves when the reply has
1744
+ * arrived.
1745
+ *
1746
+ * This is {@link setParameterValues} as a promise. By default it does **not** report a value the drive
1747
+ * refused; set `options.failOnRefused` to make it reject with {@link ParameterValuesRefusedError} in that
1748
+ * case. See {@link setParameterValues} for the details.
1749
+ *
1750
+ * @param ids - The values to write, as device parameter ids mapped to values, or as tuples of device
1751
+ * reference, index, subindex, value and optional type value key.
1752
+ * @param requestTimeout - The time to wait for the reply, in milliseconds.
1753
+ * @param messageId - The id of the request message.
1754
+ * @param options - `failOnRefused`: reject when any value was not applied. Defaults to `false`.
1755
+ */
1756
+ downloadMany(ids, requestTimeout = 9000, messageId, options = {}) {
1757
+ return (0, rxjs_1.lastValueFrom)(this.setParameterValues(ids, requestTimeout, messageId, options));
1709
1758
  }
1710
1759
  resolveDeviceParameterTypeValueKey(deviceRefObj, index, subindex, typeValueKey) {
1711
1760
  if (typeValueKey) {
@@ -1720,6 +1769,48 @@ class MotionMasterReqResClient {
1720
1769
  return infoParameter.typeValueKey;
1721
1770
  }));
1722
1771
  }
1772
+ /**
1773
+ * Returns the objects from `ids` that the device does not have.
1774
+ *
1775
+ * The check uses the list of parameters Motion Master reports for the device, which the client
1776
+ * caches, so no SDO request is sent. Use it before reading or writing objects that not every drive
1777
+ * has, so that a procedure can fail, or leave a step out, before anything is written.
1778
+ *
1779
+ * @param deviceRef - Reference to the device.
1780
+ * @param ids - Index and subindex of each object to look for.
1781
+ * @returns The objects that the device does not have, in the order of `ids`. Empty when it has all of them.
1782
+ */
1783
+ findMissingDeviceParameters(deviceRef, ids) {
1784
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
1785
+ const infoMap = yield (0, rxjs_1.lastValueFrom)(this.resolveDeviceParameterInfoMap(deviceRef));
1786
+ return ids.filter(([index, subindex]) => !infoMap.has((0, parameter_1.makeParameterId)(index, subindex)));
1787
+ });
1788
+ }
1789
+ /**
1790
+ * Reads the given objects that the device has, and leaves out the ones it does not have.
1791
+ *
1792
+ * Use it for objects that only some drives have, for example the Kd gains, which Jasper-based drives without
1793
+ * placeholder objects lack. Which objects exist is taken from the cached parameter list (see
1794
+ * {@link findMissingDeviceParameters}), so no SDO request is sent for a missing one. A read that fails for any
1795
+ * other reason rejects with that error.
1796
+ *
1797
+ * @param deviceRef - Reference to the device.
1798
+ * @param ids - Index and subindex of each object to read.
1799
+ * @returns The values keyed by parameter id, for example `{ '0x2011:01': 0.42 }`, in the order of `ids`.
1800
+ */
1801
+ uploadExistingParameters(deviceRef, ids) {
1802
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
1803
+ const missing = new Set((yield this.findMissingDeviceParameters(deviceRef, ids)).map(([index, subindex]) => (0, parameter_1.makeParameterId)(index, subindex)));
1804
+ const values = {};
1805
+ for (const [index, subindex] of ids) {
1806
+ const id = (0, parameter_1.makeParameterId)(index, subindex);
1807
+ if (!missing.has(id)) {
1808
+ values[id] = yield this.upload(deviceRef, index, subindex);
1809
+ }
1810
+ }
1811
+ return values;
1812
+ });
1813
+ }
1723
1814
  resolveDeviceParameterInfoMap(deviceRef, requestTimeout = 5000) {
1724
1815
  return this.resolveDevice(deviceRef).pipe((0, operators_1.mergeMap)(({ deviceAddress }) => {
1725
1816
  let infoMap = this.deviceParameterInfoMap.get(deviceAddress);
@@ -2323,15 +2414,19 @@ class MotionMasterReqResClient {
2323
2414
  * Reset targets.
2324
2415
  *
2325
2416
  * Set torque and velocity targets to 0, and set the position target to the current position value.
2417
+ *
2418
+ * @param deviceRef - Reference to the device.
2419
+ * @param options - Passed to {@link downloadMany}. With `failOnRefused`, the call rejects when the drive
2420
+ * does not apply one of the targets.
2326
2421
  */
2327
- resetTargets(deviceRef) {
2422
+ resetTargets(deviceRef, options = {}) {
2328
2423
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
2329
2424
  const positionActualValue = yield this.upload(deviceRef, 0x6064, 0);
2330
2425
  yield this.downloadMany([
2331
2426
  [deviceRef, 0x6071, 0, 0],
2332
2427
  [deviceRef, 0x607a, 0, positionActualValue],
2333
2428
  [deviceRef, 0x60ff, 0, 0], // target velocity
2334
- ]);
2429
+ ], undefined, undefined, options);
2335
2430
  });
2336
2431
  }
2337
2432
  /**
@@ -2783,13 +2878,16 @@ class MotionMasterReqResClient {
2783
2878
  * - The file SOMANET_CiA_402.xml and its parts will not be removed.
2784
2879
  *
2785
2880
  * To retain multipart files (e.g., SOMANET_CiA_402.xml.zip.part000), include only the base name (e.g., "SOMANET_CiA_402.xml") in the `filesToKeep` list.
2881
+ *
2882
+ * The `filesToKeep` array is not modified; each call starts from the list it is given.
2786
2883
  */
2787
2884
  factoryReset(deviceRef, filesToKeep = device_1.factoryResetDefaultFilesToKeep, installEmptyFirmware = true, reloadFirmware = false) {
2788
2885
  return this.getFiles(deviceRef).pipe((0, operators_1.mergeMap)((files) => {
2789
- if (!installEmptyFirmware) {
2790
- filesToKeep.push('SOMANET_CiA_402.xml', 'stack_image.svg');
2791
- }
2792
- const filesToDelete = files.filter((file) => file !== '' && !filesToKeep.some((fileToKeep) => file.startsWith(fileToKeep)));
2886
+ // A copy, so that neither the shared default list nor the caller's array is changed.
2887
+ const keep = installEmptyFirmware
2888
+ ? [...filesToKeep]
2889
+ : [...filesToKeep, 'SOMANET_CiA_402.xml', 'stack_image.svg'];
2890
+ const filesToDelete = files.filter((file) => file !== '' && !keep.some((fileToKeep) => file.startsWith(fileToKeep)));
2793
2891
  const fileDeletionObservables = filesToDelete.map((file) => {
2794
2892
  if (file.startsWith('.')) {
2795
2893
  return (0, rxjs_1.defer)(() => this.getFile(deviceRef, device_1.stackUnlockFilename).pipe((0, operators_1.mergeMap)(() => this.deleteFile(deviceRef, file))));
@@ -2809,6 +2907,38 @@ class MotionMasterReqResClient {
2809
2907
  return (0, rxjs_1.of)({ request: 'succeeded' });
2810
2908
  }));
2811
2909
  }
2910
+ /**
2911
+ * Describes the fault of a device for an error message.
2912
+ *
2913
+ * Reads the error code (0x603F:00), which every drive has, and the error report (0x203F:01), which only
2914
+ * some firmware has. The error report is added only when it is a non-empty text: Jasper-based drives either
2915
+ * lack the object or have a placeholder that reads 0.
2916
+ *
2917
+ * @param deviceRef - Reference to the device.
2918
+ * @returns For example "Error code (0x603F): 0x7500. Error report (0x203F): Encoder communication lost".
2919
+ */
2920
+ describeFault(deviceRef) {
2921
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
2922
+ let description;
2923
+ try {
2924
+ const errorCode = yield this.upload(deviceRef, 0x603f, 0x00);
2925
+ description = `Error code (0x603F): 0x${errorCode.toString(16).toUpperCase().padStart(4, '0')}.`;
2926
+ }
2927
+ catch (err) {
2928
+ description = `The error code (0x603F) could not be read: ${err instanceof Error ? err.message : err}.`;
2929
+ }
2930
+ try {
2931
+ const errorReport = yield this.upload(deviceRef, 0x203f, 0x01);
2932
+ if (typeof errorReport === 'string' && errorReport.trim() !== '') {
2933
+ description += ` Error report (0x203F): ${errorReport.trim()}`;
2934
+ }
2935
+ }
2936
+ catch (_a) {
2937
+ // Most Jasper-based drives do not have 0x203F; the error code above is enough.
2938
+ }
2939
+ return description;
2940
+ });
2941
+ }
2812
2942
  /**
2813
2943
  * Computes the Feed Constant for a given device.
2814
2944
  *
@@ -2893,9 +3023,11 @@ class MotionMasterReqResClient {
2893
3023
  * - `'merge'`: Reads the existing file, appends/updates it with the new data (input takes precedence), and writes the result back.
2894
3024
  * @param retryConfig Configuration settings for retrying the restore default parameters operation.
2895
3025
  * @param refresh A flag to refresh device parameter values after loading the new configuration. Defaults to `true`.
3026
+ * @param options Passed to {@link setParameterValues} for the PDO Guard step. With `failOnRefused`, loading fails
3027
+ * when the drive does not apply one of the RxPDO-mapped values.
2896
3028
  * @returns An observable that emits `void` once the configuration has been successfully loaded and (optionally) refreshed.
2897
3029
  */
2898
- loadConfig(deviceRef, data, strategy = 'replace', retryConfig = { count: 10, delay: 500 }, refresh = true) {
3030
+ loadConfig(deviceRef, data, strategy = 'replace', retryConfig = { count: 10, delay: 500 }, refresh = true, options = {}) {
2899
3031
  const encoder = new TextEncoder();
2900
3032
  const decoder = new TextDecoder();
2901
3033
  const content = typeof data === 'string' ? encoder.encode(data) : data;
@@ -2949,7 +3081,7 @@ class MotionMasterReqResClient {
2949
3081
  }
2950
3082
  // Batch write all RxPDO-mapped parameters in one request
2951
3083
  const ids = pdoMappedParams.map((p) => [deviceRef, p.index, p.subindex, p.value]);
2952
- return this.setParameterValues(ids, 10000).pipe((0, operators_1.map)(() => finalParameters));
3084
+ return this.setParameterValues(ids, 10000, undefined, options).pipe((0, operators_1.map)(() => finalParameters));
2953
3085
  }))),
2954
3086
  // Refresh parameters (Using finalParameters).
2955
3087
  (0, operators_1.mergeMap)((finalParameters) => {
@@ -3035,18 +3167,41 @@ class MotionMasterReqResClient {
3035
3167
  * Sets the device mode of operation and then transitions the device
3036
3168
  * to the specified CiA 402 state.
3037
3169
  *
3038
- * The operations are executed sequentially:
3039
- * 1. The mode of operation is written to the device.
3040
- * 2. The device is transitioned to the requested CiA 402 state.
3170
+ * The steps run one after another, each only after the previous one has succeeded:
3171
+ * 1. The mode of operation (0x6060) is written to the device.
3172
+ * 2. The modes of operation display (0x6061) is read until it shows the requested mode.
3173
+ * 3. The device is transitioned to the requested CiA 402 state.
3174
+ *
3175
+ * Nothing runs before the returned observable is subscribed to. When a step fails, the observable
3176
+ * errors and the later steps do not run, so the device is never enabled in another mode.
3041
3177
  *
3042
3178
  * @param deviceRef - Reference to the target device.
3043
3179
  * @param modesOfOperation - Desired CiA 402 mode of operation.
3044
3180
  * @param cia402State - Target CiA 402 state to transition to.
3181
+ * @param modesOfOperationDisplayTimeout - Time in milliseconds to wait for 0x6061 to show the requested mode.
3182
+ *
3183
+ * @returns Observable that completes when all steps have succeeded.
3184
+ */
3185
+ setModesOfOperationAndTransitionToCia402State(deviceRef, modesOfOperation, cia402State, modesOfOperationDisplayTimeout = 2000) {
3186
+ return (0, rxjs_1.concat)(this.setModesOfOperation(deviceRef, modesOfOperation), (0, rxjs_1.defer)(() => this.waitForModesOfOperationDisplay(deviceRef, modesOfOperation, modesOfOperationDisplayTimeout)), (0, rxjs_1.defer)(() => this.transitionToCia402State(deviceRef, cia402State)));
3187
+ }
3188
+ /**
3189
+ * Reads the modes of operation display (0x6061) until it shows the given mode.
3045
3190
  *
3046
- * @returns Observable that completes when both operations finish.
3191
+ * @throws Error when 0x6061 does not show the mode within the timeout.
3047
3192
  */
3048
- setModesOfOperationAndTransitionToCia402State(deviceRef, modesOfOperation, cia402State) {
3049
- return (0, rxjs_1.concat)(this.setModesOfOperation(deviceRef, modesOfOperation), this.transitionToCia402State(deviceRef, cia402State));
3193
+ waitForModesOfOperationDisplay(deviceRef, modesOfOperation, timeout) {
3194
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
3195
+ const deadline = Date.now() + timeout;
3196
+ let modesOfOperationDisplay = yield this.upload(deviceRef, 0x6061, 0);
3197
+ while (modesOfOperationDisplay !== modesOfOperation) {
3198
+ if (Date.now() >= deadline) {
3199
+ throw new Error(`Device ${JSON.stringify(deviceRef)} shows the mode of operation ${modesOfOperationDisplay} (0x6061) instead of the requested ${modesOfOperation} after ${timeout} ms.`);
3200
+ }
3201
+ yield (0, util_1.resolveAfter)(50);
3202
+ modesOfOperationDisplay = yield this.upload(deviceRef, 0x6061, 0);
3203
+ }
3204
+ });
3050
3205
  }
3051
3206
  /**
3052
3207
  * Installs the Integro Encoder Firmware by performing the following steps:
@@ -3163,11 +3318,13 @@ class MotionMasterReqResClient {
3163
3318
  * @param {number[][]} pdoGroupedValues - A 2D array where each inner array represents a group of PDO values.
3164
3319
  * The first element in each group is ignored, and the remaining values are processed.
3165
3320
  * @param {0x1600 | 0x1A00} pdoIndex - The PDO index to update, either `0x1600` for RxPDO or `0x1A00` for TxPDO.
3321
+ * @param {SetParameterValuesOptions} options - Passed to each {@link setParameterValues} call. With `failOnRefused`,
3322
+ * the update stops at the first write the drive does not apply.
3166
3323
  *
3167
3324
  * @returns {Promise<void>} Resolves when all PDO parameter updates are complete.
3168
3325
  * The function processes and applies updates sequentially to ensure they are performed in order.
3169
3326
  */
3170
- updatePdoParameterGroupedValues(deviceRef, pdoGroupedValues, pdoIndex) {
3327
+ updatePdoParameterGroupedValues(deviceRef, pdoGroupedValues, pdoIndex, options = {}) {
3171
3328
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
3172
3329
  for (const [i, groupedValues] of pdoGroupedValues.entries()) {
3173
3330
  let values = groupedValues
@@ -3176,13 +3333,13 @@ class MotionMasterReqResClient {
3176
3333
  .map((value) => (typeof value === 'string' ? parseInt(value, 10) : value));
3177
3334
  const n = values.length; // number of new mapped parameters
3178
3335
  values = values.concat(new Array(10 - n).fill(0));
3179
- yield (0, rxjs_1.lastValueFrom)(this.setParameterValues([[deviceRef, pdoIndex + i, 0, 0]]));
3336
+ yield (0, rxjs_1.lastValueFrom)(this.setParameterValues([[deviceRef, pdoIndex + i, 0, 0]], undefined, undefined, options));
3180
3337
  const parameterValues = values.reduce((acc, value, j) => {
3181
3338
  acc.push([deviceRef, pdoIndex + i, j + 1, value, 'uintValue']);
3182
3339
  return acc;
3183
3340
  }, []);
3184
- yield (0, rxjs_1.lastValueFrom)(this.setParameterValues(parameterValues));
3185
- yield (0, rxjs_1.lastValueFrom)(this.setParameterValues([[deviceRef, pdoIndex + i, 0, n]]));
3341
+ yield (0, rxjs_1.lastValueFrom)(this.setParameterValues(parameterValues, undefined, undefined, options));
3342
+ yield (0, rxjs_1.lastValueFrom)(this.setParameterValues([[deviceRef, pdoIndex + i, 0, n]], undefined, undefined, options));
3186
3343
  }
3187
3344
  });
3188
3345
  }
@@ -4893,16 +5050,18 @@ class MotionMasterReqResClient {
4893
5050
  * @param deviceRef - Reference to the target device.
4894
5051
  * @param notchFilter - Notch filter values to write to the device.
4895
5052
  * @param requestTimeout - Optional timeout in milliseconds for the request (default: 1000).
5053
+ * @param options - Passed to {@link setParameterValues}. With `failOnRefused`, the call fails when the drive does
5054
+ * not apply one of the values.
4896
5055
  * @returns An `Observable<void>` that completes when the parameter values have been written successfully.
4897
5056
  *
4898
5057
  */
4899
- setNotchFilterParameterValues(deviceRef, notchFilter, requestTimeout = 1000) {
5058
+ setNotchFilterParameterValues(deviceRef, notchFilter, requestTimeout = 1000, options = {}) {
4900
5059
  return this.setParameterValues([
4901
5060
  [deviceRef, 0x2023, 0x01, notchFilter.enabled ? 1 : 0],
4902
5061
  [deviceRef, 0x2023, 0x02, Math.round(notchFilter.centerFrequency)],
4903
5062
  [deviceRef, 0x2023, 0x03, Math.round(notchFilter.rejectionBand)],
4904
5063
  [deviceRef, 0x2023, 0x04, notchFilter.depth],
4905
- ], requestTimeout);
5064
+ ], requestTimeout, undefined, options);
4906
5065
  }
4907
5066
  /**
4908
5067
  * Deletes all HRD data files (`hr_data0.bin` to `hr_data4.bin`) from the device.
@@ -5185,11 +5344,7 @@ class MotionMasterReqResClient {
5185
5344
  if (cia402state !== cia402_1.Cia402State.OPERATION_ENABLED) {
5186
5345
  let errorMessage = 'Device is not in the expected state for running diagnostics. Please ensure the device is in OPERATION ENABLED state.';
5187
5346
  if (cia402state === cia402_1.Cia402State.FAULT) {
5188
- try {
5189
- const errorReport = yield this.upload(deviceRef, 0x203f, 0x01);
5190
- errorMessage += ` Device has a fault. Error report (0x203F): ${errorReport}`;
5191
- }
5192
- catch (_a) { }
5347
+ errorMessage += ` Device has a fault. ${yield this.describeFault(deviceRef)}`;
5193
5348
  }
5194
5349
  subscriber.error(new Error(errorMessage));
5195
5350
  return;
@@ -5321,4 +5476,39 @@ function extractFirmwareProductSupportedOptions(supportedOptionsPromise, firmwar
5321
5476
  return (_b = (_a = supportedOptions[`${major}.${minor}`]) === null || _a === void 0 ? void 0 : _a[`${versionedDeviceProductId}`]) !== null && _b !== void 0 ? _b : [];
5322
5477
  }));
5323
5478
  }
5479
+ /**
5480
+ * Splits the values of a multi-parameter write into the ones Motion Master reports as applied and the ones it
5481
+ * does not.
5482
+ *
5483
+ * Each written value is matched to the reply entry of its device with the same index and subindex. A value
5484
+ * that is written twice is matched to the reply entries in order. A value counts as applied only when its
5485
+ * entry has a success status; an entry with an error, or with no status, and a value without an entry count
5486
+ * as not applied.
5487
+ */
5488
+ function classifyWrittenParameterValues(written, status) {
5489
+ var _a, _b, _c, _d, _e;
5490
+ const remaining = new Map();
5491
+ for (const { deviceAddress, parameterValues } of (_a = status.collection) !== null && _a !== void 0 ? _a : []) {
5492
+ if (deviceAddress !== undefined && deviceAddress !== null) {
5493
+ remaining.set(deviceAddress, [...(parameterValues !== null && parameterValues !== void 0 ? parameterValues : [])]);
5494
+ }
5495
+ }
5496
+ const refused = [];
5497
+ const applied = [];
5498
+ for (const entry of written) {
5499
+ const entries = (_b = remaining.get(entry.deviceAddress)) !== null && _b !== void 0 ? _b : [];
5500
+ const i = entries.findIndex((p) => { var _a, _b; return ((_a = p.index) !== null && _a !== void 0 ? _a : 0) === entry.index && ((_b = p.subindex) !== null && _b !== void 0 ? _b : 0) === entry.subindex; });
5501
+ const reply = i >= 0 ? entries.splice(i, 1)[0] : undefined;
5502
+ if (reply === null || reply === void 0 ? void 0 : reply.success) {
5503
+ applied.push(entry);
5504
+ }
5505
+ else if (reply === null || reply === void 0 ? void 0 : reply.error) {
5506
+ refused.push(Object.assign(Object.assign({}, entry), { errorCode: (_d = types_1.MotionMasterMessage.Status.DeviceParameterValues.ParameterValue.Error.Code[(_c = reply.error.code) !== null && _c !== void 0 ? _c : 0]) !== null && _d !== void 0 ? _d : String(reply.error.code), errorMessage: (_e = reply.error.message) !== null && _e !== void 0 ? _e : '' }));
5507
+ }
5508
+ else {
5509
+ refused.push(Object.assign(Object.assign({}, entry), { errorCode: 'NO_STATUS', errorMessage: '' }));
5510
+ }
5511
+ }
5512
+ return { refused, applied };
5513
+ }
5324
5514
  //# sourceMappingURL=motion-master-req-res-client.js.map