- 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:
19
tdchm.c
19
tdchm.c
@ -48,6 +48,13 @@ typedef struct {
|
|||||||
pECB tdc;
|
pECB tdc;
|
||||||
} Tdc, *pTdc;
|
} Tdc, *pTdc;
|
||||||
|
|
||||||
|
/*---------------------- Monitor event data structure (from counter.c) */
|
||||||
|
typedef struct {
|
||||||
|
float fPreset;
|
||||||
|
float fCurrent;
|
||||||
|
char *pName;
|
||||||
|
} MonEvent, *pMonEvent;
|
||||||
|
|
||||||
/*=======================================================================*/
|
/*=======================================================================*/
|
||||||
static int downloadConfiguration(pTdc self)
|
static int downloadConfiguration(pTdc self)
|
||||||
{
|
{
|
||||||
@ -235,6 +242,7 @@ static int TDCStart(pHistDriver self, SConnection * pCon)
|
|||||||
if (tdc->counter != NULL) {
|
if (tdc->counter != NULL) {
|
||||||
tdc->counter->pDriv->fPreset = self->fCountPreset;
|
tdc->counter->pDriv->fPreset = self->fCountPreset;
|
||||||
tdc->counter->pDriv->eMode = self->eCount;
|
tdc->counter->pDriv->eMode = self->eCount;
|
||||||
|
InvokeCallBack(tdc->counter->pCall,COUNTSTART,NULL);
|
||||||
return tdc->counter->pDriv->Start(tdc->counter->pDriv);
|
return tdc->counter->pDriv->Start(tdc->counter->pDriv);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -279,15 +287,23 @@ static int TDCCountStatus(pHistDriver self, SConnection * pCon)
|
|||||||
{
|
{
|
||||||
pTdc tdc = NULL;
|
pTdc tdc = NULL;
|
||||||
int tdcstatus, status;
|
int tdcstatus, status;
|
||||||
float fControl;
|
float fControl, fOldControl;
|
||||||
|
MonEvent sMon;
|
||||||
|
|
||||||
assert(self);
|
assert(self);
|
||||||
tdc = (pTdc) self->pPriv;
|
tdc = (pTdc) self->pPriv;
|
||||||
assert(tdc);
|
assert(tdc);
|
||||||
|
|
||||||
if (tdc->counter != NULL) {
|
if (tdc->counter != NULL) {
|
||||||
|
fOldControl = tdc->counter->pDriv->fLastCurrent;
|
||||||
status =
|
status =
|
||||||
tdc->counter->pDriv->GetStatus(tdc->counter->pDriv, &fControl);
|
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
|
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.
|
leave it for now.
|
||||||
*/
|
*/
|
||||||
if (status == HWIdle || status == HWFault) {
|
if (status == HWIdle || status == HWFault) {
|
||||||
|
InvokeCallBack(tdc->counter->pCall,COUNTEND,NULL);
|
||||||
tdcstatus = disableTdc(tdc);
|
tdcstatus = disableTdc(tdc);
|
||||||
if (tdcstatus != 1) {
|
if (tdcstatus != 1) {
|
||||||
tdc->errorCode = COMMERROR;
|
tdc->errorCode = COMMERROR;
|
||||||
|
Reference in New Issue
Block a user