stella.jview
Class JWheel.DummyAxes

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.jview.JWheel.DummyAxes
All Implemented Interfaces:
Driver, Cloneable, MultiAxes, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
Enclosing class:
JWheel

public static class JWheel.DummyAxes
extends PropertyBundles
implements MultiAxes

Dummy test class.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  boolean open
           
private  int pos
           
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface stella.omc.MultiAxes
KEY_INITZERO
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JWheel.DummyAxes(Map<String,String> mm)
           
 
Method Summary
 boolean close()
          Performs clean-up step when the driver is unloaded.
 Collection<String> getAxesNames()
          Gets the names of the available axes.
 String getDriverName()
          If more than one driver of a certain class is present, but registering is only allowed to a certain driver, we can use this method to distinguish between different instances of the driver.
 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 isOpen()
          Queries the initalization status of the driver.
 boolean offset(String axis, int steps)
          Offsets the filter wheel for the specified number of steps.
 boolean open()
          Performs initialization steps when the driver is loaded for the first time.
 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 class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

pos

private int pos

open

private boolean open
Constructor Detail

JWheel.DummyAxes

public JWheel.DummyAxes(Map<String,String> mm)
Method Detail

getAxesNames

public Collection<String> getAxesNames()
Description copied from interface: MultiAxes
Gets the names of the available axes. Not attached to any I/O action, thus not throwing any Exceptions.

Specified by:
getAxesNames in interface MultiAxes

getMaxPosition

public int getMaxPosition(String axis)
Description copied from interface: MultiAxes
Returns the maximum available position for the given axis.

Specified by:
getMaxPosition in interface MultiAxes
Parameters:
axis - String representing the selected axis.

getMaxStep

public int getMaxStep(String axis)
Description copied from interface: MultiAxes
Returns the maximal steps this axis can travel. Used together with MultiAxes.getMaxPosition(java.lang.String) to estimate the number of steps per position.

Specified by:
getMaxStep in interface MultiAxes

getStep

public int getStep(String axis)
Description copied from interface: MultiAxes
Returns the currently attained step position via a direct query to the underlying driver.

Specified by:
getStep in interface MultiAxes

getPosition

public int getPosition(String axis)
Description copied from interface: MultiAxes
Returns the current position of the spinning driver. It is implementation dependant, if this method queries the driver or returns a cached value.

Specified by:
getPosition in interface MultiAxes
Parameters:
axis - The name of the axis to be zero-setted.
Returns:
A integer denoting one of the attainable positions.

setPosition

public boolean setPosition(String axis,
                           int nr)
Description copied from interface: MultiAxes
Sets a position on the driver. The number of positions must be an acheivable one, otherwise an IllegalArgumentException might be thrown.

Specified by:
setPosition in interface MultiAxes
Parameters:
axis - The name of the axis to be zero-setted.
nr - The numbered position to be attained.
Returns:
True on success

setZeroPosition

public boolean setZeroPosition(String axis)
Description copied from interface: MultiAxes
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.

Specified by:
setZeroPosition in interface MultiAxes
Parameters:
axis - The name of the axis to be zero-setted.
Returns:
True on success

open

public boolean open()
Description copied from interface: Driver
Performs initialization steps when the driver is loaded for the first time. A driver that communicates with the serial port will open the port in this instance.

Specified by:
open in interface Driver
Returns:
True if initialization was successful.

isOpen

public boolean isOpen()
Description copied from interface: Driver
Queries the initalization status of the driver. If the driver has been successfully initalized this method should return true.

Specified by:
isOpen in interface Driver
Returns:
True, if a previous initialization was successful

close

public boolean close()
Description copied from interface: Driver
Performs clean-up step when the driver is unloaded. A serial-port driver will probably close the serial port in this method.

Specified by:
close in interface Driver
Returns:
True if clean-up was successful.

offset

public boolean offset(String axis,
                      int steps)
Description copied from interface: MultiAxes
Offsets the filter wheel for the specified number of steps. The unit of the step is implementation dependant.

Specified by:
offset in interface MultiAxes
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

isContinuous

public boolean isContinuous(String axis)
Description copied from interface: MultiAxes
Returns true, if this axis can be continuousely offset, which is likely the case for rotary stagets, and never the case for linear stages.

Specified by:
isContinuous in interface MultiAxes

getDriverName

public String getDriverName()
Description copied from interface: Driver
If more than one driver of a certain class is present, but registering is only allowed to a certain driver, we can use this method to distinguish between different instances of the driver.

Specified by:
getDriverName in interface Driver