@synapticon/motion-master-client 6.0.0-alpha.58 → 6.0.0-alpha.60

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.
@@ -657,6 +657,58 @@ export declare class Api<SecurityDataType = unknown> extends HttpClient<Security
657
657
  */
658
658
  value: number;
659
659
  }, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, void>>;
660
+ /**
661
+ * @description Commands the device to persist its current parameters (the generic CANopen "store parameters" object 0x1010:01) and waits for confirmation. The server writes the ASCII "save" signature, waits a fixed settle (~1 s) for the drive to begin the flash write, then polls 0x1010:01 until it reads back 1 ("save completed"). Because a store in progress can leave the mailbox briefly unresponsive, a poll that does not yet confirm — a value mismatch or a transient read error alike — is retried up to `retries` more times, `interval` apart. The call blocks until the store is confirmed or the retry budget is exhausted (up to a few seconds); the device's mailbox must be active (PRE-OP/SAFE-OP/OP).
662
+ *
663
+ * @name StoreParameters
664
+ * @summary Store a device's parameters to non-volatile memory
665
+ * @request POST:/api/devices/{slavePosition}/store-parameters
666
+ */
667
+ storeParameters: (slavePosition: number, query?: {
668
+ /**
669
+ * Maximum number of extra confirmation polls after the first.
670
+ * @min 0
671
+ * @default 10
672
+ * @example 5
673
+ */
674
+ retries?: number;
675
+ /**
676
+ * Delay between confirmation polls, in milliseconds.
677
+ * @min 0
678
+ * @default 500
679
+ * @example 500
680
+ */
681
+ interval?: number;
682
+ }, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, void>>;
683
+ /**
684
+ * @description Commands the device to restore its default parameters (the generic CANopen "restore default parameters" object 0x1011) for the selected `group`, and waits for confirmation. The server writes the ASCII "load" signature to the matching 0x1011 sub-entry, waits a fixed settle (~1 s) for the device to begin, then polls that sub-entry until it reads back 1 ("restore completed"), retrying a poll that does not yet confirm — a value mismatch or a transient read error alike — up to `retries` more times, `interval` apart. The call blocks until the restore is confirmed or the retry budget is exhausted (up to a few seconds); the device's mailbox must be active (PRE-OP/SAFE-OP/OP). **Destructive:** this overwrites the selected group's parameter values in the device's volatile memory with the device's defaults, replacing the current live values (not the persisted store). Which values it touches, and whether it takes effect immediately or after the next reset, is device-specific.
685
+ *
686
+ * @name RestoreDefaultParameters
687
+ * @summary Restore a device's default parameters
688
+ * @request POST:/api/devices/{slavePosition}/restore-default-parameters
689
+ */
690
+ restoreDefaultParameters: (slavePosition: number, query?: {
691
+ /**
692
+ * Which group of defaults to restore — all (0x1011:01), communication (0x1011:02), application (0x1011:03), or manufacturer (0x1011:04).
693
+ * @default "all"
694
+ * @example "all"
695
+ */
696
+ group?: "all" | "communication" | "application" | "manufacturer";
697
+ /**
698
+ * Maximum number of extra confirmation polls after the first.
699
+ * @min 0
700
+ * @default 10
701
+ * @example 5
702
+ */
703
+ retries?: number;
704
+ /**
705
+ * Delay between confirmation polls, in milliseconds.
706
+ * @min 0
707
+ * @default 500
708
+ * @example 500
709
+ */
710
+ interval?: number;
711
+ }, params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, void>>;
660
712
  /**
661
713
  * @description Performs a CoE SDO upload — reads the value of object `index:subindex` from the device at `slavePosition` and returns the raw bytes as a JSON array. Both `index` and `subindex` accept decimal or hexadecimal notation; prefix with `0x` for hex (e.g. `0x6064` or `24676` for object 0x6064).
662
714
  *
@@ -456,6 +456,32 @@ export class Api extends HttpClient {
456
456
  type: ContentType.Json,
457
457
  ...params,
458
458
  });
459
+ /**
460
+ * @description Commands the device to persist its current parameters (the generic CANopen "store parameters" object 0x1010:01) and waits for confirmation. The server writes the ASCII "save" signature, waits a fixed settle (~1 s) for the drive to begin the flash write, then polls 0x1010:01 until it reads back 1 ("save completed"). Because a store in progress can leave the mailbox briefly unresponsive, a poll that does not yet confirm — a value mismatch or a transient read error alike — is retried up to `retries` more times, `interval` apart. The call blocks until the store is confirmed or the retry budget is exhausted (up to a few seconds); the device's mailbox must be active (PRE-OP/SAFE-OP/OP).
461
+ *
462
+ * @name StoreParameters
463
+ * @summary Store a device's parameters to non-volatile memory
464
+ * @request POST:/api/devices/{slavePosition}/store-parameters
465
+ */
466
+ storeParameters = (slavePosition, query, params = {}) => this.request({
467
+ path: `/api/devices/${slavePosition}/store-parameters`,
468
+ method: "POST",
469
+ query: query,
470
+ ...params,
471
+ });
472
+ /**
473
+ * @description Commands the device to restore its default parameters (the generic CANopen "restore default parameters" object 0x1011) for the selected `group`, and waits for confirmation. The server writes the ASCII "load" signature to the matching 0x1011 sub-entry, waits a fixed settle (~1 s) for the device to begin, then polls that sub-entry until it reads back 1 ("restore completed"), retrying a poll that does not yet confirm — a value mismatch or a transient read error alike — up to `retries` more times, `interval` apart. The call blocks until the restore is confirmed or the retry budget is exhausted (up to a few seconds); the device's mailbox must be active (PRE-OP/SAFE-OP/OP). **Destructive:** this overwrites the selected group's parameter values in the device's volatile memory with the device's defaults, replacing the current live values (not the persisted store). Which values it touches, and whether it takes effect immediately or after the next reset, is device-specific.
474
+ *
475
+ * @name RestoreDefaultParameters
476
+ * @summary Restore a device's default parameters
477
+ * @request POST:/api/devices/{slavePosition}/restore-default-parameters
478
+ */
479
+ restoreDefaultParameters = (slavePosition, query, params = {}) => this.request({
480
+ path: `/api/devices/${slavePosition}/restore-default-parameters`,
481
+ method: "POST",
482
+ query: query,
483
+ ...params,
484
+ });
459
485
  /**
460
486
  * @description Performs a CoE SDO upload — reads the value of object `index:subindex` from the device at `slavePosition` and returns the raw bytes as a JSON array. Both `index` and `subindex` accept decimal or hexadecimal notation; prefix with `0x` for hex (e.g. `0x6064` or `24676` for object 0x6064).
461
487
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synapticon/motion-master-client",
3
- "version": "6.0.0-alpha.58",
3
+ "version": "6.0.0-alpha.60",
4
4
  "description": "Isomorphic TypeScript client for Motion Master: the generated HTTP API client, the WebSocket connection, and helpers.",
5
5
  "license": "MIT",
6
6
  "repository": {