stella.omc
Interface MultiAxes

All Superinterfaces:
Driver
All Known Subinterfaces:
Positioning, Shutter
All Known Implementing Classes:
FilterWheel, JWheel.DummyAxes, LinearPositioner, MiniWheel, RelativeWheel, WifsipWheel, WindmillShutter

public interface MultiAxes
extends Driver

A driver that allows to attain numbered position on different axes. This position can be set and queried with the supplied methods. Additionally, it is able to attain a zero position, which is not necessariliy the position 0, but indicates some reset-marker.

This interface allows very basic access only. No axis-stop or concurrent setting of positions is possible.


Field Summary
static String KEY_INITZERO
          If true, we move to the zero position on init.
 
Method Summary
 Collection<String> getAxesNames()
          Gets the names of the available axes.
 int getMaxPosition(String axis)
          Returns the maximum available position for the given axis.
 int getMaxStep(String axis)
          Returns the maximal steps this axis can travel.
 int getPosition(String axis)
          Returns the current position of the spinning driver.
 int getStep(String axis)
          Returns the currently attained step position via a direct query to the underlying driver.
 boolean isContinuous(String axis)
          Returns true, if this axis can be continuousely offset, which is likely the case for rotary stagets, and never the case for linear stages.
 boolean offset(String axis, int steps)
          Offsets the filter wheel for the specified number of steps.
 boolean setPosition(String axis, int nr)
          Sets a position on the driver.
 boolean setZeroPosition(String axis)
          Calling this method should ensure that the stated axis is in a well-defined state.
 
Methods inherited from interface io.Driver
close, getDriverName, isOpen, open
 

Field Detail

KEY_INITZERO

static final String KEY_INITZERO
If true, we move to the zero position on init.

See Also:
Constant Field Values
Method Detail

getAxesNames

Collection<String> getAxesNames()
Gets the names of the available axes. Not attached to any I/O action, thus not throwing any Exceptions.


setZeroPosition

boolean setZeroPosition(String axis)
                        throws IOException
Calling this method should ensure that the stated axis is in a well-defined state. It allows the controller to define its position in a second way then, e.g. counting steps.
After a call to this method, it is often so, but not required, that the position of the axis is zero.

Parameters:
axis - The name of the axis to be zero-setted.
Returns:
True on success
Throws:
IOException - If driver communication failed.

getMaxPosition

int getMaxPosition(String axis)
                   throws IOException
Returns the maximum available position for the given axis.

Parameters:
axis - String representing the selected axis.
Throws:
IOException

getMaxStep

int getMaxStep(String axis)
               throws IOException
Returns the maximal steps this axis can travel. Used together with getMaxPosition(java.lang.String) to estimate the number of steps per position.

Throws:
IOException

getStep

int getStep(String axis)
            throws IOException
Returns the currently attained step position via a direct query to the underlying driver.

Throws:
IOException

getPosition

int getPosition(String axis)
                throws IOException
Returns the current position of the spinning driver. It is implementation dependant, if this method queries the driver or returns a cached value.

Parameters:
axis - The name of the axis to be zero-setted.
Returns:
A integer denoting one of the attainable positions.
Throws:
IOException - If driver communication failed.

setPosition

boolean setPosition(String axis,
                    int nr)
                    throws IOException
Sets a position on the driver. The number of positions must be an acheivable one, otherwise an IllegalArgumentException might be thrown.

Parameters:
axis - The name of the axis to be zero-setted.
nr - The numbered position to be attained.
Returns:
True on success
Throws:
IOException - If driver communication failed.

offset

boolean offset(String axis,
               int steps)
               throws IOException
Offsets the filter wheel for the specified number of steps. The unit of the step is implementation dependant.

Parameters:
axis - The name of the axis to be zero-setted.
steps - The number of step, positiv or negative in driver-specific coordinates.
Returns:
True on success
Throws:
IOException - If driver communication failed.

isContinuous

boolean isContinuous(String axis)
                     throws IOException
Returns true, if this axis can be continuousely offset, which is likely the case for rotary stagets, and never the case for linear stages.

Throws:
IOException