- Extended confvirtmot to allow for sequences of calls

- Extended confvirtmot to have  a checkscript
- Made sure that targets get updated when calling tasdrive
- Fixed some output codes in tasdrive.c
- Made tdchm invoke counters event message for Melone
- Fixed the ConID inefficiency by caching the host name in asynnet.c
- Added a traceActive function to trace
This commit is contained in:
koennecke
2012-04-19 10:01:31 +00:00
parent e3cf3f21a1
commit 8de4a72782

19
tdchm.c
View File

@ -48,6 +48,13 @@ typedef struct {
pECB tdc;
} Tdc, *pTdc;
/*---------------------- Monitor event data structure (from counter.c) */
typedef struct {
float fPreset;
float fCurrent;
char *pName;
} MonEvent, *pMonEvent;
/*=======================================================================*/
static int downloadConfiguration(pTdc self)
{
@ -235,6 +242,7 @@ static int TDCStart(pHistDriver self, SConnection * pCon)
if (tdc->counter != NULL) {
tdc->counter->pDriv->fPreset = self->fCountPreset;
tdc->counter->pDriv->eMode = self->eCount;
InvokeCallBack(tdc->counter->pCall,COUNTSTART,NULL);
return tdc->counter->pDriv->Start(tdc->counter->pDriv);
}
return 1;
@ -279,15 +287,23 @@ static int TDCCountStatus(pHistDriver self, SConnection * pCon)
{
pTdc tdc = NULL;
int tdcstatus, status;
float fControl;
float fControl, fOldControl;
MonEvent sMon;
assert(self);
tdc = (pTdc) self->pPriv;
assert(tdc);
if (tdc->counter != NULL) {
fOldControl = tdc->counter->pDriv->fLastCurrent;
status =
tdc->counter->pDriv->GetStatus(tdc->counter->pDriv, &fControl);
if(fOldControl != fControl) {
sMon.fCurrent = fControl;
sMon.fPreset = tdc->counter->pDriv->fPreset;
sMon.pName = tdc->counter->name;
InvokeCallBack(tdc->counter->pCall, MONITOR, &sMon);
}
}
/*
The TDC does not seem to have a means to figure if it is counting or not
@ -303,6 +319,7 @@ static int TDCCountStatus(pHistDriver self, SConnection * pCon)
leave it for now.
*/
if (status == HWIdle || status == HWFault) {
InvokeCallBack(tdc->counter->pCall,COUNTEND,NULL);
tdcstatus = disableTdc(tdc);
if (tdcstatus != 1) {
tdc->errorCode = COMMERROR;