EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Record support and user-defined fields
From: Andrew Johnson <[email protected]>
To: Benjamin Franksen <[email protected]>
Cc: [email protected]
Date: Thu, 07 Jul 2005 18:23:15 -0500
Benjamin Franksen wrote:

What I proposed for the IVOA/IVOV example is easily adapted to other scenarios, like simulation stuff, or alarm limit handling. Ok, all this needs a developer who writes the code and (more importantly) designs an appropriate interface that is general enough to be used in any record type that needs such a facility.

I think you persuaded me about that, although I think I might simplify your syntax a little (and forget what I said earlier about separating class and struct). How about this DBD syntax:

struct (drvLimits, ValType) {
    field(high, ValType)
    field(low, ValType)
    method("STATUS constrain(ValType &value)")
}

The presence of one or more ValType arguments after the struct name causes a template struct definition to be generated (without it, we just get a regular struct definition):

template <typename ValType>
struct drvLimits {
    ValType high;
    ValType low;
    STATUS constrain(ValType &value);
}

The implementation of the drvLimits::constrain() method has to be provided externally, just as with your code

OTOH, it would of course be great if we could assemble all these pieces at record load time, rather than compile it into the record type, so that each record will only have what it really uses. I just can't see how to do this in a manner that is at the same time efficient and safe. Well, apart from developing yet another programming language for the task.

Unfortunately that's probably what we'd have to do, so I'm not trying to think that one out any more.

- Andrew
--
Podiabombastic: The tendency to shoot oneself in the foot.

Replies:
Re: Record support and user-defined fields Benjamin Franksen
References:
V4 iocRecord: forward linking Ralph Lange
Re: Record support and user-defined fields Kay-Uwe Kasemir
Re: Record support and user-defined fields Andrew Johnson
Re: Record support and user-defined fields Benjamin Franksen

Navigate by Date:
Prev: Re: Record support and user-defined fields Benjamin Franksen
Next: property hierarchy and performance Jeff Hill
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Record support and user-defined fields Benjamin Franksen
Next: Re: Record support and user-defined fields Benjamin Franksen
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·