TecsServer no longer restarted by SICS
This commit is contained in:
34
tecsdriv.c
34
tecsdriv.c
@@ -307,7 +307,7 @@
|
||||
pEVDriver pNew = NULL;
|
||||
pTecsDriv pMe = NULL;
|
||||
pSicsVariable pInst = NULL;
|
||||
char *pStart = NULL, *pBin=NULL, *pLog=NULL, *pPort=NULL;
|
||||
char *pPort=NULL;
|
||||
|
||||
pNew = CreateEVDriver(argc,argv);
|
||||
pMe = (pTecsDriv)malloc(sizeof(TecsDriv));
|
||||
@@ -322,10 +322,7 @@
|
||||
/* initalise pTecsDriver */
|
||||
pMe->lastError = NULL;
|
||||
|
||||
/* get the start server option */
|
||||
pStart = IFindOption(pSICSOptions, "TecsStartCmd");
|
||||
if (pStart==NULL) return(NULL);
|
||||
str_copy(pMe->server, pStart);
|
||||
pMe->server[0]='\0';
|
||||
|
||||
/* get the port number for tecs */
|
||||
pMe->port=0;
|
||||
@@ -334,34 +331,9 @@
|
||||
pMe->port=atoi(pPort);
|
||||
}
|
||||
if (pMe->port==0) {
|
||||
pPort="9753";
|
||||
pMe->port=atoi(pPort);
|
||||
pMe->port=9753;
|
||||
}
|
||||
str_append(pMe->server, " -p ");
|
||||
str_append(pMe->server, pPort);
|
||||
|
||||
/* get the instrument name */
|
||||
pInst = FindVariable(pServ->pSics,"instrument");
|
||||
if (pInst==NULL ||
|
||||
pInst->text==NULL ||
|
||||
strlen(pInst->text)>sizeof(pMe->server)-6) return NULL;
|
||||
str_append(pMe->server, " -n tecs_");
|
||||
str_append(pMe->server, pInst->text);
|
||||
|
||||
/* add binDir option if present */
|
||||
pBin = IFindOption(pSICSOptions, "TecsBinDir");
|
||||
if (pBin!=NULL) {
|
||||
str_append(pMe->server, " -b ");
|
||||
str_append(pMe->server, pBin);
|
||||
}
|
||||
/* add logDir option if present */
|
||||
pLog = IFindOption(pSICSOptions, "TecsLogDir");
|
||||
if (pLog!=NULL) {
|
||||
str_append(pMe->server, " -d ");
|
||||
str_append(pMe->server, pLog);
|
||||
}
|
||||
str_append(pMe->server, " &");
|
||||
|
||||
/* initialise function pointers */
|
||||
pNew->SetValue = TecsRun;
|
||||
pNew->GetValue = TecsGet;
|
||||
|
||||
Reference in New Issue
Block a user