public class FocusDeviceImpl extends java.lang.Object implements FocusDeviceInternal
Modifier and Type | Field and Description |
---|---|
protected org.youscope.plugin.microscopeaccess.MicroscopeImpl |
microscope |
protected java.util.Hashtable<java.lang.String,PropertyImpl> |
properties |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(org.youscope.plugin.microscopeaccess.DeviceImpl o) |
void |
deviceStateModified()
Called whenever a device performed an action.
|
java.lang.String |
getDeviceID()
Returns the name of the device.
|
java.lang.String |
getDriverID()
Returns the Identifier under which this device's driver is defined in the library.
|
PropertyImpl[] |
getEditableProperties()
Returns a list of all editable properties of this device.
|
double |
getExplicitDelay()
Returns the explicit device delay in ms.
|
double |
getFocusPosition()
Returns the position of the focus device.
|
java.util.Date |
getInitializationTime()
Returns the time when the device was initialized.
|
java.lang.String |
getLibraryID()
Returns the library name in which this device's driver is defined.
|
PropertyImpl[] |
getProperties()
Returns a list of all properties of this device.
|
PropertyImpl |
getProperty(java.lang.String propertyID)
Returns the property of this device with the given name, or null if this device does not have a property with this name.
|
DeviceType |
getType()
Returns the type of this device.
|
protected void |
initializeDevice(int accessID)
Initializes device
|
protected PropertyImpl |
initializeProperty(java.lang.String propertyID) |
void |
setExplicitDelay(double delay,
int accessID)
Sets the explicit delay in ms.
|
void |
setFocusPosition(double position,
int accessID)
Sets the position of the current focus device.
|
void |
setRelativeFocusPosition(double offset,
int accessID)
Sets the position of the current focus device relative to the current
focus.
|
void |
waitForDevice()
Waits for the device to have finished its latest actions before returning.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDeviceID, getDriverID, getEditableProperties, getExplicitDelay, getInitializationTime, getLibraryID, getProperties, getProperty, getType, setExplicitDelay, waitForDevice
protected final org.youscope.plugin.microscopeaccess.MicroscopeImpl microscope
protected final java.util.Hashtable<java.lang.String,PropertyImpl> properties
protected void initializeDevice(int accessID) throws MicroscopeException
MicroscopeException
public double getFocusPosition() throws MicroscopeException, java.lang.InterruptedException
FocusDeviceInternal
getFocusPosition
in interface FocusDeviceInternal
MicroscopeException
java.lang.InterruptedException
public void setFocusPosition(double position, int accessID) throws MicroscopeLockedException, MicroscopeException, java.lang.InterruptedException
FocusDeviceInternal
setFocusPosition
in interface FocusDeviceInternal
position
- The new position.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeLockedException
MicroscopeException
java.lang.InterruptedException
public void setRelativeFocusPosition(double offset, int accessID) throws MicroscopeLockedException, MicroscopeException, java.lang.InterruptedException
FocusDeviceInternal
setRelativeFocusPosition
in interface FocusDeviceInternal
offset
- The offset.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeLockedException
MicroscopeException
java.lang.InterruptedException
protected PropertyImpl initializeProperty(java.lang.String propertyID) throws MicroscopeException
MicroscopeException
public java.util.Date getInitializationTime()
DeviceInternal
getInitializationTime
in interface DeviceInternal
public java.lang.String getDeviceID()
DeviceInternal
getDeviceID
in interface DeviceInternal
public DeviceType getType()
DeviceInternal
getType
in interface DeviceInternal
public PropertyImpl[] getEditableProperties()
DeviceInternal
getEditableProperties
in interface DeviceInternal
public PropertyImpl[] getProperties()
DeviceInternal
getProperties
in interface DeviceInternal
public PropertyImpl getProperty(java.lang.String propertyID) throws DeviceException
DeviceInternal
getProperty
in interface DeviceInternal
propertyID
- Name of the property.DeviceException
public java.lang.String getLibraryID()
DeviceInternal
getLibraryID
in interface DeviceInternal
public java.lang.String getDriverID()
DeviceInternal
getDriverID
in interface DeviceInternal
public double getExplicitDelay()
DeviceInternal
getExplicitDelay
in interface DeviceInternal
public void setExplicitDelay(double delay, int accessID) throws MicroscopeException, MicroscopeLockedException
DeviceInternal
setExplicitDelay
in interface DeviceInternal
delay
- Delay iin ms.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeException
MicroscopeLockedException
public int compareTo(org.youscope.plugin.microscopeaccess.DeviceImpl o)
compareTo
in interface java.lang.Comparable<org.youscope.plugin.microscopeaccess.DeviceImpl>
public void waitForDevice() throws MicroscopeException, java.lang.InterruptedException
DeviceInternal
waitForDevice
in interface DeviceInternal
MicroscopeException
java.lang.InterruptedException
public void deviceStateModified()