OtherTuningSoftware/CommonInfrastructure/Abeans

This page is for JAVA developers who evaluate http://abeans.cosylab.com/ library

Please add any


Overview

Abeans is a framework for control applications.


Understanding Abeans

We started to browse around in the imported abeans source projects in eclipse to see what does what. To understand you need to

Here are some classes that are very good for understanding abeans:

package com.cosylab.gui.demo.displayerdemo;

public class NumberProducerPanel? extends JPanel

NumberProducerPanel? builds heavily on

public class NumberDataSource? extends DataSourceSupport?

NumberProducerPanel? makes a table of editable properties:

DefaultPropertiesTable? table = new DefaultPropertiesTable?();

Understand how JButton set = new JButton("Set Characteristics"); button's ActionListener? sends around the changed properties to all consumers from source.setCharacteristics(map);.

in ..datatypes project:

public interface NumericProperty? extends AbstractProperty?

The following must be understood to make a "Plug" to talk to GenBoard:

abean_abeans project:

package abeans.pluggable;

The communication must be realized through Plug:

public abstract class Plug extends ComponentSupport? implements QoSProvider?


what to evaluate?

http://abeans.cosylab.com/ is a nice library, however we need to evaluate


libraries to compile

You don't need to compile the libraries, as abeans is also available in 8 jars, totalling to about 3 megabyte. However it is nice to make eclipse resolve the libraries, so you can jump around the objects and methods.

I made a snapshot from my disk after the below procedures:

Original location: http://www.cosylab.com/abeans/distributions/3.1/

I downloaded all sources so I can jump around variables in eclipse (press F3 when mouse is over a variable)

I downloaded some jars:

(maybe less would be enough) and added to the build CLASSPATH (in eclipse.org project, properties, build, add external jar)

Do we want a conveniency tarball of jars?

First I copied all the sources into the same project, but a "project rebuild" took ages. Therefore I separated to separate projects (8 projects). The downside is that the required libraries (jar-s) must be added to each. I did this manually, maybe some script would have been useful.

To find the jars I ran this command with sh in my jar-collection tree eclipse/lib and searched for the "unable to resolve" classes (like "junit/framework/TestC?" .. ) in the result output textfile to locate the jar for the given library class.

for i
do 
	echo $i
	jar tvf $i
done

don't miss:

among millions of other useful classes:


successfully run :

GaugerDemo.jpg

Dummy question: How to run com.cosylab.gui.demo.DisplayerDemo? ?

In eclipse you select the class and say "Run, Run as, application".

If you have the CLASSPATH set, you can say java com.cosylab.gui.demo.DisplayerDemo? from a command prompt which will run the public static void main(String[]) method of the given class.

Gabor: I successfully ran all of above.


com.cosylab.gui.components.Demonstrator main() can take an argument, the name of a class that extends com.cosylab.gui.components.demonstrator.AbstractDemoPanel?;

surely com.cosylab.gui.components.Demonstrator does have

public static void main(String[] args) method (really, I just copy-pasted from the file). I think you checked sg. else than Demonstrator class in package com.cosylab.gui.components;

You maybe messed up your eclipse so it does not understand the file as a java file ! (make new java project, make source folder, copy the classes there, refresh from eclipse).

At least try to pass classnames (set command line Arguments in the Run... menu)

Notes:


rxtx working

Works on linux. I had some mixnmatch with different versions of the library, that caused problem.

root@oops:/h/t/java/commapi/samples/Simple# java -noverify SimpleRead
Found port: /dev/ttyS0
primep=20
primep_temp_scaling=A0

(the SimpleRead? class reads only, I typed mct on PS2)

I found that jcl.jar (besides RXTXcomm.jar, javax.comm.properties and the .so files must be in place, CLASSPATH and LD_LIBRARY_PATH set accordingly).

I used the 2.1.7pre17 from http://www.rxtx.org/

the main guideline was:

http://wass.homelinux.net/howtos/Comm_How-To.shtml

that suggested the -noverify. Note that the rxtx 2.1.x version required less steps than in the guideline.


Misc links


Go back to