EPICS Controls 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  <20102011  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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Small patch for asynMask bitmask values
From: Eric Norum <[email protected]>
To: Angus Gratton <[email protected]>
Cc: tech-talk <[email protected]>
Date: Thu, 19 Aug 2010 19:13:43 -0700
The 1<<N form seems reasonable, but I'm not 100% that the bitXX names are a good idea.   My concern stems from the fact that some architectures number bits from the right (which is what I presume this patch does) while others number them from the left.  Thus 'bit14' is somewhat ambiguous.

On Aug 19, 2010, at 6:31 PM, Angus Gratton wrote:

> Hi everyone,
> 
> I have a trivial patch for asyn 4-13-1, I thought I'd send it to the
> list for comment as well as to Mark directly.
> 
> I've been setting up a lot single binary inputs and outputs, so making
> masks like this:
> 
> field(OUT,"@asynMask( xvme260-1 0 0x4000 )")
> 
> and I was thinking it'd be nice to be able to use a 1<<x or a BITx
> notation for single bit values. Most of the cards I'm using have a
> direct relationship between bit number and channel number, and it's nice
> to save the reader from having to do it in their head.
> 
> So my tiny patch just adds support for optionally specifying single bit
> values, in masks, as follows:
> 
> field(OUT,"@asynMask( xvme260-1 0 bit14 )")
> 
> The patch adds a mention in the documentation as well, although I
> haven't added any test cases.
> 
> Hope this is of some use,
> 
> - Angus
> 
> 
> <asynMaskbitValues.patch>

-- 
Eric Norum
[email protected]






Replies:
Re: Small patch for asynMask bitmask values Angus Gratton
References:
Small patch for asynMask bitmask values Angus Gratton

Navigate by Date:
Prev: Re: Small patch for asynMask bitmask values Angus Gratton
Next: RE: hex stream processing with StreamDevice? Barker, Alan M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Small patch for asynMask bitmask values Angus Gratton
Next: Re: Small patch for asynMask bitmask values Angus Gratton
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·