public interface StateDeviceInternal extends DeviceInternal
Modifier and Type | Method and Description |
---|---|
int |
getNumStates()
Returns the number of states.
|
int |
getState()
Returns the current state.
|
java.lang.String |
getStateLabel()
Returns the current state label.
|
java.lang.String |
getStateLabel(int state)
Returns the label of the given state.
|
java.lang.String[] |
getStateLabels()
Returns a list of all labels of the states of this device.
|
void |
setState(int state,
int accessID)
Sets the current state.
|
void |
setState(java.lang.String label,
int accessID)
Sets the current state.
|
void |
setStateLabel(int state,
java.lang.String label,
int accessID)
Sets the label for the given state.
|
void |
setStateLabels(java.lang.String[] labels,
int accessID)
Sets all state labels.
|
getDeviceID, getDriverID, getEditableProperties, getExplicitDelay, getInitializationTime, getLibraryID, getProperties, getProperty, getType, setExplicitDelay, waitForDevice
int getNumStates()
int getState() throws MicroscopeException
MicroscopeException
java.lang.String[] getStateLabels()
java.lang.String getStateLabel() throws MicroscopeException
MicroscopeException
java.lang.String getStateLabel(int state) throws java.lang.ArrayIndexOutOfBoundsException
state
- State for which the label should be queried.java.lang.ArrayIndexOutOfBoundsException
void setStateLabel(int state, java.lang.String label, int accessID) throws java.lang.ArrayIndexOutOfBoundsException, MicroscopeException, MicroscopeLockedException
state
- The state for which the label should be setlabel
- The label for the state.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.java.lang.ArrayIndexOutOfBoundsException
MicroscopeException
MicroscopeLockedException
void setStateLabels(java.lang.String[] labels, int accessID) throws MicroscopeException, java.lang.ArrayIndexOutOfBoundsException, MicroscopeLockedException
labels
- New labels for the states.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeException
java.lang.ArrayIndexOutOfBoundsException
- Thrown if length of labels is wrong, in one or the other direction.MicroscopeLockedException
void setState(int state, int accessID) throws MicroscopeException, java.lang.ArrayIndexOutOfBoundsException, MicroscopeLockedException
state
- State which should be set.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeException
java.lang.ArrayIndexOutOfBoundsException
MicroscopeLockedException
void setState(java.lang.String label, int accessID) throws MicroscopeException, DeviceException, MicroscopeLockedException
label
- Label of the state which should be set.accessID
- The access ID of the current microscope object. If the microscope is locked with a different accessID, a MicroscopeLockedException is thrown.MicroscopeException
DeviceException
- Thrown if label is unknown.MicroscopeLockedException