*** empty log message ***

This commit is contained in:
cvs
2000-03-15 11:29:50 +00:00
parent 952b84dedb
commit b9b30e7d62
14 changed files with 1518 additions and 6 deletions

53
tecs/tcli.c Normal file
View File

@@ -0,0 +1,53 @@
#include <stdio.h>
#include <string.h>
#include "tecc.h"
#include "errhdl.h"
/*-------------------------------------------------------------------------*/
main(int argc, char *argv[])
{
char response[80], cmd[80], device[80];
float val;
pTecsClient conn;
char *res;
#ifdef __VMS
ERR_P(conn=TeccInit("@start_tecs -p 9753 -l -d [.log]", 9753));
#else
ERR_P(conn=TeccInit("TecsServer -p 9753 -l -d log/ &", 9753));
#endif
retry:
while (1) {
scanf("%s", cmd);
if (0==strcmp(cmd,"r")) {
ERR_I(TeccGet(conn, &val));
ERR_P(res=TeccGetDev(conn));
printf("T=%f %s\n", val, res);
} else if (0==strcmp(cmd,"s")) {
scanf("%f", &val);
ERR_I(TeccSet(conn, val));
} else if (0==strcmp(cmd,"c")) {
scanf("%s", cmd);
ERR_I(TeccSend(conn, cmd, response, sizeof(response)));
printf("%s\n", response);
} else if (0==strcmp(cmd,"d")) {
scanf("%s", cmd);
ERR_I(TeccSetDev(conn, cmd));
} else if (0==strcmp(cmd,"q")) {
TeccClose(conn);
exit(1);
}
}
OnError: ErrShow("Client"); goto retry;
}