Lines Matching full:command

55  * case. If command rely on unformatted argument then this flag shall be used
56 * in place of number of optional arguments in command definition to indicate
57 * that only mandatory arguments shall be parsed and remaining command string is
85 * @brief Shell dynamic command descriptor.
99 * @brief Shell command descriptor.
185 * @brief Shell command handler prototype.
191 * @retval 0 Successful command execution.
192 * @retval 1 Help printed and command not executed.
194 * @retval -ENOEXEC Command not executed.
200 * @brief Shell dictionary command handler prototype.
207 * @retval 0 Successful command execution.
208 * @retval 1 Help printed and command not executed.
210 * @retval -ENOEXEC Command not executed.
226 * @brief Shell static command descriptor.
229 const char *syntax; /*!< Command syntax strings. */
230 const char *help; /*!< Command help string. */
232 shell_cmd_handler handler; /*!< Command handler. */
233 struct shell_static_args args; /*!< Command arguments. */
238 * @brief Macro for defining and adding a root command (level 0) with required
241 * @note Each root command shall have unique syntax. If a command will be called
242 * with wrong number of arguments shell will print an error message and command
245 * @param[in] syntax Command syntax (for example: history).
247 * @param[in] help Pointer to a command help string.
249 * @param[in] mandatory Number of mandatory arguments including command name.
264 * @brief Macro for defining and adding a conditional root command (level 0)
269 * Macro can be used to create a command which can be conditionally present.
270 * It is and alternative to \#ifdefs around command registration and command
271 * handler. If command is disabled handler and subcommands are removed from
274 * @param[in] flag Compile time flag. Command is present only if flag
276 * @param[in] syntax Command syntax (for example: history).
278 * @param[in] help Pointer to a command help string.
280 * @param[in] mandatory Number of mandatory arguments including command name.
299 * @brief Macro for defining and adding a root command (level 0) with
304 * @param[in] syntax Command syntax (for example: history).
306 * @param[in] help Pointer to a command help string.
313 * @brief Macro for defining and adding a conditional root command (level 0)
318 * @param[in] flag Compile time flag. Command is present only if flag
320 * @param[in] syntax Command syntax (for example: history).
322 * @param[in] help Pointer to a command help string.
369 * command.
372 * (foo_cmd) if subcommands are for the root command "foo_cmd".
380 /** @brief Conditionally add command to the set of subcommands.
382 * Add command to the set created with @ref SHELL_SUBCMD_SET_CREATE.
389 * @param[in] _flag Compile time flag. Command is present only if flag
391 * @param[in] _parent Parent command sequence. Comma separated in parenthesis.
392 * @param[in] _syntax Command syntax (for example: history).
394 * @param[in] _help Pointer to a command help string.
396 * @param[in] _mand Number of mandatory arguments including command name.
416 /** @brief Add command to the set of subcommands.
418 * Add command to the set created with @ref SHELL_SUBCMD_SET_CREATE.
420 * @param[in] _parent Parent command sequence. Comma separated in parenthesis.
421 * @param[in] _syntax Command syntax (for example: history).
423 * @param[in] _help Pointer to a command help string.
425 * @param[in] _mand Number of mandatory arguments including command name.
451 * @brief Initializes a shell command with arguments.
453 * @note If a command will be called with wrong number of arguments shell will
454 * print an error message and command handler will not be called.
456 * @param[in] syntax Command syntax (for example: history).
458 * @param[in] help Pointer to a command help string.
460 * @param[in] mand Number of mandatory arguments including command name.
467 * @brief Initializes a conditional shell command with arguments.
470 * command which is ignored by the shell. It is an alternative to \#ifdefs
471 * around command registration and command handler. However, empty structure is
472 * present in the flash even if command is disabled (subcommands and handler are
476 * @param[in] flag Compile time flag. Command is present only if flag
478 * @param[in] syntax Command syntax (for example: history).
480 * @param[in] help Pointer to a command help string.
482 * @param[in] mand Number of mandatory arguments including command name.
490 * @brief Initializes a conditional shell command with arguments if expression
494 * empty command which is ignored by the shell. It should be used instead of
501 * @param[in] _syntax Command syntax (for example: history).
503 * @param[in] _help Pointer to a command help string.
505 * @param[in] _mand Number of mandatory arguments including command name.
520 * @brief Initializes a shell command.
522 * @param[in] _syntax Command syntax (for example: history).
524 * @param[in] _help Pointer to a command help string.
531 * @brief Initializes a conditional shell command.
535 * @param[in] _flag Compile time flag. Command is present only if flag
537 * @param[in] _syntax Command syntax (for example: history).
539 * @param[in] _help Pointer to a command help string.
546 * @brief Initializes shell command if expression gives non-zero result at
551 * @param[in] _expr Compile time expression. Command is present only if
553 * @param[in] _syntax Command syntax (for example: history).
555 * @param[in] _help Pointer to a command help string.
582 * a command handler. The string is usually a verbal description of a given
583 * data. The idea is to use the string as a command syntax that can be prompted
584 * by the shell and corresponding data can be used to process the command.
587 * @param[in] _handler Command handler common for all dictionary commands.
799 uint32_t cmd_ctx :1; /*!< Shell is executing command */
845 /** Currently executed command.*/
848 /** New root command. If NULL shell uses default root commands. */
870 uint16_t cmd_buff_len; /*!< Command length.*/
871 uint16_t cmd_buff_pos; /*!< Command buffer cursor position.*/
873 uint16_t cmd_tmp_buff_len; /*!< Command length in tmp buffer.*/
875 /** Command input buffer.*/
878 /** Command temporary buffer.*/
1063 * This function can be used from the command handler or from threads, but not
1079 * This function can be used from the command handler or from threads, but not
1190 * @brief Prints the current command help.
1192 * Function will print a help string with: the currently entered command
1199 /** @brief Command's help has been printed */
1202 /** @brief Execute command.
1204 * Pass command line to shell to execute.
1209 * This function must not be called from shell command context!
1215 * @param[in] cmd Command to be executed.
1221 /** @brief Set root command for all shell instances.
1223 * It allows setting from the code the root command. It is an equivalent of
1224 * calling select command with one of the root commands as the argument
1225 * (e.g "select log") except it sets command for all shell instances.
1229 * @retval 0 if root command is set.
1230 * @retval -EINVAL if invalid root command is provided.
1329 * @brief Retrieve return value of most recently executed shell command.
1333 * @retval return value of previous command