To all :
OK, Thanks for helping me understand the mbbi/hardware/soft
device/shift/mask stuff better.
Proposal number 2 is to modify the device support module devMbbiSoftRaw.c
to mask the rval similar to the way hardware device support does it. The
mask will be calculated from the NOBT and the user-specified SHFT fields.
I have produced a test version of devMbbiSoftRaw.c and have tested it with
CAMAC hardware and with soft raw device support. The hardware worked as
before, and the soft raw support worked as desired, extracting only the
"middle" bits of interest.
Regarding changes to the devMbbiSoftRaw.c file :
This could be added to the end of the init_record section :
/* initialize mask*/
pmbbi->mask = 0;
for (i=0; i<pmbbi->nobt; i++) {
pmbbi->mask <<= 1; /* shift left 1 bit*/
pmbbi->mask |= 1; /* set low order bit*/
}
pmbbi->mask <<= pmbbi->shft;
This could be added to the read_mbbi section following dbGetLink :
if(status==0) pmbbi->rval = pmbbi->rval & pmbbi->mask;
Regarding legacy mbbi records which use raw soft device support: If a
legacy mbbi record had used bits "beyond" the specified NOBT as part of
their
state values, then the record will produce a different result because
the bits beyond NOBT will (now) be masked.
Regarding part 2 of my earlier posting, during the IOC boot I was loading
another application library *after* the library which was rebuilt with the
revised record support. The second library had the original .o files (with
identical names).
-ps
--
Paul Sichta
Princeton Plasma Physics Laboratory
609-243-3477
- Replies:
- Re: MBBI & mask Marty Kraimer
- Navigate by Date:
- Prev:
Re: beta12 & GPIB & Compiler Bug Benjamin Franksen
- Next:
Re: Channel counts? Bill McDowell
- 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: MBBI & mask Rozelle Wright
- Next:
Re: MBBI & mask Marty Kraimer
- 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
|