Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: mbbi/mbbo Mask values
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Fri, 1 Jun 2012 10:34:54 -0500
Hi Guys,

On 2012-06-01 Dalesio, Leo wrote:
> Also, changing that MASK to some arbitrary bit pattern in the device
> support seems a very obscure modification that future engineers trying to
> understand the application would likely have a difficult time finding.

I disagree, the MASK field is provided for device support to use, and is only 
ever accessed in one place in the mbbiRecord.c file; at record initialization 
immediately before the dset->init_record() routine is called the record 
executes this statement:

    /* initialize mask*/
    prec->mask = (1 << prec->nobt) - 1;

After this though the record does not change or read the MASK field at all.  
Thus device support is perfectly at liberty to use the field however it likes, 
as long as it doesn't require that the user set its value in the .db file.  It 
is also the device support's responsibility to apply the mask before setting 
RVAL if this is necessary and appropriate for the hardware.

Note however that the same is not true of the SHFT field, which is used to 
right-shift RVAL before doing the state comparisons when the SHFT field is 
non-zero.  SHFT is never set by the record though, and *can* be loaded from 
the .db file, although many device supports set it based on the signal number 
in the hardware address.

HTH,

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

Replies:
RE: mbbi/mbbo Mask values Dalesio, Leo
References:
RE: mbbi/mbbo Mask values Dalesio, Leo
Re: mbbi/mbbo Mask values Dudley, David
RE: mbbi/mbbo Mask values Dalesio, Leo

Navigate by Date:
Prev: Re: asynManager isConnected J. Lewis Muir
Next: RE: mbbi/mbbo Mask values Dalesio, Leo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: mbbi/mbbo Mask values Dalesio, Leo
Next: RE: mbbi/mbbo Mask values Dalesio, Leo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·