- Modified collective drive operations to run motors in individual tasks
- Added a processnode methos to scriptcontext. processnode waits for the scriptchain of a node to finish. - Fixed a bug in sicsget - Made histmemsec dim and rank manager privilege. To allow chnage at runtime. Is required for SANS - Fixed some issues with multicountersec, mostly relating to passing things through in a sensible way. - Updated motorsec.c to work with a client based driver SKIPPED: psi/polterwrite.c psi/tabledrive.c psi/tabledrive.h
This commit is contained in:
37
countersec.c
37
countersec.c
@ -425,6 +425,31 @@ static int CountCmd(pSICSOBJ ccmd, SConnection * con,
|
||||
return DoCount((pCounter)ccmd, preset, con, 1);
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int GetMonitorCmd(pSICSOBJ ccmd, SConnection * con,
|
||||
Hdb * cmdNode, Hdb * par[], int nPar)
|
||||
{
|
||||
long counts;
|
||||
pCounter self = (pCounter)ccmd;
|
||||
if(nPar < 1) {
|
||||
SCWrite(con,"ERROR: missing monitor no in getmonitor",eError);
|
||||
return 0;
|
||||
}
|
||||
counts = self->getMonitor(self,par[0]->value.v.intValue,con);
|
||||
SCPrintf(con,eValue,"%s.monitor.%d = %ld", self->name,
|
||||
par[0]->value.v.intValue,counts);
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int GetCountsCmd(pSICSOBJ ccmd, SConnection * con,
|
||||
Hdb * cmdNode, Hdb * par[], int nPar)
|
||||
{
|
||||
long counts;
|
||||
pCounter self = (pCounter)ccmd;
|
||||
counts = self->getCounts(self,con);
|
||||
SCPrintf(con,eValue,"%s.counts = %ld", self->name,counts);
|
||||
return 1;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int CountNBCmd(pSICSOBJ ccmd, SConnection * con,
|
||||
Hdb * cmdNode, Hdb * par[], int nPar)
|
||||
{
|
||||
@ -587,12 +612,24 @@ pCounter CreateSecCounter(SConnection *pCon, char *type, char *name, int length)
|
||||
}
|
||||
AddHipadabaChild(node, child, NULL);
|
||||
|
||||
child = MakeSICSHdbPar("exponent", usUser,
|
||||
MakeHdbInt(0));
|
||||
if (child == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
SetHdbProperty(child, "__save", "true");
|
||||
AddHipadabaChild(node, child, NULL);
|
||||
|
||||
child = AddSICSHdbPar(node,"count", usUser, MakeSICSFunc(CountCmd));
|
||||
AddSICSHdbPar(child, "preset", usUser, MakeHdbFloat(2));
|
||||
|
||||
child = AddSICSHdbPar(node,"countnb", usUser, MakeSICSFunc(CountNBCmd));
|
||||
AddSICSHdbPar(child, "preset", usUser, MakeHdbFloat(2));
|
||||
|
||||
child = AddSICSHdbPar(node,"getmonitor", usSpy, MakeSICSFunc(GetMonitorCmd));
|
||||
AddSICSHdbPar(child, "no", usSpy, MakeHdbInt(1));
|
||||
child = AddSICSHdbPar(node,"getcounts", usUser, MakeSICSFunc(GetCountsCmd));
|
||||
|
||||
child = AddSICSHdbPar(node,"stop", usUser, MakeSICSFunc(StopCmd));
|
||||
child = AddSICSHdbPar(node,"pause", usUser, MakeSICSFunc(PauseCmd));
|
||||
child = AddSICSHdbPar(node,"continue", usUser, MakeSICSFunc(ContinueCmd));
|
||||
|
Reference in New Issue
Block a user