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

Subject: JCA type conversion
From: rolf <[email protected]>
To: tech-talk <[email protected]>
Date: Thu, 01 Apr 2010 04:58:16 -0700
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?


Thanks - rolf -

--
+-----------------------------------------+
| Rolf Keitel, Ph.D., TRIUMF              |
| Division Head, Engineering              |
| Tel: (604) 222-7453 Fax: (604)222-7307  |
| e-mail: [email protected]                  |
+-----------------------------------------+


Replies:
Re: JCA type conversion J. Lewis Muir

Navigate by Date:
Prev: Software Engineer Position at NSCL Vasu MSU
Next: Re: JCA type conversion J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Software Engineer Position at NSCL Vasu MSU
Next: Re: JCA type conversion J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·