public Boolean HasStatus(int bildID, STATUS bsCheck) { Bild bild = GetBild(bildID); if (bild != null) { STATUS bs = (STATUS)bild.Status; return(bs.HasFlag(bsCheck)); } return(false); }
public override string GetDeviceStatus() { if (fli == null) { return(null); } try { STATUS status = fli.GetDeviceStatus(); if (status.HasFlag(STATUS.FILTER_POSITION_UNKNOWN)) { return("Unknow"); } else if (status.HasFlag(STATUS.FILTER_STATUS_HOME)) { return("Home"); } else if (status.HasFlag(STATUS.FILTER_STATUS_HOME_SUCCEEDED)) { return("Succeeded"); } else if (status.HasFlag(STATUS.FILTER_STATUS_HOMING)) { return("Homing"); } else { return(null); } } catch (Exception e) { return(e.Message); } }
public override string GetDeviceStatus() { if (fli == null) { return(null); } try { STATUS status = fli.GetDeviceStatus(); //Console.WriteLine((STATUS)status.ToString()); if (status.HasFlag(STATUS.CAMERA_STATUS_UNKNOWN)) { return("Unknow"); } else if (status.HasFlag(STATUS.CAMERA_STATUS_EXPOSING)) { return("Exposing"); } else if (status.HasFlag(STATUS.CAMERA_STATUS_READING_CCD)) { return("Reading"); } else if (status.HasFlag(STATUS.CAMERA_STATUS_MASK)) { return("Mask"); } else if (status.HasFlag(STATUS.CAMERA_STATUS_WAITING_FOR_TRIGGER)) { return("Wait Trigger"); } else if (status.HasFlag(STATUS.CAMERA_STATUS_IDLE)) { return("Idle"); } else { return(null); } } catch (Exception e) { return(e.Message); } }