#include <otCommandParser.h>
Public Member Functions | |
otCommandParser () | |
bool | init (U32 elements, otFILE *fs=0) |
void | close () |
S32 | add (const char *commandText, const char *commandTextShort, _procCallback commandExe, bool disk=false, U8 minParams=0, U8 maxParams=0, const char *paramsList=0, const char *help=0) |
S32 | parse (char *cmdLine) |
U32 | count () |
void | usage (int n, bool error=true) |
const char * | name (U32 i, bool Long=true) |
const char * | parameters (U32 i) |
const char * | help (U32 i) |
bool | parameters (U32 i, U8 &minp, U8 &maxp) |
int | findCommandIndex (const char *name) |
bool | isConsole () |
S32 | retCode () |
void | setEcho (bool ena) |
void | setRetCode (S32 v) |
|
Library creation. |
|
Add a new command to the command parser
|
|
Close the library and free all allocated memories |
|
Read the number of loaded command
|
|
From a string found the index of a command. All command are stored in UPPERCASE!
|
|
Return the help for a specified command
|
|
Init the library
|
|
Read if the command parser is set for console mode or not. Console mode accept character correction like BACKSPACE.
|
|
Return the name of a command
|
|
Read the number of parameters for a specified command index
|
|
Return requested parameters of a specified command
|
|
It interprets the string that is passed to it, if a command is recognized it is executed. The parameters (if necessary) follow the command separated by a SPACE character.
|
|
Read the return code of the latest execute command
|
|
Enable or disable string echo in batch execution
|
|
Force ret code to a specified value.
|
|
Display on standard output the command usage
|