Hi Jim,
On 2012-09-28 Jim Chen wrote:
>
> The problem is that I need to retrieve this string in the aSub Init
> routine, as it states here: field(INAM,"myfunctionInit"). At that point,
> the stringout record might not be processed yet.
It doesn't need to be processed, its VAL field already holds the string that
you want. The issue you're having though is that the aSub record doesn't read
its input links before calling your init() subroutine, so you can't expect to
see a value in prec->a until your process() subroutine gets called later.
> I suppose the PP key is
> to force the other record to be processed afterwards. Even when I set the
> stringout record PINI=1, and place it before my aSub record. This comes to
> another question, what is the order when the database records are read and
> initialised?
The order of initialization of records at iocInit() is not documented, so it
can change in the future. Currently all records of one type get initialized
together before moving onto the next type, and the order of the record types
is controlled by their order in the DBD file that the IOC loads. Within each
record type it looks like the records will get initialized in alphabetical
order, using strcmp() to determine that order, but I wouldn't rely on that
staying the same for ever. All records get initialized before any get
processed though.
HTH,
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- References:
- problem passing string to aSub record parameter Jim Chen
- Re: problem passing string to aSub record parameter Andrew Johnson
- RE: problem passing string to aSub record parameter Jim Chen
- Navigate by Date:
- Prev:
RE: problem passing string to aSub record parameter Jim Chen
- Next:
Re: Loading modbus waveform record from acalcout record (or caput) Tim Mooney
- 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: problem passing string to aSub record parameter Jim Chen
- Next:
Recall: problem passing string to aSub record parameter Jim Chen
- 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
|