jba: fixed pass test karonis: added PV_LINK code

This commit is contained in:
Janet B. Anderson
1992-04-23 09:55:42 +00:00
parent f4a0af7478
commit fa1cd87e78
5 changed files with 112 additions and 13 deletions

View File

@@ -111,6 +111,10 @@ struct pcdset { /* pulseCounter input dset */
#define CTR_SETUP 4
void monitor();
/* Added for Channel Access Links */
long dbCaAddInlink();
long dbCaGetLink();
static long init_record(ppc,pass)
struct pulseCounterRecord *ppc;
@@ -119,7 +123,7 @@ static long init_record(ppc,pass)
struct pcdset *pdset;
long status=0;
if (pass!=0) return(0);
if (pass==0) return(0);
/* must have device support */
if(!(pdset = (struct pcdset *)(ppc->dset))) {
@@ -131,6 +135,12 @@ static long init_record(ppc,pass)
ppc->sgv = ppc->sgl.value.value;
}
if (ppc->sgl.type == PV_LINK && ppc->gsrc == SOFTWARE)
{
status = dbCaAddInlink(&(ppc->sgl), (void *) ppc, "SGV");
if(status) return(status);
} /* endif */
/* must have cmd_pc functions defined */
if( (pdset->number < 5) || (pdset->cmd_pc == NULL) ) {
recGblRecordError(S_dev_missingSup,ppc,"pc: cmd_pc");
@@ -172,6 +182,14 @@ static long process(ppc)
recGblSetSevr(ppc,LINK_ALARM,VALID_ALARM);
}
}
if (ppc->sgl.type == CA_LINK){
ppc->pact = TRUE;
status=dbCaGetLink(&(ppc->sgl));
ppc->pact = FALSE;
if(status!=0) {
recGblSetSevr(ppc,LINK_ALARM,VALID_ALARM);
}
}
if(status=0){
if(ppc->sgv != ppc->osgv){ /* soft gate changed */
save=ppc->cmd;