motion-master-client 0.0.247 → 0.0.248
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/lib/motion-master-req-res-client.d.ts +118 -20
- package/src/lib/motion-master-req-res-client.js +149 -34
- package/src/lib/motion-master-req-res-client.js.map +1 -1
- package/src/lib/smm-od-v1.json +16 -1
- package/src/lib/smm-od-v2.json +2051 -0
- package/src/lib/smm-od.d.ts +41 -0
- package/src/lib/smm-od.js +6 -0
- package/src/lib/smm-od.js.map +1 -0
- package/src/lib/smm.d.ts +199 -48
- package/src/lib/smm.js +273 -95
- package/src/lib/smm.js.map +1 -1
- package/src/lib/util.d.ts +257 -6
- package/src/lib/util.js +328 -4
- package/src/lib/util.js.map +1 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export * from './lib/parameter';
|
|
|
36
36
|
export * from './lib/product';
|
|
37
37
|
export * from './lib/request-status-resolver';
|
|
38
38
|
export * from './lib/sii';
|
|
39
|
+
export * from './lib/smm-od';
|
|
40
|
+
export * from './lib/smm';
|
|
39
41
|
export * from './lib/system-log-line';
|
|
40
42
|
export * from './lib/types';
|
|
41
43
|
export * from './lib/units';
|
package/src/index.js
CHANGED
|
@@ -39,6 +39,8 @@ tslib_1.__exportStar(require("./lib/parameter"), exports);
|
|
|
39
39
|
tslib_1.__exportStar(require("./lib/product"), exports);
|
|
40
40
|
tslib_1.__exportStar(require("./lib/request-status-resolver"), exports);
|
|
41
41
|
tslib_1.__exportStar(require("./lib/sii"), exports);
|
|
42
|
+
tslib_1.__exportStar(require("./lib/smm-od"), exports);
|
|
43
|
+
tslib_1.__exportStar(require("./lib/smm"), exports);
|
|
42
44
|
tslib_1.__exportStar(require("./lib/system-log-line"), exports);
|
|
43
45
|
tslib_1.__exportStar(require("./lib/types"), exports);
|
|
44
46
|
tslib_1.__exportStar(require("./lib/units"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/motion-master-client/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,4DAAkC;AAClC,gEAAsC;AACtC,uDAA6B;AAC7B,iEAAuC;AACvC,gEAAsC;AACtC,wDAA8B;AAC9B,yDAA+B;AAC/B,yDAA+B;AAC/B,sDAA4B;AAC5B,yDAA+B;AAC/B,qEAA2C;AAC3C,uDAA6B;AAC7B,4EAAkD;AAClD,gEAAsC;AACtC,0DAAgC;AAChC,uDAA6B;AAC7B,kEAAwC;AACxC,iEAAuC;AACvC,gEAAsC;AACtC,qEAA2C;AAC3C,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,qEAA2C;AAC3C,uDAA6B;AAC7B,0DAAgC;AAChC,wDAA8B;AAC9B,2DAAiC;AACjC,0DAAgC;AAChC,wDAA8B;AAC9B,wEAA8C;AAC9C,oDAA0B;AAC1B,gEAAsC;AACtC,sDAA4B;AAC5B,sDAA4B;AAC5B,8DAAoC;AACpC,qDAA2B;AAC3B,kFAAwD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/motion-master-client/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,4DAAkC;AAClC,gEAAsC;AACtC,uDAA6B;AAC7B,iEAAuC;AACvC,gEAAsC;AACtC,wDAA8B;AAC9B,yDAA+B;AAC/B,yDAA+B;AAC/B,sDAA4B;AAC5B,yDAA+B;AAC/B,qEAA2C;AAC3C,uDAA6B;AAC7B,4EAAkD;AAClD,gEAAsC;AACtC,0DAAgC;AAChC,uDAA6B;AAC7B,kEAAwC;AACxC,iEAAuC;AACvC,gEAAsC;AACtC,qEAA2C;AAC3C,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,6EAAmD;AACnD,6EAAmD;AACnD,iFAAuD;AACvD,oFAA0D;AAC1D,qEAA2C;AAC3C,uDAA6B;AAC7B,0DAAgC;AAChC,wDAA8B;AAC9B,2DAAiC;AACjC,0DAAgC;AAChC,wDAA8B;AAC9B,wEAA8C;AAC9C,oDAA0B;AAC1B,uDAA6B;AAC7B,oDAA0B;AAC1B,gEAAsC;AACtC,sDAA4B;AAC5B,sDAA4B;AAC5B,8DAAoC;AACpC,qDAA2B;AAC3B,kFAAwD"}
|
|
@@ -4,7 +4,7 @@ import { Device } from './device';
|
|
|
4
4
|
import { DeviceParameter } from './device-parameter';
|
|
5
5
|
import { HardwareDescription, StackInfo } from './hardware-description';
|
|
6
6
|
import { MotionMasterReqResSocket } from './motion-master-req-res-socket';
|
|
7
|
-
import {
|
|
7
|
+
import { UIFeaturesConfig } from './parameter';
|
|
8
8
|
import { SystemLogLine } from './system-log-line';
|
|
9
9
|
import { MotionMasterMessage, ParameterValueType, ParameterTypeValue, DeviceParameterValuesStatus, ParameterTypeValueKey, DeviceRefObj, DeviceRef, FullAutoTuningStatus, SystemVersionStatus, DeviceInfoStatus, DeviceParameterInfoStatus, GetDeviceParameterInfoRequest, GetDeviceParameterValuesRequest, GetMultiDeviceParameterValuesRequest, MultiDeviceParameterValuesStatus, SetDeviceParameterValuesRequest, SetMultiDeviceParameterValuesRequest, GetDeviceFileListRequest, DeviceFileListStatus, GetDeviceFileRequest, DeviceFileStatus, SetDeviceFileRequest, DeleteDeviceFileRequest, ResetDeviceFaultRequest, DeviceFaultResetStatus, StopDeviceRequest, DeviceStopStatus, StartDeviceFirmwareInstallationRequest, DeviceFirmwareInstallationStatus, GetDeviceLogRequest, DeviceLogStatus, StartCoggingTorqueRecordingRequest, CoggingTorqueRecordingStatus, GetCoggingTorqueDataRequest, CoggingTorqueDataStatus, StartOffsetDetectionRequest, OffsetDetectionStatus, StartPlantModelIdentificationRequest, PlantIdentificationStatus, ComputeAutoTuningGainsRequest, AutoTuningStatus, SetMotionControllerParametersRequest, MotionControllerStatus, EnableMotionControllerRequest, SetSignalGeneratorParametersRequest, SignalGeneratorStatus, StopSignalGeneratorRequest, StartMonitoringDeviceParameterValuesRequest, MonitoringParameterValuesStatus, StopMonitoringDeviceParameterValuesRequest, GetEthercatNetworkStateRequest, EthercatNetworkStateStatus, SetEthercatNetworkStateRequest, StartNarrowAngleCalibrationRequest, NarrowAngleCalibrationStatus, SetSystemClientTimeoutRequest, StartSystemIdentificationRequest, SystemIdentificationStatus, CirculoEncoderMagnetDistanceStatus, StartCirculoEncoderNarrowAngleCalibrationProcedureRequest, CirculoEncoderNarrowAngleCalibrationProcedureStatus, GetDeviceCiA402StateRequest, DeviceCiA402StateStatus, SetDeviceCiA402StateRequest, SystemLogStatus, StartDeviceSiiRestoreRequest, DeviceSiiRestoreStatus, StartOpenLoopFieldControlRequest, OpenLoopFieldControlStatus, ComputeFullAutoTuningGainsRequest, StartFullAutoTuningRequest, StopFullAutoTuningRequest, StartCirculoEncoderConfigurationRequest, CirculoEncoderConfigurationStatus, StopCirculoEncoderNarrowAngleCalibrationProcedureRequest, StartOsCommandRequest, OsCommandStatus, RestoreDefaultParametersType, DeviceParameterAddressValue, DeviceParameterIds, DeviceParameterInfo, RequestStatusMessage } from './types';
|
|
10
10
|
import { Cia402State, ModesOfOperation } from './cia402';
|
|
@@ -12,7 +12,6 @@ import { EncoderRegisterCommunicationOsCommandResponse, MotorPhaseOrderDetection
|
|
|
12
12
|
import { IntegroVariant } from './integro-variant';
|
|
13
13
|
import { ConfigParameter } from './config-file';
|
|
14
14
|
import { MotionMasterClientIndexedDB } from './mmcidb';
|
|
15
|
-
import { SmmVerificationGroupOrdinal } from './smm';
|
|
16
15
|
import { DataType } from 'python-struct';
|
|
17
16
|
/**
|
|
18
17
|
* This class contains methods for making requests to Motion Master using the injected request/response socket.
|
|
@@ -1110,7 +1109,7 @@ export declare class MotionMasterReqResClient {
|
|
|
1110
1109
|
* @param deviceRef The reference to the device on which the command will be executed.
|
|
1111
1110
|
* @param command The command to be executed, represented as a Uint8Array.
|
|
1112
1111
|
* @param commandTimeout The maximum time allowed for the command to complete.
|
|
1113
|
-
* @param responsePollingInterval The interval (in milliseconds) for polling the command response.
|
|
1112
|
+
* @param responsePollingInterval The interval (in milliseconds) for polling the command response.
|
|
1114
1113
|
* @param osCommandMode Specifies whether the next OS command should run immediately after the current one or abort the current command. Sets the OS Command Mode. Defaults to false.
|
|
1115
1114
|
* @param fsBufferContent If true, the content of the fs-buffer will be read and assigned to the `fsBuffer` property of {@link OsCommandResponse}. If a Uint8Array is provided, the content will be written to the fs-buffer file. If undefined, only the OS command will be executed, and its response will be read and parsed.
|
|
1116
1115
|
* @returns An observable of type T, which extends {@link OsCommandResponse}, representing the result of the command execution.
|
|
@@ -1269,8 +1268,8 @@ export declare class MotionMasterReqResClient {
|
|
|
1269
1268
|
* @param deviceRef - The reference to the device to which the command will be sent.
|
|
1270
1269
|
* @param index - The index of the SMM parameter to read.
|
|
1271
1270
|
* @param subindex - The subindex of the SMM parameter to read. Defaults to 0.
|
|
1272
|
-
* @param commandTimeout - The timeout for the command in milliseconds.
|
|
1273
|
-
* @param responsePollingInterval - The interval between polling attempts for a response in milliseconds.
|
|
1271
|
+
* @param commandTimeout - The timeout for the command in milliseconds.
|
|
1272
|
+
* @param responsePollingInterval - The interval between polling attempts for a response in milliseconds.
|
|
1274
1273
|
*
|
|
1275
1274
|
* @returns An observable that emits the response from the command once it is received.
|
|
1276
1275
|
*/
|
|
@@ -1413,13 +1412,15 @@ export declare class MotionMasterReqResClient {
|
|
|
1413
1412
|
* @param deviceRef - The reference to the device to which the login command will be sent.
|
|
1414
1413
|
* @param username - The optional username used for logging in to the SMM. If not provided, it will be treated as an empty string.
|
|
1415
1414
|
* @param password - The password used for logging in to the SMM.
|
|
1415
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1416
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1416
1417
|
*
|
|
1417
1418
|
* @returns An observable that emits a boolean value indicating whether the login attempt succeeded.
|
|
1418
1419
|
*
|
|
1419
1420
|
* @remarks
|
|
1420
1421
|
* If the device is already logged in, the next login attempt will fail unless the user logs out first.
|
|
1421
1422
|
*/
|
|
1422
|
-
loginToSmmForParameterDownload(deviceRef: DeviceRef, username: string, password: string): Observable<boolean>;
|
|
1423
|
+
loginToSmmForParameterDownload(deviceRef: DeviceRef, username: string, password: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1423
1424
|
/**
|
|
1424
1425
|
* Logs into the SMM for software update with the provided credentials.
|
|
1425
1426
|
*
|
|
@@ -1430,13 +1431,15 @@ export declare class MotionMasterReqResClient {
|
|
|
1430
1431
|
* @param deviceRef - The reference to the device to which the login command will be sent.
|
|
1431
1432
|
* @param username - The optional username used for logging in to the SMM. If not provided, it will be treated as an empty string.
|
|
1432
1433
|
* @param password - The password used for logging in to the SMM.
|
|
1434
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1435
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1433
1436
|
*
|
|
1434
1437
|
* @returns An observable that emits a boolean value indicating whether the login attempt succeeded.
|
|
1435
1438
|
*
|
|
1436
1439
|
* @remarks
|
|
1437
1440
|
* If the device is already logged in, the next login attempt will fail unless the user logs out first.
|
|
1438
1441
|
*/
|
|
1439
|
-
loginToSmmForSoftwareUpdate(deviceRef: DeviceRef, username: string, password: string): Observable<boolean>;
|
|
1442
|
+
loginToSmmForSoftwareUpdate(deviceRef: DeviceRef, username: string, password: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1440
1443
|
/**
|
|
1441
1444
|
* Logs out from the SMM.
|
|
1442
1445
|
*
|
|
@@ -1444,10 +1447,12 @@ export declare class MotionMasterReqResClient {
|
|
|
1444
1447
|
* is successful and `false` otherwise. The command times out after 10 seconds if no response is received.
|
|
1445
1448
|
*
|
|
1446
1449
|
* @param deviceRef - The reference to the device to which the logout command will be sent.
|
|
1450
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1451
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1447
1452
|
*
|
|
1448
1453
|
* @returns An observable that emits a boolean value indicating whether the logout attempt succeeded.
|
|
1449
1454
|
*/
|
|
1450
|
-
logoutFromSmm(deviceRef: DeviceRef): Observable<boolean>;
|
|
1455
|
+
logoutFromSmm(deviceRef: DeviceRef, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1451
1456
|
/**
|
|
1452
1457
|
* Logs out from the SMM and then logs back in with the provided credentials for parameter download.
|
|
1453
1458
|
*
|
|
@@ -1458,16 +1463,20 @@ export declare class MotionMasterReqResClient {
|
|
|
1458
1463
|
* @param deviceRef - The reference to the device to which the logout and login commands will be sent.
|
|
1459
1464
|
* @param username - The username used for logging in to the SMM.
|
|
1460
1465
|
* @param password - The password used for logging in to the SMM.
|
|
1466
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1467
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1461
1468
|
*
|
|
1462
1469
|
* @returns An observable that emits a boolean value indicating whether the relogin attempt succeeded.
|
|
1463
1470
|
*/
|
|
1464
|
-
reloginToSmmForParameterDownload(deviceRef: DeviceRef, username: string, password: string): Observable<boolean>;
|
|
1471
|
+
reloginToSmmForParameterDownload(deviceRef: DeviceRef, username: string, password: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1465
1472
|
/**
|
|
1466
1473
|
* Changes the SMM password for the specified device.
|
|
1467
1474
|
*
|
|
1468
1475
|
* @param deviceRef - A reference to the target device.
|
|
1469
1476
|
* @param oldPassword - The current SMM password.
|
|
1470
1477
|
* @param newPassword - The new password to set for the SMM.
|
|
1478
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1479
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1471
1480
|
* @returns An Observable that emits `true` if the password change and SMM restart succeed, otherwise `false`.
|
|
1472
1481
|
*
|
|
1473
1482
|
* @remarks
|
|
@@ -1476,7 +1485,7 @@ export declare class MotionMasterReqResClient {
|
|
|
1476
1485
|
*
|
|
1477
1486
|
* This function sends an acyclic command to update the password. If successful, it triggers an SMM restart.
|
|
1478
1487
|
*/
|
|
1479
|
-
changeSmmPassword(deviceRef: DeviceRef, oldPassword: string, newPassword: string): Observable<boolean>;
|
|
1488
|
+
changeSmmPassword(deviceRef: DeviceRef, oldPassword: string, newPassword: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1480
1489
|
/**
|
|
1481
1490
|
* Triggers a restart for the specified device.
|
|
1482
1491
|
*
|
|
@@ -1484,8 +1493,8 @@ export declare class MotionMasterReqResClient {
|
|
|
1484
1493
|
* The method will return `true` if the restart was successful, otherwise `false`.
|
|
1485
1494
|
*
|
|
1486
1495
|
* @param deviceRef - The reference to the device to restart.
|
|
1487
|
-
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1488
|
-
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1496
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1497
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1489
1498
|
*
|
|
1490
1499
|
* @returns An Observable that emits `true` if the restart was successful, or `false` otherwise.
|
|
1491
1500
|
*/
|
|
@@ -1497,8 +1506,8 @@ export declare class MotionMasterReqResClient {
|
|
|
1497
1506
|
* The method will return `true` if the acknowledgment was successful, otherwise `false`.
|
|
1498
1507
|
*
|
|
1499
1508
|
* @param deviceRef - The reference to the device to acknowledge the I/O failure on.
|
|
1500
|
-
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1501
|
-
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1509
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1510
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1502
1511
|
*
|
|
1503
1512
|
* @returns An Observable that emits `true` if the acknowledgment was successful, or `false` otherwise.
|
|
1504
1513
|
*/
|
|
@@ -1511,15 +1520,17 @@ export declare class MotionMasterReqResClient {
|
|
|
1511
1520
|
* @param deviceRef - The reference to the target device.
|
|
1512
1521
|
* @param values - An array of data values to transmit.
|
|
1513
1522
|
* @param parameterStructureVersion - The version of the parameter structure (default: 0x0041).
|
|
1523
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1524
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1514
1525
|
*
|
|
1515
1526
|
* @returns An Observable that emits `true` if the operation succeeds, or `false` if it fails, the `values` array is empty.
|
|
1516
1527
|
*
|
|
1517
1528
|
* @remarks
|
|
1518
1529
|
* - If the `values` array is empty, the function immediately returns `false`.
|
|
1519
1530
|
* - The `version` is prepended to the values array before packing.
|
|
1520
|
-
* - The function constructs an OS command for transmitting the parameters and writes the packed buffer to the file
|
|
1531
|
+
* - The function constructs an OS command for transmitting the parameters and writes the packed buffer to the fs-buffer file.
|
|
1521
1532
|
*/
|
|
1522
|
-
transmitSmmParameters(deviceRef: DeviceRef, values: DataType[], parameterStructureVersion?: number): Observable<boolean>;
|
|
1533
|
+
transmitSmmParameters(deviceRef: DeviceRef, values: DataType[], parameterStructureVersion?: number, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1523
1534
|
/**
|
|
1524
1535
|
* Loads the SMM parameters for verification on the specified device.
|
|
1525
1536
|
*
|
|
@@ -1528,13 +1539,100 @@ export declare class MotionMasterReqResClient {
|
|
|
1528
1539
|
* into valid parameter values, which are then returned in sequence within the OS command response.
|
|
1529
1540
|
*
|
|
1530
1541
|
* @param deviceRef - The reference to the device from which the parameters should be loaded.
|
|
1542
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1543
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1531
1544
|
* @returns An Observable that emits the response from the device, containing the valid parameter values for verification
|
|
1532
1545
|
* after the buffer is processed and reconstructed.
|
|
1533
1546
|
*
|
|
1534
1547
|
* @throws Will throw an error if the command fails or times out.
|
|
1535
1548
|
*/
|
|
1536
|
-
loadSmmParametersForVerification(deviceRef: DeviceRef): Observable<SmmAcyclicHandlerLoadParametersForVerificationOsCommandResponse>;
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1549
|
+
loadSmmParametersForVerification(deviceRef: DeviceRef, commandTimeout?: number, responsePollingInterval?: number): Observable<SmmAcyclicHandlerLoadParametersForVerificationOsCommandResponse>;
|
|
1550
|
+
/**
|
|
1551
|
+
* Verifies a group of SMM parameters for the specified device.
|
|
1552
|
+
*
|
|
1553
|
+
* This function calculates a bitmask from the provided values and group ordinal,
|
|
1554
|
+
* then sends an SMM OS command (subcommand VERIFY_PARAMETERS) along with the bitmask content
|
|
1555
|
+
* via `fs-buffer` to the device for verification.
|
|
1556
|
+
*
|
|
1557
|
+
* @param deviceRef - A reference to the target device.
|
|
1558
|
+
* @param values - An array of parameter values to verify.
|
|
1559
|
+
* @param groupIndex - The verification group index used for bitmask calculation.
|
|
1560
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1561
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1562
|
+
* @returns An `Observable<boolean>` that emits `true` if the verification succeeded, or `false` otherwise.
|
|
1563
|
+
*
|
|
1564
|
+
* @remarks
|
|
1565
|
+
* This function requires parameters to be previously loaded for verification to succeed. If parameters are not preloaded, the verification will fail.
|
|
1566
|
+
* The same group can be verified multiple times without causing an error.
|
|
1567
|
+
*/
|
|
1568
|
+
verifySmmParameters(deviceRef: DeviceRef, values: DataType[], groupIndex: number, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Loads the SMM validation file on the specified device.
|
|
1571
|
+
*
|
|
1572
|
+
* @param deviceRef - A reference to the target device.
|
|
1573
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1574
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1575
|
+
* @returns An Observable emitting the OS command response.
|
|
1576
|
+
*
|
|
1577
|
+
* @remarks
|
|
1578
|
+
* This function should only be called **after all parameter groups have been successfully verified**.
|
|
1579
|
+
*/
|
|
1580
|
+
loadSmmValidationFile(deviceRef: DeviceRef, commandTimeout?: number, responsePollingInterval?: number): Observable<OsCommandResponse>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Loads the SMM validation file and then retrieves the safety parameters report file.
|
|
1583
|
+
*
|
|
1584
|
+
* @param deviceRef - A reference to the target device.
|
|
1585
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1586
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1587
|
+
* @returns An Observable emitting the decoded content of the `.safety_parameters_report` file.
|
|
1588
|
+
*
|
|
1589
|
+
* @throws An error if loading the validation file fails.
|
|
1590
|
+
*
|
|
1591
|
+
* @remarks
|
|
1592
|
+
* This function should only be called **after all parameter groups have been successfully verified**.
|
|
1593
|
+
*/
|
|
1594
|
+
loadSmmValidationFileAndReadSafetyParametersReportFile(deviceRef: DeviceRef, commandTimeout?: number, responsePollingInterval?: number): Observable<string>;
|
|
1595
|
+
/**
|
|
1596
|
+
* Validates the SMM configuration on the specified device.
|
|
1597
|
+
*
|
|
1598
|
+
* @param deviceRef - The reference to the target device.
|
|
1599
|
+
* @param report - A `Uint8Array` representing the validation report data.
|
|
1600
|
+
* @param date - The date associated with the validation.
|
|
1601
|
+
* @param username - The username used for authentication.
|
|
1602
|
+
* @param password - The password used for authentication.
|
|
1603
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1604
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1605
|
+
*
|
|
1606
|
+
* @returns An Observable that emits `true` if the configuration validation succeeds, or `false` if it fails.
|
|
1607
|
+
*
|
|
1608
|
+
* @remarks
|
|
1609
|
+
* - Packs the validation report, date, username, and password into a buffer.
|
|
1610
|
+
* - Constructs an OS command using the `VALIDATE_CONFIGURATION` subcommand.
|
|
1611
|
+
* - Sends the command to the device and writes the packed buffer to the fs-buffer file.
|
|
1612
|
+
* - **Important:** Once the configuration is successfully validated, subsequent calls to this function will fail. To revalidate, the user must go through the verification process again.
|
|
1613
|
+
*/
|
|
1614
|
+
validateSmmConfiguration(deviceRef: DeviceRef, report: Uint8Array, date: Date, username: string, password: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1615
|
+
/**
|
|
1616
|
+
* Reads the safety parameters report from the device and validates the SMM configuration.
|
|
1617
|
+
*
|
|
1618
|
+
* @param deviceRef - The reference to the target device.
|
|
1619
|
+
* @param date - The date associated with the validation.
|
|
1620
|
+
* @param username - The username used for authentication.
|
|
1621
|
+
* @param password - The password used for authentication.
|
|
1622
|
+
* @param commandTimeout - The timeout in milliseconds for the command to complete.
|
|
1623
|
+
* @param responsePollingInterval - The interval in milliseconds between polling for the response.
|
|
1624
|
+
*
|
|
1625
|
+
* @returns An Observable that emits `true` if the SMM configuration is successfully validated, or `false` if validation fails.
|
|
1626
|
+
*
|
|
1627
|
+
* @throws An error if the `.safety_parameters_report` file is missing.
|
|
1628
|
+
*
|
|
1629
|
+
* @remarks
|
|
1630
|
+
* - The function attempts to retrieve the `.safety_parameters_report` file from the device.
|
|
1631
|
+
* - If the file is missing, an error is thrown.
|
|
1632
|
+
* - The file content is read into a `Uint8Array` and passed to `validateSmmConfiguration`.
|
|
1633
|
+
* - The SMM configuration validation follows the same behavior as `validateSmmConfiguration`:
|
|
1634
|
+
* - If validation succeeds, subsequent calls to this function will fail.
|
|
1635
|
+
* - To revalidate, the user must repeat the verification process.
|
|
1636
|
+
*/
|
|
1637
|
+
readSafetyParametersReportAndValidateSmmConfiguration(deviceRef: DeviceRef, date: Date, username: string, password: string, commandTimeout?: number, responsePollingInterval?: number): Observable<boolean>;
|
|
1540
1638
|
}
|