- Introduced a new trace facility

- Fixed performance problems in many protocol drivers.


SKIPPED:
	psi/julprot.c
	psi/phytron.c
	psi/pmacprot.c
	psi/polterwrite.c
	psi/spss7.c
This commit is contained in:
koennecke
2011-06-29 07:53:54 +00:00
parent 9abb3584f1
commit 3ee1865f9b
31 changed files with 868 additions and 35 deletions

View File

@@ -309,14 +309,10 @@ static int SecMotorStatus(void *sulf, SConnection * pCon)
if (SCGetInterrupt(pCon) < (int) interrupt) {
SCSetInterrupt(pCon, (int) interrupt);
}
if(self->stopped == 0) {
self->errorCount++;
}
break;
case HWIdle:
self->posCount = 10000;
handleMoveCallback(self, pCon);
self->errorCount = 0;
break;
}
return status;
@@ -355,6 +351,10 @@ static int SecMotorHalt(void *sulf)
haltFunc = (SICSOBJFunc) node->value.v.func;
assert(haltFunc != NULL);
self->stopped = 1;
self->pDrivInt->iErrorCount--;
if(self->pDrivInt->iErrorCount < 0){
self->pDrivInt->iErrorCount = 0;
}
return haltFunc((pSICSOBJ) self, pServ->dummyCon, node, par, 0);
}
@@ -462,7 +462,7 @@ static hdbCallbackReturn SecMotorCallback(pHdb node, void *userData,
* check for alarm condition
*/
SecMotorGetPar(self, "failafter", &fVal);
if (self->errorCount > (int) fVal) {
if (self->pDrivInt->iErrorCount > (int) fVal) {
/* big alarm */
ServerWriteGlobal("ERROR: !!! MOTOR ALARM !!! MOTOR ALARM !!!",
eError);
@@ -471,7 +471,7 @@ static hdbCallbackReturn SecMotorCallback(pHdb node, void *userData,
self->name);
ServerWriteGlobal(pBueffel, eError);
SCSetInterrupt(pCon, eAbortBatch);
self->errorCount = 0;
self->pDrivInt->iErrorCount = 0;
return hdbAbort;
}
@@ -553,10 +553,10 @@ static hdbCallbackReturn SecMotorSignCallback(pHdb node, void *userData,
}
SecMotorGetPar(self, "softlowerlim", &limit);
limit *= v.v.doubleValue;
SecMotorSetPar(self, pCon, "softlowerlim", limit);
SecMotorSetPar(self, pCon, "softupperlim", limit);
SecMotorGetPar(self, "softupperlim", &limit);
limit *= v.v.doubleValue;
SecMotorSetPar(self, pCon, "softupperlim", limit);
SecMotorSetPar(self, pCon, "softlowerlim", limit);
SecMotorSetPar(self, pCon, "softzero", .0);
UpdateHipadabaPar(node, v, pCon);
return hdbContinue;