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  <20192020  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  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Inter-module dependency between stream and calc
From: "Zimoch Dirk \(PSI\) via Tech-talk" <[email protected]>
To: "Konrad, Martin" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 19 Mar 2019 11:52:01 +0000
Hi Martin,

Ralph is right. If you want to use StreamDevice with and without sCalcout support, you need two libraries. The only choice you have is if you want to support two versions of the StreamDevice lib or to split off the StreamDevice sCalcout support. The reason is that EPICS needs two sets if files, the libs and the dbds to be kept in sync. I really wish the dbds would become part of the libs. It would make some things much easier and safer. But thats a different story.

In version 2.7 I had the sCalcout support separated but I found it inconvenient for me to maintain. Also I assumed that people would either use sCalcout or not so that two libs would be an overkill for most users.

The easier way however is to tell your users: „I have built StreamDevice with sCalcout support for good reasons. Thus if you want to use it you need to include cald.dbd in your project if you need it or not. Deal with it.“

Dirk

> Am 18.03.2019 um 17:15 schrieb Konrad, Martin <[email protected]>:
> 
> Hi,
> I'm wondering how to handle dependencies between support modules the
> right way (TM). Let's say I have the following chain of dependencies:
> 
> myIOC -> stream -> calc
> 
> Background: StreamDevice includes support for the sCalcRecord. Since I'm
> building stream and calc as shared libraries that are shipped as
> pre-canned Debian packages I want to build them with all their features
> enabled.
> 
> The problem: myIOC does not make use of sCalcRecords so I only add the
> following lines to its Makefile:
> 
> myioc_DBD += stream.dbd
> myioc_LIBS += stream
> 
> The IOC builds fine but a careful look reveals that dbdExpand.pl prints
> the following message:
> 
> "Device using undefined record type 'scalcout', place-holder created"
> 
> When I try to run the IOC it fails to load the DBD file:
> 
> dbLoadDatabase("../../dbd/myioc.dbd",0,0)
> Declaration of recordtype(scalcout) preceeded full definition.
> Error at or before "}" in file "../../dbd/myioc.dbd" line 5335
> 
> The relevant lines are:
> 
> 5334 recordtype(scalcout) {
> 5335 }
> 5336 device(scalcout, INST_IO, devscalcoutStream, "stream")
> 
> I understand that the scalcout record not being defined anywhere is a
> problem. So I use the following lines in the IOC's Makefile and
> everything works as intended:
> 
> myioc_DBD += calc.dbd
> myioc_DBD += stream.dbd
> myioc_LIBS += calc
> myioc_LIBS += stream
> 
> However, I'm wondering if there is a way I can build stream without
> forcing IOC engineers to include a DBD file they aren't using. In other
> words: Is there a way to include the relevant calc stuff into stream.dbd
> without causing problems on IOCs that are using calc directly?
> 
> Any help is appreciated,
> 
> Martin
> 
> P.S.: I'm using StreamDevice 2.8.8, calc 3.7.1 and Base 3.15.6.
> 
> -- 
> Martin Konrad
> High Performance Controls Team Leader
> Facility for Rare Isotope Beams
> Michigan State University
> 640 South Shaw Lane
> East Lansing, MI 48824-1321, USA
> Tel. 517-908-7253
> Email: [email protected]

Replies:
Re: Inter-module dependency between stream and calc Johnson, Andrew N. via Tech-talk
References:
Inter-module dependency between stream and calc Konrad, Martin via Tech-talk

Navigate by Date:
Prev: asyn R4-35 available Mark Rivers via Tech-talk
Next: Re: Inter-module dependency between stream and calc Konrad, Martin 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Inter-module dependency between stream and calc Ralph Lange via Tech-talk
Next: Re: Inter-module dependency between stream and calc Johnson, Andrew N. 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  <20192020  2021  2022  2023  2024 
ANJ, 19 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·