Experimental Physics and Industrial Control System
On Thursday, July 26, 2012, Hinko Kocevar wrote:
> On 07/26/2012 02:04 PM, Benjamin Franksen wrote:
> > On Thursday, July 26, 2012, Hinko Kocevar wrote:
> >> While developing writing Asyn device driver support for our products
> >> running on Linux OS, we were faced with the need to support more than
> >> 16 enumeration values that are to be represented using mbbi / mbbo
> >> records.
> >>
> >> I'm looking for solutions to this problem. We are trying to stay
> >> within EPICS base provided record types as much as possible, but we
> >> have no problems to include additional EPICS extensions to out soft
> >> IOC in order to gain record support. Last resort would be to provide
> >> a new record type.
> >
> > Writing a new record type with, say, 32 choices based on the existing
> > 16- choices versions wouldn't be hard. The problem is that the result
> > won't be very useful because CA (Channel Access) limits the number of
> > choices for type DBR_XXX_ENUM to 16 which is hard coded in the
> > protocol (see db_access.h). So, for instance, a menu button in an
> > operator panel would not see all 32 choices but only the first 16; and
> > so on.
> >
> > A possible work-around would be to somehow split the choices into
> > smaller (related) groups, then provide a 'master' mbbi/o for the
> > choice of the group, and separate mbbi/o for chosing inside the
> > groups.
>
> My version would not even include the 'master' mbbi/mbbo. I was thinking
> about splitting too large enumerations into 16 or less values to fit
> single mbbi/mbbo.
>
> For example: 20 enums
> - 0 - 15 in mbbi1 record
> - 16 -19 in mbbi2 record
If your choices do not lend themselves naturally to grouping into smaller
sets of sub-choices, then this approach makes sense. I would, however, use
only 15 choices, reserving the 16th to indicate that the actual choice
should be made from the next record in the chain. You could also reserve yet
another choice to indicate that this record dos not apply, i.e. to indicate
'undefined' (see below).
You can have arbitraryly many choices if you chain records in this way.
> What will mbbi1 value be if eg. enum 17 should be set?
If you reserve the 16th choice, then "Other" comes to mind, "More..." if you
think of user interfaces.
> What will mbbi2 value be if eg. enum 4 should be set?
"n/a" or just ""
> Can it be 'undefined'?
Reserve yet one more choice for this. Or: set the UDF field of a record e.g.
via db link from another record. If you also have DISS=INVALID you have a
good idication of an undefined state.
> Or should we leave one enum state reserved in
> this case and set it when other mbbiX is in use..
Yes, see above.
Cheers
Ben
Attachment:
signature.asc
Description: This is a digitally signed message part.
- Replies:
- Re: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- References:
- More than 16 enumerations mbbi / mbbo Hinko Kocevar
- Re: More than 16 enumerations mbbi / mbbo Benjamin Franksen
- Re: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- Navigate by Date:
- Prev:
Re: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- Next:
Re: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- 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: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- Next:
Re: More than 16 enumerations mbbi / mbbo Hinko Kocevar
- 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