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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: mbboDirect problem |
From: | Dirk Zimoch <[email protected]> |
To: | Andrew Johnson <[email protected]> |
Cc: | [email protected] |
Date: | Thu, 07 Jan 2010 10:36:02 +0100 |
Hi Dirk,
On Wednesday 06 January 2010 03:37:53 Dirk Zimoch wrote:It is a pity that the Bx fields of mbboDirect do not update when VAL is written. It seems mbboDirect has not been designed to have VAL written. But then neither DOL not the record_init() code makes much sense. Maybe this is an issue for the next Codeathon. Provided we have defined what the "expected behaviour" is.
To add a little history to the discussion, the mbb*Direct record types were created from the mbb* record types at JLAB. I suspect that their deficiencies have not been corrected because their original author lost interest and nobody else has been sufficiently motivated to fix them before now.
I have a couple of private emails about a patch to the mbboDirect record from September 2008, but the suggestion at the time was that more changes were still needed, which was one of the reasons why I didn't apply the change.
I would certainly encourage anyone who wants to work on improvements to do so (and publicize that you are doing so), although if you make significant changes to the configuration fields or runtime behaviour it might be advisable to rename the record type at the same time so that existing IOCs which may rely on the current behaviour do not break when upgraded to a release containing the new version. It is then trivial to deprecate the old record types and unbundle them from Base while still making them available for existing installations to use.
I propose the following behavior:
I haven't examined your specific suggestions, I'm happy to let you, Stephanie and others to work on the details. I would like reference documentation to accompany any new or modified record type.
What about extending the mbb* records to 32 bits?
I don't understand what you mean by that; the VAL field of the mbb[io] records is a DBF_ENUM (i.e. an index into a list of choices) and you can't change the underlying type for the index value. The xxVL, RVAL and MASK fields are DBF_ULONG and thus 32 bits wide already.
If you meant to increase the number of choices possible from 16 to 32, I'm afraid that is currently limited by the CA network protocol and API which was only designed to transport at most 16 state strings. That limitation is likely to be removed at some point, but it will not be possible to make the result backwards compatible so existing CA clients will have to be modified to use more than 16 states.
If you meant extend the mbb[io]Direct records to 32 bits though, I think that has already been done by at least one site and does seem worthwhile.
Heretic question: What about combining the features of mbb[io]Direct with mbb[io], i.e. adding Bx fields to mbb[io] records and get rid of mbb[io]Direct?
I don't see any major advantage to doing this, since the record types are really very different in purpose. The mbb[io] records allow a series of state names to be associated with specific bit patterns, whereas the mbb[io]Direct records allow individual bits in a word to be separated out and combined. The only overlap between these is in the I/O of the raw value; sharing device support between record types will need a whole new record/device interface to be developed though...
- Andrew
Don't merge mbbi/o and mbbi/oDirect, as their functionality is too different, and we would end up with a big clumsy "all digital stuff in one" record.
All these really good and reasonable ideas (32 bit, strings and alarm stuff for each bit, reasonable startup and monitor behavior, maybe even sending DBE_PROPERTY events...) should go in two new record types to avoid breaking existing stuff. The new records could also have a more descriptive name .... something resembling "bitfield" or "bitset"?