jba Moved set of alarm stat and sevr to macros

This commit is contained in:
Janet B. Anderson
1991-12-05 13:40:07 +00:00
parent 5f1357a45d
commit a69a2aa8ae
39 changed files with 207 additions and 439 deletions

View File

@@ -30,8 +30,7 @@
*
* Modification Log:
* -----------------
* .01 mm-dd-yy iii Comment
* .02 mm-dd-yy iii Comment
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
* ...
*/
@@ -44,6 +43,7 @@
#include <cvtTable.h>
#include <dbDefs.h>
#include <dbAccess.h>
#include <recSup.h>
#include <devSup.h>
#include <link.h>
#include <aiRecord.h>
@@ -110,19 +110,14 @@ static long read_ai(pai)
status = dbGetLink(&(pai->inp.value.db_link),pai,DBR_LONG,
&(pai->rval),&options,&nRequest);
if(status!=0) {
if(pai->nsev<VALID_ALARM) {
pai->nsev = VALID_ALARM;
pai->nsta = LINK_ALARM;
}
recGblSetSevr(pai,LINK_ALARM,VALID_ALARM);
}
break;
case (CA_LINK) :
break;
default :
if(pai->nsev<VALID_ALARM) {
pai->nsev = VALID_ALARM;
pai->nsta = SOFT_ALARM;
if(recGblSetSevr(pai,SOFT_ALARM,VALID_ALARM)){
if(pai->stat!=SOFT_ALARM) {
strcpy(message,pai->name);
strcat(message,": devAiSoftRaw (read_ai) Illegal INP field");