EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  <20012002  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  <20012002  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: CA and unsigned types
From: "Jeff Hill" <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Tue, 14 Aug 2001 17:47:34 -0600
> >>> On 11/12/1996 at 16:55:17 GMT, Jeff Hill wrote:
> 
>   > The unsigned integer types used internally in the database do not
>   > currently exist in the ca client API. To get around this problem EPICS
>   > ioc core informs clients attached to "unsigned int" fields that the
>   > native type is "float". This promotion to a larger type guards against
>   > the loss of information during type conversions.
> 
>   > Johnny Tang at CEBAF has recommended that "unsigned char" and "unsigned
>   > short" should map to a 32 bit integer external type (without loss of
>   > information). This change is planned for the next release of EPICS.
> 
> Is this behaviour actually documented anywhere other than the Tech-Talk
> archives ?
> 
> I found no mention either in the Record Reference Manual or the App.
> Developer's Guide.

We need to add this to the doc.

> 
> Was the effect on large arrays considered ?  In my case, this caused a
> waveform record of type USHORT and size 6000 to be unusable.

You could ignore the native type hint from the client library and fetch
the USHORT type as a SHORT type and then perform the conversion as you
see fit in the client library. As I recall the database library will
just blindly copy USHORT's into SHORTS during the conversion w/o loss
of information. You could use a pointer cast to convert back to a USHORT
type in the client side application. If your application is general purpose
then perhaps there will need to be a user specifiable override for the native 
type.

You could also change your waveform record to type SHORT and perform the conversion 
as you see fit in in the client application.

It is also now possible in R3.14 to configure the array size limit, and as
you have observed, this is the solution for sites that can afford to waste some 
bandwidth.

> 
> Is there a plan to implement these types in CA ?
> 

Yes, the above are admittedly kludges and a better solution is needed.
Depending on decisions made in the next few months, our fix might arrive with 
an upgrade including a user extensible process variable property set.

Jeff



Replies:
Re: CA and unsigned types Chip Watson
References:
CA and unsigned types Brian McAllister

Navigate by Date:
Prev: Re: CA and unsigned types Brian McAllister
Next: Re: CA and unsigned types Chip Watson
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  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: Re: CA and unsigned types Brian McAllister
Next: Re: CA and unsigned types Chip Watson
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·