public string InstrStatusString(object o, bool channels = false) { LMDAQ.Instrument inst = (LMDAQ.Instrument)o; CombinedInstrumentProcessingStateSnapshot cps = new CombinedInstrumentProcessingStateSnapshot(inst); return(InstrStatusString(cps, channels)); }
public string InstrStatusString(CombinedInstrumentProcessingStateSnapshot cipss, bool channels = false) { string s = String.Empty; if (cipss == null) { return("No snapshot"); // NEXT: revisit how this occurs, the status update implementation is broken } try { string id = cipss.iss.action.ToString() + " " + cipss.iss.ins.ToString(); // some identifying info if (cipss.iss.ins.IsSuspect) { s = cipss.iss.ins.Reason + ", " + id; } else { String ss = cipss.cs.ToString() + ";"; ss += cipss.iss.ToString(); s = ss + " " + id; if (/*channels && cipss.iss.asy != null*/ cipss.iss.ins.dsid.SRType == InstrType.LMMM || cipss.iss.ins.dsid.SRType == InstrType.PTR32) { s += "; " + cipss.iss.asy.cpss.HitsPerChnImage(); } } } catch (System.ObjectDisposedException) { } return(s); }
public string InstrStatusString(object o, bool channels = false) { Instr.Instrument inst = (Instr.Instrument)o; CombinedInstrumentProcessingStateSnapshot cps = new CombinedInstrumentProcessingStateSnapshot(inst); return InstrStatusString(cps, channels); }
public string InstrStatusString(CombinedInstrumentProcessingStateSnapshot cipss, bool channels = false) { string s = String.Empty; if (cipss == null) return ("No snapshot"); // NEXT: revisit how this occurs, the status update implementation is broken try { string id = cipss.iss.action.ToString() + " " + cipss.iss.ins.ToString(); // some identifying info if (cipss.iss.ins.IsSuspect) s = cipss.iss.ins.Reason + ", " + id; else { String ss = cipss.cs.ToString() + ";"; ss += cipss.iss.ToString(); s = ss + " " + id; if (/*channels && cipss.iss.asy != null*/cipss.iss.ins.dsid.SRType == InstrType.LMMM || cipss.iss.ins.dsid.SRType == InstrType.PTR32) s += "; " + cipss.iss.asy.cpss.HitsPerChnImage(); } } catch (System.ObjectDisposedException) { } return s; }