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: | StreamDevice for an odd float format |
From: | "Brown, Garth via Tech-talk" <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Wed, 5 Jun 2019 17:58:12 +0000 |
Hi All,
I'm trying to use StreamDevice to talk to a device that is almost, but not quite, giving me data that the format converters (as I understand them) can convert.
It’s an ASCII representation of the IEEE 32 bit floating point format, e.g. the raw data for a value of 28.0 is
0x34 0x31 0x45 0x30 0x30 0x30 0x30 0x30
Which is the ASCII code for
41E00000
I think that if the raw data were 0x41E00000, %R would be able to convert it. And if the raw data were
0x32 0x38 0x2E 0x30 (ASCII for 28.0)
then %f would be able to convert it.
Before I start writing calc records to convert the 32 bits to a float value, I figured I'd ask if someone had a less brute-force approach. Maybe a StreamDevice format converter trick I don't know about?
Thanks,
Garth
|