- Connections write timeouts were incorrectly handled in asynnetc. Fixed.

- Implemented the desired run/drive behaviour: drive waits for what it started
  run starts, and success waits for everything to finish. This required
  changes to a lot of files.
- Fixed a bug in remob which supressed required messages
This commit is contained in:
koennecke
2009-04-17 12:52:01 +00:00
parent 50b0a5c4a7
commit 99d2485d22
39 changed files with 422 additions and 200 deletions

View File

@ -203,6 +203,7 @@ static int HistStartCount(void *pData, SConnection * pCon)
}
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
SCSetInterrupt(pCon, eAbortBatch);
ReleaseCountLock(self->pCountInt);
return HWFault;
}
@ -237,12 +238,14 @@ static int HistPause(void *pData, SConnection * pCon)
SCWrite(pCon, "ERROR: failed to fix histogram memory problem",
eError);
SCSetInterrupt(pCon, eAbortBatch);
ReleaseCountLock(self->pCountInt);
return HWFault;
}
}
}
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
SCSetInterrupt(pCon, eAbortBatch);
ReleaseCountLock(self->pCountInt);
return HWFault;
}
@ -277,11 +280,13 @@ static int HistContinue(void *pData, SConnection * pCon)
SCWrite(pCon, "ERROR: failed to fix histogram memory problem",
eError);
SCSetInterrupt(pCon, eAbortBatch);
ReleaseCountLock(self->pCountInt);
return HWFault;
}
}
}
SCWrite(pCon, "ERROR: failed to fix histogram memory problem", eError);
ReleaseCountLock(self->pCountInt);
SCSetInterrupt(pCon, eAbortBatch);
return HWFault;
}
@ -299,6 +304,7 @@ static int HistCountStatus(void *pData, SConnection * pCon)
if (!self->iInit) {
SCWrite(pCon, "ERROR: histogram memory not initialised", eError);
InvokeCallBack(self->pCall, COUNTEND, NULL);
ReleaseCountLock(self->pCountInt);
return COTERM;
}
@ -726,7 +732,7 @@ int HistDoCount(pHistMem self, SConnection * pCon)
/* start */
return StartDevice(GetExecutor(), "HistogramMemory", self->pDes, self,
pCon, self->pDriv->fCountPreset);
pCon, RUNRUN, self->pDriv->fCountPreset);
}
/*-----------------------------------------------------------------------*/
@ -738,7 +744,7 @@ int HistBlockCount(pHistMem self, SConnection * pCon)
/* start counting */
iRet = StartDevice(GetExecutor(), "HistogramMemory", self->pDes, self,
pCon, self->pDriv->fCountPreset);
pCon, RUNDRIVE, self->pDriv->fCountPreset);
if (!iRet) {
/* error has already been reported */
return 0;
@ -1569,7 +1575,8 @@ int HistAction(SConnection * pCon, SicsInterp * pSics, void *pData,
/* getdelay */
else if(strcmp(argv[1],"getdelay") == 0){
if(self->pDriv->data->nTimeChan > 1) {
SCPrintf(pCon,eValue,"hm.delay = %d", self->pDriv->data->timeBinning[0]);
iVal = (int)self->pDriv->data->timeBinning[0];
SCPrintf(pCon,eValue,"hm.delay = %d", iVal);
return 1;
} else {
SCPrintf(pCon,eError,"ERROR: no TOF configured");