The mbbo documentation in the record Wiki (https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Multi-Bit_Binary_Output) says this:
“MASK is used by device support routine to read the hardware register. Record support sets low order of MASK the number of bits specified in NOBT. Device support can shift this value.”
The 3.15.5 version of the mbbo record seems to do what the documentation says:
(base) corvette:src/std/rec>grep -i mask mbboRecord.c
/* Initialize MASK if the user set NOBT instead */
if (prec->mask == 0 && prec->nobt <= 32)
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Mark Rivers via Tech-talk
Sent: Tuesday, September 15, 2020 10:47 AM
To: 'Eric Norum' <ericnorum at gmail.com>; Johnson, Andrew N. <anj at anl.gov>
Cc: tech-talk at aps.anl.gov (tech-talk at aps.anl.gov) <tech-talk at aps.anl.gov>
Subject: RE: mbbi record ignores mask?
Ø
The mbbi record in the couple of versions of base that Ive checked (3.15.5 and 3.15.7) don’t seem to use the MASK field.
I believe that is the responsibility of the device support. asyn device support handles the mask.
Mark
This is one of those things that seems impossible to have been wrong for so long that it makes me wonder if I’m misinterpreting what I’m reading.
The mbbi record in the couple of versions of base that Ive checked (3.15.5 and 3.15.7) don’t seem to use the MASK field.
/eda/epics/R3.15.7/base/src/std/rec
wenorum@xildev5 224> grep -n mask mbbiRecord.c
140:
if (prec->mask == 0 && prec->nobt <= 32)
141:
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;