- update instruments configurations

- new six version with status display
- bugfixes on TecsClient
- some changed samp. env. devices
This commit is contained in:
cvs
2003-10-17 09:35:37 +00:00
parent d62d2902ac
commit d63a4a4128
13 changed files with 425 additions and 252 deletions

View File

@@ -16,6 +16,29 @@ static char response[COC_RES_LEN];
static char *rwCode="rwacs";
static char *rdCode="rdacs";
pTecsClient TeccStart(char *startcmd, char *host, int port) {
CocConn *conn;
char *code, *cmd, thishost[64], *th;
int iret;
NEW(conn, CocConn);
code=rwCode;
cmd=startcmd;
if (host[0]!='\0') {
gethostname(thishost, sizeof(thishost));
th=getenv(thishost);
if (th==NULL) th=thishost;
if (0!=strcmp(th, host)) {
code=rdCode;
cmd="";
}
}
ERR_I(iret=CocInitClient(conn, host, port, code, 0, cmd));
if (iret==1) ErrShort("TECS_INIT: can not connect to TecsServer");
return((pTecsClient)conn);
OnError: return(NULL);
}
pTecsClient TeccInit(char *startcmd, int port) {
CocConn *conn=NULL;
char *code, host[64];
@@ -37,27 +60,6 @@ pTecsClient TeccInit(char *startcmd, int port) {
return(NULL);
}
pTecsClient TeccStart(char *startcmd, char *host, int port) {
CocConn *conn;
char *code, *cmd, thishost[64];
int iret;
NEW(conn, CocConn);
code=rwCode;
cmd=startcmd;
if (host[0]!='\0') {
gethostname(thishost, sizeof(thishost));
if (0!=strcmp(thishost, host)) {
code=rdCode;
cmd="";
}
}
ERR_I(iret=CocInitClient(conn, host, port, code, 0, cmd));
if (iret==1) ErrShort("TECS_INIT: can not connect to TecsServer");
return((pTecsClient)conn);
OnError: return(NULL);
}
int TeccGet3(pTecsClient conn, float *tC, float *tX, float *tP) {
int iret;