EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compression record returns double value for field "N" over channel access
From: Ralph Lange via Core-talk <core-talk at aps.anl.gov>
To: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Fri, 25 Nov 2022 20:16:31 +0100
On Fri, 25 Nov 2022 at 19:24, Andrew Johnson via Core-talk <core-talk at aps.anl.gov> wrote:
On 11/25/22 7:00 AM, Ralph Lange via Core-talk wrote:
On Fri, 25 Nov 2022 at 13:56, Ralph Lange <ralph.lange at gmx.de> wrote:
On Fri, 25 Nov 2022 at 12:25, Timo Korhonen <Timo.Korhonen at ess.eu> wrote:

I chime in here as we discussed this with Georg yesterday. Using cainfo, the original IOC reports both native and request data types as double (DBF_DOUBLE resp. DBR_DOUBLE).


True.
And wrong.

Btw. The compress_array() routine in compressRecord.c treats N and NSAM as signed.
Also wrong.
I'm not quite sure what your first "wrong" there was referring to, CA just can't express any data types outside its limited set, so what cainfo reports as the "Native data type" has to be the result of converting the internal type into some appropriate CA type.

True. My bad.
The code snipped (what cainfo prints) is

            dbfType = ca_field_type(pvs[n].chid);
            dbrType = dbf_type_to_DBR(dbfType);

I always thought that dbf_type_to_DBR() would make the ULONG -> DOUBLE translation visible, but looking at the definition of that macro as

#define dbf_type_to_DBR(type)  (((type) >= 0 && (type) <= dbf_text_dim-3) ? (type)   :  -1  )

that was obviously just wishful thinking.
 
I don't think cainfo could ever show a difference between the "Native data type" and "Request type" lines since it doesn't make any access requests at all with any data types, so the latter line isn't really very useful output from cainfo IMHO.

I will make a change to cainfo and remove the redundant output line.

Cheers,
~Ralph

References:
Compression record returns double value for field "N" over channel access Georg Weiss via Core-talk
Re: Compression record returns double value for field "N" over channel access Ralph Lange via Core-talk
Re: Compression record returns double value for field "N" over channel access Timo Korhonen via Core-talk
Re: Compression record returns double value for field "N" over channel access Ralph Lange via Core-talk
Re: Compression record returns double value for field "N" over channel access Ralph Lange via Core-talk
Re: Compression record returns double value for field "N" over channel access Andrew Johnson via Core-talk

Navigate by Date:
Prev: Re: Compression record returns double value for field "N" over channel access Andrew Johnson via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-710 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Compression record returns double value for field "N" over channel access Andrew Johnson via Core-talk
Next: Build failed: epics-base base-7.0-61 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 25 Nov 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·