Hello Kay,
On 08/11/2016 10:58 AM, Kasemir, Kay wrote:
>
> Klemen found that the EGU field for ai is STRING[16] and he can set an EGU field accordingly:
> $ caput BL11A:Det:crocD2:Y1:RateTrigger.EGU "abcdefghijklmnop"
> Old : BL11A:Det:crocD2:Y1:RateTrigger.EGU 123456789012345
> New : BL11A:Det:crocD2:Y1:RateTrigger.EGU abcdefghijklmno
>
> The channel access protocol, however, only gives us a MAX_UNITS_SIZE of 8 in db_access.h:
>
> #define MAX_UNITS_SIZE 8
>
> /* structure for a control double field */
> struct dbr_ctrl_double{
...
> char units[MAX_UNITS_SIZE]; /* units of value */
...
> };
>
>
> Does anybody remember the reasoning for this?
Old-style db_access (i.e. CA structures) vs newer dbAccess (internal IOC
API with better flexibility). From the newer dbAccessDefs.h:
> #define DB_UNITS_SIZE 16
> #define DBRunits \
> char units[DB_UNITS_SIZE]; /* units */
This is similar to the issue that by using the dbAccess API the IOC can
handle enums with up to 30 choices and choice strings (DB_MAX_CHOICES
defined in dbDefs.h), but CA never switched to the new API and can only
transport 16 choice strings, so it can't transport all the STAT menu
strings for example.
> Would it make sense to shorten the EGU field length in records?
I would rather leave it at 16, since we now have pvAccess which *can*
access and transport the wider string.
> Or lengthen MAX_UNITS_SIZE?
That would require changes to the on-the-wire CA protocol and could
break CA client applications.
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- EGU field length vs. Channel Access protocol Kasemir, Kay
- Navigate by Date:
- Prev:
Re: EPICS 3.15 good for production use? J. Lewis Muir
- Next:
Race condition in db_get_field_and_count() (3.14.12) Williams Jr., Ernest L.
- 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: EGU field length vs. Channel Access protocol bob dalesio
- Next:
Streamdevice for Hexa command "최숙"
- 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
|