EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: dbd question
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Tue, 14 Apr 2015 16:43:39 -0400
>> In the dbd files, link fields have no initial value defined.
...
>> Any reason for this difference?

Recently I bumped into the fact that there is a difference between
CONSTANT w/ pstring==NULL (if no default value is defined) and CONSTANT
w/ pstring=="" (a default value of "").

At least for DOL this makes a big difference as recGblInitConstantLink()
treats NULL as a no-op and "" as equivalent to "0", so a value of zero
is read from the link.



On 04/14/2015 04:32 PM, Andrew Johnson wrote:
> Hi Rolf,
> 
> On 04/14/2015 10:57 AM, Rolf Keitel wrote:
>> Just out of interest:
>> In the dbd files, link fields have no initial value defined.
>> When I am loading a record
>> record(ao, "TEST:AO") {
>> }
>> and look with dbpr at the IOC console,
>> the OUT link has the value  CONSTANT
>> the DOL link has the value  CONSTANT
>> the FLNK link has the value  CONSTANT 0.
>> 
>> (similar with other record types)
>> 
>> Any reason for this difference?
> 
> I hadn't noticed before, but I so see the same pattern. There is no
> initial value given for FLNK in the dbCommon.dbd file so the in-memory
> contents should be the same, but both dbgf and caget show the different
> results.
> 
> The dbStatic/dbStaticLib.c/dbGetString() routine is responsible for the
> difference; it has different code for handling INP/OUT links and FWD
> links since the set of flags supported is different. A constant FWD link
> field is always returned as the fixed string "0" whereas constant INP
> and OUT links return whatever string value they were set to (which must
> have been numeric or they wouldn't still be classified as constant links):
> 
> epics> dbpf anj:ai.FLNK "123"
> DBR_STRING:          "0"
> epics> dbpf anj:ai.SIML "123"
> DBR_STRING:          "123"
> 
> This does appear to be a bit of an anachronism, but I don't see it as a
> problem at all. Are you suggesting we should change this?
> 
> - Andrew
> 


References:
Re: dbd question Andrew Johnson

Navigate by Date:
Prev: Re: dbd question Andrew Johnson
Next: EPICS Base R3.15.2-pre1 available Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: dbd question Andrew Johnson
Next: EPICS Base R3.15.2-pre1 available Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·