Class ScannableGroupNamed
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.scannablegroup.ScannableGroup
gda.device.scannable.scannablegroup.ScannableGroupNamed
- All Implemented Interfaces:
Device,Scannable,IScannableGroup,IScannableGroupNamed,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
- Direct Known Subclasses:
AssemblyBase,DetectorArm,SampleStage
@ServiceInterface(IScannableGroupNamed.class)
public class ScannableGroupNamed
extends ScannableGroup
implements IScannableGroupNamed
A logical group of Scannables that allows multiple Scannables to be moved at the same time, or allows further
validation for movement, e.g.
MotomanRobotScannableGroup's validation on simultaneous KTheta, KPhi movement,
that can additionally be managed through the Finder.
inputNames, extraNames and outputFormat are taken from the constituent Scannables, not maintained as a field of the
Group.
A ScannableGroupNamed is a logical group of Scannables that can be created through Spring instantiation or by adding
Scannables from the Jython console, or through the use of Scannable names with the Finder.
Configuring a ScannableGroup configures all of its component Scannables and adds itself as an IObserver, and the
default behaviour of adding a Scannable to an already configured ScannableGroup is to configure the Scannable
(although it can instead un-configure the group, allowing it to be configured again).
ScannableGroups can add, remove or set Scannables by using the Scannables or their names, and additionally can remove
Scannables by their index.
The names within a ScannableGroupNamed are simply taken from the Scannables, not maintained seperately. For a more
lightweight Name/Scannable group management object, see AssemblyBase, which maintains Scannables and Names
seperately until configured.-
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
ConstructorsConstructorDescriptionScannableGroupNamed(String name) ScannableGroupNamed(String name, Scannable[] groupMembers) ScannableGroupNamed(String name, String[] groupMembersNames) Cannot have equivalent Listconstructor as would mask List constructor ScannableGroupNamed(String name, List<Scannable> groupMembers) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupMember(Scannable groupMember, boolean toConfigure) Adds a scannable to this group.voidaddGroupMemberByName(String name) getGroupMemberByName(String name) final String[]voidremoveGroupMemberName(String name) voidsetGroupMembersNames(List<String> scannableNames) The default (scannableNames, false) implementation of setGroupMembersNames(names, toConfigure): if this group is already configured, it will be unconfigured to allow all group members to be configured by calling this.configure()voidsetGroupMembersNamesWithArray(String[] scannableNames) The default (scannableNames, false) implementation of setGroupMembersNamesWithArray(names, toConfigure)voidsetGroupMembersNamesWithArray(String[] scannableNames, boolean toConfigure) voidsetGroupMembersNamesWithList(List<String> scannableNames, boolean toConfigure) Methods inherited from class gda.device.scannable.scannablegroup.ScannableGroup
__getattr__, addGroupMember, asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, configure, extractPositionsFromObject, getExtraNames, getGroupMember, getGroupMemberNames, getGroupMembers, getGroupMembersAsArray, getInputNames, getOutputFormat, getPosition, getUnits, isBusy, isDemandAllScannablePositions, removeGroupMemberByIndex, removeGroupMemberByScannable, setDemandAllScannablePositions, setExtraNames, setGroupMembers, setGroupMembersWithArray, setGroupMembersWithList, setInputNames, stop, toFormattedString, toString, update, waitWhileBusyMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, externalToInternal, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, validateScannable, valueUnavailableString, 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
configure, 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.scannablegroup.IScannableGroup
addGroupMember, getGroupMemberNames, getGroupMembers, getGroupMembersAsArray, getUnits, removeGroupMemberByIndex, removeGroupMemberByScannable, setGroupMembers, setGroupMembersWithArray, setGroupMembersWithListMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedString, waitWhileBusy
-
Constructor Details
-
ScannableGroupNamed
public ScannableGroupNamed() -
ScannableGroupNamed
- Throws:
FactoryException
-
ScannableGroupNamed
- Throws:
FactoryException
-
ScannableGroupNamed
-
ScannableGroupNamed
Cannot have equivalent Listconstructor as would mask List constructor - Parameters:
name-groupMembersNames-- Throws:
FactoryException
-
-
Method Details
-
getGroupMembersNamesAsArray
- Specified by:
getGroupMembersNamesAsArrayin interfaceIScannableGroupNamed
-
getGroupMembersNames
- Specified by:
getGroupMembersNamesin interfaceIScannableGroupNamed
-
setGroupMembersNames
The default (scannableNames, false) implementation of setGroupMembersNames(names, toConfigure): if this group is already configured, it will be unconfigured to allow all group members to be configured by calling this.configure()- Specified by:
setGroupMembersNamesin interfaceIScannableGroupNamed- Parameters:
scannableNames- a List of the names of the scannables to add to the group- Throws:
FactoryException- if configuring a Scannable throws this Exception
-
setGroupMembersNamesWithList
public void setGroupMembersNamesWithList(List<String> scannableNames, boolean toConfigure) throws FactoryException - Specified by:
setGroupMembersNamesWithListin interfaceIScannableGroupNamed- Parameters:
scannableNames- - the names of the scannables to add to the grouptoConfigure- behaviour if this group is already configured: whether to configure the new members (true) or unconfigure this group (false)- Throws:
FactoryException- if configuring a Scannable throws this Exception
-
setGroupMembersNamesWithArray
public void setGroupMembersNamesWithArray(String[] scannableNames, boolean toConfigure) throws FactoryException - Specified by:
setGroupMembersNamesWithArrayin interfaceIScannableGroupNamed- Parameters:
scannableNames- - the names of the scannables to add to the grouptoConfigure- behaviour if this group is already configured: whether to configure the new members (true) or unconfigure this group (false)- Throws:
FactoryException- if configuring a Scannable throws this Exception
-
setGroupMembersNamesWithArray
The default (scannableNames, false) implementation of setGroupMembersNamesWithArray(names, toConfigure)- Specified by:
setGroupMembersNamesWithArrayin interfaceIScannableGroupNamed- Parameters:
scannableNames- - the names of the scannables to add to the group- Throws:
FactoryException- if configuring a Scannable throws this Exception
-
removeGroupMemberName
- Specified by:
removeGroupMemberNamein interfaceIScannableGroupNamed- Throws:
DeviceException
-
getGroupMemberByName
- Specified by:
getGroupMemberByNamein interfaceIScannableGroupNamed- Throws:
DeviceException
-
addGroupMemberByName
- Specified by:
addGroupMemberByNamein interfaceIScannableGroupNamed- Throws:
FactoryException
-
addGroupMember
Description copied from class:ScannableGroupAdds a scannable to this group. This will not add a Scannable if it is already included- Specified by:
addGroupMemberin interfaceIScannableGroup- Overrides:
addGroupMemberin classScannableGroup- Parameters:
groupMember-toConfigure- - controls behaviour if the ScannableGroup is already configured: whether to configure the scannable (true) or set the ScannableGroue to be unconfigured (false)- Throws:
FactoryException
-