Kay asked:
Where can I get the current copy of data access?
After sometime tonight, dataAccess will appear in the CVSWeb view of the
EPICS CVS repository, and the latest version committed will be
downloadable from the download/base page.
As Jeff has said though, CVS doesn't yet include the changes he made
before the last core developer meeting.
On a related note, I have looked at writing Java interfaces for the core
property catalog, viewer and manipulator classes, and had very little
difficulty in doing this. The only significant difference from C++
comes from the fact that Java doesn't provide references to basic types.
My manipulator's reveal functions have to return their property's
updated value rather than setting it themselves through a passed in
reference as implemented in the C++ version. I've attached the skeleton
I worked out (no implementation though, lots of bits missing, and I have
no intention to continue working on this myself).
- Andrew
--
Podiabombastic: The tendency to shoot oneself in the foot.
// This is an incomplete implementation of the dataAccess interfaces in Java,
// just to prove that there's nothing in the dataAccess design that can't be
// written in another language.
public class propertyId {
public propertyId(String name);
public propertyId(propertyId id);
public int identifier();
public String toString();
public boolean equals(propertyId id);
}
public interface propertyCatalog {
// Java doesn't have enums, so we do this instead:
public static final int SUCCESS = 0;
public static final int TOO_LOW = 1;
public static final int TOO_HIGH = 2;
public static final int INVALID = 3;
public void traverse(propertyViewer v);
public int traverse(propertyManipulator m);
public bool find(propertyId id, propertyViewer v);
}
public interface propertyViewer {
public void reveal(propertyId id, boolean value, propertyCatalog c);
public void reveal(propertyId id, char value, propertyCatalog c);
public void reveal(propertyId id, byte value, propertyCatalog c);
public void reveal(propertyId id, short value, propertyCatalog c);
public void reveal(propertyId id, int value, propertyCatalog c);
public void reveal(propertyId id, long value, propertyCatalog c);
public void reveal(propertyId id, float value, propertyCatalog c);
public void reveal(propertyId id, double value, propertyCatalog c);
public void reveal(propertyId id, String value, propertyCatalog c);
public void reveal(propertyId id, propertyCatalog c);
}
public interface propertyManipulator {
// The catalog's traverse() function passes the propertyManipulator
// each old property's value and replaces it with the value returned.
// In C++ reveal() is passed a non-const reference to the property
// value storage, but Java can't do that for any of the basic types.
// A propertyCatalog is a reference type however, so that works Ok.
public boolean reveal(propertyId id, boolean value, propertyCatalog c);
public char reveal(propertyId id, char value, propertyCatalog c);
public byte reveal(propertyId id, byte value, propertyCatalog c);
public short reveal(propertyId id, short value, propertyCatalog c);
public int reveal(propertyId id, int value, propertyCatalog c);
public long reveal(propertyId id, long value, propertyCatalog c);
public float reveal(propertyId id, float value, propertyCatalog c);
public double reveal(propertyId id, double value, propertyCatalog c);
public String reveal(propertyId id, String value, propertyCatalog c);
public void reveal(propertyId id, propertyCatalog c);
}
- Replies:
- RE: Current copy of data access? Jeff Hill
- Navigate by Date:
- Prev:
Re: Channel Access Client Interface Benjamin Franksen
- Next:
RE: Current copy of data access? Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Channel Access Client Interface Ralph Lange
- Next:
RE: Current copy of data access? Jeff Hill
- Index:
2002
2003
2004
<2005>
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|