2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 <2015> 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 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: | Conversion issues (analog device support with float type raw data) |
From: | Ralph Lange <[email protected]> |
To: | EPICS Core-Talk <[email protected]> |
Date: | Fri, 09 Jan 2015 11:04:04 +0100 |
All,The standard conversions that are being done in analog record types convert between RVAL (integer type) and VAL (float type).
All device supports that are handling float-type raw data (mostly field buses, PLCs, ASYN, ...) cannot use the record support's conversion because of the mismatch in data types. They have to clone the code and do the conversion as part of the device support, RVAL is usually ignored.
This leads to the situation that for some input records (if they are connected to integer type raw data) the conversion can be tested by doing caputs to the RVAL field, for the other records caputs to the RVAL field are just being ignored.
Does anyone have a good idea how to straighten this out in a reasonable and compatible way?
We could add a second RVAL field of type double to the analog records, and define yet another DSET.read() return code to trigger a float-float conversion. That would at least move the conversion code back into the record scope, where it belongs. Admittedly this is not really cleaning things up a lot, but as long as there are no variable type fields in records, I don't see a way around adding a field for a double type raw value.
What do you think? ~Ralph