Brian McAllister wrote:
>
> >>> 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.
>
> Was the effect on large arrays considered ? In my case, this caused a
> waveform record of type USHORT and size 6000 to be unusable.
I am not aware of any plans to change the current mappings which are:
epicsShareDef unsigned short dbDBRnewToDBRold[newDBR_ENUM+1] = {
0, /*DBR_STRING to DBR_STRING*/
4, /*DBR_CHAR to DBR_CHAR*/
4, /*DBR_UCHAR to DBR_CHAR*/
1, /*DBR_SHORT to DBR_SHORT*/
5, /*DBR_USHORT to DBR_LONG*/
5, /*DBR_LONG to DBR_LONG*/
6, /*DBR_ULONG to DBR_DOUBLE*/
2, /*DBR_FLOAT to DBR_FLOAT*/
6, /*DBR_DOUBLE to DBR_DOUBLE*/
3, /*DBR_ENUM to DBR_ENUM*/
};
These mapping have been used for several years and I dont think they should be
changed because any change could inpact existing applications.
No matter what mapping is chosen, it will not satisfy all requirements. In
hindsight, I think we should have used the same semantics that the C compiler
uses. If we had mapped DBR_USHORT to DBR_SHORT and DBR_ULONG to DBR_LONG we
would have the same semantics. It is too late now to make these changes because
they may impact existing applications.
Note that when the next generation CA interface appears it will allow all the
date types dbAccess currently supports.
Marty Kraimer
- Replies:
- Re: CA and unsigned types Brian McAllister
- Re: CA and unsigned types Brian McAllister
- References:
- CA and unsigned types Brian McAllister
- Navigate by Date:
- Prev:
Re: RAWF, RAWL Benjamin Franksen
- Next:
Re: CA and unsigned types Brian McAllister
- 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:
Re: CA and unsigned types Chip Watson
- Next:
Re: CA and unsigned types Brian McAllister
- 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
|