use of org.eclipse.scanning.api.device.IScannableDeviceService in project gda-core by openGDA.
the class BeamPositionPlotter method getBeamSize.
private double getBeamSize() throws ScanningException {
if (beamSize < 0 && mappingStageInfo.getBeamSize() != null) {
try {
final URI jmsUri = new URI(LocalProperties.getActiveMQBrokerURI());
final IScannableDeviceService scannableDeviceService = eventService.createRemoteService(jmsUri, IScannableDeviceService.class);
IScannable<Double> beamScannable = scannableDeviceService.getScannable(mappingStageInfo.getBeamSize());
if (beamScannable != null)
beamSize = beamScannable.getPosition();
} catch (ScanningException e) {
throw e;
} catch (Exception e) {
throw new ScanningException(e);
}
}
return beamSize;
}
Aggregations