I have a piece of equipment that returns an IEEE-754 floating point value expressed as a hexadecimal integer. i.e. when the device returns the ASCII string
0xbff9d411
it is sending the value
-1.95178
So far the only way I can figure out how to handle this is to read the value into a ai record RVAL then use a subroutine record with a C union to do the conversion and then store the float value in the ai record VAL. Is there a way to avoid the subroutine record? I’m looking for sort of a combination of a %x and a %R StreamDevice format converter.
Thanks,
—
Eric Norum
wenorum at lbl.gov
- Replies:
- Re: StreamDevice "type punning" floating point conversion Johnson, Andrew N. via Tech-talk
- Navigate by Date:
- Prev:
Re: EPICS QT question Mark Rivers via Tech-talk
- Next:
Re: StreamDevice "type punning" floating point conversion Johnson, Andrew N. via Tech-talk
- 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:
Re: EPICS QT question Mark Rivers via Tech-talk
- Next:
Re: StreamDevice "type punning" floating point conversion Johnson, Andrew N. via Tech-talk
- 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
|