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  <20132014  2015  2016  2017  2018  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: initHookFunction and asynPortDriver
From: Zenon Szalata <[email protected]>
To: Eric Norum <[email protected]>
Cc: tech-talk <[email protected]>
Date: Wed, 6 Mar 2013 20:39:13 -0800
Hi Eric,
You are right that a linked list of structures is the way to go. I am actually using the linked list with my routine which I call from st.cmd file, where I pass in a board number... I just did not think that it would be fine to loop over all items in the linked list to handle the chores related to initialization. I got stuck not realizing that initHookFunstion is called at IOC init time; I was thinking in terms of device driver instance init time. Anyway, silly me.
Thanks,
Zen

On 03/06/13 20:12, Eric Norum wrote:
Can you expand on what's wrong with initHooks?
Couldn't you create a linked list of the device private structures for your devices with a file-static pointer to the list -- then the initHooks routine could traverse this list at whatever points you need during IOC initialization.

On Mar 6, 2013, at 7:53 PM, Zenon Szalata <[email protected]> wrote:

Hi Mark,
I am wondering if there is functionality in asynPortDriver or asyn as such for having a callback routine be called at various stages of the DB initialization.  I would like to use something like the EPICS initHookFunction.  The problem with it is that it is a static function with no mechanism that I see to pass to it a pointer to my device driver class object, so that from the callback routine the correct instance of the device driver can be called.  I have a situation where I have a few identical VME ADC boards and for each of these boards I create an object of the class (derived from asynPortDriver).
I have klugged this as a function which I invoke from st.cmd file after IOC initialization is done.  This works fine unless I need to have a bit more control when the routine is called, like after some phase of the DB init other than after all initialization is done.
Sorry for bugging you about this,
Zen


References:
initHookFunction and asynPortDriver Zenon Szalata
Re: initHookFunction and asynPortDriver Eric Norum

Navigate by Date:
Prev: Re: initHookFunction and asynPortDriver Eric Norum
Next: RTEMS-beatnik(MVME6100) network initialize error? 문건영
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: initHookFunction and asynPortDriver Eric Norum
Next: RTEMS-beatnik(MVME6100) network initialize error? 문건영
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·