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:
committed by
Douglas Clowes
parent
c28223584b
commit
faa2302019
10
counter.c
10
counter.c
@@ -779,7 +779,8 @@
|
|||||||
{"preset",1,{FUPAOPT}},
|
{"preset",1,{FUPAOPT}},
|
||||||
{"send",0,{0,0}},
|
{"send",0,{0,0}},
|
||||||
{"setpar",3,{FUPATEXT,FUPAINT,FUPAFLOAT}},
|
{"setpar",3,{FUPATEXT,FUPAINT,FUPAFLOAT}},
|
||||||
{"getpar",2,{FUPATEXT,FUPAOPT}}
|
{"getpar",2,{FUPATEXT,FUPAOPT}},
|
||||||
|
{"getnmon",0,{0,0}}
|
||||||
};
|
};
|
||||||
char *pMode[] = {
|
char *pMode[] = {
|
||||||
"timer",
|
"timer",
|
||||||
@@ -795,7 +796,7 @@
|
|||||||
/* parse function args */
|
/* parse function args */
|
||||||
argtolower(argc,argv);
|
argtolower(argc,argv);
|
||||||
argx = &argv[1];
|
argx = &argv[1];
|
||||||
iRet = EvaluateFuPa((pFuncTemplate)&ActionTemplate,22,argc-1,argx,&PaRes);
|
iRet = EvaluateFuPa((pFuncTemplate)&ActionTemplate,23,argc-1,argx,&PaRes);
|
||||||
if(iRet < 0)
|
if(iRet < 0)
|
||||||
{
|
{
|
||||||
sprintf(pBueffel,"%s",PaRes.pError);
|
sprintf(pBueffel,"%s",PaRes.pError);
|
||||||
@@ -1134,6 +1135,11 @@
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 22: /* getnmon */
|
||||||
|
snprintf(pBueffel,131,"%s.getnmon = %ld", argv[0], GetNMonitor(self));
|
||||||
|
SCWrite(pCon,pBueffel,eValue);
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0); /* internal error */
|
assert(0); /* internal error */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user