motion-master-client 0.0.322 → 0.0.324

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.
@@ -2973,7 +2973,7 @@ class MotionMasterReqResClient {
2973
2973
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
2974
2974
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
2975
2975
  *
2976
- * @returns An observable that emits a boolean value indicating whether the login attempt succeeded.
2976
+ * @throws {Error} If the login attempt fails.
2977
2977
  *
2978
2978
  * @remarks
2979
2979
  * If the device is already logged in, the next login attempt will fail unless the user logs out first.
@@ -2981,7 +2981,11 @@ class MotionMasterReqResClient {
2981
2981
  loginToSmmForParameterDownload(deviceRef, username, password, commandTimeout = 5000, responsePollingInterval = 500) {
2982
2982
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.PARAMETER_DOWNLOAD_LOGIN);
2983
2983
  const content = (0, smm_1.packSmmCredentials)(username, password);
2984
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
2984
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
2985
+ if (response.request !== 'succeeded') {
2986
+ throw new Error('Login to SMM for parameter download failed.');
2987
+ }
2988
+ }));
2985
2989
  }
2986
2990
  /**
2987
2991
  * Logs into the SMM for software update with the provided credentials.
@@ -2996,7 +3000,7 @@ class MotionMasterReqResClient {
2996
3000
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
2997
3001
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
2998
3002
  *
2999
- * @returns An observable that emits a boolean value indicating whether the login attempt succeeded.
3003
+ * @throws {Error} If the login attempt fails.
3000
3004
  *
3001
3005
  * @remarks
3002
3006
  * If the device is already logged in, the next login attempt will fail unless the user logs out first.
@@ -3004,7 +3008,11 @@ class MotionMasterReqResClient {
3004
3008
  loginToSmmForSoftwareUpdate(deviceRef, username, password, commandTimeout = 10000, responsePollingInterval = 500) {
3005
3009
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.SOFTWARE_UPDATE_LOGIN);
3006
3010
  const content = (0, smm_1.packSmmCredentials)(username, password);
3007
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3011
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3012
+ if (response.request !== 'succeeded') {
3013
+ throw new Error('Login to SMM for software update failed.');
3014
+ }
3015
+ }));
3008
3016
  }
3009
3017
  /**
3010
3018
  * Logs out from the SMM.
@@ -3016,11 +3024,15 @@ class MotionMasterReqResClient {
3016
3024
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3017
3025
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3018
3026
  *
3019
- * @returns An observable that emits a boolean value indicating whether the logout attempt succeeded.
3027
+ * @throws {Error} If the logout attempt fails.
3020
3028
  */
3021
3029
  logoutFromSmm(deviceRef, commandTimeout = 10000, responsePollingInterval = 500) {
3022
3030
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.LOGOUT);
3023
- return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3031
+ return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3032
+ if (response.request !== 'succeeded') {
3033
+ throw new Error('Logout from SMM failed.');
3034
+ }
3035
+ }));
3024
3036
  }
3025
3037
  /**
3026
3038
  * Logs out from the SMM and then logs back in with the provided credentials for parameter download.
@@ -3035,12 +3047,10 @@ class MotionMasterReqResClient {
3035
3047
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3036
3048
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3037
3049
  *
3038
- * @returns An observable that emits a boolean value indicating whether the relogin attempt succeeded.
3050
+ * @throws {Error} If either the logout or login attempt fails.
3039
3051
  */
3040
3052
  reloginToSmmForParameterDownload(deviceRef, username, password, commandTimeout = 10000, responsePollingInterval = 500) {
3041
- return this.logoutFromSmm(deviceRef, commandTimeout, responsePollingInterval).pipe((0, operators_1.mergeMap)((succeeded) => succeeded
3042
- ? this.loginToSmmForParameterDownload(deviceRef, username, password, commandTimeout, responsePollingInterval)
3043
- : (0, rxjs_1.of)(false)));
3053
+ return this.logoutFromSmm(deviceRef, commandTimeout, responsePollingInterval).pipe((0, operators_1.mergeMap)(() => this.loginToSmmForParameterDownload(deviceRef, username, password, commandTimeout, responsePollingInterval)));
3044
3054
  }
3045
3055
  /**
3046
3056
  * Changes the SMM password for the specified device.
@@ -3050,7 +3060,8 @@ class MotionMasterReqResClient {
3050
3060
  * @param newPassword - The new password to set for the SMM.
3051
3061
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3052
3062
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3053
- * @returns An Observable that emits `true` if the password change and SMM restart succeed, otherwise `false`.
3063
+ *
3064
+ * @throws {Error} If the password change attempt fails.
3054
3065
  *
3055
3066
  * @remarks
3056
3067
  * A prior successful login is required before changing the password.
@@ -3061,7 +3072,7 @@ class MotionMasterReqResClient {
3061
3072
  changeSmmPassword(deviceRef, oldPassword, newPassword, commandTimeout = 10000, responsePollingInterval = 500) {
3062
3073
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.CHANGE_PASSWORD);
3063
3074
  const content = (0, smm_1.packSmmChangePassword)(newPassword, oldPassword);
3064
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'), (0, operators_1.mergeMap)((succeeded) => (succeeded ? this.triggerSmmRestart(deviceRef) : (0, rxjs_1.of)(false))));
3075
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.mergeMap)(() => this.triggerSmmRestart(deviceRef)));
3065
3076
  }
3066
3077
  /**
3067
3078
  * Triggers an SMM restart for the specified device.
@@ -3076,11 +3087,15 @@ class MotionMasterReqResClient {
3076
3087
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3077
3088
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3078
3089
  *
3079
- * @returns An Observable that emits `true` if the restart was successful, or `false` otherwise.
3090
+ * @throws {Error} If the SMM restart attempt fails.
3080
3091
  */
3081
3092
  triggerSmmRestart(deviceRef, commandTimeout = 40000, responsePollingInterval = 500) {
3082
3093
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.TRIGGER_RESTART);
3083
- return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3094
+ return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3095
+ if (response.request !== 'succeeded') {
3096
+ throw new Error('Triggering SMM restart failed.');
3097
+ }
3098
+ }));
3084
3099
  }
3085
3100
  /**
3086
3101
  * Acknowledges an I/O failure on the specified device.
@@ -3092,11 +3107,15 @@ class MotionMasterReqResClient {
3092
3107
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3093
3108
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3094
3109
  *
3095
- * @returns An Observable that emits `true` if the acknowledgment was successful, or `false` otherwise.
3110
+ * @throws {Error} If the acknowledgment attempt fails.
3096
3111
  */
3097
3112
  acknowledgeIoFailureOnSmm(deviceRef, commandTimeout = 10000, responsePollingInterval = 500) {
3098
3113
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.IO_FAILURE_ACKNOWLEDGE);
3099
- return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3114
+ return this.runOsCommand(deviceRef, command, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3115
+ if (response.request !== 'succeeded') {
3116
+ throw new Error('Acknowledging I/O failure on SMM failed.');
3117
+ }
3118
+ }));
3100
3119
  }
3101
3120
  /**
3102
3121
  * Configures the SMM software update process for the specified device.
@@ -3105,11 +3124,15 @@ class MotionMasterReqResClient {
3105
3124
  * @param deviceRef - A reference to the target device.
3106
3125
  * @param fileSize - The size of the software update file, in bytes.
3107
3126
  *
3108
- * @returns An Observable that emits `true` if the configuration succeeds, or `false` if it fails.
3127
+ * @throws {Error} If the configuration attempt fails.
3109
3128
  */
3110
3129
  configureSmmSoftwareUpdate(deviceRef, fileSize) {
3111
3130
  const command = (0, os_command_1.createSmmAcyclicHandlerConfigureSoftwareUpdateOsCommand)(fileSize);
3112
- return this.runOsCommand(deviceRef, command, 10000, 100).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3131
+ return this.runOsCommand(deviceRef, command, 10000, 100).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3132
+ if (response.request !== 'succeeded') {
3133
+ throw new Error('Configuring SMM software update failed.');
3134
+ }
3135
+ }));
3113
3136
  }
3114
3137
  /**
3115
3138
  * Performs a complete SMM software update on the specified device.
@@ -3126,8 +3149,7 @@ class MotionMasterReqResClient {
3126
3149
  * @param responsePollingInterval - (Optional) Polling interval for command responses. Defaults to 1000 ms.
3127
3150
  * @param fsBufferReadWriteTimeout - (Optional) Timeout for fs-buffer read/write operations. Defaults to 120,000 ms.
3128
3151
  *
3129
- * @returns An `Observable<boolean>` that emits the result of the final step.
3130
- * The observable completes successfully if all steps succeed, or errors out at the first failure.
3152
+ * @throws {Error} If any step in the software update process fails.
3131
3153
  *
3132
3154
  * @remarks
3133
3155
  * The software update procedure follows these sequential steps:
@@ -3139,8 +3161,8 @@ class MotionMasterReqResClient {
3139
3161
  * 6. Finalize the software update.
3140
3162
  * 7. Trigger a device restart to apply the update.
3141
3163
  *
3142
- * Each step is implemented as a deferred observable. The commands execute only when subscribed to,
3143
- * ensuring a strict sequence. If any step fails, the process terminates immediately via `concat` behavior.
3164
+ * Each step is implemented as a deferred observable.
3165
+ * The commands execute only when subscribed to, ensuring a strict sequence.
3144
3166
  */
3145
3167
  updateSmmSoftware(deviceRef, username, password, buffer, crc, chunkSize = 1000, commandTimeout = 30000, responsePollingInterval = 1000, fsBufferReadWriteTimeout = 120000) {
3146
3168
  const fileSize = buffer.byteLength;
@@ -3161,14 +3183,22 @@ class MotionMasterReqResClient {
3161
3183
  const end = start + chunkSize;
3162
3184
  const fsBufferContent = buffer.slice(start, end);
3163
3185
  observables.push((0, rxjs_1.defer)(() => this.runOsCommandAndWriteFsBuffer(deviceRef, transmitSoftwareCommand, fsBufferContent, commandTimeout, responsePollingInterval, false, fsBufferReadWriteTimeout).pipe((0, operators_1.last)(), // Only consider the final response of the command.
3164
- (0, operators_1.map)((response) => response.request === 'succeeded') // Interpret the response success.
3186
+ (0, operators_1.map)((response) => {
3187
+ if (response.request !== 'succeeded') {
3188
+ throw new Error(`Transmitting SMM software chunk ${i + 1}/${n} failed.`);
3189
+ }
3190
+ }) // Interpret the response success.
3165
3191
  )));
3166
3192
  }
3167
3193
  // Step 5: Pack the CRC value and prepare the finalize command.
3168
3194
  const packedCrc = (0, smm_1.packSmmSoftwareUpdateCrc)(crc);
3169
3195
  const finalizeSoftwareUpdateCommand = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.FINALIZE_SOFTWARE_UPDATE);
3170
3196
  // Step 6: Send the CRC to validate data integrity.
3171
- observables.push((0, rxjs_1.defer)(() => this.runOsCommandAndWriteFsBuffer(deviceRef, finalizeSoftwareUpdateCommand, packedCrc).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'))),
3197
+ observables.push((0, rxjs_1.defer)(() => this.runOsCommandAndWriteFsBuffer(deviceRef, finalizeSoftwareUpdateCommand, packedCrc).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3198
+ if (response.request !== 'succeeded') {
3199
+ throw new Error('Finalizing SMM software update failed.');
3200
+ }
3201
+ }))),
3172
3202
  // Step 7: Trigger a restart so the new software takes effect.
3173
3203
  (0, rxjs_1.defer)(() => this.triggerSmmRestart(deviceRef)));
3174
3204
  return (0, rxjs_1.concat)(...observables).pipe((0, operators_1.last)());
@@ -3183,20 +3213,24 @@ class MotionMasterReqResClient {
3183
3213
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3184
3214
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3185
3215
  *
3186
- * @returns An Observable that emits `true` if the operation succeeds, or `false` if it fails, the `values` array is empty.
3216
+ * @throws {Error} If the transmission fails or if the `values` array is empty.
3187
3217
  *
3188
3218
  * @remarks
3189
- * - If the `values` array is empty, the function immediately returns `false`.
3219
+ * - If the `values` array is empty, the function throws an error.
3190
3220
  * - The function constructs an OS command for transmitting the parameters and writes the packed buffer to the fs-buffer file.
3191
3221
  */
3192
3222
  transmitSmmParameters(deviceRef, values, parameterStructureVersion = undefined, commandTimeout = 5000, responsePollingInterval = 500) {
3193
3223
  if (values.length === 0) {
3194
- return (0, rxjs_1.of)(false);
3224
+ throw new Error('Transmitting SMM parameters failed. The values array is empty.');
3195
3225
  }
3196
3226
  return (parameterStructureVersion ? (0, rxjs_1.of)(parameterStructureVersion) : this.resolveSmmParameterStructureVersion(deviceRef)).pipe((0, operators_1.mergeMap)((version) => {
3197
3227
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.TRANSMIT_PARAMETERS);
3198
3228
  const { buffer: content } = (0, smm_1.packSmmParameterValues)(values, version);
3199
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3229
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3230
+ if (response.request !== 'succeeded') {
3231
+ throw new Error('Transmitting SMM parameters failed.');
3232
+ }
3233
+ }));
3200
3234
  }));
3201
3235
  }
3202
3236
  /**
@@ -3244,7 +3278,8 @@ class MotionMasterReqResClient {
3244
3278
  * If not provided, the version is resolved dynamically from the device.
3245
3279
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3246
3280
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3247
- * @returns An `Observable<boolean>` that emits `true` if the verification succeeded, or `false` otherwise.
3281
+ *
3282
+ * @throws {Error} If the verification fails.
3248
3283
  *
3249
3284
  * @remarks
3250
3285
  * This function requires parameters to be previously loaded for verification to succeed. If parameters are not preloaded, the verification will fail.
@@ -3254,7 +3289,11 @@ class MotionMasterReqResClient {
3254
3289
  return (parameterStructureVersion ? (0, rxjs_1.of)(parameterStructureVersion) : this.resolveSmmParameterStructureVersion(deviceRef)).pipe((0, operators_1.mergeMap)((version) => {
3255
3290
  const { buffer: content } = (0, smm_1.packSmmParameterValuesForVerification)(values, groupIndex, version);
3256
3291
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.VERIFY_PARAMETERS);
3257
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3292
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3293
+ if (response.request !== 'succeeded') {
3294
+ throw new Error('Verifying SMM parameters failed.');
3295
+ }
3296
+ }));
3258
3297
  }));
3259
3298
  }
3260
3299
  /**
@@ -3304,7 +3343,7 @@ class MotionMasterReqResClient {
3304
3343
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3305
3344
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3306
3345
  *
3307
- * @returns An Observable that emits `true` if the configuration validation succeeds, or `false` if it fails.
3346
+ * @throws An error if the validation fails.
3308
3347
  *
3309
3348
  * @remarks
3310
3349
  * - Packs the validation report, date, username, and password into a buffer.
@@ -3315,7 +3354,11 @@ class MotionMasterReqResClient {
3315
3354
  validateSmmConfiguration(deviceRef, report, date, username, password, commandTimeout = 5000, responsePollingInterval = 500) {
3316
3355
  const { buffer: content } = (0, smm_1.packSmmValidationReport)(report, date, username, password);
3317
3356
  const command = (0, os_command_1.createSmmAcyclicHandlerOsCommand)(os_command_1.SmmAcyclicHandlerSubcommandId.VALIDATE_CONFIGURATION);
3318
- return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => response.request === 'succeeded'));
3357
+ return this.runOsCommandAndWriteFsBuffer(deviceRef, command, content, commandTimeout, responsePollingInterval).pipe((0, operators_1.last)(), (0, operators_1.map)((response) => {
3358
+ if (response.request !== 'succeeded') {
3359
+ throw new Error('Validating SMM configuration failed.');
3360
+ }
3361
+ }));
3319
3362
  }
3320
3363
  /**
3321
3364
  * Reads the safety parameters report from the device and validates the SMM configuration.
@@ -3327,9 +3370,7 @@ class MotionMasterReqResClient {
3327
3370
  * @param commandTimeout - The timeout in milliseconds for the command to complete.
3328
3371
  * @param responsePollingInterval - The interval in milliseconds between polling for the response.
3329
3372
  *
3330
- * @returns An Observable that emits `true` if the SMM configuration is successfully validated, or `false` if validation fails.
3331
- *
3332
- * @throws An error if the `.safety_parameters_report` file is missing.
3373
+ * @throws An error if the safety parameters report file is missing or if the validation fails.
3333
3374
  *
3334
3375
  * @remarks
3335
3376
  * - The function attempts to retrieve the `.safety_parameters_report` file from the device.
@@ -3503,7 +3544,7 @@ class MotionMasterReqResClient {
3503
3544
  * @param parameterStructureVersion - (Optional) A specific SMM parameter structure version to use.
3504
3545
  * If not provided, the version is resolved dynamically from the device.
3505
3546
  *
3506
- * @returns An Observable that emits `true` if the reset succeeds, or `false` if it fails.
3547
+ * @throws {Error} If the factory reset operation fails.
3507
3548
  *
3508
3549
  * @remarks
3509
3550
  * This function first determines the SMM parameter structure version — either from the provided argument
@@ -3790,15 +3831,9 @@ class MotionMasterReqResClient {
3790
3831
  return fail(`Mismatch: the configuration file contains ${configFile.parameters.length} parameters, but the SMM parameter structure expects ${values.length - 1}.`);
3791
3832
  }
3792
3833
  // Log out from SMM if already logged in, then log in for parameter download.
3793
- return this.logoutFromSmm(deviceRef).pipe((0, operators_1.concatMap)(() => this.loginToSmmForParameterDownload(deviceRef, username, password)), (0, operators_1.concatMap)((loginSuccess) => {
3794
- if (!loginSuccess) {
3795
- return fail('Failed to log in for parameter download.');
3796
- }
3834
+ return this.logoutFromSmm(deviceRef).pipe((0, operators_1.concatMap)(() => this.loginToSmmForParameterDownload(deviceRef, username, password)), (0, operators_1.concatMap)(() => {
3797
3835
  // Transmit the SMM parameters, then verify them by loading and checking against the original values.
3798
- return this.transmitSmmParameters(deviceRef, values, parameterStructureVersion).pipe((0, operators_1.concatMap)((transmitSuccess) => {
3799
- if (!transmitSuccess) {
3800
- return fail('Failed to transmit SMM parameters.');
3801
- }
3836
+ return this.transmitSmmParameters(deviceRef, values, parameterStructureVersion).pipe((0, operators_1.concatMap)(() => {
3802
3837
  // Load the SMM parameters for verification.
3803
3838
  return this.loadSmmParametersForVerification(deviceRef).pipe((0, operators_1.concatMap)((status) => {
3804
3839
  if (status.request === 'failed') {
@@ -3817,22 +3852,14 @@ class MotionMasterReqResClient {
3817
3852
  // For each group entry, call verifySmmParameters and fail if any group fails verification.
3818
3853
  // Uses concatMap to ensure groups are verified one after another in order.
3819
3854
  return (0, rxjs_1.from)(groupEntries).pipe((0, operators_1.concatMap)(([_, groupValues], i) => this.verifySmmParameters(deviceRef, groupValues, i + 1, // Skipping the first group (None).
3820
- parameterStructureVersion).pipe((0, operators_1.concatMap)((verifySuccess) => {
3821
- if (!verifySuccess) {
3822
- return fail(`Verification failed for parameter group ${i + 1}.`);
3823
- }
3824
- return (0, rxjs_1.of)(true);
3825
- }))), (0, operators_1.toArray)(), // Collect all verification results.
3855
+ parameterStructureVersion).pipe((0, operators_1.concatMap)(() => (0, rxjs_1.of)(true)))), (0, operators_1.toArray)(), // Collect all verification results.
3826
3856
  (0, operators_1.concatMap)(() => this.loadSmmValidationFileAndReadSafetyParametersReportFile(deviceRef).pipe((0, operators_1.concatMap)((safetyParametersReport) => {
3827
3857
  if (!safetyParametersReport) {
3828
3858
  return fail('Failed to load the safety parameter validation file or read the safety parameter report.');
3829
3859
  }
3830
3860
  // Encode validation file content as Uint8Array for transmission.
3831
3861
  const report = new TextEncoder().encode(safetyParametersReport);
3832
- return this.validateSmmConfiguration(deviceRef, report, new Date(), username, password).pipe((0, operators_1.concatMap)((validateSuccess) => {
3833
- if (!validateSuccess) {
3834
- return fail('SMM configuration validation failed.');
3835
- }
3862
+ return this.validateSmmConfiguration(deviceRef, report, new Date(), username, password).pipe((0, operators_1.concatMap)(() => {
3836
3863
  // Re-read the SMM parameters to update the values stored on the Motion Master.
3837
3864
  return this.getSmmOdParameters(deviceRef, parameterStructureVersion, 'device', false).pipe((0, operators_1.map)(() => safetyParametersReport));
3838
3865
  }));