Example #1
0
        public string InstrStatusString(object o, bool channels = false)
        {
            LMDAQ.Instrument inst = (LMDAQ.Instrument)o;
            CombinedInstrumentProcessingStateSnapshot cps = new CombinedInstrumentProcessingStateSnapshot(inst);

            return(InstrStatusString(cps, channels));
        }
Example #2
0
        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);
        }
Example #3
0
 public string InstrStatusString(object o, bool channels = false)
 {
     Instr.Instrument inst = (Instr.Instrument)o;
     CombinedInstrumentProcessingStateSnapshot cps = new CombinedInstrumentProcessingStateSnapshot(inst);
     return InstrStatusString(cps, channels);
 }
Example #4
0
 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;
 }