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 2023 2024 2025 | 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 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: pyepics not updating pv.enum_strs after connection |
From: | Matt Newville <[email protected]> |
To: | Jameson Graef Rollins <[email protected]> |
Cc: | EPICS tech-talk <[email protected]> |
Date: | Thu, 19 Mar 2015 07:13:05 -0500 |
On Wed, Mar 18 2015, Matt Newville <[email protected]> wrote:
> Sorry for the confusion. The surest way to ensure you have enum strings
> and other CTRL attributes is to do
>
> pv.get_ctrlvars()
>
> This should happens by default in many situations where you need to know
> the CTRL variables (say, putting a string for the name to enum PV, or
> getting with 'as_string=True'). Of course, a PV can't get look up its enum
> strings if it's not connected.
Hi, Matt. Thanks so much for the response. Unfortunately using
get_ctrlvars doesn't seem to help. Or at least I can't figure out how
to use it properly.
I've tried setting "with_ctrlvars=True" when adding the callback (which
is supposed to be the default anyway), but enum_strs is still None in
the arguments passed to the callback.
If I explicitly retrieve the pv in the callback (via 'cb_info') and call
pv.get_ctrlvars() directly, I'm consistently returned an empty dict.
Furthermore, this call takes a very long time to return, apparently
after hitting a timeout.
Other methods on the pv retrieved from 'cb_info' are timing out as well.
It's almost as if the PV being supplied to the callback isn't actually
the same PV attached to the callback.
This is my first application that relies heavily on PV callbacks, so I
could be doing things improperly. Everything else seems to be working
great, though. It's just the enums that I seem to have no way of
resolving.
jamie.