Added scanPeriod() routine to convert a menuScan value into its period.

This commit is contained in:
Andrew Johnson
2003-04-02 20:47:21 +00:00
parent e1bfd021c1
commit c7c74a8aab
2 changed files with 10 additions and 0 deletions

View File

@@ -285,6 +285,15 @@ void scanDelete(struct dbCommon *precord)
}
return;
}
double scanPeriod(int scan) {
if (scan>=SCAN_1ST_PERIODIC) {
int ind = scan - SCAN_1ST_PERIODIC;
scan_list *psl = papPeriodic[ind];
return (double) psl->ticks / vxTicksPerSecond;
}
return 0.0;
}
int scanppl(double rate) /*print periodic list*/
{

View File

@@ -33,6 +33,7 @@ long scanInit(void);
void post_event(int event);
void scanAdd(struct dbCommon *);
void scanDelete(struct dbCommon *);
double scanPeriod(int scan);
void scanOnce(void *precord);
int scanOnceSetQueueSize(int size);
int scanppl(double rate); /*print periodic lists*/