g+
g+ Communities
Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
<== Date ==> <== Thread ==>

Subject: VxWorks global variable support extension proposal
From: wlupton@keck.hawaii.edu (William Lupton)
To: tech-talk@aps.anl.gov
Date: Thu, 13 Jan 2000 10:18:05 -1000
Dear all,

We realized yesterday that the VxWorks global variable device support
does not support selection of an individual bit (for bi/bo) or a range
of bits (for mbbi/mbbo) from the underlying global variable. Device
support for bi/bo simply copies a 'short' into .VAL and for mbbi/mbbo
copies a 'long'.

This hasn't been in an issue for us in past applications but now we have
a case where a device is mapping extensive data structures, including
some words where we would like to map individual bits on to bi/bo or
ranges of bits on to mbbi/mbbo, into VxWorks memory. We would like to
use the global variable device support to access these data structures.


Here is a proposal:

1. extend the VxWorks global variable device support (INST_IO version) so
   the link string, which is currently of the form

   [ "*" ] name [ "[" index "]" ]

   is of the form

   [ "*" ] name [ "[" index "]" ] [ keyword "=" value ] ...

   where the keyword/value pairs carry extra configuration information

2. keyword names would be case-independent and abbreviable (ambiguous
   abbreviations would refer to that keyword which was first supported;
   this guarantees backwards compatibility); initially, two keywords
   would be supported

   name		value				default
   ----		-----				-------

   start	bit number of lsb (0-31)	-1
   type		type of underlying var.		as at present (*)

   "start" specifies the same information that the "S" field does (by
   convention) for VME_IO; the default of -1 means that the entire
   variable is copied (as at present; needed for backwards compatibility)

   "type" specifies the type of the underlying global variable; currently
   this is implied by the record type; it would be particularly useful to
   be able to specify that a bi/bo comes from a long, which is not possible
   at present; the type names are the C names (with no support for "unsigned")
   and are case-independent and abbreviable

3. white space is permitted everywhere (and is ignored, as at present)

4. note that bo/mbbo support may (strictly) require use of a semaphore to
   cover the case where several records which access the same word are
   processing concurrently (I recall an earlier discussion that resulted
   in the use of intLock()/intUnlock(); one could add taskLock()/taskUnlock()
   instead of a semaphore?)


Here are some examples:

assume that ssss is a 'short' global variable whose value is 0x1234 and
llll is a 'long' global variable whose value is 0x12345678

1. bi: ssss s=4

   VAL field is set to ssss's bit 4 (1)

2. bi: llll s=31 t=long

   VAL field is set to llll's bit 31 (0)

3. mbbo: ssss s=8 t=short

   NOBT bits of ssss, starting at bit 8, are set to VAL (VAL masked to NOBT
   bits and shifted left by 8 bits)

Comments?

William


Replies:
Re: VxWorks global variable support extension proposal Carl Lionberger
Re: VxWorks global variable support extension proposal Andrew Johnson

Navigate by Date:
Prev: DL-PC board question john sinclair
Next: RE: DL-PC board question Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
Navigate by Thread:
Prev: RE: DL-PC board question Jeff Hill
Next: Re: VxWorks global variable support extension proposal Carl Lionberger
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·