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: Benjamin Franksen <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 12 Jun 2014 20:33:33 +0200
On Thursday, June 12, 2014 16:24:55 Mooney, Tim M. wrote:
> Well, since we're talking about 3.15, we could require <record>.dbd to
> define an initial value for DTYP. Then dbst wouldn't have to worry
> about it.

Remember DTYP is part of dbCommon. AFAIK there is no way to override the
default value for an already defined field in a dbd file.

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.

Cheers
Ben

> On Friday, June 06, 2014 13:12:08 Andrew Johnson wrote:
> > On 06/06/2014 11:49 AM, Emmanuel Mayssat wrote:
> > > My goal is also to have this feature supported and be part of the
> > > epics-base.
> > > The feature I am asking for is very close to what the alias
> > > directive is doing.
> >
> > Something like this could be added (in 3.15 or later, not 3.14 which
> > is now feature-frozen) quite easily. It would have to re-use the
> > existing syntax for setting field values though, say allowing a "*"
> > meaning "whatever" for the record type name when the record must
> > already exist:
> >
> > record("*", "myAO") {
> >
> >    field(VAL, "21")
> >    field(FLNK, "AnotherAO.PROC")
> >
> > }
>
> Yes, that sound like a nice feature. I agree that it is much better to
> throw an error when the record does not yet exist.
>
> 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.
>
> Cheers
> Ben
> --
> "Make it so they have to reboot after every typo." ― Scott Adams
--
"Make it so they have to reboot after every typo." ― Scott Adams

Attachment: signature.asc
Description: This is a digitally signed message part.


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

Navigate by Date:
Prev: RE: EPICS database Feature request Mooney, Tim M.
Next: Re: EPICS database Feature request Andrew Johnson
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 Mooney, Tim M.
Next: Re: EPICS database Feature request Andrew Johnson
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 ·