jba: changed MAJOR_ALARM to VALID_ALARM
This commit is contained in:
@@ -148,9 +148,9 @@ static long process(paddr)
|
||||
if (pcompress->inp.type != DB_LINK) {
|
||||
status=0;
|
||||
}else if (pcompress->wptr == NULL) {
|
||||
if(pcompress->nsev<MAJOR_ALARM) {
|
||||
if(pcompress->nsev<VALID_ALARM) {
|
||||
pcompress->nsta = READ_ALARM;
|
||||
pcompress->nsev = MAJOR_ALARM;
|
||||
pcompress->nsev = VALID_ALARM;
|
||||
}
|
||||
status=0;
|
||||
} else {
|
||||
|
||||
+4
-4
@@ -109,8 +109,8 @@ static long process(paddr)
|
||||
if (pfanout->lnk6.type==DB_LINK) dbScanPassive(pfanout->lnk6.value.db_link.pdbAddr);
|
||||
} else if(pfanout->selm==SELECTED) {
|
||||
if(pfanout->seln<1 || pfanout->seln>6) {
|
||||
if(pfanout->nsev<MAJOR_ALARM) {
|
||||
pfanout->nsev = MAJOR_ALARM;
|
||||
if(pfanout->nsev<VALID_ALARM) {
|
||||
pfanout->nsev = VALID_ALARM;
|
||||
pfanout->nsta = SOFT_ALARM;
|
||||
}
|
||||
} else {
|
||||
@@ -121,8 +121,8 @@ static long process(paddr)
|
||||
dbScanPassive(plink->value.db_link.pdbAddr);
|
||||
}
|
||||
} else {
|
||||
if(pfanout->nsev<MAJOR_ALARM) {
|
||||
pfanout->nsev = MAJOR_ALARM;
|
||||
if(pfanout->nsev<VALID_ALARM) {
|
||||
pfanout->nsev = VALID_ALARM;
|
||||
pfanout->nsta = SOFT_ALARM;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -357,9 +357,9 @@ struct pidRecord *ppid;
|
||||
|
||||
/* fetch the controlled value */
|
||||
if (ppid->cvl.type != DB_LINK) { /* nothing to control*/
|
||||
if (ppid->nsev<MAJOR_ALARM) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->nsta = SOFT_ALARM;
|
||||
ppid->nsev = MAJOR_ALARM;
|
||||
ppid->nsev = VALID_ALARM;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
@@ -367,9 +367,9 @@ struct pidRecord *ppid;
|
||||
nRequest=1;
|
||||
if(dbGetLink(&(ppid->cvl.value.db_link),ppid,DBR_FLOAT,
|
||||
&cval,&options,&nRequest)!=NULL) {
|
||||
if (ppid->nsev<MAJOR_ALARM) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->nsta = READ_ALARM;
|
||||
ppid->nsev = MAJOR_ALARM;
|
||||
ppid->nsev = VALID_ALARM;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
@@ -379,9 +379,9 @@ struct pidRecord *ppid;
|
||||
nRequest=1;
|
||||
if(dbGetLink(&(ppid->stpl.value.db_link),ppid,DBR_FLOAT,
|
||||
&(ppid->val),&options,&nRequest)!=NULL) {
|
||||
if (ppid->nsev<MAJOR_ALARM) {
|
||||
if (ppid->nsev<VALID_ALARM) {
|
||||
ppid->stat = READ_ALARM;
|
||||
ppid->sevr = MAJOR_ALARM;
|
||||
ppid->sevr = VALID_ALARM;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -121,9 +121,9 @@ static long process(paddr)
|
||||
psel->pact = TRUE;
|
||||
if(fetch_values(psel)==0) {
|
||||
if(do_sel(psel)!=0) {
|
||||
if(psel->nsev<MAJOR_ALARM) {
|
||||
if(psel->nsev<VALID_ALARM) {
|
||||
psel->nsta = CALC_ALARM;
|
||||
psel->nsev = MAJOR_ALARM;
|
||||
psel->nsev = VALID_ALARM;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -489,9 +489,9 @@ struct steppermotorRecord *psm;
|
||||
/* initialize the motor */
|
||||
/* set mode - first command checks card present */
|
||||
if (sm_driver(psm->dtyp,card,channel,SM_MODE,psm->mode,0) < 0){
|
||||
if(psm->nsev < MAJOR_ALARM) {
|
||||
if(psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = WRITE_ALARM;
|
||||
psm->nsev = MAJOR_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
psm->init = 1;
|
||||
return;
|
||||
@@ -522,9 +522,9 @@ struct steppermotorRecord *psm;
|
||||
status = sm_driver(psm->dtyp,card,channel,SM_READ,0,0);
|
||||
}
|
||||
if (status < 0){
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = WRITE_ALARM;
|
||||
psm->nsev = MAJOR_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -613,9 +613,9 @@ struct steppermotorRecord *psm;
|
||||
long nRequest=1;
|
||||
|
||||
if(dbGetLink(&(psm->dol.value.db_link),psm,DBR_FLOAT,&(psm->val),&options,&nRequest)){
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = READ_ALARM;
|
||||
psm->nsev = MAJOR_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -648,9 +648,9 @@ struct steppermotorRecord *psm;
|
||||
|
||||
/* move motor */
|
||||
if (sm_driver(psm->dtyp,card,channel,SM_MOVE,psm->rval-psm->rrbv,0) < 0){
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->stat = WRITE_ALARM;
|
||||
psm->sevr = MAJOR_ALARM;
|
||||
psm->sevr = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -689,9 +689,9 @@ struct steppermotorRecord *psm;
|
||||
long nRequest=1;
|
||||
|
||||
if(dbGetLink(&(psm->dol.value.db_link),psm,DBR_FLOAT,&(psm->val),&options,&nRequest)) {
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = READ_ALARM;
|
||||
psm->nsev = MAJOR_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -729,9 +729,9 @@ struct steppermotorRecord *psm;
|
||||
|
||||
/*the last arg of next call is check for direction */
|
||||
if(sm_driver(psm->dtyp,card,channel,SM_MOTION,1,(psm->val < 0))){
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->stat = WRITE_ALARM;
|
||||
psm->sevr = MAJOR_ALARM;
|
||||
psm->sevr = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -776,9 +776,9 @@ struct steppermotorRecord *psm;
|
||||
reset = psm->init;
|
||||
if (reset == 0) psm->init = 1;
|
||||
if(dbGetLink(&(psm->rdbl.value.db_link),psm,DBR_FLOAT,&new_pos,&options,&nRequest)){
|
||||
if (psm->nsev < MAJOR_ALARM) {
|
||||
if (psm->nsev < VALID_ALARM) {
|
||||
psm->nsta = READ_ALARM;
|
||||
psm->nsev = MAJOR_ALARM;
|
||||
psm->nsev = VALID_ALARM;
|
||||
}
|
||||
psm->init = reset;
|
||||
return;
|
||||
|
||||
+4
-4
@@ -261,9 +261,9 @@ struct timerRecord *ptimer;
|
||||
if(status!=0) return;
|
||||
}
|
||||
if (ptimer->out.type != VME_IO) {
|
||||
if(ptimer->nsev<MAJOR_ALARM) {
|
||||
if(ptimer->nsev<VALID_ALARM) {
|
||||
ptimer->nsta = WRITE_ALARM;
|
||||
ptimer->nsev = MAJOR_ALARM;
|
||||
ptimer->nsev = VALID_ALARM;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -283,9 +283,9 @@ struct timerRecord *ptimer;
|
||||
((ptimer->tevt == 0)?0:post_event), /* addr of event post routine */
|
||||
(int)ptimer->tevt) /* event to post on trigger */
|
||||
!= 0){
|
||||
if (ptimer->nsev<MAJOR_ALARM) {
|
||||
if (ptimer->nsev<VALID_ALARM) {
|
||||
ptimer->nsta = WRITE_ALARM;
|
||||
ptimer->nsev = MAJOR_ALARM;
|
||||
ptimer->nsev = VALID_ALARM;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user