Added "getnmon" command to fetch the number of available monitors for a counter object.

Mark Koennecke agreed to this change on the 15/03/07.
Search for
Re: getnmonitor from scan.c and counter.c
on plone for the transcript.

r1672 | ffr | 2007-03-20 10:53:26 +1100 (Tue, 20 Mar 2007) | 6 lines
This commit is contained in:
Ferdi Franceschini
2007-03-20 10:53:26 +11:00
committed by Douglas Clowes
parent c28223584b
commit faa2302019

View File

@@ -778,8 +778,9 @@
{"mode",1,{FUPAOPT}},
{"preset",1,{FUPAOPT}},
{"send",0,{0,0}},
{"setpar",3,{FUPATEXT,FUPAINT,FUPAFLOAT}},
{"getpar",2,{FUPATEXT,FUPAOPT}}
{"setpar",3,{FUPATEXT,FUPAINT,FUPAFLOAT}},
{"getpar",2,{FUPATEXT,FUPAOPT}},
{"getnmon",0,{0,0}}
};
char *pMode[] = {
"timer",
@@ -795,7 +796,7 @@
/* parse function args */
argtolower(argc,argv);
argx = &argv[1];
iRet = EvaluateFuPa((pFuncTemplate)&ActionTemplate,22,argc-1,argx,&PaRes);
iRet = EvaluateFuPa((pFuncTemplate)&ActionTemplate,23,argc-1,argx,&PaRes);
if(iRet < 0)
{
sprintf(pBueffel,"%s",PaRes.pError);
@@ -1134,6 +1135,11 @@
return 0;
}
break;
case 22: /* getnmon */
snprintf(pBueffel,131,"%s.getnmon = %ld", argv[0], GetNMonitor(self));
SCWrite(pCon,pBueffel,eValue);
return 1;
break;
default:
assert(0); /* internal error */
}