X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=mware%2Fparser.h;h=b4e2f61d4382543553b5a6689c6d5d9c6987f773;hb=8ceb6ba0e3d44b47960b6e01554f624e2dbbb45e;hp=34f6a14d3f0dfc50dd7354d76e1243bcc714c026;hpb=a5d4c124a53f74592228614fe5eecd3d2aa3ae2d;p=bertos.git diff --git a/mware/parser.h b/mware/parser.h old mode 100755 new mode 100644 index 34f6a14d..b4e2f61d --- a/mware/parser.h +++ b/mware/parser.h @@ -1,7 +1,34 @@ /** * \file + * * * \version $Id$ * @@ -12,12 +39,6 @@ * \brief serial protocol parser and commands. */ -/*#* - *#* $Log$ - *#* Revision 1.1 2006/06/01 12:27:39 marco - *#* Added utilities for protocols - *#* - *#*/ #ifndef PARSER_H #define PARSER_H @@ -32,10 +53,10 @@ */ typedef enum { - RC_ERROR = -1, //!< Reply with error. - RC_OK = 0, //!< No reply (ignore reply arguments). - RC_REPLY = 1, //!< Reply command arguments. - RC_SKIP = 2 //!< Skip following commands + RC_ERROR = -1, ///< Reply with error. + RC_OK = 0, ///< No reply (ignore reply arguments). + RC_REPLY = 1, ///< Reply command arguments. + RC_SKIP = 2 ///< Skip following commands } ResultCode; /** union that contains parameters passed to and from commands */ @@ -57,10 +78,11 @@ typedef ResultCode (*CmdFuncPtr)(parms args_results[]); */ struct CmdTemplate { - const char *name; //!< name of command - const char *arg_fmt; //!< format string for the input - const char *result_fmt; //!< format string for the output - CmdFuncPtr func; //!< pointer to the handler function + const char *name; ///< Name of command + const char *arg_fmt; ///< Format string for the input + const char *result_fmt; ///< Format string for the output + CmdFuncPtr func; ///< Pointer to the handler function + uint16_t flags; ///< Currently unused. }; /** @@ -104,7 +126,7 @@ const char* parser_rl_match(void* dummy, const char* word, int word_len); bool parser_process_line(const char* line); -/*! +/** * Execute a command with its arguments, and fetch its results. * * \param templ Template of the command to be executed