On 4/1/10 6:58 AM, rolf wrote:
> I am trying to work with Java Channel access (JCA 2.3.2 and CAJ
> 1.1.5b). I may have blinders on, but the only documentation I can find
> is the APS tutorial and the JCA javadoc (for JCA 2.1.2). If there is
> anything else, could someone please point me to it.
>
> My specific problem:
> I have a MonitorListener, which delivers a MonitorEvent on a PV value
> change.
> The MonitorEvent gives me DBR, from which I want to get the new value as
> a String.
>
> My code looks like this:
>
> DBR dbr = evt.getDBR();
> DBR dbr2 = dbr.convert(DBRType.CTRL_STRING);
> String[] s = ((DBRString) dbr2).getStringValue();
>
> s[0] contains the correct value for all DBR types, with the exception of
> enumerated types, where it has an empty string.
> What am I doing wrong?
Hi, Rolf.
I've never done what you're trying to do, but have you seen the
following Tech-Talk post?
http://www.aps.anl.gov/epics/tech-talk/2006/msg01221.php
Perhaps you need to use DBRType.LABELS_ENUM?
Lewis
--
J. Lewis Muir
Software Engineer
IMCA-CAT
- References:
- JCA type conversion rolf
- Navigate by Date:
- Prev:
JCA type conversion rolf
- Next:
create arrays in EDM Jovan Loncar
- 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
- Navigate by Thread:
- Prev:
JCA type conversion rolf
- Next:
Re: JCA type conversion Simon Ebner
- 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
|