Package gda.util.converters


package gda.util.converters

The design philosophy is that within the ObjectServer of GDA there will be instances of classes that implement interfaces IReloadableQuantitiesConverter and Findable. These instances are findable by any other classes using the Finder object given the Name member of the class.

One such class is the CombinedDOF which has the name of the IReloadableQuantitiesConverter object stored in its ConverterName field. The CombinedDOF then uses the IReloadableQuantitiesConverter object to convert the position of the dof to the position of the associated moveables and vice versa.

Two important implementations of IReloadableQuantitiesConverter and Findable are CoupledConverterHolder and SplitConverterHolder.

These classes do no actual conversion themselves but can be used to create a complex converter from other converters to any required level of nesting.

Current implementations of IReloadableQuantitiesConverter and Findable that actually perform conversion are JEPConverterHolder and LookupTableConverterHolder. Both of these implementation perform the same conversion for all entries in the Source or Target lists passed to it. This is done by such classes creating a simple converter that implements IQuantityConverter and using that to construct a GenQuantitiesConverter which simple re-uses the single conversion provided by the IQuantityConverter object over all entries in the Source and Target lists presented to it in the toSource and calculateMoveables methods.

LookupTableQuantityConverter

The lookup tables must be constant in direction (either ascending or descending) in the X values. A table that is constant in direction in both X and Y can be used to convert in both directions. If a convert is to be used for converting for both source to target and target to source and the Y values change direction within a table, a coupled converter must be formed with another LookupTableQuantityConverter object. We use a mode flag to indicate how the object is to be used to control which checks of the data in the table are performed. For example InterpolationFunction will throw an exception if the xvalues change direction *

  • Class
    Description
    AutoRenameableConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    AutoRenameableConverter Class
    CoupledConverterHolder<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>,I extends javax.measure.Quantity<I>>
    Class that can be used to create a converter made up of two other converters in series.
    IConverter<Source,Target>
    Converts forward and back between a source and a target
     
    IQuantitiesConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
     
    IQuantityConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    Used by gda.util.converters.GenQuantitiesConverter to convert between two Quantities.
    IReloadableQuantitiesConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    Allows a object that supports IQuantitiesConverter to reload its state from any resource on which it may depend e.g.
    JEPConverterHolder<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    class to be generated by the Castor on the ObjectServer to allow conversion between two DOFs using mathematical expressions given in a file.
    LookupTableConverterHolder<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    class to be generated by the Castor on the ObjectServer to allow conversion between two DOFs using a lookup table.
    LookupTableQuantityConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    Class to perform conversion between a Source and Target quantity using a lookup table
     
    RenameableConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    RenameableConverter Class
    SimpleConverter<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    'Simple' converter that allows the underlying converter to be specified as a property.
    SimpleConverterBase<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    Base class for 'simple' converters that implement the IConverter interface, converting from one Quantity to another Quantity, using an object that implements the IReloadableQuantitiesConverter interface.
    SplitConverterHolder<S extends javax.measure.Quantity<S>,T extends javax.measure.Quantity<T>>
    Class that can be used to create a converter made up of two other converters in such a way that one converter is used to convert from Source to Target and another used to convert from Target to Source.