Added getnmon and getnumchan to the counter and scan commands so we can retrieve the number of available monitors.
r1650 | ffr | 2007-03-14 13:56:20 +1100 (Wed, 14 Mar 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
3fdf28282a
commit
848448de38
11
counter.c
11
counter.c
@@ -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,10 @@
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 22: /* getnmon */
|
||||
snprintf(pBueffel,131,"%s.getnmon = %ld", argv[0], GetNMonitor(self));
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
break;
|
||||
default:
|
||||
assert(0); /* internal error */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user