Embedded TCP/IP stack  4.7.0

◆ fnet_shell_help()

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:

...
static const fnet_shell_command_t fapp_cmd_table [] =
{
{ FNET_SHELL_CMD_TYPE_NORMAL, "?", 0, 0, fapp_help_cmd,"Display this help message.", ""},
{ FNET_SHELL_CMD_TYPE_NORMAL, "set", 0, 2, fapp_set_cmd, "Set parameter.", "[<parameter> <value>]"},
{ FNET_SHELL_CMD_TYPE_NORMAL, "get", 0, 0, fapp_show, "Get parameters.", "[<parameter>]" },
{ FNET_SHELL_CMD_TYPE_NORMAL, "info", 0, 0, fapp_netif_info_cmd, "Show interface info.", ""},
{ FNET_SHELL_CMD_TYPE_NORMAL, "dhcp", 0, 1, fapp_dhcp_cln_cmd, "Start DHCP client.", "[release|reboot]"},
{ FNET_SHELL_CMD_TYPE_NORMAL, "http", 0, 1, fapp_http_srv_cmd, "Start HTTP Server.", "[release]"},
{ FNET_SHELL_CMD_TYPE_SHELL, "exp", 0, 1, &fapp_fs_shell, "File Explorer submenu...", ""},
};
...

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-2020 by Andrej Butok. http://fnet.sourceforge.net