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  <2017 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
<== Date ==> <== Thread ==>

Subject: Re: init function in device support
From: Michael Davidsaver <mdavidsaver@gmail.com>
To: "Thomas, Patrick" <pthomas@caltech.edu>
Cc: "tech-talk@aps.anl.gov Talk" <tech-talk@aps.anl.gov>
Date: Fri, 6 Oct 2017 10:53:13 +0200
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
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
ANJ, 06 Oct 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·