OptSuite Data Acquisition Module

Besides the extension-points specific to data-acquisition, this module also incorporates the classes and interfaces for the general OptSuite concepts like measurement routines and their steps. There exist two how-to documents dedicated to general routine extension points: How-To of routine steps and How-To on measurement tools.

Data Acquisition: acquisitionAlgorithm

AcquisitionAlgorithms are used with routine steps for data-acquisiton when the user should be able to choose from multiple ways of data-acquisition for the same use case. This is used for example in OptSuite’s PSI extensions as there exists very different acquisition strategies (three- to five-step acquisition). Algorithms define a kind when they are registered. This property is used to group algrorithms when displaying a choice to the user.

As most functionality comes into OptSuite by a routine step, AcquisitionAlgorithms can not be used independently, they have to be used along with a routine step extending AlgorithmRoutineStep. These types of steps take an algorithm, execute it and store its results to the datastore when run. Of course an algorithm routine step has to be registered to the measurementRoutineStep extension point as any other routine step, too.

The overall procedure of adding a new routine step that uses algorithms can be outlined like follows:

  • Extend AlgorithmRoutineStep (define the kind of algorithm to use)
  • Extend AlgorithmRoutineStepFactory. This is used to create routine steps. It should be accompanied by several helpers defined in the imtek.optsuite.acquisition.algorithm package (like, AlgorithmCreationWizardHop or AlgorithmSelectionWizardPage)
  • Register your extension of the factory to the measurementRoutineStep extension-point
  • Implement algorithms of the kind you defined for the routine step (Implement AcquisitionAlgorithm)
  • Register the algorithms to the acquisitionAlgorithm extension point

Algorithm Routine Steps

Creatin a new algorithm routine step is easy. You simply extend AlgorithmRoutineStep and implement some abstract methods:

public class MyAlgorithmRoutineStep extends AlgorithmRoutineStep {
 
	/**
	 * 
	 */
	public MyAlgorithmRoutineStep() {
	}
 
	/* (non-Javadoc)
	 * @see imtek.optsuite.acquisition.algorithm.AlgorithmRoutineStep#createStepTreeNode(imtek.optsuite.acquisition.routine.MeasurementRoutineTreeNode)
	 */
	@Override
	protected AcquisitionAlgorithmTreeNode createStepTreeNode(
			MeasurementRoutineTreeNode parent) {
		// Here you can use a provided implementation
		return new AcquisitionAlgorithmTreeNode(parent, this);
	}
 
	/* (non-Javadoc)
	 * @see imtek.optsuite.acquisition.algorithm.AlgorithmRoutineStep#getAlorithmKind()
	 */
	@Override
	protected String getAlorithmKind() {
		// Here you have to return the kind of algorithms this step might use
		return "my.algorithm.kind";
	}
 
	/* (non-Javadoc)
	 * @see imtek.optsuite.acquisition.routine.MeasurementToolRoutineStep#getRequiredMeasurementToolTypes()
	 */
	@Override
	public List<Class> getRequiredMeasurementToolTypes() {
		// Return a list of classes of the measurement tools your routine step should use
		return new ArrayList<Class>(0);
	}
 
	/* (non-Javadoc)
	 * @see imtek.optsuite.acquisition.routine.MeasurementRoutineStep#getName()
	 */
	public String getName() {
		return "my algorithm routine step";
	}
}
 
documentation/modules/acquisition.txt · Last modified: 2006/10/09 11:52 by fleque
Recent changes · Show pagesource · Login