AliOS Things API CLI Guide - Shaofa/AliOS-Things-Certification-Manual GitHub Wiki
- 1 aos_cli_register_command
- 2 aos_cli_unregister_command
- 3 aos_cli_register_commands
- 4 aos_cli_unregister_commands
- 5 aos_cli_printf
- 6 aos_cli_init
- 7 aos_cli_stop
int aos_cli_register_command(const struct cli_command *command)
-
Description
This function registers a command with the command-line interface.
-
Parameters
IN/OUT NAME DESC [in] command The structure to register one CLI command -
Returns
0 on success, error code otherwise.
int aos_cli_unregister_command(const struct cli_command *command)
-
Description
This function unregisters a command from the command-line interface.
-
Parameters
IN/OUT NAME DESC [in] command The structure to unregister one CLI command -
Returns
0 on success, error code otherwise.
int aos_cli_register_commands(const struct cli_command *commands, int num_commands)
-
Description
Register a batch of CLI commands Often, a module will want to register several commands.
-
Parameters
IN/OUT NAME DESC [in] commands Pointer to an array of commands. [in] num_commands Number of commands in the array. -
Returns
0 on success, error code otherwise.
int aos_cli_unregister_commands(const struct cli_command *commands, int num_commands)
-
Description
Unregister a batch of CLI commands
-
Parameters
IN/OUT NAME DESC [in] commands Pointer to an array of commands. [in] num_commands Number of commands in the array. -
Returns
0 on success, error code otherwise.
int aos_cli_printf(const char *buff, ...)
-
Description
Print CLI msg
-
Parameters
IN/OUT NAME DESC [in] buff Pointer to a char * buffer. -
Returns
0 on success, error code otherwise.
int aos_cli_init(void)
-
Description
CLI initial function
-
Parameters
None.
-
Returns
0 on success, error code otherwise
int aos_cli_stop(void)
-
Description
Stop the CLI thread and carry out the cleanup
-
Parameters
None.
-
Returns
0 on success, error code otherwise.