|
#define | SDCMD_VERSION_MAJOR 0 |
|
#define | SDCMD_VERSION_MINOR 9 |
|
|
#define | SDCMD_RCCODE_VERSION 210 |
|
#define | SDCMD_RCCODE_INFO 212 |
|
#define | SDCMD_RCCODE_HELP 214 |
|
#define | SDCMD_RCCODE_SUCCESS 250 |
|
#define | SDCMD_RCCODE_ALREADY 251 |
|
#define | SDCMD_RCCODE_ERRCMD 500 |
|
#define | SDCMD_RCCODE_ERRARGS 501 |
|
#define | SDCMD_RCCODE_ERRRUNT 504 |
|
#define | SDCMD_RCCODE_ERRNAVAIL 505 |
|
#define | SDCMD_RCCODE_ERRSIZE 509 |
|
|
int | SDCMD_proccmd (serdisp_t *dd, char *cmdline, char *msgbuf, int msgbuf_size, int show_rccode) |
| processes a command line More...
|
|
Introduction
serdisp_proccmd.h offers a command processor which can be used in two ways:
- generic command processor inside programs that link serdisplib
- echo daemon provided by the library at runtime
int SDCMD_proccmd |
( |
serdisp_t * |
dd, |
|
|
char * |
cmdline, |
|
|
char * |
msgbuf, |
|
|
int |
msgbuf_size, |
|
|
int |
show_rccode |
|
) |
| |
processes a command line (eg: 'GPO SET gpo0 1'
, 'OPTION SET option1 3'
)
- Parameters
-
dd | device descriptor |
cmdline | command line that should be processed |
msgbuf | message buffer (or NULL if not used) |
msgbuf_size | size of message buffer |
show_rccode | show or hide return code information |
- Returns
- return code (one of
SDCMD_RCCODE_*
)
- Since
- 1.98.0