[email protected] wrote:
>
> Hello -
>
> Since we're on the subject of save/restore, there is a little problem
> with boRecord.c that forces us to restore soft BOs differently from
> soft AOs. For both record types, we set DOL to blank (these are soft records
> and are used for storing constants and user inputs). We then use use static
> db restore in initHooks.c before record initialization to restore VALs from
> file. I need to set PINI to YES on the soft BOs in order to get the proper
> severity to drive the color on some displays (usually RED if OFF and GREEN if
> ON). However, for a soft BO with a blank DOL, process won't reset the udf flag
> to true and the severity is INVALID until somebody does a ca put to change
> VAL. So I'm forced to restore soft BOs with channel access after initHooks
> is done. I don't have the problem with soft AOs since process (convert, really)
> will always set udf to false no matter what.
>
> Could the process function of the boRecord.c be changed:
>
> /* convert val to rval */
> if ( pbo->mask != 0 ) {
> if(pbo->val==0) pbo->rval = 0;
> else pbo->rval = pbo->mask;
> } else pbo->rval = (unsigned long)pbo->val;
> >>>add this>>> pbo->udf = FALSE;
IMHO it would not be correct to do this. Setting UDF to FALSE should
only be done if the value is defined. This is not the case if DOL is
undefined, at least as long as we are not shure that some kind of
readback actually happened.
We need a way to tell if readback at init time actually happened or not.
At the moment, only the code that does the readback knows this. So, in
your case, the right place to put the UDF=FALSE is in the code that sets
the RVAL or VAL (i.e. the db restore code that is called from the
initHook).
Things would be different if the readback would be initiated by the
record support.
Ben
--
The Notorious Neb Nesknarf
- References:
- Re: VxWorks global variable device support (boRecord.c) saa
- Navigate by Date:
- Prev:
support for output records Leo R. Dalesio
- Next:
Re: support for output records Bernd Schoeneburg
- 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:
Re: VxWorks global variable device support (boRecord.c) saa
- Next:
Re: support for output records Benjamin Franksen
- 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
|