EPICS Home

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  <20172018  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  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: dbGetLink question
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Fri, 1 Dec 2017 10:26:18 -0600
Hi Mark,

On 12/01/2017 08:47 AM, Mark Rivers wrote:
> 
> I have a question about how dbGetLink works.  I have read the
> Application Developer's Guide (3.15.5) but it is not clear.
> Specifically I want to understand how it works under the following
> conditions:
> 
> - Link is an output link
> - Link process type is CA
> - The output PV resides in another IOC.
> 
> Does dbGetLink actually read the value from the other IOC?  It
> seems like that would be a slow operation, and so would require
> the record to be asynchronous?  Or does the database put a
> camonitor on that external record so the link value can be
> obtained without an actual caget operation?  If so, I cannot
> find this mentioned in the Application Developer's Guide.  It
> only describes channel access monitors being set up for input
> links, not output links.

Please be aware that in Base 3.16.1 we introduced extensible link types
so things have changed under the hood in future releases, but the use
case you are describing will still work for CA links. I don't want to
encourage this usage which is why I've never documented it myself, but
it has been used enough (mostly in subroutine record routines) that
breaking this now would cause problems for a number of sites. It also
works for DB links, but isn't guaranteed for future link types.

At IOC initialization, all CA links are passed to the CA client library
and a chid created for them by the dbCa code. Then the first time a
record type calls dbGetLink() on such a CA link (whether it's an input
or output link) dbCa sets up a monitor for that request, but doesn't
actually return a value yet. Future dbGetLink() calls will return values
from the latest monitor event they received.

HTH,

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
RE: dbGetLink question Mark Rivers
References:
dbGetLink question Mark Rivers

Navigate by Date:
Prev: Re: Channel access blocking Williams Jr., Ernest L.
Next: Andor shamrock not detected Hinko Kocevar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: dbGetLink question Mark Rivers
Next: RE: dbGetLink question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024