Interface IScannableDeviceService
- All Known Implementing Classes:
MockScannableConnector,ScannableDeviceConnectorService
A bundle implements this service and the scanning consumes the service. The tests provide the service directly.
This service is designed to be implemented by GDA8 to provide scannables
(existing ones) to the new system. This can be done easily as
IScannable is a subset of Scannable in GDA8.
It also provides IWritableDetector's. These are analogous to, but not
the same as Detector in GDA. The service wraps both gda.device.Detector into
IWritableDetector and gda.px.detector.Detector into
IWritableDetector. In the first case the model provides the
collection time and anything else required. In the later case the model
provides the file path and omegaStart required.
It mirrors the other connector services like the JMS one, which push the details of getting connections outside the core scanning API using declarative services.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.getRequiredPerScanMonitorNames(String scannableName) Deprecated, for removal: This API element is subject to removal in a future version.this feature should not be used for new code, if this behaviour is required we should add a GDA9 way to do define scannable dependencies<T> IScannable<T> getScannable(String name) Get a scannable by name.Get the names of all scannables known to the connector.default List<IScannable<?>> getScannables(List<String> scannableNames) Returns a list of the scannables with the given namesdefault List<IScannable<?>> getScannables(IPosition position) Returns a list of the scannables for the givenIPositions.default voidhandleDeviceError(String name, Exception e) <T> voidregister(IScannable<T> scannable) Used to register a device.
-
Method Details
-
register
Used to register a device. This is required so that spring may create detectors and call the register method by telling the detector to register itself.- Parameters:
device-
-
getScannableNames
Get the names of all scannables known to the connector.- Returns:
- Throws:
ScanningException
-
getScannable
Get a scannable by name.- Parameters:
name- name of scannable to find- Returns:
- scannable, never
null - Throws:
ScanningException- if no scannable with the given name could be found
-
getScannables
Returns a list of the scannables for the givenIPositions.- Parameters:
position- anIPosition- Returns:
- list of scannables for the given position
- Throws:
ScanningException- if one or more of the scannables cannot be found
-
getScannables
Returns a list of the scannables with the given names- Parameters:
scannableNames- a list of scannable names- Returns:
- list of scannables for the given names
- Throws:
ScanningException- if one or more of the scannables cannot be found
-
getGlobalPerScanMonitorNames
Deprecated, for removal: This API element is subject to removal in a future version.useinstead TODO this method should eventually be removedinvalid reference
IDefaultScanConfigurationsReturns the set of global per-scan monitors that should be added to all scans. This is used to support legacy (GDA8) spring configurations. Should not be called by client code.- Returns:
- global per-scan monitor names
-
getRequiredPerScanMonitorNames
@Deprecated(since="GDA 9.3", forRemoval=true) default Set<String> getRequiredPerScanMonitorNames(String scannableName) Deprecated, for removal: This API element is subject to removal in a future version.this feature should not be used for new code, if this behaviour is required we should add a GDA9 way to do define scannable dependenciesReturns the set of the names required per-scan monitors for the given scannable name. This is used to support legacy (GDA8) spring configurations. Should not be called by client code.- Parameters:
scannableName- scannable to get required per-scan monitor names for- Returns:
- names of required per-scan monitors for the scannable with the given name
-
handleDeviceError
-
invalid reference