Fixed dbReportDeviceConfig so that it correctly handles LINR

This commit is contained in:
Marty Kraimer
1998-06-12 12:37:05 +00:00
parent 682656a794
commit e5cc6ad87c
2 changed files with 12 additions and 4 deletions

View File

@@ -89,6 +89,7 @@ int main(int argc,char **argv)
gphDump(pdbbase->pgpHash);
dbDumpMenu(pdbbase,NULL);
dbDumpRecord(pdbbase,NULL,0);
dbReportDeviceConfig(pdbbase,stdout);
dbFreeBase(pdbbase);
*/
return(0);

View File

@@ -3629,15 +3629,22 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
if(status) break;
strcpy(dtypValue,dbGetString(pdbentry));
status = dbFindField(pdbentry,"LINR");
if(status || *((short *)pdbentry->pfield) <=1 ) {
cvtValue[0] = 0;
if(status) {
cvtValue[0] = 0;
} else {
if(strcmp(dbGetString(pdbentry),"LINEAR")!=0) {
cvtValue[0] = 0;
} else {
strcpy(cvtValue,"cvt(");
status = dbFindField(pdbentry,"EGUL");
if(!status) strcat(cvtValue,dbGetString(pdbentry));
status = dbFindField(pdbentry,"EGUH");
if(!status) strcat(cvtValue,dbGetString(pdbentry));
status = dbFindField(pdbentry,"EGUF");
if(!status) {
strcat(cvtValue,",");
strcat(cvtValue,dbGetString(pdbentry));
}
strcat(cvtValue,")");
}
}
fprintf(report,"%-8s %-20s %-20s %-20s %-s\n",
busName,linkValue,dtypValue,