Package gda.device.enumpositioner
Class EpicsValve
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.enumpositioner.EnumPositionerBase
gda.device.enumpositioner.EpicsValve
- All Implemented Interfaces:
ControllerRecord,Device,EnumPositioner,Scannable,Configurable,Findable,gda.observable.IObservable,gov.aps.jca.event.MonitorListener,EventListener
- Direct Known Subclasses:
EpicsValveCallback
@ServiceInterface(EnumPositioner.class)
public class EpicsValve
extends EnumPositionerBase
implements gov.aps.jca.event.MonitorListener, ControllerRecord
Control devices using the Epics Valve/Shutter template.
This class operates two Epics records: a record which controls the device and a record which holds the status. The positions are: "Open", "Close" and "Reset". There are 5 values for the status: "Open", "Opening", "Closed", "Closing" and "Fault".
The stop method in this class does nothing as the valves operate too fast for such a method to be meaningful.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EpicsChannelManagerprotected EpicsControllerprotected gov.aps.jca.Channelprotected gov.aps.jca.ChannelFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.protected EnumPositionerStatusGets the name of the controller record, e.g.Returns the name of the Epics valve/shutter template this object is usingReturns the current position of the Scannable.Returns the current statusgda.device.enumpositioner.EpicsValve.ValveStatusbooleanvoidmonitorChanged(gov.aps.jca.event.MonitorEvent arg0) voidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.voidsetCheckDemandInStatus(boolean checkDemandInStatus) If set to 'true', the demand and current valve positions will be checked ingetStatus()- if the current position != demand position then state is set toEnumPositionerStatus.MOVING.voidsetEpicsRecordName(String recordName) Sets the name of the Epics valve/shutter template to use.voidstop()Stop the current move/operation.Methods inherited from class gda.device.enumpositioner.EnumPositionerBase
addPosition, addPositions, checkPositionValid, clearPositions, containsPosition, createFormattedListAcceptablePositions, getNumberOfPositions, getPosition, getPositionerStatus, getPositionIndex, getPositions, getPositionsList, isBusy, isInPos, setPositionerStatus, setPositionsInternal, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, waitWhileBusy
-
Field Details
-
controller
-
currentPositionChnl
protected gov.aps.jca.Channel currentPositionChnl -
currentStatusChnl
protected gov.aps.jca.Channel currentStatusChnl -
channelManager
-
-
Constructor Details
-
EpicsValve
public EpicsValve()Constructor.
-
-
Method Details
-
configure
public void configure()Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase
-
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classScannableBase- Parameters:
position- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
getPosition
Description copied from class:ScannableBaseReturns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
getStatus
Description copied from interface:EnumPositionerReturns the current status- Specified by:
getStatusin interfaceEnumPositioner- Overrides:
getStatusin classEnumPositionerBase- Returns:
- the status
- Throws:
DeviceException
-
fetchEpicsStatus
- Throws:
DeviceException
-
getValveStatus
public gda.device.enumpositioner.EpicsValve.ValveStatus getValveStatus() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
getEpicsRecordName
Returns the name of the Epics valve/shutter template this object is using- Returns:
- the name of the Epics valve/shutter template
-
setEpicsRecordName
Sets the name of the Epics valve/shutter template to use.- Parameters:
recordName-
-
getControllerRecordName
Description copied from interface:ControllerRecordGets the name of the controller record, e.g. EPICS process variable name. For example, in NeXus this value can be written as the value of thecontroller_recordfield for theNXpositionerfor the scannable.- Specified by:
getControllerRecordNamein interfaceControllerRecord- Returns:
- controller record name
- See Also:
-
monitorChanged
public void monitorChanged(gov.aps.jca.event.MonitorEvent arg0) - Specified by:
monitorChangedin interfacegov.aps.jca.event.MonitorListener
-
isCheckDemandInStatus
public boolean isCheckDemandInStatus() -
setCheckDemandInStatus
public void setCheckDemandInStatus(boolean checkDemandInStatus) If set to 'true', the demand and current valve positions will be checked ingetStatus()- if the current position != demand position then state is set toEnumPositionerStatus.MOVING.- Parameters:
checkDemandInStatus-
-