EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 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: [Bug 1824277] Re: Regression in calcout setting constant links at runtime
From: Andrew Johnson via Core-talk <[email protected]>
To: [email protected]
Date: Fri, 19 Apr 2019 18:32:40 -0000
We could change the code for constant links so they return a value from
their lset::getValue() method (currently that routine exists but just
returns 0). The string-to-number conversion result could be cached so
this doesn't have to be done every time, but this could break any
existing databases that provide an initial value using a constant link
and later do puts to update the related value field.

I guess we could avoid that by coding getValue() so it would only return
a value the first time it's called after the link has been set, and then
only if the loadScalar(), routine that gets called from
recGblInitConstantLink() API hasn't already been called.

However a lot of older code that reads links doesn't actually call
dbGetLink() when the link type is constant (e.g. devAiSoft.c). I removed
a lot of those checks from Base already since they aren't needed, but
many probably still remain, and that pattern or its equivalent is
probably universal in the synApps record types. I just found it in
aCalcout, sCalcout, sseq and transform in the calc module, although not
in swait. The code in those records is going to need updating to not
break if someone gives them a JSON_LINK, but they should continue to
work with just the older link types.

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1824277

Title:
  Regression in calcout setting constant links at runtime

Status in EPICS Base:
  In Progress
Status in EPICS Base 7.0 series:
  In Progress

Bug description:
  With the 3.15 branch, writing a literal number to a calcout.INP[A-L]
  field causes the corresponding [A-L] field to be set to that number.
  This works because the calcout record marks the INP fields as
  special(SPC_MOD) and the calcout::special() routine calls
  recGblInitConstantLink() to initialize the corresponding [A-L] field
  from the new link string. I suspect that a number of the synApps
  record types (transform, scalc, acalc etc.) probably use this same
  technique.

  Keenan Lang reported that this doesn't currently work on the 7.0
  branch; the value in the [A-L] field doesn't change, which I have
  confirmed.

  This use of special() to reinitialize constant links is unusual,
  normally putting a literal into a link field after record
  initialization has no effect, but someone who worked on the calcout
  record discovered this way to get it to work.

  I think I know what's going on and how to fix it (change
  dbPutFieldLink() to call dbAddLink() before the second call to
  dbPutSpecial()), but I need to check that this won't break other
  cases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1824277/+subscriptions

Navigate by Date:
Prev: Re: Support for Google Test in EPICS base / modules? Ralph Lange via Core-talk
Next: Re: [Merge] ~anj/epics-base/+git/base-7.0:fix-1824277 into epics-base:7.0 Andrew Johnson via Core-talk
Index: 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: [Merge] ~anj/epics-base/+git/base-7.0:fix-1824277 into epics-base:7.0 Andrew Johnson via Core-talk
Next: [Bug 1824277] Re: Regression in calcout setting constant links at runtime Ben Franksen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 04 Oct 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·