Peter Schlumpf [1] writes in about Avanti [2], a java-based project aimed at generating an open source API for automation systems (java APIs are fairly easily bound to other languages..., no?). A description is up, and Peter promises sanitized code within a few days.
Links:
[1] mailto:schlumpf@nslsilus.org
[2] http://nsls1.nslsilus.org/~schlumpf/avanti/