tecs driver inserted
M. Zolliker
This commit is contained in:
@ -60,6 +60,7 @@
|
||||
#include "ltc11.h"
|
||||
#include "eurodriv.h"
|
||||
#include "el755driv.h"
|
||||
#include "tecsdriv.h"
|
||||
/*--------------------- Functions needed to implement interfaces -----------*/
|
||||
static long EVIDrive(void *pData, SConnection *pCon, float fVal)
|
||||
{
|
||||
@ -1102,6 +1103,48 @@
|
||||
}
|
||||
|
||||
}
|
||||
else if(strcmp(argv[3],"tecs") == 0) /* TECS temperature server */
|
||||
{
|
||||
/* Create a driver */
|
||||
pDriv = CreateTecsDriver(argc-4,&argv[4]);
|
||||
if(!pDriv)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: failed to create TECS device driver",eError);
|
||||
return 0;
|
||||
}
|
||||
/* got a driver, initialise everything */
|
||||
pNew = CreateEVController(pDriv,argv[2],&iRet);
|
||||
if(!pNew)
|
||||
{
|
||||
SCWrite(pCon,"ERROR creating Environment Controller",eError);
|
||||
DeleteEVDriver(pDriv);
|
||||
return 0;
|
||||
}
|
||||
if(!iRet)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: problem initialising Environment controller",
|
||||
eError);
|
||||
pDriv->GetError(pDriv,&iRet,pError,131);
|
||||
sprintf(pBueffel,"HW reported: %s",pError);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
}
|
||||
/* set a few parameters */
|
||||
EVCSetPar(pNew,"upperlimit",300.0,pCon);
|
||||
EVCSetPar(pNew,"lowerlimit",1.0,pCon);
|
||||
/* install command */
|
||||
iRet = AddCommand(pSics,argv[2],TecsWrapper,DeleteEVController,
|
||||
pNew);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: duplicate command %s not created",argv[2]);
|
||||
DeleteEVController((void *)pNew);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return 0;
|
||||
}
|
||||
EVRegisterController(FindEMON(pSics),argv[2],pNew, pCon);
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(argv[3],"itc4") == 0) /* ITC4 driver */
|
||||
{
|
||||
/* Create a driver */
|
||||
|
Reference in New Issue
Block a user