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  2019  2020  2021  2022  <20232024  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  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: dbGetLink documentation update suggestion
From: Ivo Hanak via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Tue, 12 Dec 2023 14:21:42 +0100
Dear Madam/Sir,

I am writing here because I would like to suggest an update to documentation as the behavior I observed seems to match the code. It is just not expected (at least it was so for me). Feel free to reject the suggestion if I am misinterpreting anything.

EPICS 7.0.6.1

If conditions are right, dbGetLink() retrieving DBR_STRING from a DBF_ENUM CA link pointing at a PV hosted by a remote IOC may return -1 even though dbIsLinkConnected() says the link is connected. This occurs when dbGetLink() is used with the link for the first time after IOC startup. I assume this is a result of a delayed string monitoring request (CA_MONITOR_STRING) in dbCaGetLink() (dbCa.c). A retry slightly later works as expected. 

Using google I found following documents:
Yet, none of them seems to mention this behavior next to the description of dbGetField(). Also, dbCa.h does not describe it. And, I was not able to find description of dbGetLink() at https://epics-controls.org/. Yet, I admit I gave up after I got lost there. Still, unless my explananation is incorrect, would it possible to add description of this behavior to documentation of dbGetLink() unless it is already there, please? Something like this:

While reading a string (dbrType DBR_STRING) from a CA link of type DBF_ENUM, this routine may return -1 even though it is connected (use dbIsLinkConnected to check). This happens when the routing is used for the first time with this link especially if the link points at PV hosted by a remote IOC. This is a result of CA routines which request the string representation on demand only. Retrying this routine a little bit later may provide expected result (i.e. the string).

Thank you.

Sincerely,
Ivo Hanak





Navigate by Date:
Prev: Re: Simulated limit switches on motorSim motor Nariyoshi, Pedro via Tech-talk
Next: How to get current project location path in javascript ? Philippe della Faille 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  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: Can phoebus tool tip show a PV's server? Tynan Ford via Tech-talk
Next: How to get current project location path in javascript ? Philippe della Faille 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  2019  2020  2021  2022  <20232024 
ANJ, 12 Dec 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·