*** empty log message ***
This commit is contained in:
32
tecs/lsc.h
Normal file
32
tecs/lsc.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "serutil.h"
|
||||
#define LSC_MAX_CMDS 5
|
||||
|
||||
int LscCmdChk(SerChannel *ser, char *cmds);
|
||||
int LscCmdChkC(SerChannel *ser, const char *cmds);
|
||||
/*
|
||||
send one or several commands and check it's parameters
|
||||
a colon must separate the parameters
|
||||
attention:
|
||||
in LscCmdChk, *cmds will be modified (more efficient)
|
||||
in LscCmdChkC, *cmds must not be longer than 127 chars
|
||||
*/
|
||||
|
||||
int LscEqPar(char *par, char *res);
|
||||
/*
|
||||
compare if parameters are equal (numbers as numbers, spaces ignored)
|
||||
*/
|
||||
|
||||
struct { struct LscElem *next; char *cmnd; } LscElem;
|
||||
typedef struct { struct LscElem *head, *tail; } LscList;
|
||||
|
||||
int LscPushCmd(LscList clist, char *cmnd);
|
||||
/*
|
||||
push a command on th command list. If cmnd points to a temporary buffer,
|
||||
strdup() must be used.
|
||||
*/
|
||||
|
||||
int LscNextCmd(SerChannel *ser, LscList clist);
|
||||
/*
|
||||
strip one line from LscList, and send it through LscCmdChk
|
||||
the list and the command buffers are freed when no longer used
|
||||
*/
|
||||
Reference in New Issue
Block a user