Package gda.scan
Class ImplicitScanObject
java.lang.Object
gda.scan.ScanObject
gda.scan.ImplicitScanObject
- All Implemented Interfaces:
IImplicitScanObject,IScanObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface uk.ac.gda.api.scan.IScanObject
IScanObject.ScanObjectType -
Field Summary
Fields inherited from class gda.scan.ScanObject
scannable -
Constructor Summary
ConstructorsConstructorDescriptionImplicitScanObject(Scannable scannable, Object start, Object stop, Object step) -
Method Summary
Modifier and TypeMethodDescriptionChecks whether the points in this scan object are valid.voidFill the array of points to move the scannable tointThe number of points this object can move its scannable to.getStart()getStep()getStop()getType()booleanhasStart()booleanhasStep()booleanhasStop()moveStep()Move the scannable to its next positionMove the scannable to the start positionvoidsetNumberPoints(int number) Set the number of points to move to.toString()Methods inherited from class gda.scan.ScanObject
getScannableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.gda.api.scan.IScanObject
getScannable
-
Constructor Details
-
ImplicitScanObject
- Parameters:
scannable-start-stop-step-
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceIScanObject
-
setNumberPoints
public void setNumberPoints(int number) Description copied from interface:IImplicitScanObjectSet the number of points to move to. This should be used when the scan object does not initially have enough information to know this, for example if only start and stop are specified - this can be the case for scannable s2 in the scan commandscan s1 0 5 1 s2 0 10, where the second scannable only has start and step defined. This method will be called with to set the size of this scan object to be the same as that for scannable s1.- Specified by:
setNumberPointsin interfaceIImplicitScanObject- Parameters:
number-
-
getNumberPoints
public int getNumberPoints()Description copied from interface:IScanObjectThe number of points this object can move its scannable to.- Specified by:
getNumberPointsin interfaceIScanObject- Returns:
- the size of the array of points
-
arePointsValid
Description copied from interface:IScanObjectChecks whether the points in this scan object are valid. Note that forIImplicitScanObjects,IImplicitScanObject.calculateScanPoints()must have been called first.- Specified by:
arePointsValidin interfaceIScanObject- Returns:
nullif all points in the array of points are valid for the scannable, or the toString() of the point which is unacceptable- Throws:
DeviceException
-
moveToStart
Description copied from interface:IScanObjectMove the scannable to the start position- Specified by:
moveToStartin interfaceIScanObject- Throws:
Exception
-
moveStep
Description copied from interface:IScanObjectMove the scannable to its next position- Specified by:
moveStepin interfaceIScanObject- Throws:
Exception
-
calculateScanPoints
public void calculateScanPoints()Fill the array of points to move the scannable to- Specified by:
calculateScanPointsin interfaceIImplicitScanObject
-
hasStart
public boolean hasStart()- Specified by:
hasStartin interfaceIScanObject- Returns:
- true if the object has a defined start position
-
hasStop
public boolean hasStop()- Specified by:
hasStopin interfaceIScanObject- Returns:
- true if the object has a defined stop position (i.e. defines an entire scan)
-
hasStep
public boolean hasStep()- Specified by:
hasStepin interfaceIImplicitScanObject
-
getStart
- Specified by:
getStartin interfaceIImplicitScanObject
-
getStop
- Specified by:
getStopin interfaceIImplicitScanObject
-
getStep
- Specified by:
getStepin interfaceIImplicitScanObject
-
toString
-