Interface IPositionListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
ExpressionWatchdog,SolsticeScanMetadataWriter,TopupWatchdog
A positioner moves the motors, taking into account level
and blocks until done.
It is posible to get an event for the move, both when each level
is complete and at the end of the move, using this listener. This
can be useful for designs that to and action which should notify other
objects about moves.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidlevelPerformed(PositionEvent event) Called after a given move level has been reached.default voidpositionChanged(PositionEvent event) Called when the position of anIScannablechanges.static IPositionListenerpositionMovePerformed(Consumer<PositionEvent> consumer) default voidCalled after a given position in a scan has been moved to but before detectors are exposed.default voidpositionPerformed(PositionEvent event) Called after a given position in a scan has been performed.default booleanpositionWillPerform(PositionEvent event) Called just before the position reaches a given valuestatic IPositionListenerpostionPerformedListener(Consumer<PositionEvent> consumer)
-
Method Details
-
positionWillPerform
Called just before the position reaches a given value- Parameters:
event-- Returns:
falseto abort the point but not the overall scan.- Throws:
ScanningException- if an exception occurred responding to this event. Note: throwing an exception will stop the scan. If this behaviour is not desirable the exception should be caught and logged instead
-
levelPerformed
Called after a given move level has been reached.- Parameters:
event-- Throws:
ScanningException- if an exception occurred responding to this event. Note: throwing an exception will stop the scan. If this behaviour is not desirable the exception should be caught and logged instead
-
positionChanged
Called when the position of anIScannablechanges.- Parameters:
event-- Throws:
ScanningException- if an exception occurred responding to this event. Note: throwing an exception will stop the scan. If this behaviour is not desirable the exception should be caught and logged instead
-
positionPerformed
Called after a given position in a scan has been performed.- Parameters:
event-- Throws:
ScanningException- if an exception occurred responding to this event. Note: throwing an exception will stop the scan. If this behaviour is not desirable the exception should be caught and logged instead
-
positionMovePerformed
Called after a given position in a scan has been moved to but before detectors are exposed. TODO: is there a better name for this method- Parameters:
event-- Throws:
ScanningException
-
postionPerformedListener
-
positionMovePerformed
-