Lines Matching full:command

51  * case. If command rely on unformatted argument then this flag shall be used
52 * in place of number of optional arguments in command definition to indicate
53 * that only mandatory arguments shall be parsed and remaining command string is
79 * @brief Shell dynamic command descriptor.
93 * @brief Shell command descriptor.
129 * @brief Shell command handler prototype.
135 * @retval 0 Successful command execution.
136 * @retval 1 Help printed and command not executed.
138 * @retval -ENOEXEC Command not executed.
144 * @brief Shell dictionary command handler prototype.
151 * @retval 0 Successful command execution.
152 * @retval 1 Help printed and command not executed.
154 * @retval -ENOEXEC Command not executed.
170 * @brief Shell static command descriptor.
173 const char *syntax; /*!< Command syntax strings. */
174 const char *help; /*!< Command help string. */
176 shell_cmd_handler handler; /*!< Command handler. */
177 struct shell_static_args args; /*!< Command arguments. */
182 * @brief Macro for defining and adding a root command (level 0) with required
185 * @note Each root command shall have unique syntax. If a command will be called
186 * with wrong number of arguments shell will print an error message and command
189 * @param[in] syntax Command syntax (for example: history).
191 * @param[in] help Pointer to a command help string.
193 * @param[in] mandatory Number of mandatory arguments including command name.
208 * @brief Macro for defining and adding a conditional root command (level 0)
213 * Macro can be used to create a command which can be conditionally present.
214 * It is and alternative to \#ifdefs around command registration and command
215 * handler. If command is disabled handler and subcommands are removed from
218 * @param[in] flag Compile time flag. Command is present only if flag
220 * @param[in] syntax Command syntax (for example: history).
222 * @param[in] help Pointer to a command help string.
224 * @param[in] mandatory Number of mandatory arguments including command name.
243 * @brief Macro for defining and adding a root command (level 0) with
248 * @param[in] syntax Command syntax (for example: history).
250 * @param[in] help Pointer to a command help string.
257 * @brief Macro for defining and adding a conditional root command (level 0)
262 * @param[in] flag Compile time flag. Command is present only if flag
264 * @param[in] syntax Command syntax (for example: history).
266 * @param[in] help Pointer to a command help string.
313 * command.
316 * (foo_cmd) if subcommands are for the root command "foo_cmd".
324 /** @brief Conditionally add command to the set of subcommands.
326 * Add command to the set created with @ref SHELL_SUBCMD_SET_CREATE.
333 * @param[in] _flag Compile time flag. Command is present only if flag
335 * @param[in] _parent Parent command sequence. Comma separated in parenthesis.
336 * @param[in] _syntax Command syntax (for example: history).
338 * @param[in] _help Pointer to a command help string.
340 * @param[in] _mand Number of mandatory arguments including command name.
360 /** @brief Add command to the set of subcommands.
362 * Add command to the set created with @ref SHELL_SUBCMD_SET_CREATE.
364 * @param[in] _parent Parent command sequence. Comma separated in parenthesis.
365 * @param[in] _syntax Command syntax (for example: history).
367 * @param[in] _help Pointer to a command help string.
369 * @param[in] _mand Number of mandatory arguments including command name.
395 * @brief Initializes a shell command with arguments.
397 * @note If a command will be called with wrong number of arguments shell will
398 * print an error message and command handler will not be called.
400 * @param[in] syntax Command syntax (for example: history).
402 * @param[in] help Pointer to a command help string.
404 * @param[in] mand Number of mandatory arguments including command name.
411 * @brief Initializes a conditional shell command with arguments.
414 * command which is ignored by the shell. It is an alternative to \#ifdefs
415 * around command registration and command handler. However, empty structure is
416 * present in the flash even if command is disabled (subcommands and handler are
420 * @param[in] flag Compile time flag. Command is present only if flag
422 * @param[in] syntax Command syntax (for example: history).
424 * @param[in] help Pointer to a command help string.
426 * @param[in] mand Number of mandatory arguments including command name.
434 * @brief Initializes a conditional shell command with arguments if expression
438 * empty command which is ignored by the shell. It should be used instead of
445 * @param[in] _syntax Command syntax (for example: history).
447 * @param[in] _help Pointer to a command help string.
449 * @param[in] _mand Number of mandatory arguments including command name.
464 * @brief Initializes a shell command.
466 * @param[in] _syntax Command syntax (for example: history).
468 * @param[in] _help Pointer to a command help string.
475 * @brief Initializes a conditional shell command.
479 * @param[in] _flag Compile time flag. Command is present only if flag
481 * @param[in] _syntax Command syntax (for example: history).
483 * @param[in] _help Pointer to a command help string.
490 * @brief Initializes shell command if expression gives non-zero result at
495 * @param[in] _expr Compile time expression. Command is present only if
497 * @param[in] _syntax Command syntax (for example: history).
499 * @param[in] _help Pointer to a command help string.
526 * a command handler. The string is usually a verbal description of a given
527 * data. The idea is to use the string as a command syntax that can be prompted
528 * by the shell and corresponding data can be used to process the command.
531 * @param[in] _handler Command handler common for all dictionary commands.
743 uint32_t cmd_ctx :1; /*!< Shell is executing command */
784 /** Currently executed command.*/
787 /** New root command. If NULL shell uses default root commands. */
806 uint16_t cmd_buff_len; /*!< Command length.*/
807 uint16_t cmd_buff_pos; /*!< Command buffer cursor position.*/
809 uint16_t cmd_tmp_buff_len; /*!< Command length in tmp buffer.*/
811 /** Command input buffer.*/
814 /** Command temporary buffer.*/
989 * This function can be used from the command handler or from threads, but not
1004 * This function can be used from the command handler or from threads, but not
1111 * @brief Prints the current command help.
1113 * Function will print a help string with: the currently entered command
1120 /** @brief Command's help has been printed */
1123 /** @brief Execute command.
1125 * Pass command line to shell to execute.
1130 * This function must not be called from shell command context!
1136 * @param[in] cmd Command to be executed.
1142 /** @brief Set root command for all shell instances.
1144 * It allows setting from the code the root command. It is an equivalent of
1145 * calling select command with one of the root commands as the argument
1146 * (e.g "select log") except it sets command for all shell instances.
1150 * @retval 0 if root command is set.
1151 * @retval -EINVAL if invalid root command is provided.
1250 * @brief Retrieve return value of most recently executed shell command.
1254 * @retval return value of previous command