jba pact now used to test for asyn processing, not status

This commit is contained in:
Janet B. Anderson
1992-04-17 12:41:48 +00:00
parent 69bf379321
commit fc17801360
17 changed files with 93 additions and 68 deletions

View File

@@ -61,6 +61,7 @@
* .21 02-05-92 jba Changed function arguments from paddr to precord
* .22 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .23 02-28-92 jba ANSI C changes
* .24 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -125,8 +126,7 @@ struct aidset { /* analog input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_ai;/*(0,1,2)=> success and */
/*(convert,don't continue, don't convert)*/
DEVSUPFUN read_ai;/*(0,2)=> success and convert,don't convert)*/
/* if convert then raw value stored in rval */
DEVSUPFUN special_linconv;
};
@@ -168,6 +168,7 @@ static long process(pai)
{
struct aidset *pdset = (struct aidset *)(pai->dset);
long status;
unsigned char pact=pai->pact;
if( (pdset==NULL) || (pdset->read_ai==NULL) ) {
pai->pact=TRUE;
@@ -184,11 +185,11 @@ static long process(pai)
}
}
/*pact must not be set true until read_ai is called*/
status=(*pdset->read_ai)(pai); /* read the new value */
/* check if device support set pact */
if ( !pact && pai->pact ) return(0);
pai->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&pai->time);
if (status==0) convert(pai);
else if (status==2) status=0;

View File

@@ -55,6 +55,7 @@
* .22 02-05-92 jba Changed function arguments from paddr to precord
* .23 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .24 02-28-92 jba ANSI C changes
* .25 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -118,8 +119,7 @@ struct aodset { /* analog input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (0,2)=>(success,success no convert)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_ao;/*(0,1)=>success and */
/*(continue, don`t continue) */
DEVSUPFUN write_ao;/*(0)=>(success ) */
DEVSUPFUN special_linconv;
};
@@ -193,6 +193,7 @@ static long process(pao)
{
struct aodset *pdset = (struct aodset *)(pao->dset);
long status=0;
unsigned char pact=pao->pact;
if( (pdset==NULL) || (pdset->write_ao==NULL) ) {
pao->pact=TRUE;
@@ -205,8 +206,10 @@ static long process(pao)
} else {
status=(*pdset->write_ao)(pao);
}
/* check if device support set pact */
if ( !pact && pao->pact ) return(0);
pao->pact = TRUE;
if(status==1) return(0);
tsLocalTime(&pao->time);
/* check for alarms */

View File

@@ -48,6 +48,7 @@
* .14 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .15 02-05-92 jba Changed function arguments from paddr to precord
* .16 02-28-92 jba ANSI C changes
* .17 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -108,8 +109,7 @@ struct bidset { /* binary input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_bi;/*(0,1,2)=> success and */
/*(convert,don't continue, don't convert)*/
DEVSUPFUN read_bi;/*(0,2)=> success and convert, don't convert)*/
/* if convert then raw value stored in rval */
};
void alarm();
@@ -141,6 +141,7 @@ static long process(pbi)
{
struct bidset *pdset = (struct bidset *)(pbi->dset);
long status;
unsigned char pact=pbi->pact;
if( (pdset==NULL) || (pdset->read_bi==NULL) ) {
pbi->pact=TRUE;
@@ -149,9 +150,10 @@ static long process(pbi)
}
status=(*pdset->read_bi)(pbi); /* read the new value */
/* check if device support set pact */
if ( !pact && pbi->pact ) return(0);
pbi->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&pbi->time);
if(status==0) { /* convert rval to val */
if(pbi->rval==0) pbi->val =0;

View File

@@ -56,6 +56,7 @@
* .20 02-05-92 jba Changed function arguments from paddr to precord
* .21 02-28-92 jba ANSI C changes
* .22 03-03-92 jba Changed callback handling
* .23 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -122,7 +123,7 @@ struct bodset { /* binary output dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns:(0,2)=>(success,success no convert*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_bo;/*returns: (-1,0,1)=>(failure,success,don't continue)*/
DEVSUPFUN write_bo;/*returns: (-1,0)=>(failure,success)*/
};
@@ -196,6 +197,7 @@ static long process(pbo)
struct bodset *pdset = (struct bodset *)(pbo->dset);
long status=0;
int wait_time;
unsigned char pact=pbo->pact;
if( (pdset==NULL) || (pdset->write_bo==NULL) ) {
pbo->pact=TRUE;
@@ -222,14 +224,15 @@ static long process(pbo)
if ( pbo->mask != 0 ) {
if(pbo->val==0) pbo->rval = 0;
else pbo->rval = pbo->mask;
}
} else pbo->rval = (unsigned long)pbo->val;
}
if(status==0) {
status=(*pdset->write_bo)(pbo); /* write the new value */
}
/* check if device support set pact */
if ( !pact && pbo->pact ) return(0);
pbo->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if(status==1) return(0);
tsLocalTime(&pbo->time);
wait_time = (int)((pbo->high) * vxTicksPerSecond); /* seconds to ticks */
if(pbo->val==1 && wait_time>0) {

View File

@@ -31,6 +31,7 @@
* -----------------
4 .00 12-13-91 jba Initial definition
* .01 02-28-92 jba ANSI C changes
* .02 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -46,7 +47,6 @@
#include <devSup.h>
#include <errMdef.h>
#include <recSup.h>
#include <module_types.h>
#include <eventRecord.h>
/* Create RSET - Record Support Entry Table*/
@@ -94,7 +94,7 @@ struct eventdset { /* event input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_event;/*(0,1)=> success, async */
DEVSUPFUN read_event;/*(0)=> success */
};
void monitor();
@@ -114,13 +114,13 @@ static long process(pevent)
{
struct eventdset *pdset = (struct eventdset *)(pevent->dset);
long status=0;
unsigned char pact=pevent->pact;
if((pdset!=NULL) && (pdset->number >= 5) && pdset->read_event )
status=(*pdset->read_event)(pevent); /* read the new value */
/* check if device support set pact */
if ( !pact && pevent->pact ) return(0);
pevent->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
if(pevent->val>0) post_event((int)pevent->val);

View File

@@ -32,6 +32,7 @@
* .01 10-14-91 jba Added dev sup crtl fld and wd timer
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
* .04 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -100,8 +101,7 @@ struct histogramdset { /* histogram input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_histogram;/*(0,1,2)=> success and */
/*(add_count,don't continue, don't add_count)*/
DEVSUPFUN read_histogram;/*(0,2)=> success and add_count, don't add_count)*/
/* if add_count then sgnl added to array */
DEVSUPFUN special_linconv;
};
@@ -157,6 +157,7 @@ static long init_record(phistogram)
/* This routine may get called twice. Once by cvt_dbaddr. Once by iocInit*/
pcallback->process = process;
if(phistogram->wdog==NULL && phistogram->sdel!=0) {
/* initialize a watchdog timer */
pcallback = (struct callback *)(calloc(1,sizeof(struct callback)));
@@ -168,7 +169,6 @@ static long init_record(phistogram)
exit(1);
}
pcallback->wd_id = wdCreate();
pcallback->process = process;
/* start new watchdog timer on monitor */
wait_time = (float)(phistogram->sdel * vxTicksPerSecond);
@@ -206,6 +206,7 @@ static long process(phistogram)
{
struct histogramdset *pdset = (struct histogramdset *)(phistogram->dset);
long status;
unsigned char pact=phistogram->pact;
if( (pdset==NULL) || (pdset->read_histogram==NULL) ) {
phistogram->pact=TRUE;
@@ -213,13 +214,11 @@ static long process(phistogram)
return(S_dev_missingSup);
}
/*pact must not be set true until read_histogram is called*/
status=(*pdset->read_histogram)(phistogram);
/* check if device support set pact */
if ( !pact && phistogram->pact ) return(0);
phistogram->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&phistogram->time);
if(status==0)add_count(phistogram);

View File

@@ -33,6 +33,7 @@
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .04 02-28-92 jba ANSI C changes
* .04 04-10-92 jba pact now used to test for asyn processing, not status
*/
@@ -97,7 +98,7 @@ struct longindset { /* longin input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_longin;/*(0,1)=> success, async */
DEVSUPFUN read_longin; /*returns: (-1,0)=>(failure,success)*/
};
void alarm();
void monitor();
@@ -128,6 +129,7 @@ static long process(plongin)
{
struct longindset *pdset = (struct longindset *)(plongin->dset);
long status;
unsigned char pact=plongin->pact;
if( (pdset==NULL) || (pdset->read_longin==NULL) ) {
plongin->pact=TRUE;
@@ -136,11 +138,10 @@ static long process(plongin)
}
status=(*pdset->read_longin)(plongin); /* read the new value */
/* check if device support set pact */
if ( !pact && plongin->pact ) return(0);
plongin->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&plongin->time);
/* check for alarms */

View File

@@ -32,6 +32,7 @@
* .01 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
* .04 04-10-92 jba pact now used to test for asyn processing, not status
*/
@@ -96,7 +97,7 @@ struct longoutdset { /* longout input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_longout;/*(-1,0,1)=>(failure,success,don't Continue*/
DEVSUPFUN write_longout;/*(-1,0)=>(failure,success*/
};
void alarm();
int convert();
@@ -133,6 +134,7 @@ static long process(plongout)
{
struct longoutdset *pdset = (struct longoutdset *)(plongout->dset);
long status=0;
unsigned char pact=plongout->pact;
if( (pdset==NULL) || (pdset->write_longout==NULL) ) {
plongout->pact=TRUE;
@@ -157,11 +159,10 @@ static long process(plongout)
if(status==0) {
status=(*pdset->write_longout)(plongout); /* write the new value */
}
/* check if device support set pact */
if ( !pact && plongout->pact ) return(0);
plongout->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&plongout->time);
/* check for alarms */

View File

@@ -49,6 +49,7 @@
* .14 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .15 02-05-92 jba Changed function arguments from paddr to precord
* .16 02-28-92 jba ANSI C changes
* .17 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -111,7 +112,7 @@ struct mbbidset { /* multi bit binary input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_mbbi;/*(0,1,2)=>(success, asyn, success no convert)*/
DEVSUPFUN read_mbbi;/*(0,2)=>(success, success no convert)*/
};
void alarm();
void monitor();
@@ -168,6 +169,7 @@ static long process(pmbbi)
{
struct mbbidset *pdset = (struct mbbidset *)(pmbbi->dset);
long status;
unsigned char pact=pmbbi->pact;
if( (pdset==NULL) || (pdset->read_mbbi==NULL) ) {
pmbbi->pact=TRUE;
@@ -176,8 +178,10 @@ static long process(pmbbi)
}
status=(*pdset->read_mbbi)(pmbbi); /* read the new value */
/* check if device support set pact */
if ( !pact && pmbbi->pact ) return(0);
pmbbi->pact = TRUE;
if (status==1) return(0);
tsLocalTime(&pmbbi->time);
if(status==0) { /* convert the value */
unsigned long *pstate_values;

View File

@@ -52,6 +52,7 @@
* .17 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .18 02-05-92 jba Changed function arguments from paddr to precord
* .19 02-28-92 jba ANSI C changes
* .20 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -115,7 +116,7 @@ struct mbbodset { /* multi bit binary output dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (0,2)=>(success,success no convert)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_mbbo;/*(0,1)=>(success,don't Continue*/
DEVSUPFUN write_mbbo; /*returns: (0,2)=>(success,success no convert)*/
};
@@ -205,6 +206,7 @@ static long process(pmbbo)
{
struct mbbodset *pdset = (struct mbbodset *)(pmbbo->dset);
long status=0;
unsigned char pact=pmbbo->pact;
if( (pdset==NULL) || (pdset->write_mbbo==NULL) ) {
pmbbo->pact=TRUE;
@@ -249,10 +251,10 @@ static long process(pmbbo)
status=(*pdset->write_mbbo)(pmbbo); /* write the new value */
DONT_WRITE:
/* check if device support set pact */
if ( !pact && pmbbo->pact ) return(0);
pmbbo->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if(status==1) return(0);
tsLocalTime(&pmbbo->time);
/* check for alarms */
alarm(pmbbo);

View File

@@ -32,6 +32,7 @@
* .01 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
* .04 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -95,7 +96,7 @@ struct pcdset { /* pulseCounter input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN cmd_pc;/*(-1,0,1)=>(failure,success,don't Continue*/
DEVSUPFUN cmd_pc;/*(-1,0)=>(failure,success*/
};
/* def for gsrc field */
@@ -145,6 +146,7 @@ static long process(ppc)
long status=0;
long options,nRequest;
unsigned short save;
unsigned char pact=ppc->pact;
/* must have cmd_pc functions defined */
if( (pdset==NULL) || (pdset->cmd_pc==NULL) ) {
@@ -191,11 +193,10 @@ static long process(ppc)
}
if (status==0) status=(*pdset->cmd_pc)(ppc);
/* check if device support set pact */
if ( !pact && ppc->pact ) return(0);
ppc->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
ppc->udf=FALSE;
tsLocalTime(&ppc->time);

View File

@@ -33,6 +33,7 @@
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .04 02-28-92 jba ANSI C changes
* .05 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -96,7 +97,7 @@ struct pddset { /* pulseDelay input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_pd;/*(-1,0,1)=>(failure,success,don't Continue*/
DEVSUPFUN write_pd;/*(-1,0)=>(failure,success*/
};
void monitor();
@@ -129,6 +130,7 @@ static long process(ppd)
{
struct pddset *pdset = (struct pddset *)(ppd->dset);
long status=0;
unsigned char pact=ppd->pact;
/* must have write_pd functions defined */
if( (pdset==NULL) || (pdset->write_pd==NULL) ) {
@@ -139,11 +141,10 @@ static long process(ppd)
if (status==0) status=(*pdset->write_pd)(ppd); /* write the new value */
/* check if device support set pact */
if ( !pact && ppd->pact ) return(0);
ppd->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
ppd->udf=FALSE;
tsLocalTime(&ppd->time);

View File

@@ -34,6 +34,7 @@
* .03 02-05-92 jba Changed function arguments from paddr to precord
* .04 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .05 02-28-92 jba ANSI C changes
* .06 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -97,7 +98,7 @@ struct ptdset { /* pulseTrain input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_pt;/*(-1,0,1)=>(failure,success,don't Continue*/
DEVSUPFUN write_pt;/*(-1,0)=>(failure,success)*/
};
/* def for gsrc field */
@@ -147,6 +148,7 @@ static long process(ppt)
long status=0;
long options,nRequest;
double save;
unsigned char pact=ppt->pact;
/* must have write_pt functions defined */
@@ -189,10 +191,10 @@ static long process(ppt)
if (status==0 && (ppt->gsrc!=SOFTWARE || ppt->sgv!=0))
status=(*pdset->write_pt)(ppt);
/* check if device support set pact */
if ( !pact && ppt->pact ) return(0);
ppt->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
if(status==-1)status = 0;
ppt->udf=FALSE;

View File

@@ -32,6 +32,7 @@
* .01 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
* .04 04-10-92 jba pact now used to test for asyn processing, not status
*/
@@ -95,7 +96,7 @@ struct stringindset { /* stringin input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_stringin;/*(0,1)=> success, async */
DEVSUPFUN read_stringin; /*returns: (-1,0)=>(failure,success)*/
};
void monitor();
@@ -125,6 +126,7 @@ static long process(pstringin)
{
struct stringindset *pdset = (struct stringindset *)(pstringin->dset);
long status;
unsigned char pact=pstringin->pact;
if( (pdset==NULL) || (pdset->read_stringin==NULL) ) {
pstringin->pact=TRUE;
@@ -133,11 +135,10 @@ static long process(pstringin)
}
status=(*pdset->read_stringin)(pstringin); /* read the new value */
/* check if device support set pact */
if ( !pact && pstringin->pact ) return(0);
pstringin->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&pstringin->time);
/* check event list */

View File

@@ -33,6 +33,7 @@
* .02 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .03 02-05-92 jba Changed function arguments from paddr to precord
* .04 02-28-92 jba ANSI C changes
* .05 04-10-92 jba pact now used to test for asyn processing, not status
*/
@@ -96,7 +97,7 @@ struct stringoutdset { /* stringout input dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN write_stringout;/*(-1,0,1)=>(failure,success,don't Continue*/
DEVSUPFUN write_stringout;/*(-1,0)=>(failure,success)*/
};
void monitor();
@@ -133,6 +134,7 @@ static long process(pstringout)
{
struct stringoutdset *pdset = (struct stringoutdset *)(pstringout->dset);
long status=0;
unsigned char pact=pstringout->pact;
if( (pdset==NULL) || (pdset->write_stringout==NULL) ) {
pstringout->pact=TRUE;
@@ -158,11 +160,10 @@ static long process(pstringout)
if(status==0) {
status=(*pdset->write_stringout)(pstringout); /* write the new value */
}
/* check if device support set pact */
if ( !pact && pstringout->pact ) return(0);
pstringout->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if (status==1) return(0);
tsLocalTime(&pstringout->time);
/* check event list */

View File

@@ -36,7 +36,7 @@
* .04 02-05-92 jba Changed function arguments from paddr to precord
* .05 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .06 02-28-92 jba ANSI C changes
* .07 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -125,7 +125,7 @@ static long init_record(psub)
strcpy(temp,"_");
}
strcat(temp,psub->inam);
ret = symFindByName(sysSymTbl,temp,&psub->sadr,(void *)&sub_type);
ret = symFindByName(sysSymTbl,temp,(void *)&psub->sadr,(void *)&sub_type);
if ((ret !=OK) || ((sub_type & N_TEXT) == 0)){
recGblRecordError(S_db_BadSub,psub,"recSub(init_record)");
return(S_db_BadSub);
@@ -142,7 +142,7 @@ static long init_record(psub)
strcpy(temp,"_");
}
strcat(temp,psub->snam);
ret = symFindByName(sysSymTbl,temp,&psub->sadr,(void *)&sub_type);
ret = symFindByName(sysSymTbl,temp,(void *)&psub->sadr,(void *)&sub_type);
if ((ret < 0) || ((sub_type & N_TEXT) == 0)){
recGblRecordError(S_db_BadSub,psub,"recSub(init_record)");
return(S_db_BadSub);

View File

@@ -53,6 +53,7 @@
* .13 02-05-92 jba Changed function arguments from paddr to precord
* .14 02-28-92 jba Changed get_precision,get_graphic_double,get_control_double
* .15 02-28-92 jba ANSI C changes
* .16 04-10-92 jba pact now used to test for asyn processing, not status
*/
#include <vxWorks.h>
@@ -117,8 +118,7 @@ struct wfdset { /* waveform dset */
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_wf;/*(0,1)=> success and */
/*(convert,don't continue)*/
DEVSUPFUN read_wf; /*returns: (-1,0)=>(failure,success)*/
};
/*sizes of field types*/
@@ -168,6 +168,7 @@ static long process(pwf)
{
struct wfdset *pdset = (struct wfdset *)(pwf->dset);
long status;
unsigned char pact=pwf->pact;
if( (pdset==NULL) || (pdset->read_wf==NULL) ) {
pwf->pact=TRUE;
@@ -184,11 +185,13 @@ static long process(pwf)
}
}
/*pact must not be set true until read_wf completes*/
if ( pact && pwf->busy ) return(0);
status=(*pdset->read_wf)(pwf); /* read the new value */
/* check if device support set pact */
if ( !pact && pwf->pact ) return(0);
pwf->pact = TRUE;
/* status is one if an asynchronous record is being processed*/
if(status==1) return(0);
pwf->udf=FALSE;
tsLocalTime(&pwf->time);