added IVAL field to bi/bo records; it is always the inverse of VAL
This commit is contained in:
1 parent
e64d981e8f
commit
4e327465b0
4 files changed
+32
-3
No files matched your search
@@ -146,6 +146,10 @@ static long process(struct dbCommon *pcommon)
|
||||
prec->udf = FALSE;
|
||||
}
|
||||
else if(status==2) status=0;
|
||||
|
||||
/** IVAL is always the inverse of VAL. */
|
||||
prec->ival = (prec->val == 0) ? 1 : 0;
|
||||
|
||||
/* check for alarms */
|
||||
checkAlarms(prec, &timeLast);
|
||||
/* check event list */
|
||||
@@ -202,7 +206,7 @@ static long get_enum_str(const DBADDR *paddr, char *pstring)
|
||||
static long get_enum_strs(const DBADDR *paddr,struct dbr_enumStrs *pes)
|
||||
{
|
||||
biRecord *prec=(biRecord *)paddr->precord;
|
||||
|
||||
|
||||
pes->no_str = 2;
|
||||
memset(pes->strs,'\0',sizeof(pes->strs));
|
||||
|
||||
@@ -295,6 +299,9 @@ static void monitor(biRecord *prec)
|
||||
/* send out monitors connected to the value field */
|
||||
if (monitor_mask){
|
||||
db_post_events(prec,&prec->val,monitor_mask);
|
||||
|
||||
/** IVAL can post monitors. */
|
||||
db_post_events(prec, &prec->ival, monitor_mask);
|
||||
}
|
||||
if(prec->oraw!=prec->rval) {
|
||||
db_post_events(prec,&prec->rval,
|
||||
|
||||
@@ -65,7 +65,9 @@ field.
|
||||
The value from RVAL is then converted using the process described in the
|
||||
next section.
|
||||
|
||||
=fields INP, DTYP, ZNAM, ONAM, RVAL, VAL
|
||||
The IVAL field is always the inverse of the VAL field.
|
||||
|
||||
=fields INP, DTYP, ZNAM, ONAM, RVAL, VAL, IVAL
|
||||
|
||||
=head3 Conversion Fields
|
||||
|
||||
@@ -166,6 +168,11 @@ is not equal to VAL.
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(IVAL, DBF_SHORT) {
|
||||
prompt("Inverted Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ZSV,DBF_MENU) {
|
||||
prompt("Zero Error Severity")
|
||||
promptgroup("70 - Alarm")
|
||||
@@ -308,6 +315,8 @@ for more information on simulation mode and its fields.
|
||||
interest(4)
|
||||
extra("epicsCallback *simpvt")
|
||||
}
|
||||
|
||||
|
||||
|
||||
=head2 Record Support
|
||||
|
||||
|
||||
@@ -395,6 +395,9 @@ static void monitor(boRecord *prec)
|
||||
{
|
||||
unsigned short monitor_mask;
|
||||
|
||||
/** IVAL is always the inverse of VAL. */
|
||||
prec->ival = (prec->val == 0) ? 1 : 0;
|
||||
|
||||
monitor_mask = recGblResetAlarms(prec);
|
||||
/* check for value change */
|
||||
if (prec->mlst != prec->val){
|
||||
@@ -407,6 +410,9 @@ static void monitor(boRecord *prec)
|
||||
/* send out monitors connected to the value field */
|
||||
if (monitor_mask){
|
||||
db_post_events(prec,&prec->val,monitor_mask);
|
||||
|
||||
/** IVAL can post monitors. */
|
||||
db_post_events(prec, &prec->ival, monitor_mask);
|
||||
}
|
||||
if(prec->oraw!=prec->rval) {
|
||||
db_post_events(prec,&prec->rval,
|
||||
|
||||
@@ -74,7 +74,9 @@ again with VAL set to 0 after the number of seconds specified by HIGH.
|
||||
Thus, HIGH implements a momentary output which changes the state of the
|
||||
device back to 0 after I<N> number of seconds.
|
||||
|
||||
=fields DTYP, OUT, VAL, RVAL, HIGH, ZNAM, ONAM
|
||||
The IVAL field is always the inverse of the VAL field.
|
||||
|
||||
=fields DTYP, OUT, VAL, IVAL, RVAL, HIGH, ZNAM, ONAM
|
||||
|
||||
=head2 Conversion Parameters
|
||||
|
||||
@@ -212,6 +214,11 @@ for more information on simulation mode and its fields.
|
||||
asl(ASL0)
|
||||
pp(TRUE)
|
||||
}
|
||||
field(IVAL, DBF_SHORT) {
|
||||
prompt("Inverted Value")
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
prompt("Output Mode Select")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
Reference in new issue
Block a user