Replaced recGblResetSevr by recGblResetAlarms
This commit is contained in:
@@ -441,21 +441,8 @@ static void monitor(pai)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pai,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pai,&pai->stat,DBE_VALUE);
|
||||
db_post_events(pai,&pai->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pai);
|
||||
/* check for value change */
|
||||
delta = pai->mlst - pai->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -522,21 +522,8 @@ static void monitor(pao)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pao,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pao,&pao->stat,DBE_VALUE);
|
||||
db_post_events(pao,&pao->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pao);
|
||||
/* check for value change */
|
||||
delta = pao->mlst - pao->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -297,21 +297,8 @@ static void monitor(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pbi,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev){
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and sevr fields */
|
||||
db_post_events(pbi,&pbi->stat,DBE_VALUE);
|
||||
db_post_events(pbi,&pbi->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pbi);
|
||||
/* check for value change */
|
||||
if (pbi->mlst != pbi->val){
|
||||
/* post events for value change and archive change */
|
||||
|
||||
@@ -392,21 +392,8 @@ static void monitor(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pbo,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev){
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and sevr fields */
|
||||
db_post_events(pbo,&pbo->stat,DBE_VALUE);
|
||||
db_post_events(pbo,&pbo->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pbo);
|
||||
/* check for value change */
|
||||
if (pbo->mlst != pbo->val){
|
||||
/* post events for value change and archive change */
|
||||
|
||||
@@ -365,24 +365,11 @@ static void monitor(pcalc)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
double *pnew;
|
||||
double *pprev;
|
||||
int i;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pcalc,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pcalc,&pcalc->stat,DBE_VALUE);
|
||||
db_post_events(pcalc,&pcalc->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pcalc);
|
||||
/* check for value change */
|
||||
delta = pcalc->mlst - pcalc->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -324,21 +324,8 @@ static void monitor(pcompress)
|
||||
struct compressRecord *pcompress;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pcompress,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pcompress,&pcompress->stat,DBE_VALUE);
|
||||
db_post_events(pcompress,&pcompress->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pcompress);
|
||||
monitor_mask |= (DBE_LOG|DBE_VALUE);
|
||||
if(monitor_mask) db_post_events(pcompress,pcompress->bptr,monitor_mask);
|
||||
return;
|
||||
|
||||
@@ -194,23 +194,9 @@ static void monitor(pevent)
|
||||
struct eventRecord *pevent;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pevent,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pevent,&pevent->stat,DBE_VALUE);
|
||||
db_post_events(pevent,&pevent->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(pevent);
|
||||
db_post_events(pevent,&pevent->val,monitor_mask|DBE_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ static long process(pfanout)
|
||||
long status=0;
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
unsigned short monitor_mask;
|
||||
|
||||
pfanout->pact = TRUE;
|
||||
|
||||
@@ -195,11 +196,7 @@ static long process(pfanout)
|
||||
tsLocalTime(&pfanout->time);
|
||||
/* check monitors*/
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pfanout,stat,sevr,nsta,nsev);
|
||||
if((stat!=nsta || sevr!=nsev)){
|
||||
db_post_events(pfanout,&pfanout->stat,DBE_VALUE);
|
||||
db_post_events(pfanout,&pfanout->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pfanout);
|
||||
/* process the forward scan link record */
|
||||
recGblFwdLink(pfanout);
|
||||
|
||||
|
||||
@@ -340,24 +340,11 @@ static void monitor(psub)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
short stat,sevr,nsta,nsev;
|
||||
float *pnew;
|
||||
float *pprev;
|
||||
int i;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(psub,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(psub,&psub->stat,DBE_VALUE);
|
||||
db_post_events(psub,&psub->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(psub);
|
||||
/* check for value change */
|
||||
delta = psub->mlst - psub->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -317,31 +317,8 @@ static void monitor(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
stat=phistogram->stat;
|
||||
sevr=phistogram->sevr;
|
||||
nsta=phistogram->nsta;
|
||||
nsev=phistogram->nsev;
|
||||
/*set current stat and sevr*/
|
||||
phistogram->stat = nsta;
|
||||
phistogram->sevr = nsev;
|
||||
phistogram->nsta = 0;
|
||||
phistogram->nsev = 0;
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(phistogram,&phistogram->stat,DBE_VALUE);
|
||||
db_post_events(phistogram,&phistogram->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(phistogram);
|
||||
/* post events for count change */
|
||||
if(phistogram->mcnt>phistogram->mdel){
|
||||
/* post events for count change */
|
||||
|
||||
@@ -321,22 +321,9 @@ static void monitor(plongin)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
long delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(plongin,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(plongin,&plongin->stat,DBE_VALUE);
|
||||
db_post_events(plongin,&plongin->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(plongin);
|
||||
/* check for value change */
|
||||
delta = plongin->mlst - plongin->val;
|
||||
if(delta<0) delta = -delta;
|
||||
|
||||
@@ -352,24 +352,9 @@ static void monitor(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
|
||||
long delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(plongout,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(plongout,&plongout->stat,DBE_VALUE);
|
||||
db_post_events(plongout,&plongout->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(plongout);
|
||||
/* check for value change */
|
||||
delta = plongout->mlst - plongout->val;
|
||||
if(delta<0) delta = -delta;
|
||||
|
||||
@@ -383,20 +383,8 @@ static void monitor(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pmbbi,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev){
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and sevr fields */
|
||||
db_post_events(pmbbi,&pmbbi->stat,DBE_VALUE);
|
||||
db_post_events(pmbbi,&pmbbi->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pmbbi);
|
||||
/* check for value change */
|
||||
if (pmbbi->mlst != pmbbi->val){
|
||||
/* post events for value change and archive change */
|
||||
|
||||
@@ -428,21 +428,8 @@ static void monitor(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pmbbo,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev){
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and sevr fields */
|
||||
db_post_events(pmbbo,&pmbbo->stat,DBE_VALUE);
|
||||
db_post_events(pmbbo,&pmbbo->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pmbbo);
|
||||
/* check for value change */
|
||||
if (pmbbo->mlst != pmbbo->val){
|
||||
/* post events for value change and archive change */
|
||||
|
||||
@@ -118,11 +118,9 @@ static void monitor(ppermissive)
|
||||
struct permissiveRecord *ppermissive;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
unsigned short val,oval,wflg,oflg;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ppermissive,stat,sevr,nsta,nsev);
|
||||
monitor_mask = recGblResetAlarms(ppermissive);
|
||||
/* get val,oval,wflg,oflg*/
|
||||
val=ppermissive->val;
|
||||
oval=ppermissive->oval;
|
||||
@@ -131,18 +129,6 @@ static void monitor(ppermissive)
|
||||
/*set oval and oflg*/
|
||||
ppermissive->oval = val;
|
||||
ppermissive->oflg = wflg;
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(ppermissive,&ppermissive->stat,DBE_VALUE);
|
||||
db_post_events(ppermissive,&ppermissive->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
if(oval != val) {
|
||||
db_post_events(ppermissive,&ppermissive->val,monitor_mask|DBE_VALUE);
|
||||
}
|
||||
|
||||
@@ -293,21 +293,8 @@ static void monitor(ppid)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
float delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ppid,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(ppid,&ppid->stat,DBE_VALUE);
|
||||
db_post_events(ppid,&ppid->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(ppid);
|
||||
/* check for value change */
|
||||
delta = ppid->mlst - ppid->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -311,24 +311,8 @@ static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd)
|
||||
static void monitor(struct pulseCounterRecord *ppc)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ppc,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev)
|
||||
{
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(ppc,&ppc->stat,DBE_VALUE);
|
||||
db_post_events(ppc,&ppc->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(ppc);
|
||||
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
||||
db_post_events(ppc,&ppc->val,monitor_mask);
|
||||
|
||||
|
||||
@@ -385,23 +385,8 @@ static void monitor(ppd)
|
||||
struct pulseDelayRecord *ppd;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ppd,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(ppd,&ppd->stat,DBE_VALUE);
|
||||
db_post_events(ppd,&ppd->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(ppd);
|
||||
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
||||
|
||||
/* temp change, keep old val value in pfld so ascii files do not
|
||||
|
||||
@@ -279,23 +279,8 @@ static void monitor(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ppt,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(ppt,&ppt->stat,DBE_VALUE);
|
||||
db_post_events(ppt,&ppt->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(ppt);
|
||||
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
||||
db_post_events(ppt,&ppt->val,monitor_mask);
|
||||
if(ppt->oper != ppt->per){
|
||||
|
||||
@@ -348,24 +348,11 @@ static void monitor(psel)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
double *pnew;
|
||||
double *pprev;
|
||||
int i;
|
||||
|
||||
/* get peevious stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(psel,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(psel,&psel->stat,DBE_VALUE);
|
||||
db_post_events(psel,&psel->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(psel);
|
||||
/* check for value change */
|
||||
delta = psel->mlst - psel->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -338,12 +338,7 @@ struct seqRecord *pseq;
|
||||
printf("asyncFinish(%s) completing processing\n", pseq->name);
|
||||
pseq->udf = FALSE;
|
||||
|
||||
recGblResetSevr(pseq, stat, sevr, nsta, nsev);
|
||||
if((stat!=nsta || sevr!=nsev))
|
||||
{
|
||||
db_post_events(pseq, &pseq->stat, DBE_VALUE);
|
||||
db_post_events(pseq, &pseq->sevr, DBE_VALUE);
|
||||
}
|
||||
recGblResetAlarms(pseq);
|
||||
|
||||
/* process the forward scan link record */
|
||||
recGblFwdLink(pseq);
|
||||
|
||||
@@ -121,23 +121,9 @@ static void monitor(pstate)
|
||||
struct stateRecord *pstate;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pstate,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pstate,&pstate->stat,DBE_VALUE);
|
||||
db_post_events(pstate,&pstate->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(pstate);
|
||||
if(strncmp(pstate->oval,pstate->val,sizeof(pstate->val))) {
|
||||
db_post_events(pstate,&(pstate->val[0]),monitor_mask|DBE_VALUE);
|
||||
strncpy(pstate->oval,pstate->val,sizeof(pstate->val));
|
||||
|
||||
@@ -395,22 +395,9 @@ static void monitor(psm)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
float delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(psm,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(psm,&psm->stat,DBE_VALUE);
|
||||
db_post_events(psm,&psm->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(psm);
|
||||
/* check for value change */
|
||||
delta = psm->mlst - psm->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
@@ -536,7 +523,7 @@ struct steppermotorRecord *psm;
|
||||
|
||||
/* alarm conditions for limit switches */
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(psm,stat,sevr,nsta,nsev);
|
||||
recGblResetAlarms(psm);
|
||||
post_events = FALSE;
|
||||
if (psm->mccw && psm->mcw){ /* limits disconnected */
|
||||
recGblSetSevr(psm,WRITE_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -210,23 +210,8 @@ static void monitor(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pstringin,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pstringin,&pstringin->stat,DBE_VALUE);
|
||||
db_post_events(pstringin,&pstringin->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(pstringin);
|
||||
if(strncmp(pstringin->oval,pstringin->val,sizeof(pstringin->val))) {
|
||||
db_post_events(pstringin,&(pstringin->val[0]),monitor_mask|DBE_VALUE);
|
||||
strncpy(pstringin->oval,pstringin->val,sizeof(pstringin->val));
|
||||
|
||||
@@ -249,23 +249,8 @@ static void monitor(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pstringout,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pstringout,&pstringout->stat,DBE_VALUE);
|
||||
db_post_events(pstringout,&pstringout->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(pstringout);
|
||||
if(strncmp(pstringout->oval,pstringout->val,sizeof(pstringout->val))) {
|
||||
db_post_events(pstringout,&(pstringout->val[0]),monitor_mask|DBE_VALUE);
|
||||
strncpy(pstringout->oval,pstringout->val,sizeof(pstringout->val));
|
||||
|
||||
@@ -350,24 +350,12 @@ static void monitor(psub)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
double delta;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
double *pnew;
|
||||
double *pprev;
|
||||
int i;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(psub,stat,sevr,nsta,nsev);
|
||||
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(psub,&psub->stat,DBE_VALUE);
|
||||
db_post_events(psub,&psub->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(psub);
|
||||
/* check for value change */
|
||||
delta = psub->mlst - psub->val;
|
||||
if(delta<0.0) delta = -delta;
|
||||
|
||||
@@ -176,23 +176,8 @@ static void monitor(ptimer)
|
||||
struct timerRecord *ptimer;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(ptimer,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev){
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and sevr fields */
|
||||
db_post_events(ptimer,&ptimer->stat,DBE_VALUE);
|
||||
db_post_events(ptimer,&ptimer->sevr,DBE_VALUE);
|
||||
}
|
||||
|
||||
monitor_mask = recGblResetAlarms(ptimer);
|
||||
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
||||
db_post_events(ptimer,&ptimer->val,monitor_mask);
|
||||
db_post_events(ptimer,&ptimer->t1wd,monitor_mask);
|
||||
|
||||
@@ -343,22 +343,8 @@ static void monitor(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
unsigned short stat,sevr,nsta,nsev;
|
||||
|
||||
/* get previous stat and sevr and new stat and sevr*/
|
||||
recGblResetSevr(pwf,stat,sevr,nsta,nsev);
|
||||
|
||||
/* Flags which events to fire on the value field */
|
||||
monitor_mask = 0;
|
||||
|
||||
/* alarm condition changed this scan */
|
||||
if (stat!=nsta || sevr!=nsev) {
|
||||
/* post events for alarm condition change*/
|
||||
monitor_mask = DBE_ALARM;
|
||||
/* post stat and nsev fields */
|
||||
db_post_events(pwf,&pwf->stat,DBE_VALUE);
|
||||
db_post_events(pwf,&pwf->sevr,DBE_VALUE);
|
||||
}
|
||||
monitor_mask = recGblResetAlarms(pwf);
|
||||
monitor_mask |= (DBE_LOG|DBE_VALUE);
|
||||
if(monitor_mask) db_post_events(pwf,pwf->bptr,monitor_mask);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user