xref: /docs/en/application-dev/tools/param-tool.md (revision e41f4b71)
1# param
2
3The param tool enables you to operate system parameters. It is valid only for standard-system devices.
4
5## Prerequisites
6
7* You have obtained the <!--Del-->[<!--DelEnd-->hdc tool<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd--> to run hdc shell commands.
8* The device is properly connected.
9
10## Command Description
11
12  | Command| Description|
13  | ----------------- | ------------------------------------------ |
14  | ls [-r] [name] | Displays the information about the system parameter that matches the given name. If **-r** is carried, the information is obtained based on the parameter permission. If **-r** is not carried, the information is directly obtained.|
15  | get [name] | Obtains the value of the system parameter with the given name. If no name is specified, the values of all system parameters are returned.|
16  | set name value | Sets the value for the system parameter with the given name.|
17  | wait name [value] [timeout] | Waits for the system parameter with the given name to match the specified value. Fuzzy match is supported. For example, ***** indicates any value, and **val*** indicates matching of only the first three val characters. **timeout** indicates the waiting time, in seconds. If it is not set, the default value 30s is used.|
18  | save | Persistently saves the parameters to the workspace.|
19
20## Example
21
22* To display information about the system parameter that matches a given name, run the following command:
23
24  ```bash
25  param ls [-r] [name]
26  ```
27  **Usage Example**
28  ![ls-integrity](figures/param-ls-integrity.png)
29  ![ls-part](figures/param-ls-part.png)
30  ![ls](figures/param-ls.png)
31
32* To obtain the value of the system parameter with the given name, run the following command:
33
34  ```bash
35  param get [name]
36  ```
37  **Usage Example**
38  ![get](figures/param-get.png)
39
40* To set the value for the system parameter with the given name, run the following command:
41
42  ```bash
43  param set name value
44  ```
45  **Usage Example**
46  ![set](figures/param-set.png)
47
48* To wait for the system parameter with the given name to match the specified value, run the following command:
49
50  ```bash
51  param wait name [value] [timeout]
52  ```
53  **Usage Example**
54  ![wait](figures/param-wait.png)
55
56* To persistently save the parameters to the workspace, run the following command:
57
58  ```bash
59  param save
60  ```
61  **Usage Example**
62  ![save](figures/param-save.png)
63