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

Subject: Re: EPICS database Feature request
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Thu, 12 Jun 2014 16:22:56 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ben,

On 06/12/2014 Benjamin Franksen wrote:

>> Another problem when overriding record fields in this way is the
>> DTYP field, and primarily if you use dbst on the template/db
>> files. I remember that dbst likes to substitute "Soft Channel"
>> for "", which will break the existing record if its DTYP is
>> different from that. It would be nice if someone had an idea how
>> to prevent that.

> However, I think all that is needed to make this work is to have
> dbst (that is, dbWriteRecord in dbStaticLib) omit the DTYP
> definition if it gets told to only write out non-default fields
> (level=0). It does this correctly for all other fields. Looking at
> the code in 3.14.12, there is a special case in dbIsDefaultValue
> for DBF_DEVICE, making it always returns FALSE. I guess there is a
> reason for this but apparently this is what causes DTYP to always
> be written out, no matter whether it is the default or not.

Base releases prior to 3.15 included two different implementations of
dbIsDefaultValue(). DCTs and programs like dbst used the
dbStaticNoRun.c version which always returns FALSE for DBF_DEVICE
fields; the IOC used the dbStaticRun.c version which checks if the
record type has any registered device support entries and returns TRUE
if that list is empty, otherwise it returns FALSE.

The DTYP field is handled differently to other field types because the
mapping between strings and numbers for the field is dependent on the
order in which the device() entries in the DBD file(s) were loaded.
You probably expect the default DTYP to be Soft Channel, but it might
not be if someone changes things around in the DBD files so that some
other device() entry comes first.

Presumably the thinking was that we would always want dbst to output
the actual string value for the DTYP field to ensure that the same
DTYP is used for the record, even if the IOC loads a different DBD
file with a different default than the DBD file that dbst used.

In 3.15 the dbStaticNoRun.c file is no more, and you'll find that you
won't be able to build dbst using 3.15 at all. I hope to produce a
replacement for it written in Perl (based on the Perl DBD parsing
modules I produced), but it hasn't risen sufficiently high on my
priority list to work on yet.

- - Andrew
- -- 
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTmhowAAoJENMGEg7qy0V2rtEH/AvKV2KbwWESQsbi/YlO2uyT
P/7jmQ0YvmLlzxJJ5D7i31NS7ZW+E8BzbZKARfS4ljGnb2FrnQNilvsirxiUGr9Z
L8Xb/JkLfssq618CPbVM1koqT83NGGasUy1Re9xfFBMX6pRdKJc6TmubcoFy1FOc
ICYgffHNCiWUL7KTQ0jhCYmy+SJQtEtYiPvKbIF57IzuaYMUXtNATXyCEaUNBpsm
xhDZg9+a+r9eXVO1ZDaFGnT2LAvPX+8iA4D+wbFeYuDpiDFazRo7MjKAMthKFojV
PdZ3KPjjjU5ujWUHWIqzqqjwMyxGdA4zlEZZeJaI3zDKr6rHyceF31BHqUaD6iY=
=Bvtz
-----END PGP SIGNATURE-----

References:
EPICS database Feature request Emmanuel Mayssat
Re: EPICS database Feature request Benjamin Franksen
RE: EPICS database Feature request Mooney, Tim M.
Re: EPICS database Feature request Benjamin Franksen

Navigate by Date:
Prev: Re: EPICS database Feature request Benjamin Franksen
Next: 答复: Compiling helloWorld of EPICS V4 on 64bit linux had a link error [SEC=UNOFFICIAL] 米清茹
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS database Feature request Benjamin Franksen
Next: Porting EPICS to a new OS Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·