Пример #1
0
        } /* ReadNextScanLine */

        public void  SaveRawCtdData(StreamWriter sw,
                                    PicesMsgQueue msgQueue,
                                    ref bool successful
                                    )
        {
            ulong  bytesRead    = 0;
            ulong  bytesWritten = 0;
            ushort rec          = GetNextRecord();

            ulong tenMeg = 10 * 1024 * 1024;

            while (!eof)
            {
                bytesRead += 2;

                if ((msgQueue != null) && ((bytesRead % tenMeg) == 0))
                {
                    msgQueue.AddMsg("Bytes Read: " + bytesRead.ToString("##,###,###,##0") + "\t" +
                                    "Ctd-Data-Written: " + bytesWritten.ToString("##,###,###,##0")
                                    );
                }

                //if  (bytesRead >=  377711000)
                {
                    Sipper3DecodeRec dr = decodeRecs[rec];
                    if (!dr.ImageData())
                    {
                        byte deviceId = dr.SensorNum();
                        if ((deviceId == 16) && dr.Text())
                        {
                            sw.Write(dr.SensorData());
                            ++bytesWritten;
                        }
                    }
                }
                rec = GetNextRecord();
            }

            if (msgQueue != null)
            {
                msgQueue.AddMsg("");
                msgQueue.AddMsg("Done Scanning");
                msgQueue.AddMsg("Bytes Read: " + bytesRead.ToString("##,###,###,##0") + "\t" +
                                "Ctd-Data-Written: " + bytesWritten.ToString("##,###,###,##0")
                                );
            }

            successful = true;
        } /* SaveRawCtdData */
Пример #2
0
        } /* ReportData */

        public void  ReportData(Sipper3DecodeRec dataRec,
                                int scanLine
                                )
        {
            byte deviceId = dataRec.SensorNum();

            if ((deviceId < 0) || (deviceId >= reporters.Length))
            {
                return;
            }

            if (reporters[deviceId] == null)
            {
                reporters[deviceId] = (new Instrument("Temp", "Temp")).CreateInstrumentDataReport(this, deviceId);
            }

            reporters[deviceId].ReportData(dataRec.Text(), dataRec.SensorData(), scanLine);
        } /* ReportData */