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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: StreamDevice "type punning" floating point conversion |
From: | "Brown, Garth via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Eric Norum <wenorum at lbl.gov>, "Johnson, Andrew N." <anj at anl.gov> |
Cc: | EPICS tech-talk <tech-talk at aps.anl.gov> |
Date: | Thu, 24 Sep 2020 21:30:37 +0000 |
Hi Eric,
See this thread where John Priller at FRIB gave me code that handles what I believe is the same issue you're having. I can send you what they sent me.
Garth
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Johnson, Andrew N. via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, September 24, 2020 10:19 AM To: Eric Norum <wenorum at lbl.gov> Cc: EPICS tech-talk <tech-talk at aps.anl.gov> Subject: Re: StreamDevice "type punning" floating point conversion Hi Eric,
On Sep 24, 2020, at 11:34 AM, Eric Norum <wenorum at lbl.gov> wrote:
It sounds to me like you need another StreamDevice format converter, which would seem to be the logical place to put this functionality. It’s possible that some devices might need really obscure things like byte-swapping the value in between parsing the
hex format integer and writing the 32-bit float value, but hopefully those kinds of devices are so rare that Dirk shouldn’t need to support them until asked.
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|