Hi:
JCA/CAJ is very close to the original Channel Access
client library, so just as with it you have the choice between
a) Always get the enum as a DBR_STRING.
"Works", gives you the string, but asks the IOC to
produce the string when fetching the number would be a tiny bit
more efficient. Besides, you might really want both the number
and the state string.
b) Get the DBR_CTRL_ENUM once(!), which gives you the enum strings,
then continue to just read the number.
Seems perfect, because more efficient and now you have both
number and string.
But DBR_CTRL_ENUM only gives you a maximum of 16 enums,
while in fact there might be more options for certain enumerated values.
Your pick.
-Kay
On 9/18/09 01:16 , "David Brodrick" <[email protected]> wrote:
> Tech-talkers,
> I am using JCA/CAJ and I am wondering about the best way to determine
> the string representation of the current value for enumerated records
> such as bi, mbbi, etc.
>
> Given the current numeric VAL, do I need to explicitly do an additional
> CA call to find out the appropriate string mapping (eg to find out the
> string for ONAM), or is there an easier way?
> Many thanks,
> David
>
> --
> ==========================================================
> David Brodrick, Software Engineer
> CSIRO Australia Telescope National Facility
> Locked Bag 194, Narrabri, NSW 2390, Australia
> Work: 02 6790 4038 Fax: 02 6790 4090
> mailto:[email protected]
> ==========================================================
>
>
>
- References:
- Getting String Form of Enums David Brodrick
- Navigate by Date:
- Prev:
Re: About Bruker AXS Jens Eden
- Next:
more list all process variables... Sue Witherspoon
- 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:
Getting String Form of Enums David Brodrick
- Next:
more list all process variables... Sue Witherspoon
- 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
|