parser.h File Reference
Go to the source code of this file.
Data Structures | |
| union | parms |
| union that contains parameters passed to and from commands More... | |
| struct | CmdTemplate |
| Define a command that can be tokenized by the parser. More... | |
Defines | |
| #define | REGISTER_CMD(NAME) |
| Utility function to register a command. | |
| #define | MAKE_TEMPLATE(NAME, ARGS, RES, FLAGS) |
| Utility macro to create a command template. | |
| #define | MAKE_CMD(NAME, ARGS, RES, BODY, FLAGS) |
| Utility macro to create command templates and callback functions. | |
Typedefs | |
| typedef ResultCode(* | CmdFuncPtr )(parms args_results[]) |
| pointer to commands | |
Enumerations | |
| enum | ResultCode { RC_ERROR = -1, RC_OK = 0, RC_REPLY = 1, RC_SKIP = 2, RC_CLAMPED = 3 } |
| Error generated by the commands through the return code. More... | |
Functions | |
| void | parser_init (void) |
| Initialize the parser module. | |
| bool | parser_register_cmd (const struct CmdTemplate *cmd) |
| Register a new command into the parser. | |
| const char * | parser_rl_match (void *dummy, const char *word, int word_len) |
| Hook for readline to provide completion support for the commands registered in the parser. | |
| bool | parser_process_line (const char *line) |
| Command input handler. | |
| bool | parser_execute_cmd (const struct CmdTemplate *templ, parms args[CONFIG_PARSER_MAX_ARGS]) |
| Execute a command with its arguments, and fetch its results. | |
| struct CmdTemplate * | parser_get_cmd_template (const char *line) |
| Find the template for the command contained in the text line. | |
| bool | parser_get_cmd_arguments (const char *line, const struct CmdTemplate *templ, parms args[CONFIG_PARSER_MAX_ARGS]) |
| Extract the arguments for the command contained in the text line. | |
| bool | get_word (const char **begin, const char **end) |
| Tokenize one word at a time from a text. | |
Detailed Description
Definition in file parser.h.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)