put away for mrk after epics installed
This commit is contained in:
@@ -68,9 +68,9 @@
|
||||
* long *options; addr of options
|
||||
* long *nRequest; addr of number of elements
|
||||
*
|
||||
* dbPutLink(pdblink,pdest,dbrType,pbuffer,nRequest)
|
||||
* dbPutLink(pdblink,psource,dbrType,pbuffer,nRequest)
|
||||
* struct db_link *pdblink;
|
||||
* struct dbCommon *pdest;
|
||||
* struct dbCommon *psource;
|
||||
* short dbrType; DBR_xxx
|
||||
* caddr_t pbuffer; addr of input data
|
||||
* long nRequest;
|
||||
@@ -316,9 +316,7 @@ struct dbAddr *paddr;
|
||||
if(!(precLoc=GET_PRECLOC(paddr->record_type))
|
||||
|| !(precord=GET_PRECORD(precLoc,record_number))
|
||||
|| (paddr->field_size+field_offset) > (precLoc->rec_size)) {
|
||||
recGblDbaddrError(S_db_notFound,paddr,"field_spec_to_mem_loc");
|
||||
(long)(paddr->pfield) = -1;
|
||||
(long)(paddr->precord) = -1;
|
||||
recGblDbaddrError(S_db_notFound,paddr,"dbNameToAddr");
|
||||
return(S_db_notFound);
|
||||
}
|
||||
paddr->precord=precord;
|
||||
@@ -363,24 +361,23 @@ long dbGetLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
return(dbGetField(paddr,dbrType,pbuffer,options,nRequest));
|
||||
}
|
||||
|
||||
long dbPutLink(pdblink,pdest,dbrType,pbuffer,options,nRequest)
|
||||
long dbPutLink(pdblink,psource,dbrType,pbuffer,nRequest)
|
||||
struct db_link *pdblink;
|
||||
struct dbCommon *pdest;
|
||||
struct dbCommon *psource;
|
||||
short dbrType;
|
||||
caddr_t pbuffer;
|
||||
long *options;
|
||||
long *nRequest;
|
||||
long nRequest;
|
||||
{
|
||||
struct dbAddr *paddr=(struct dbAddr*)(pdblink->pdbAddr);
|
||||
long status;
|
||||
|
||||
status=dbPut(paddr,dbrType,pbuffer,nRequest);
|
||||
if(pdblink->maximize_sevr) {
|
||||
struct dbCommon *pfrom=(struct dbCommon*)(paddr->precord);
|
||||
struct dbCommon *pto=(struct dbCommon*)(paddr->precord);
|
||||
|
||||
if(pfrom->sevr>pdest->sevr) {
|
||||
pdest->nsev = pfrom->sevr;
|
||||
pdest->nsta = LINK_ALARM;
|
||||
if(pto->sevr<psource->sevr) {
|
||||
pto->nsev = psource->sevr;
|
||||
pto->nsta = LINK_ALARM;
|
||||
}
|
||||
}
|
||||
if(!RTN_SUCCESS(status)) return(status);
|
||||
@@ -5905,7 +5902,7 @@ long nRequest;
|
||||
else {
|
||||
if( prset && (pspecial = (prset->special))) {
|
||||
status=(*pspecial)(paddr,0);
|
||||
if(!RTN_SUCCESS(status)) goto all_done;
|
||||
if(!RTN_SUCCESS(status)) return(status);
|
||||
} else {
|
||||
recGblRecSupError(S_db_noSupport,paddr,"dbPut",
|
||||
"special");
|
||||
@@ -5929,7 +5926,7 @@ long nRequest;
|
||||
status= (*prset->put_array_info)(paddr,nRequest);
|
||||
}
|
||||
|
||||
if(!RTN_SUCCESS(status)) goto all_done;
|
||||
if(!RTN_SUCCESS(status)) return(status);
|
||||
|
||||
/* check for special processing is required */
|
||||
if(special) {
|
||||
@@ -5938,7 +5935,7 @@ long nRequest;
|
||||
}
|
||||
else {
|
||||
status=(*pspecial)(paddr,1);
|
||||
if(!RTN_SUCCESS(status)) goto all_done;
|
||||
if(!RTN_SUCCESS(status)) return(status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5950,7 +5947,5 @@ long nRequest;
|
||||
((*pval != *pfield_name) || (!pfldDes->process_passive)))
|
||||
db_post_events(precord,paddr->pfield,DBE_VALUE);
|
||||
|
||||
all_done:
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ static long initRecSup()
|
||||
|
||||
static long initDatabase()
|
||||
{
|
||||
char name[PVNAME_SZ+FLDNAME_SZ+1];
|
||||
char name[PVNAME_SZ+FLDNAME_SZ+2];
|
||||
short i,j,k;
|
||||
char message[120];
|
||||
long status;
|
||||
@@ -251,6 +251,9 @@ static long initDatabase()
|
||||
lstInit(&(precord->mlis));
|
||||
precord->pact=FALSE;
|
||||
|
||||
/* set lset=0 See determine lock set below*/
|
||||
precord->lset = 0;
|
||||
|
||||
/* Init DSET NOTE that result may be NULL*/
|
||||
precord->dset=(struct dset *)GET_PDSET(pdevSup,precord->dtyp);
|
||||
|
||||
@@ -262,15 +265,14 @@ static long initDatabase()
|
||||
strncpy(name,plink->value.pv_link.pvname,PVNAME_SZ);
|
||||
strcat(name,".");
|
||||
strncat(name,plink->value.pv_link.fldname,FLDNAME_SZ);
|
||||
printf("%s %d %d %s\n",precord->name,plink->value.pv_link.process_passive,plink->value.pv_link.maximize_sevr,name);
|
||||
if(dbNameToAddr(name,&dbAddr) == 0) {
|
||||
/* show that refered to record has link. */
|
||||
/* See determine lock set below.*/
|
||||
((struct dbCommon *)(dbAddr.precord))->lset = -1;
|
||||
plink->type = DB_LINK;
|
||||
plink->value.db_link.pdbAddr =
|
||||
(caddr_t)calloc(1,sizeof(struct dbAddr));
|
||||
*((struct dbAddr *)(plink->value.db_link.pdbAddr))=dbAddr;
|
||||
/* show that refered to record has link. */
|
||||
/* See determine lock set below.*/
|
||||
}
|
||||
else {
|
||||
/*This will be replaced by channel access call*/
|
||||
@@ -312,7 +314,6 @@ printf("%s %d %d %s\n",precord->name,plink->value.pv_link.process_passive,plink-
|
||||
if(precord->lset > 0) continue; /*already in a lock set */
|
||||
lookAhead = ( (precord->lset == -1) ? TRUE : FALSE);
|
||||
nset++;
|
||||
printf("calling addToSet\n");
|
||||
status = addToSet(precord,i,lookAhead,i,j,nset);
|
||||
if(status) return(status);
|
||||
}
|
||||
@@ -336,7 +337,6 @@ static long addToSet(precord,record_type,lookAhead,i,j,lset)
|
||||
struct recTypDes *precTypDes;
|
||||
struct recLoc *precLoc;
|
||||
|
||||
printf("%s precord->lset %d lset %d lookAhead %d\n",precord->name,precord->lset,lset,lookAhead);
|
||||
if(precord->lset > 0) {
|
||||
status = S_db_lsetLogic;
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
@@ -359,7 +359,6 @@ printf("%s precord->lset %d lset %d lookAhead %d\n",precord->name,precord->lset,
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
return(status);
|
||||
}
|
||||
printf("calling addToSet recursive 1\n");
|
||||
status = addToSet(pk,
|
||||
((struct dbAddr *)(plink->value.db_link.pdbAddr))->record_type,
|
||||
TRUE,i,j,lset);
|
||||
@@ -395,7 +394,6 @@ printf("calling addToSet recursive 1\n");
|
||||
errMessage(status,"Logic Error in iocInit(addToSet)");
|
||||
return(status);
|
||||
}
|
||||
printf("calling addToSet recursive 2\n");
|
||||
status = addToSet(pn,in,TRUE,i,j,lset);
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ int recGblReportLink(fp,pfield_name,plink)
|
||||
case VME_IO:
|
||||
if(fprintf(fp,"%4s VME: card=%2d signal=%2d\n",
|
||||
pfield_name,
|
||||
plink->value.vmeio.card,plink->value.vmeio.card)<0) return(-1);
|
||||
plink->value.vmeio.card,plink->value.vmeio.signal)<0) return(-1);
|
||||
break;
|
||||
case CAMAC_IO:
|
||||
if(fprintf(fp,
|
||||
|
||||
Reference in New Issue
Block a user