From cf2fe676723ea2421c1e9ff0ebf01986d804432b Mon Sep 17 00:00:00 2001 From: cvs Date: Wed, 8 Mar 2000 13:37:08 +0000 Subject: [PATCH] tecs driver inserted M. Zolliker --- evcontroller.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/evcontroller.c b/evcontroller.c index 8d48989f..80429bda 100644 --- a/evcontroller.c +++ b/evcontroller.c @@ -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 */