Package gda.device.enumpositioner
Class EpicsSimpleBinary
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.enumpositioner.EnumPositionerBase
gda.device.enumpositioner.EpicsSimpleBinary
- All Implemented Interfaces:
ControllerRecord,Device,EditableEnumPositioner,EnumPositioner,Scannable,Configurable,Findable,gda.observable.IObservable
@ServiceInterface(EnumPositioner.class)
public class EpicsSimpleBinary
extends EnumPositionerBase
implements EditableEnumPositioner, ControllerRecord
Similar to EpicsValve, except looks at a single pv which can only have positions 0 or 1.
The external names of these positions are names are read from Epics, but can be overwritten (though this is not encouraged)
The external names of these positions are names are read from Epics, but can be overwritten (though this is not encouraged)
EpicsValve should be used if the device uses the proper Epics Valve/Shutter template
-
Field Summary
Fields 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 TypeMethodDescriptioncheckPositionValid(Object position) This default behaviour should be extended by most subclasses! This default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands.voidDefault 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.Gets the name of the controller record, e.g.Returns the current position of the Scannable.Returns the current statusbooleanisBusy()Check if the Scannable is moving/operating.voidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.voidsetPositions(String[] newPositions) Deprecated.voidsetPositions(Collection<String> positions) Deprecated.voidvoidsetReadonly(boolean readonly) Set to true to prevent attempts to change the pv through this classMethods inherited from class gda.device.enumpositioner.EnumPositionerBase
addPosition, addPositions, clearPositions, containsPosition, createFormattedListAcceptablePositions, getNumberOfPositions, getPosition, getPositionerStatus, getPositionIndex, getPositions, getPositionsList, 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, stop, 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.device.EnumPositioner
getPositions, getPositionsList, isInPosMethods 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, stop, toFormattedString, waitWhileBusy
-
Constructor Details
-
EpicsSimpleBinary
public EpicsSimpleBinary()Constructor
-
-
Method Details
-
setPvName
-
getPvName
-
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:
-
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- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
getStatus
Description copied from interface:EnumPositionerReturns the current status- Specified by:
getStatusin interfaceEnumPositioner- Overrides:
getStatusin classEnumPositionerBase- Returns:
- the status
- Throws:
DeviceException- See Also:
-
setPositions
Deprecated.Override the Epics values for the external names of the positions (deprecated).- Specified by:
setPositionsin interfaceEditableEnumPositioner- Parameters:
newPositions- External names to set
-
setPositions
Deprecated.Override the Epics values for the external names of the positions (deprecated).- Specified by:
setPositionsin interfaceEditableEnumPositioner- Parameters:
positions- External names to set
-
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- See Also:
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classEnumPositionerBase- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
checkPositionValid
Description copied from class:ScannableBaseThis default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands. May check limits and other things too. This is the method called by scans on all points before the scan is run.- Specified by:
checkPositionValidin interfaceScannable- Overrides:
checkPositionValidin classEnumPositionerBase- Parameters:
position-- Returns:
- null if position is valid, or returns a description if not.
- See Also:
-
setReadonly
public void setReadonly(boolean readonly) Set to true to prevent attempts to change the pv through this class- Parameters:
readonly-
-