- Fixes to make SL6 work

- New NeXus libraries
- Added new raw binary transfer mode for mass data
- Added a check script option to configurable virtual motor


SKIPPED:
	psi/dumprot.c
	psi/make_gen
	psi/psi.c
	psi/rebin.c
	psi/sanslirebin.c
This commit is contained in:
koennecke
2012-03-29 08:41:05 +00:00
parent 14f257c2ab
commit 9eca96b064
56 changed files with 8881 additions and 6327 deletions

View File

@ -289,7 +289,24 @@ static int InterestCallback(int iEvent, void *pEvent, void *pUser)
}
return 1;
}
/*---------------------------------------------------------------------*/
static void invokeCheckScript(pConfigurableVirtualMotor self,
SConnection * pCon)
{
Tcl_Interp *pTcl;
int status;
pTcl = InterpGetTcl(pServ->pSics);
if(self->checkScript != NULL){
status = Tcl_Eval(pTcl, self->readScript);
if (status != TCL_OK) {
snprintf(self->scriptError, 510, "ERROR: Tcl subsystem reported %s",
Tcl_GetStringResult(pTcl));
SCWrite(pCon, self->scriptError, eError);
}
}
}
/*------------------------------------------------------------------------*/
static int ConfCheckStatus(void *pData, SConnection * pCon)
{
@ -327,6 +344,7 @@ static int ConfCheckStatus(void *pData, SConnection * pCon)
}
if (result == HWIdle) {
invokeCheckScript(self,pCon);
event.pName = self->name;
event.fVal = self->pDriv->GetValue(self, pCon);
InvokeCallBack(self->pCall, MOTDRIVE, &event);
@ -575,6 +593,26 @@ int ConfigurableVirtualMotorAction(SConnection * pCon, SicsInterp * pSics,
return 1;
}
}
} else if (strcmp(argv[1], "checkscript") == 0) {
if (argc > 2) {
/* set case */
Arg2Text(argc - 2, &argv[2], pBueffel, 510);
self->checkScript = strdup(pBueffel);
SCSendOK(pCon);
return 1;
} else {
/* inquiry */
if (self->checkScript == NULL) {
snprintf(pBueffel, 510, "%s.checkscript = UNDEFINED", argv[0]);
SCWrite(pCon, pBueffel, eValue);
return 1;
} else {
snprintf(pBueffel, 510, "%s.checkscript = %s", argv[0],
self->checkScript);
SCWrite(pCon, pBueffel, eValue);
return 1;
}
}
} else if (strcmp(argv[1], "interest") == 0) {
pRegInfo = (pRegisteredInfo) malloc(sizeof(RegisteredInfo));
if (!pRegInfo) {
@ -584,7 +622,7 @@ int ConfigurableVirtualMotorAction(SConnection * pCon, SicsInterp * pSics,
pRegInfo->pName = strdup(argv[0]);
pRegInfo->pCon = SCCopyConnection(pCon);
value = ConfGetValue(self, pCon);
if (!iRet) {
if (value < -9990.) {
snprintf(pBueffel,511,
"Failed to register interest, Reason:Error obtaining current position for %s",
argv[0]);