jba: fixed pass test
This commit is contained in:
@@ -148,7 +148,7 @@ static long init_record(pai,pass)
|
||||
struct aidset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct aidset *)(pai->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pai,"ai: init_record");
|
||||
|
||||
@@ -144,7 +144,7 @@ static long init_record(pao,pass)
|
||||
long status=0;
|
||||
double value;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct aodset *)(pao->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pao,"ao: init_record");
|
||||
|
||||
@@ -123,7 +123,7 @@ static long init_record(pbi,pass)
|
||||
struct bidset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct bidset *)(pbi->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pbi,"bi: init_record");
|
||||
|
||||
@@ -162,7 +162,7 @@ static long init_record(pbo,pass)
|
||||
long status=0;
|
||||
struct callback *pcallback;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct bodset *)(pbo->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pbo,"bo: init_record");
|
||||
|
||||
@@ -144,7 +144,7 @@ static long init_record(pcalc,pass)
|
||||
short error_number;
|
||||
char rpbuf[80];
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
plink = &pcalc->inpa;
|
||||
pvalue = &pcalc->a;
|
||||
|
||||
@@ -106,7 +106,7 @@ static long init_record(pevent,pass)
|
||||
struct eventdset *pdset;
|
||||
long status=0;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if( (pdset=(struct eventdset *)(pevent->dset)) && (pdset->init_record) )
|
||||
status=(*pdset->init_record)(pevent);
|
||||
|
||||
@@ -111,7 +111,7 @@ static long init_record(pfanout,pass)
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
/* get link selection if sell is a constant and nonzero*/
|
||||
if (pfanout->sell.type==CONSTANT && pfanout->sell.value.value!=0 ){
|
||||
|
||||
@@ -157,9 +157,19 @@ static long init_record(phistogram,pass)
|
||||
float wait_time;
|
||||
void (*process)();
|
||||
|
||||
if (pass==0){
|
||||
if (pass==0){
|
||||
|
||||
/* This routine may get called twice. Once by cvt_dbaddr. Once by iocInit*/
|
||||
/* allocate space for histogram array */
|
||||
if(phistogram->bptr==NULL) {
|
||||
if(phistogram->nelm<=0) phistogram->nelm=1;
|
||||
phistogram->bptr = (unsigned long *)calloc(phistogram->nelm,sizeof(long));
|
||||
}
|
||||
|
||||
/* calulate width of array element */
|
||||
phistogram->wdth=(phistogram->ulim-phistogram->llim)/phistogram->nelm;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
pcallback->process = process;
|
||||
if(phistogram->wdog==NULL && phistogram->sdel!=0) {
|
||||
@@ -173,21 +183,13 @@ static long init_record(phistogram,pass)
|
||||
exit(1);
|
||||
}
|
||||
pcallback->wd_id = wdCreate();
|
||||
|
||||
|
||||
/* start new watchdog timer on monitor */
|
||||
wait_time = (float)(phistogram->sdel * vxTicksPerSecond);
|
||||
wdStart(pcallback->wd_id,wait_time,callbackRequest,(int)pcallback);
|
||||
}
|
||||
|
||||
/* allocate space for histogram array */
|
||||
if(phistogram->bptr==NULL) {
|
||||
if(phistogram->nelm<=0) phistogram->nelm=1;
|
||||
phistogram->bptr = (unsigned long *)calloc(phistogram->nelm,sizeof(long));
|
||||
}
|
||||
|
||||
/* calulate width of array element */
|
||||
phistogram->wdth=(phistogram->ulim-phistogram->llim)/phistogram->nelm;
|
||||
|
||||
/* must have device support defined */
|
||||
if(!(pdset = (struct histogramdset *)(phistogram->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,phistogram,"histogram: init_record");
|
||||
return(S_dev_noDSET);
|
||||
@@ -196,10 +198,7 @@ static long init_record(phistogram,pass)
|
||||
if( (pdset->number < 6) || (pdset->read_histogram == NULL) ) {
|
||||
recGblRecordError(S_dev_missingSup,phistogram,"histogram: init_record");
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* call device support init_record */
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(phistogram))) return(status);
|
||||
|
||||
@@ -111,7 +111,7 @@ static long init_record(plongin,pass)
|
||||
struct longindset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct longindset *)(plongin->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,plongin,"longin: init_record");
|
||||
|
||||
@@ -144,7 +144,7 @@ static long init_record(pmbbi,pass)
|
||||
long status;
|
||||
int i;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct mbbidset *)(pmbbi->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pmbbi,"mbbi: init_record");
|
||||
|
||||
@@ -151,7 +151,7 @@ static long init_record(pmbbo,pass)
|
||||
long status;
|
||||
int i;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct mbbodset *)(pmbbo->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pmbbo,"mbbo: init_record");
|
||||
|
||||
@@ -108,7 +108,7 @@ static long init_record(ppid,pass)
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
/* initialize the setpoint for constant setpoint */
|
||||
if (ppid->stpl.type == CONSTANT){
|
||||
|
||||
@@ -109,7 +109,7 @@ static long init_record(ppd,pass)
|
||||
struct pddset *pdset;
|
||||
long status=0;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
/* must have device support */
|
||||
if(!(pdset = (struct pddset *)(ppd->dset))) {
|
||||
|
||||
@@ -121,7 +121,7 @@ static long init_record(psel,pass)
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
/* get seln initial value if nvl is a constant*/
|
||||
if (psel->nvl.type == CONSTANT ) psel->seln = psel->nvl.value.value;
|
||||
|
||||
@@ -179,7 +179,7 @@ static long init_record(psm,pass)
|
||||
struct smdset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct smdset *)(psm->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,psm,"sm: init_record");
|
||||
|
||||
@@ -108,7 +108,7 @@ static long init_record(pstringin,pass)
|
||||
struct stringindset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
if(!(pdset = (struct stringindset *)(pstringin->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pstringin,"stringin: init_record");
|
||||
|
||||
@@ -146,7 +146,7 @@ static long init_record(ptimer,pass)
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
|
||||
if (pass!=0) return(0);
|
||||
if (pass==0) return(0);
|
||||
|
||||
/* get the delay initial value if torg is a constant*/
|
||||
if (ptimer->torg.type == CONSTANT ){
|
||||
|
||||
@@ -149,11 +149,12 @@ static long init_record(pwf,pass)
|
||||
pwf->nord = 0;
|
||||
return(0);
|
||||
}
|
||||
/* must have read_wf function defined */
|
||||
/* must have dset defined */
|
||||
if(!(pdset = (struct wfdset *)(pwf->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,pwf,"wf: init_record");
|
||||
return(S_dev_noDSET);
|
||||
}
|
||||
/* must have read_wf function defined */
|
||||
if( (pdset->number < 5) || (pdset->read_wf == NULL) ) {
|
||||
recGblRecordError(S_dev_missingSup,pwf,"wf: init_record");
|
||||
return(S_dev_missingSup);
|
||||
|
||||
Reference in New Issue
Block a user