public void setCCDContrast(String telescope, String ccdCamera, String value) throws Exception { _log.info("\"" + telescope + "\" \"" + ccdCamera + "\" \"" + value + "\" setCCDContrast"); try { ccd.setContrast(telescope, ccdCamera, Long.parseLong(value)); } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } catch (Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } }
public String getCCDContrast(String telescope, String ccdCamera) throws Exception { _log.info("\"" + telescope + "\" \"" + ccdCamera + "\" getCCDContrast"); try { return doubleFormat.format(ccd.getContrast(telescope, ccdCamera)).replaceAll(",", ""); } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } catch (Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } }
public void setCCDExposureTime(String telescope, String ccdCamera, String value) throws Exception { _log.info("\"" + telescope + "\" \"" + ccdCamera + "\" \"" + value + "\" setCCDExposureTime"); try { ccd.setExposureTime(telescope, ccdCamera, Double.parseDouble(value)); } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } catch (Exception e) { _log.error(e.getMessage()); errorInstance(); throw new Exception(); } }
public String getCCDUrlImage(final String telescope, final String ccdCamera) throws Exception { _log.info("\"" + telescope + "\" \"" + ccdCamera + "\" getCCDUrlImage"); try { try { ccd.stopContinueMode(telescope, ccdCamera); } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); } String imageId = ccd.startContinueMode(telescope, ccdCamera); String URL = "None"; Boolean available = false; while (!available) { try { _log.info("ID= " + imageId); URL = ccd.getImageURL(telescope, ccdCamera, imageId); available = true; } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); if (e.getMessage().contains("not yet available")) Thread.sleep(1000); else throw new Exception(); } // end-try } // end-while return URL; } catch (CCDTeleoperationException_Exception e) { _log.error(e.getMessage()); throw new Exception(); } catch (Exception e) { _log.error(e.getMessage()); throw new Exception(); } }