public class WindmillShutter extends MotorController implements Shutter
| Modifier and Type | Class and Description |
|---|---|
static class |
WindmillShutter.ExposureSimulation
Tries to simulate the shutter movement for exposures.
|
static class |
WindmillShutter.FullTurn
Dumps the full status message to system out, performs a full turn and
dumps the status again.
|
static class |
WindmillShutter.Parameters
Dumps all parameters to system out.
|
static class |
WindmillShutter.Register
Dumps the register value to system out.
|
MotorController.AxesReset, MotorController.Dump, MotorController.Reset, MotorController.Set, MotorController.Status, MotorController.StepAbstractSerialDriver.Available| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFAXIS
The axis name.
|
static String |
DEFDRIVERNAME
The default name of the shutter driver.
|
private static boolean |
DEFINITZERO
Default zero-positioning on init.
|
private static long |
DEFMAXSHUTTERTIME |
private static String |
DEFPARAMETERS
The default initializing parameters.
|
static String |
KEY_MAXSHUTTERTIME
Turning times below this are not suspicious.
|
static String |
KEY_PARAMETERS
The parameters to send on init as a map.
|
private boolean |
shutteropen
After init, the shutter is closed.
|
axis, FAILED, HOME, KEY_ADDRESS, KEY_AXES, KEY_CONTROLLERTYPE, KEY_EEPROMSTORE, KEY_FAILAXISMOVE, KEY_PROTOCOL, KEY_RESPONSECHOP, KEY_RESPONSEDELAY, KEY_RETRYPOS, KEY_SERIALRETRY, KEY_SLEEPAXISMOVE, KEY_STEPTOLERANCE, KEY_TELEGRAM, KEY_WORKAROUND, MCC, OK, OMC, UNDEFINEDPOSITIONinport, KEY_BAUDRATE, KEY_CLOSETIMEOUT, KEY_DATABIT, KEY_FLOWCONTROL, KEY_INBUFFER, KEY_NOTIFYCOOLDOWN, KEY_OUTBUFFER, KEY_PARITYBIT, KEY_PORTNAME, KEY_RECEIVEFRAMING, KEY_RECEIVETHRESHOLD, KEY_RECEIVETIMEOUT, KEY_STOPBIT, KEY_TIMEOUT, LOCK, outport, STATICLOCKKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_INITZEROCONFIG, KEY_CLASS| Constructor and Description |
|---|
WindmillShutter(Map<String,String> config)
Construct a new shutter similar to a motor controller, but defaulting its
name to
DEFDRIVERNAME. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeShutter() |
long |
fullTurn()
A method that performs a full turn of the filter wheel.
|
double[] |
getAllParameters()
Gets all parameters, 1-45.
|
long |
getClosingTime()
Returns the last recorded shutter closing time.
|
int |
getMaxPosition()
Returns the maximumk number of allowed positions, which is two.
|
int |
getMaxPosition(String axis)
Compatibility mode.
|
int |
getMaxStep(String axis)
Returns the maximal steps this axis can travel.
|
long |
getOpeningTime()
Returns the last recorded shutter opening time.
|
protected Map<String,String> |
getParametersFor(String ax)
We have only a single axis, thus, always return a single map.
|
int |
getPosition()
Returns the position of the shutter.
|
int |
getPosition(String axis)
Compatibility mode.
|
long |
getTotalOpenTime()
Returns the time the shutter was fully opened.
|
boolean |
isOpenShutter() |
boolean |
offset(int diff)
Rotates the desired number of steps from the current position, no
nulling.
|
boolean |
offset(String axis,
int pos)
Compatibility mode.
|
boolean |
open()
Sets the shutter into zero position after opening.
|
boolean |
openShutter() |
long |
quarterTurn()
Rotates a hundred steps with half-step resolution.
|
boolean |
setOldZeroPosition()
If the driver has been opened, we set the position of the WindmillShutter
to the zero position.
|
boolean |
setPosition(int onoff)
This shutter runs a dedicated program, it cannot be set from the outside.
|
boolean |
setPosition(String axis,
int pos)
Compatibility mode.
|
boolean |
setZeroPosition()
Make the new zero positioning in the 'regular' way by issuing a X0-H
|
boolean |
setZeroPosition(String axis)
Compatibility mode.
|
axisStop, encapsulate, ensureCommand, errorPower, errorStep, errorStop, getAxesNames, getControllerParameter, getControllerParameterArray, getControllerType, getStatus, getStatus, getStep, getStepResolution, init, isContinuous, powerOff, powerOn, readString, readString, remote, reset, resetAxis, setControllerParameter, waitWhileAxisMoving, waitWhileAxisMoving, writeCommand, writeCommand, writeString, writeStringclose, createPortEventListener, createPortEventListener, deregisterSoleEventListener, disableEvent, enableEvent, getDriverName, isOpen, registerSoleEventListener, resetOriginalParameterscreateDriver, equals, hashCodeaugment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetAxesNames, getStep, isContinuousclose, getDriverName, isOpeninitpublic static final String KEY_PARAMETERS
public static final String KEY_MAXSHUTTERTIME
public static final String DEFDRIVERNAME
private static final boolean DEFINITZERO
private static final String DEFAXIS
private static final String DEFPARAMETERS
private static final long DEFMAXSHUTTERTIME
private boolean shutteropen
public WindmillShutter(Map<String,String> config)
DEFDRIVERNAME.protected Map<String,String> getParametersFor(String ax)
getParametersFor in class MotorControllerpublic boolean open()
throws IOException
open in interface Driveropen in class MotorControllerIOExceptionpublic boolean setPosition(String axis, int pos) throws IOException
setPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.pos - The numbered position to be attained.IOException - If driver communication failed.public boolean offset(String axis, int pos) throws IOException
offset in interface MultiAxesaxis - The name of the axis to be zero-setted.pos - The number of step, positiv or negative in
driver-specific coordinates.IOException - If driver communication failed.public boolean setZeroPosition(String axis) throws IOException
setZeroPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.IOException - If driver communication failed.public int getPosition(String axis) throws IOException
getPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.IOException - If driver communication failed.public int getMaxPosition(String axis) throws IOException
getMaxPosition in interface MultiAxesaxis - String representing the selected axis.IOExceptionpublic int getMaxStep(String axis) throws IOException
MultiAxesMultiAxes.getMaxPosition(java.lang.String) to estimate the number of steps per position.getMaxStep in interface MultiAxesIOExceptionpublic boolean setZeroPosition()
throws IOException
setZeroPosition in interface PositioningIOException - If driver communication failed.public boolean setOldZeroPosition()
throws IOException
IOExceptionpublic int getPosition()
throws IOException
getPosition in interface PositioningIOException - If driver communication failed.public int getMaxPosition()
getMaxPosition in interface Positioningpublic boolean setPosition(int onoff)
setPosition in interface Positioningpublic boolean offset(int diff)
throws IOException
offset in interface PositioningIOExceptionpublic long getOpeningTime()
throws IOException
getOpeningTime in interface ShutterIOException - If driver communication failed.public long getClosingTime()
throws IOException
getClosingTime in interface ShutterIOException - If driver communication failed.public long getTotalOpenTime()
throws IOException
getTotalOpenTime in interface ShutterIOExceptionpublic long fullTurn()
throws IOException
IOExceptionpublic boolean openShutter()
throws IOException
openShutter in interface ShutterIOExceptionpublic boolean closeShutter()
throws IOException
closeShutter in interface ShutterIOExceptionpublic boolean isOpenShutter()
isOpenShutter in interface Shutterpublic double[] getAllParameters()
throws IOException
IOExceptionpublic long quarterTurn()
throws IOException
IOException