Skip to content

AliOS Things API CLI Guide

librae8226 edited this page Mar 1, 2018 · 1 revision

API INDEX


1-aos_cli_register_command

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.

2-aos_cli_unregister_command

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.

3-aos_cli_register_commands

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.

4-aos_cli_unregister_commands

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.

5-aos_cli_printf

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.

6-aos_cli_init

int aos_cli_init(void)
  • Description

    CLI initial function

  • Parameters

    None.

  • Returns

    0 on success, error code otherwise

7-aos_cli_stop

int aos_cli_stop(void)
  • Description

    Stop the CLI thread and carry out the cleanup

  • Parameters

    None.

  • Returns

    0 on success, error code otherwise.

Clone this wiki locally