Example #1
0
        /// <summary>
        ///  Tailored only for LMMM/NPOD!
        ///  this looks at the status block content and sets the cycle status; Rates, Assay Cancelled, Status, are the three I've seen in data so far
        /// </summary>
        /// <param name="sb"></param>
        /// <param name="text"></param>
        /// <param name="stat"></param>
        public void ParseStatusBlock(StreamStatusBlock sb, Cycle cycle)
        {
            //'Assay Cancelled. ' == Cancelled,
            // Completed ==  status block found at end of file or at cycle finish time
            // 'Rates = 0,0,0,0,1,6,0,54,0,0,0,0,1071,546,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0' == Rates (see e.g. GDND/2010_10_20_155930_0.ncd)
            CycleDAQStatus stat = CycleDAQStatus.UnspecifiedTruncation;
            string         text = "";

            if (sb != null)
            {
                sb.Decode(State.rawDataBuff);
                if (!String.IsNullOrEmpty(sb.msg))
                {
                    if (text.StartsWith("Assay Cancelled."))  // dev note: string constants that should live in the LMMMLingo class.
                    {
                        stat = CycleDAQStatus.Cancelled;
                    }
                    else if (text.StartsWith("Rates ="))
                    {
                        stat = CycleDAQStatus.Rates;
                    }
                    else
                    {
                        stat = CycleDAQStatus.Completed;
                    }
                }
                else
                {
                    stat = CycleDAQStatus.UnspecifiedTruncation;
                }
            }
            cycle.DaqStatus = stat;
            cycle.Message   = text;
        }
Example #2
0
 /// <summary>
 ///  Tailored only for LMMM/NPOD! 
 ///  this looks at the status block content and sets the cycle status; Rates, Assay Cancelled, Status, are the three I've seen in data so far
 /// </summary>
 /// <param name="sb"></param>
 /// <param name="text"></param>
 /// <param name="stat"></param>
 public void ParseStatusBlock(StreamStatusBlock sb, Cycle cycle)
 {
     //'Assay Cancelled. ' == Cancelled,
     // Completed ==  status block found at end of file or at cycle finish time
     // 'Rates = 0,0,0,0,1,6,0,54,0,0,0,0,1071,546,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0' == Rates (see e.g. GDND/2010_10_20_155930_0.ncd)
     CycleDAQStatus stat = CycleDAQStatus.UnspecifiedTruncation;
     string text = "";
     if (sb != null)
     {
         sb.Decode(State.rawDataBuff);
         if (!String.IsNullOrEmpty(sb.msg))  // dev note: this needs expansion to support other data stream end conditions, not just the orignal LMMM
         {
             if (text.StartsWith("Assay Cancelled."))  // dev note: string constants that should live in the LMMMLingo class.
                 stat = CycleDAQStatus.Cancelled;
             else if (text.StartsWith("Rates ="))
                 stat = CycleDAQStatus.Rates;
             else
                 stat = CycleDAQStatus.Completed;
         }
         else
         {
             stat = CycleDAQStatus.UnspecifiedTruncation;
         }
     }
     cycle.DaqStatus = stat;
     cycle.Message = text;
 }