Benjamin's comments sound correct to me. I looked at aoRecord.c and boRecord.c
and in each case alarms were checked before the output value was written. Thus
using nsev should provide the correct value.
Any other comments?
Marty Kraimer
Benjamin Franksen wrote:
>
> Hello,
>
> while testing the latest changes to the mbboDirect record, I noticed the
> following, which seems to be a general problem.
>
> Imagine two (or more) output records with soft support. They are chained
> by their OUT links pointing to some field of the next record. The links
> are PP and MS.
>
> Now, if the severity of the first record changes during processing, this
> change is NOT forwarded to the next record until it is processed the
> next time. Instead the old severity is used. If the first record is a bo
> with two state dependend severities, and if this record is always
> alternating between one and zero, the second record will ALWAYS have the
> wrong severity, namely the one from the last processing, not the
> current.
>
> The reason is that the record support code of most record types calls
> recGblResetAlarms after calling the device support's write function. The
> latter will call dbPutLink if it is a soft support. But when dbPutLink
> sees the MS flag on, it sets the severity of the target record to the
> source records's SEVR, which have not yet been updated (recGblSetSevr
> sets only NSEV and NSTA). Only when the source record calls
> recGblResetAlarms will STAT/SEVR be set to NSTA/NSEV, but then
> processing of the target record is long over.
>
> As a solution one could change dbPutLinkValue to use NSEV instead of
> SEVR of the source record, i.e. change line 827 in dbAccess.c from
>
> recGblSetSevr(pdest,LINK_ALARM,psource->sevr);
>
> to
>
> recGblSetSevr(pdest,LINK_ALARM,psource->nsev);
>
> How about that? Will this break other code?
>
> BTW: The problem does not exist with input links because, if the input
> link is PP and MS, the source record will have been processed completely
> before dbGetLink evaluates the source record's STAT.
>
> Ben
> --
> The Notorious Neb Nesknarf
- References:
- Delay of Maximize Severity in OUT Links Benjamin Franksen
- Navigate by Date:
- Prev:
Delay of Maximize Severity in OUT Links Benjamin Franksen
- Next:
alarm handler question William Lupton
- Index:
1994
1995
1996
1997
1998
1999
<2000>
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Delay of Maximize Severity in OUT Links Benjamin Franksen
- Next:
alarm handler question William Lupton
- Index:
1994
1995
1996
1997
1998
1999
<2000>
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|