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 11:25:43 +0100
On Fri, 25 Nov 2022 at 11:14, Georg Weiss via Core-talk <core-talk at aps.anl.gov> wrote:

The field N (and NSAM) of a compression record should according to specification (https://epics.anl.gov/base/R7-0/6-docs/compressRecord.html) use ULONG. However, reading the field N over channel access apparently may return a double value:

 

>cainfo RFQ-010:RFS-EPR-110:Cur-ROI-Avg.N

RFQ-010:RFS-EPR-110:Cur-ROI-Avg.N

    State:            connected

    Host:             idmz-ro-epics-gw-tn.esss.lu.se:5064

    Access:           read, no write

    Native data type: DBF_DOUBLE

    Request type:     DBR_DOUBLE

    Element count:    1

 

The assumption is that since input data is an array of doubles, the field N uses same type.

While the above suggests query was handled by a ca gateway, I get the same result when not using a gateway.

 

Seems pvaccess returns a unsigned long type for field N.

 

Is this behavior expected?


Well, kind of.

Channel Access can't transport ULONG data. Instead, it will use DOUBLE.

Thus, when doing the cainfo against the original compress record (on the IOC), I would expect that you see the Native type as DBF_ULONG and the Request Type as DBR_DOUBLE.

The CA Gateway, however, has already a CA connection on the IOC side, so the data item for an original ULONG is of type DOUBLE inside the Gateway. This means when you're doing a cainfo against the Gateway, it would report both the Native and the Request type as DOUBLE.

Please re-check your statement that you see the same result against the original IOC. I would expect the Native type to be ULONG in that case.

Cheers,
~Ralph


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

Navigate by Date:
Prev: Compression record returns double value for field "N" over channel access Georg Weiss 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 
Navigate by Thread:
Prev: Compression record returns double value for field "N" over channel access Georg Weiss via Core-talk
Next: Re: Compression record returns double value for field "N" over channel access Timo Korhonen 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 ·