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  <20132014  2015  2016  2017  2018  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: dbGetLink with options
From: Andrew Johnson <[email protected]>
To: "Zhang, Dehong" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 28 Oct 2013 11:39:49 -0500
Hi Dehong,

On 10/26/2013 11:35 AM, Zhang, Dehong wrote:
I am trying to fetch the value from a PV in another IOC.  I would like to get the connection
status and alarm severity in one call.  According to the developer's guide, these can be done
by setting the options (3.14.12), but whenever I set the options to none-zero (with the proper
return structure), it fails.

I did a "grep dbGetLink *" in base/***/src/rec.  It seems nobody uses options.

You are correct for that API, DB links do support options but CA links and CONST links don't (if you pass in a non-zero pointer for poptions they will set *poptions=0 before returning to tell you that they don't support any option bits). In 3.15 if you try and pass a non-zero value at *options you'll get a warning message at runtime (and the value will be zeroed again).

Do I need to explicitly call dbCaGetLink, and check the link status and alarm severity by
calling dbCaIsLinkConnected and dbCaGetSevr?

I would advise against using the dbCa routines directly if you can avoid doing so, they will lock your code into using Channel Access when future releases may provide pvAccess links too.

For the link connection status, call dbIsLinkConnected(plink) which returns a true/false value.

The dbGetLink() routine automatically sets the alarm condition (status and severity) of the record that owns the link, based on the link flags and the alarm condition of the link target. What else were you planning to do with the that alarm information?

By the way, dbGetLink always returns "0", even when it fails or when the link is not there.

A disconnected link is not seen as an error, the IOC code should be able to continue despite another part of the control system being down. The dbGetLink() routine can return a non-zero status, but disconnection does not cause it to do that.

Note that in 3.15 and later we have been changing the implementation of the link code to allow additional link types to be added in the future, although we're not at that stage yet.

HTH,

- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

Replies:
RE: dbGetLink with options Zhang, Dehong
References:
dbGetLink with options Zhang, Dehong

Navigate by Date:
Prev: sequencer + streamdevice Christoph Burandt
Next: RE: dbGetLink with options Zhang, Dehong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: dbGetLink with options Zhang, Dehong
Next: RE: dbGetLink with options Zhang, Dehong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·