On 10/06/2017 02:04 AM, Thomas, Patrick wrote:
> Hi,
>
>
> I am trying to understand how to use the 'long init(int after)' function
> in device support. Is it expected that I define a separate such function
> for each record type (there is a pointer to it in the dset for each
> record type)? I would like to define a single function that gets called
> after all records of *all types* have been initialized. Is this
> possible? If so, is there an example available?
The device support init() function isn't required, and may be omitted.
IMO it's not very useful. I've never had record type/DTYP specific
initialization.
What you want is best accomplished with an init hook (see initHooks.h).
My usual starting point is to call initHookRegister() from a registrar
function, then use the initHookAfterIocRunning event to start eg. driver
specific worker threads. This happens near the end of iocInit().
- Replies:
- Re: init function in device support Thomas, Patrick
- References:
- init function in device support Thomas, Patrick
- Navigate by Date:
- Prev:
Re: init function in device support Johnson, Andrew N.
- Next:
aD driver for Mako G G-032? Ralph Lange
- 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: init function in device support Johnson, Andrew N.
- Next:
Re: init function in device support Thomas, Patrick
- 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
|