EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: init function in device support
From: "Johnson, Andrew N." <[email protected]>
To: "Thomas, Patrick" <[email protected]>
Cc: "[email protected] Talk" <[email protected]>
Date: Fri, 6 Oct 2017 08:50:54 +0000
Hi Patrick,

> On Oct 6, 2017, at 2:04 AM, Thomas, Patrick <[email protected]> wrote:
> 
> 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)?

It is available for that purpose, but as with most functions it’s optional so you don’t have to use it. If you’re writing device support for multiple record types you can’t guarantee the order in which initialization happens though using this particular API. However...

> 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?

Take a look at the API described in initHooks.h which is designed to let you register a callback routine that gets called at various times during IOC initialization. In your case the initHookStates initHookAfterInitDevSup and initHookAfterInitDatabase might be the most interesting. There is an example showing how to use this API in the standard makeBaseAPp example template, exampleApp/src/initTrace.c has a function trace() which prints the name of each state when it gets called.

HTH,

- Andrew



References:
init function in device support Thomas, Patrick

Navigate by Date:
Prev: init function in device support Thomas, Patrick
Next: Re: init function in device support Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: init function in device support Thomas, Patrick
Next: Re: init function in device support Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·