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  2017  2018  2019  2020  2021  <20222023  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  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Creating a database record
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Dudley, David" <dudleyd at frib.msu.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 16 Feb 2022 07:52:45 -0800
On 2/15/22 06:40, Dudley, David via Tech-talk wrote:
Would it be possible to perform this function from inside the iocInit function chain?  When iocInit(0) is performed, I install an init function hook to receive all the init steps.  Could I build and install a database during – say- the  initHookAfterInitDevSup announcement?  At that point, I push a database out to a temp file, and the load it in using a call to dbReadDatabaseFP, or similar?

The only safe point at which to do something like this would
be initHookAtIocBuild (the first hook point).  Doing so at
any later hook would miss part of the initialization process.


This is just to make a couple of statistics records available every time the driver loads, but I could see other uses for it.

Later-

*David Dudley*

Controls Engineer III

*Facility for Rare Isotope Beams*

Michigan State University

640 South Shaw Lane

East Lansing, MI 48824-1321, USA

Tel. 517-908-7133

Email: dudleyd at frib.msu.edu <mailto:dudleyd at frib.msu.edu>

**

	

*cid:[email protected]*

*From:*Tech-talk <tech-talk-bounces at aps.anl.gov> *On Behalf Of *Ralph Lange via Tech-talk
*Sent:* Friday, February 04, 2022 3:48 AM
*To:* EPICS Tech Talk <tech-talk at aps.anl.gov>
*Subject:* Re: Creating a database record

*[EXTERNAL] This email originated from outside of FRIB*

On Thu, 3 Feb 2022 at 21:01, Dudley, David via Tech-talk <tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:

    Is it possible from with a device driver that before iocInit (or during some part of it) to programmatically build a database record for use in EPICS?

I know of a driver that does that, yes.

In the initialization of the driver (started by calls from the startup script) they detect the hardware and create a matching DB file in '/tmp', then load that file. Works fine.

I don't like that for a production system for multiple reasons. Having no or little control over which records an IOC loads.... Broken cards that would just disappear from the name space with no trace....

But I see the advantage for plug-and-play lab use.

If you don't hard code the records into the driver code, but maybe blow up from templates that are part of your application, you would give the user at least some control.

Cheers,
~Ralph

reference: https://github.com/NDSv3/nds-epics/blob/46bf0bbf053a36be6140ef3d457519f8b56609a8/ndsSup/src/epicsInterfaceImpl.cpp#L170 <https://github.com/NDSv3/nds-epics/blob/46bf0bbf053a36be6140ef3d457519f8b56609a8/ndsSup/src/epicsInterfaceImpl.cpp#L170>



References:
Creating a database record Dudley, David via Tech-talk
Re: Creating a database record Ralph Lange via Tech-talk
RE: Creating a database record Dudley, David via Tech-talk

Navigate by Date:
Prev: RE: Creating a database record Dudley, David via Tech-talk
Next: error building asyn4-38 : cross_compiler_target_archs=linux-arm chaker.maazouzi--- via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: RE: Creating a database record Dudley, David via Tech-talk
Next: Potentiostat EPICS driver (EC301 / SP-300) Nilson Pereira via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·