The latest development version of this page may be more current than this released 2.3-beta.1 version.

CLI API Reference

int wm_cli_init(void)

Initialize cli.

Returns:

  • WM_ERR_SUCCESS: succeed

  • others: failed

int wm_cli_printf(const char *fmt, ...)

output cli information

Parameters:
  • fmt[in] string format list

  • ...[in] variable parameters

Returns:

the number of bytes transmitted

WM_CLI_CMD_DEFINE(cmd, handler, description, usage)

define an cli command

Parameters:
  • cmd[in] cmd name

  • handler[in] cmd handler funtion

  • description[in] cmd description

  • usage[in] cmd usage

Returns:

None

typedef void (*wm_cli_handler)(int argc, char *argv[])

command handler.

Param argc:

number of input parameters.

Param argv:

input parameters.