Embedded TCP/IP stack: fnet_shell_help

FNET

void fnet_shell_help ( fnet_shell_desc_t  desc)

Prints the command-shell help message.

Parameters
descShell service descriptor.
See also
fnet_shell_cmd_function_t

This function prints the list of commands supported by the shell, defined by the desc descriptor. For example:

1 ...
2  static const struct fnet_shell_command fapp_cmd_table [] =
3  {
4  { FNET_SHELL_CMD_TYPE_NORMAL, "?", 0, 0, fapp_help_cmd,"Display this help message.", ""},
5  { FNET_SHELL_CMD_TYPE_NORMAL, "set", 0, 2, fapp_set_cmd, "Set parameter.", "[<parameter> <value>]"},
6  { FNET_SHELL_CMD_TYPE_NORMAL, "get", 0, 0, fapp_show, "Get parameters.", "[<parameter>]" },
7  { FNET_SHELL_CMD_TYPE_NORMAL, "info", 0, 0, fapp_netif_info_cmd, "Show interface info.", ""},
8  { FNET_SHELL_CMD_TYPE_NORMAL, "dhcp", 0, 1, fapp_dhcp_cln_cmd, "Start DHCP client.", "[release|reboot]"},
9  { FNET_SHELL_CMD_TYPE_NORMAL, "http", 0, 1, fapp_http_cmd, "Start HTTP Server.", "[release]"},
10  { FNET_SHELL_CMD_TYPE_SHELL, "exp", 0, 1, &fapp_fs_shell, "File Explorer submenu...", ""},
11  };
12 ...

Calling of the fnet_shell_help() for the fapp_cmd_table structure prints:

>      ?                                 - Display this help message
>    set [<parameter> <value>]           - Set parameter
>    get [<parameter>]                   - Get parameters
>   info                                 - Show detailed status
>   dhcp [release]                       - Start DHCP client
>   http [release]                       - Start HTTP Server
>    exp                                 - File Explorer submenu...

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net