use of org.eclipse.scanning.api.device.IRunnableDeviceService in project gda-core by openGDA.
the class EditMappingStageDialog method findMappingStageOptions.
private void findMappingStageOptions() {
// may be null if not configured for this beamline
options = getService(MappingStageOptions.class);
if (malcolmDeviceName.isPresent()) {
try {
final URI jmsURI = new URI(LocalProperties.getActiveMQBrokerURI());
final IEventService eventService = getService(IEventService.class);
IRunnableDeviceService runnableDeviceService = eventService.createRemoteService(jmsURI, IRunnableDeviceService.class);
IMalcolmDevice malcolmDevice = (IMalcolmDevice) (IRunnableDevice<?>) runnableDeviceService.getRunnableDevice(malcolmDeviceName.get());
List<String> availableAxes = new ArrayList<>(malcolmDevice.getAvailableAxes());
List<String> associatedAxes = null;
if (options != null) {
// Currently these are not Malcolm related
associatedAxes = options.getAssociatedAxes();
}
options = new MappingStageOptions();
options.setFastAxes(availableAxes);
options.setSlowAxes(availableAxes);
if (associatedAxes != null)
options.setAssociatedAxes(associatedAxes);
} catch (Exception e) {
MessageDialog.openError(getShell(), "", "Could not get available axes for malcolm device ''" + malcolmDeviceName.get() + "''");
}
}
}
use of org.eclipse.scanning.api.device.IRunnableDeviceService in project gda-core by openGDA.
the class ProcessingSelectionWizardPage method getRunnableDeviceService.
private IRunnableDeviceService getRunnableDeviceService() throws EventException, URISyntaxException {
if (runnableDeviceService == null) {
IEventService eventService = context.get(IEventService.class);
URI jmsURI = new URI(LocalProperties.getActiveMQBrokerURI());
runnableDeviceService = eventService.createRemoteService(jmsURI, IRunnableDeviceService.class);
}
return runnableDeviceService;
}
Aggregations