@Override @CheckForNull public List<String> getAllIoNames() { try { return Repository.getIoNames(); } catch (final PersistenceException e) { LOG.error("Can't load IO-Names", e); return null; } }
/** * Get the Epics Address string to an IO Name. It the name not found return the string '$$$ * IO-Name NOT found! $$$'. * * @param ioName the IO-Name. * @return the Epics Adress for the given IO-Name. */ @Nonnull public List<String> getIoNamesFromIoc(@Nonnull final String iocName) { try { return Repository.getIoNames(iocName); } catch (final PersistenceException e) { LOG.error("Can't load IO_Names from IOC", e); final ArrayList<String> al = new ArrayList<String>(); al.add("%%% Database not available %%%"); return al; } }
/** * Get the Epics Address string to an IO Name. It the name not found return the string '$$$ * IO-Name NOT found! $$$'. * * @param ioName the IO-Name. * @return Field and the Epics Address String for the given IO-Name separated by ':'. * @throws PersistenceException */ @Override @Nonnull public final String getEpicsAddress(@Nonnull final String ioName, @Nonnull final String field) { // return the Bus-type if ("DTYP".equals(field)) { // at the moment only Profibus DP return "PBDP"; } else if ("DESC".equals(field)) { try { return Repository.getShortChannelDesc(ioName); } catch (final PersistenceException e) { LOG.error("Can't load short channel description", e); return "%%% Database not available %%%"; } } try { return Repository.getEpicsAddressString(ioName); } catch (final PersistenceException e) { LOG.error("Can't load EPICS address string", e); return "%%% Database not available %%%"; } }