Added create drive command to site ansto

r1037 | ffr | 2006-08-01 17:03:00 +1000 (Tue, 01 Aug 2006) | 2 lines
This commit is contained in:
Ferdi Franceschini
2006-08-01 17:03:00 +10:00
committed by Douglas Clowes
parent 2fe58f2839
commit 3da52afb10
2 changed files with 25 additions and 16 deletions

View File

@@ -63,9 +63,7 @@ typedef struct {
prs232 controller;
char *host;
int iPort;
int iChannel;
void *pData;
int finishCount;
float dummy_threshold;
} BeamMon;
/** \brief Returns the counter status,
@@ -171,13 +169,22 @@ static int MonTryAndFixIt(CounterDriver *cntrData, int iCode) {
static int MonSet(CounterDriver *cntrData, char *name, int iCter, float FVal) {
BeamMon *self = NULL;
self = (BeamMon *) cntrData;
self = cntrData->pData;
if(strcmp(name,"threshold") == 0){
//TODO set threshold
self->dummy_threshold = FVal;
}
}
static int MonGet(CounterDriver *cntrData, char *name, int iCter, float *fVal) {
BeamMon *self = NULL;
self = (BeamMon *) cntrData;
self = cntrData->pData;
if(strcmp(name,"threshold") == 0){
//TODO get threshold
*fVal = self->dummy_threshold;
}
*fVal = 123456789.0;
}
@@ -240,7 +247,7 @@ static void KillMon(pCounterDriver self) {
eError);
return NULL;
}
pCntDriv = CreateCounterDriver(name, "MONITOR");
pCntDriv = CreateCounterDriver(name, "anstomonitor");
if(!pCntDriv) {
free(newCtr);
return NULL;
@@ -271,6 +278,7 @@ static void KillMon(pCounterDriver self) {
strncpy(buffer,pPtr, 131);
newCtr->controller = MonConnect(pCon, buffer, port);
newCtr->dummy_threshold = 1.7e6;
return pCntDriv;
}