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: [Fwd: RE: EPICS base V4: iocCore database]
From: Jeff Hill <[email protected]>
To: 'Ralph Lange' <[email protected]>
Cc: 'Marty Kraimer' <[email protected]>, 'Andrew Johnson' <[email protected]>, 'Eric Norum' <[email protected]>, 'Benjamin Franksen' <[email protected]>, 'Bob Dalesio' <[email protected]>
Date: Tue, 22 Feb 2005 16:56:12 -0700

> -----Original Message-----
> From: Ralph Lange [mailto:[email protected]]
>
> Jeff Hill writes:
> 
> > [...]
> > system.
> > o Data access is more fool proof because it uses overloaded
> > functions instead of a data type code and a void pointer.
> > o We can generate C and Java bindings for data access as
> needed.
> 
> 
> Is that enough? While for C it seems feasible - especially for
> Java there seems to be a need for a genuine Java 
> implementation of things (as with CA). This might not 
> be easy if the design depends on features that
> are available only for C++.
> 

The first issue is if we can wrap the C++ implementation with
callable functions in other languages. All of the Data Access
interfaces are 100% based on C++ pure virtual base classes.
Translating to C nomenclature, these C++ pure virtual interfaces
are just like C function jump tables. This is a feature that can
of course be easily mapped to and from C, Java, Python, etc. The
support library entry points are just C/C++ callable functions.
No problem there either.

The 2nd issue is if a pure {Java, C, Python, ...} internal
implementation of the Data Access support libraries are possible.
The C++ implementation is in fact heavily based on C++ templates
- a feature not found in the aforementioned languages. So yes, of
course, if a pure {Java, Python, C, ...} implementation of the
equivalence and assignment support libraries were created then
another implementation approach would need to be used. I am
guessing that the author would quickly arrive at the conclusion
that, lacking templates, it would be most efficient to write a
program that creates a program as was done for GDD and its
ancestors. This will probably be easier to implement and maintain
compared to writing all of the conversion functions by hand as
was done in the very earliest versions of the system - especially
given the new features detecting and returning an error for out
of range conversions. If such a project were initiated, we would
be more than happy to point the person in charge at some examples
of such a program generating a range checking conversion matrix
program that they might use as an example. In any case, that's
what occurred when the GDD library was designed and written
(which did not use templates).

So in summary, my perspective is that a C++ implementation is
more easily maintained, and faster at runtime, because the
compiler does more of the heavy lifting, and the compiler detects
more programmer errors at compile time, but there is certainly no
part of the interfaces or the functional capabilities of the
support libraries that can't be reproduced in other languages
should we choose to maintain parallel versions.

Jeff



References:
Re: [Fwd: RE: EPICS base V4: iocCore database] Ralph Lange

Navigate by Date:
Prev: Re: EPICS base V4: iocCore database Andrew Johnson
Next: Re: EPICS base V4: iocCore database: Booleans 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 
Navigate by Thread:
Prev: Re: [Fwd: RE: EPICS base V4: iocCore database] Ralph Lange
Next: Re: [Fwd: RE: EPICS base V4: iocCore database] 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 ·