Jeff
This is a known problem.
All of the following must be true prior to experiencing this problem:
o Running on a little endian architecture with signed characters (e.i. Intel
and probably also VAX)
o Running a CA client that fetches a 2 byte data type such as DBR_SHORT
o The most significant bit of the data is set
o Running a beta release of EPICS R3.13 and perhaps earlier releases also
I have created a potential fix, but not committed it to CVS at this time. A patch will
be installed into the final release of 3.13.
Sorry, I have procrastinated on the bug report for this while finalizing the patch.
An easy workaround for this problem would be to fetch the data as a DBR_LONG.
Thanks for bringing this to my attention, and thanks also to Mark Rivers and Ken
Evans for initially experiencing (and reporting) the problem.
Jeff
On Thursday, September 03, 1998 12:08 PM, Jeffrey McDonald [SMTP:[email protected]] wrote:
> Hi,
>
> Using a slightly modified version of caExample (which comes with
> makeBaseApp), I download 200 parameters to a waveform record using a
> ca_array_put command.
>
> The record is defined as:
>
> record(waveform, "$(user):waveForm1")
> {
> field(DESC, "waveform record")
> field(NELM, "200")
> field(DTYP, "Soft Channel")
> field(FTVL, "USHORT")
> }
>
>
> from caExample.c, I do:
>
> SEVCHK(ca_array_put(DBR_SHORT,200,mychid,(void *)indata),"ca_array_put
> failure");
> SEVCHK(ca_pend_io(5.0),"ca_pend_io failure");
> SEVCHK(ca_array_get(DBR_SHORT,200,mychid,(void
> *)outdata),"ca_array_get failure");
> SEVCHK(ca_pend_io(5.0),"ca_pend_io failure");
>
>
> I set the data equal to the array index, e.g. outdata[50] =50. I
> have defined the indata and outdata to be pointers to short.
>
> When I read-back the data, on the sgi OS, I get back exactly
> what I expect. When I read-back data on Linux (Red Hat 5.0), I get the
> correct answer for the first 128 elements, for elements following 128, I
> get:
>
> outvalue = invalue | 0xff00
> e.g. for outdata[199]= 65479 = 0xffc7
> (for those not hex-speaking 0xc7 is 199)
>
> I have checked to see that the correct values are in the waveform
> record, and they are (the ca_array_put command works correctly). However,
> when the ca_array_get is called, the values for the elements greater than
> 128 are corrupted when they are returned on the Linux box -- but NOT on
> the sgi.
>
> Any ideas?
>
> Thanks,
>
> Jeff
>
> _____________________________________________________
> Jeffrey McDonald, Florida State [email protected]
> FNAL MS 352 phone 630-840-3983
> Batavia, IL 60510 fax 630-840-8886
>
>
- Navigate by Date:
- Prev:
strange ca_array_get results on Linux Jeffrey McDonald
- Next:
FREE CapFast training license Dr. Chong Lee
- 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
- Navigate by Thread:
- Prev:
strange ca_array_get results on Linux Jeffrey McDonald
- Next:
FREE CapFast training license Dr. Chong Lee
- 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
|