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

Subject: Re: MBBO Record Initialization (and a proposal)
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Tue, 15 Sep 2009 22:38:53 +0200
On Dienstag, 15. September 2009, Szalata, Zenon M. wrote:
> I have successfully implemented initializing dynamically menu strings (in
> mbbo record) by creating a device support C module for a fictitious
> device.  This gives me access to the mbboRecord structure at IOC init
> time.  I have chosen INST_IO as link type since its structure is the
> simplest of all. Now, the mbbo record is needed only as a menu of
> choices, where the numeric value of the selected item is used in genSub
> routine.  The mbbo record never does any IO. In my xxxx.dbd file I have
> the following:
>
>  device( mbbo, INST_IO,devMbboSoftMag, "softMag")
>
> The thing is that I was looking for an even simpler solution, but what I
> did works.

Could your solution be turned into a general purpose support module, 
published for download? Then the next one facing a similar task /will/ have 
a simple (or at least simpler) solution available. I have, of course, no 
idea whether this is feasible, as you didn't state how the strings are 
determined dynamically (for instance from which data). One way to configure 
such a generic device support could be to specify the name of a subroutine 
that gets called during initialization, gets the record instance as 
argument, and is responsible for setting the string values (and maybe also 
other items such as state severities and raw values).

This may be related to your problem or not, but I have often wished for 
something like "application level menu definitions". The main problem is 
that the existing dbd level menu definitions can only be used statically in 
record type definitions for fields of type DBF_MENU, but not for DBF_ENUM 
fields, i.e. not to provide the enum strings for (mb)bo/i records. If there 
were a way to allow this, e.g. by adding some extra field to these record 
types and appropriate support code, then similar records could (re-)use the 
same string definitions. More importantly, the generated C-language 
definitions could be used in sequencer programs, making interaction between 
these programs and the database a lot less brittle. Things would be almost 
perfect if one could, in addition, specify menu definitions in the *db* 
file, so that they can be easier maintained in lockstep with db and 
sequencer programs.

Cheers
Ben

Replies:
RE: MBBO Record Initialization (and a proposal) Szalata, Zenon M.
References:
MBBO Record Initialization Szalata, Zenon M.
Re: MBBO Record Initialization David Kline
RE: MBBO Record Initialization Szalata, Zenon M.

Navigate by Date:
Prev: RE: MBBO Record Initialization Szalata, Zenon M.
Next: Is anybody using a Met One Instruments Model 212 Profiler? Maren Purves
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: MBBO Record Initialization Szalata, Zenon M.
Next: RE: MBBO Record Initialization (and a proposal) Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·