- simplified devser queue

- added inherited sct variables starting with @
- inserted SctIsPending / DevIsPending
- some general improvements in scriptcontext.c/sctdriveobj.c
This commit is contained in:
zolliker
2010-01-27 13:39:33 +00:00
parent 7976b52212
commit a56838b90d
5 changed files with 303 additions and 246 deletions

View File

@ -107,7 +107,8 @@ static int SCTDRIVCheckLimits(void *data, float val,
self = (pSICSOBJ) data;
pPriv = (pDrivObjPriv) self->pPrivate;
snprintf(script, 1024, "%f", val);
snprintf(script, 1024, "%g", val);
/* set target. This not yet done, as SetValue is called later */
SetHdbProperty(self->objectNode, "target", script);
if (GetHdbProperty(self->objectNode, "checklimits", script, 1024)) {
status = SctCallInContext(pServ->dummyCon, script,
@ -298,6 +299,7 @@ pSICSOBJ MakeSctDriveObj(pHdb node, char *class, SctController * c,
memset(pPriv, 0, sizeof(DrivObjPriv));
pNew->pDes = CreateDescriptor(class);
pNew->pDes->SaveStatus = SaveSICSOBJ;
pPriv->pDriv = CreateDrivableInterface();
if (pNew->pDes == NULL || pPriv->pDriv == NULL) {
free(pNew);
@ -357,6 +359,7 @@ int SctMakeDriveObject(SConnection * pCon, SicsInterp * pSics,
SCWrite(pCon, "ERROR: node creation failed", eError);
return 0;
}
SetHdbProperty(node, "sicscommand", argv[1]);
sctName = argv[5];
class = argv[4];
doNotKillNode = 0; /* kill the node with the command */