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
> - 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.
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
- RE: dbGetLink question Mark Rivers
- dbGetLink question Mark Rivers
- Navigate by Date:
Re: Channel access blocking Williams Jr., Ernest L.
Andor shamrock not detected Hinko Kocevar
- Navigate by Thread:
dbGetLink question Mark Rivers
RE: dbGetLink question Mark Rivers