Ejemplo n.º 1
0
            public void Reset()
            {
                lock (singleton)
                {
                    frameGrabberJpegCompressor        = new STATUS_STRING();
                    frameGrabberJpegCompressor.status = "No Device Connected";
                    frameGrabberJpegCompressor.color  = Color.Red;


                    frameGrabberBitmapCapture        = new STATUS_STRING();
                    frameGrabberBitmapCapture.status = "No Device Connected";
                    frameGrabberBitmapCapture.color  = Color.Red;


                    GPS        = new STATUS_STRING();
                    GPS.status = "No GPS Device, No fixed position set";
                    GPS.color  = Color.Red;

                    Drive        = new STATUS_STRING();
                    Drive.status = "No Drive Connected";
                    Drive.color  = Color.Red;

                    Service        = new STATUS_STRING();
                    Service.status = "Not Running";
                    Service.color  = Color.Red;

                    ServiceVersion        = new STATUS_STRING();
                    ServiceVersion.status = "0.0.0.0";
                    Service.color         = Color.Red;

                    videoChannel1        = new STATUS_STRING();
                    videoChannel1.status = "No Video Connected";
                    videoChannel1.color  = Color.Red;

                    videoChannel2        = new STATUS_STRING();
                    videoChannel2.status = "No Video Connected";
                    videoChannel2.color  = Color.Red;

                    videoChannel3        = new STATUS_STRING();
                    videoChannel3.status = "No Video Connected";
                    videoChannel3.color  = Color.Red;

                    videoChannel4        = new STATUS_STRING();
                    videoChannel4.status = "No Video Connected";
                    videoChannel4.color  = Color.Red;

                    hotswap        = new STATUS_STRING();
                    hotswap.color  = Color.Red;
                    hotswap.status = "not started";

                    lprPlateProcessQueCount       = new STATUS_COUNT();
                    lprPlateProcessQueCount.count = 0;
                    lprPlateProcessQueCount.color = Color.Green;
                }
            }
Ejemplo n.º 2
0
        void ParseStat(string statStr)
        {
            //System_frameGrabberJpegCompressor = (int)600,
            //   System_frameGrabberBitmapCapture,
            //   System_GPS,
            //   System_Service,
            //   System_videoChannel1,
            //   System_videoChannel2,
            //   System_videoChannel3,
            //   System_videoChannel4,
            //   System_Drive,
            //   System_Hotswap,
            //   LPRServiceVersionString

            //  LPR_ProcessQCnt.Snapshot

            STATUS_STRING stat = new STATUS_STRING();

            string[] sp1 = statStr.Split(':');

            if (sp1.Length < 1) return;

            stat.status = sp1[1];

            if (sp1[0].Contains("LPR_ProcessQCnt.Snapshot"))
            {
                STATUS_COUNT statCount = new STATUS_COUNT();

                statCount.count = 0;
                try
                {
                    statCount.count = Convert.ToInt32(sp1[1]);
                }
                catch { }

                lock (m_SystemStatusLock) { m_SystemStatus.LprPlateProcessQueCount = statCount; }
            }
            else if (sp1[0].Contains("System_frameGrabber_2"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.FrameGrabber_1 = stat; }
            }
            else if  (sp1[0].Contains("System_frameGrabber_1"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.FrameGrabber_0 = stat; }

            }
            else if (sp1[0].Contains("System_GPS"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No GPS Device; No fixed position set") || sp1[1].Contains("Have GPS device; No Satellite Acquisition"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.GPS = stat; }

            }
            else if (sp1[0].Contains("System_Service"))
            {
                if ( ! m_ServiceRunning )
                {
                    stat.status = "Service Not Running";
                    stat.color = Color.Red;
                }
                else
                {
                    stat.status = "Service Running";
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Service = stat; }

            }
            else if (sp1[0].Contains("System_videoChannel1"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel1 = stat; }

            }
            else if (sp1[0].Contains("System_videoChannel2"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel2 = stat; }

            }
            else if (sp1[0].Contains("System_videoChannel3"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel3 = stat; }

            }
            else if (sp1[0].Contains("System_videoChannel4"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel4 = stat; }

            }
            else if (sp1[0].Contains("System_Drive"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No drive"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Drive = stat; }

            }
            else if (sp1[0].Contains("System_Hotswap"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("Starting HotSwap"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Hotswap = stat; }
            }
            else if (sp1[0].Contains("LPRServiceVersionString"))
            {
                stat.status = sp1[1].Replace('^','.');

                lock (m_SystemStatusLock) { m_SystemStatus.ServiceVersion= stat; }
            }
        }
Ejemplo n.º 3
0
            public void Reset()
            {
                lock (singleton)
                {
                    frameGrabberJpegCompressor = new STATUS_STRING();
                    frameGrabberJpegCompressor.status = "No Device Connected";
                    frameGrabberJpegCompressor.color = Color.Red;

                    frameGrabberBitmapCapture = new STATUS_STRING();
                    frameGrabberBitmapCapture.status = "No Device Connected";
                    frameGrabberBitmapCapture.color = Color.Red;

                    GPS = new STATUS_STRING();
                    GPS.status = "No GPS Device, No fixed position set";
                    GPS.color = Color.Red;

                    Drive = new STATUS_STRING();
                    Drive.status = "No Drive Connected";
                    Drive.color = Color.Red;

                    Service = new STATUS_STRING();
                    Service.status = "Not Running";
                    Service.color = Color.Red;

                    ServiceVersion = new STATUS_STRING();
                    ServiceVersion.status = "0.0.0.0";
                    Service.color = Color.Red;

                    videoChannel1 = new STATUS_STRING();
                    videoChannel1.status = "No Video Connected";
                    videoChannel1.color = Color.Red;

                    videoChannel2 = new STATUS_STRING();
                    videoChannel2.status = "No Video Connected";
                    videoChannel2.color = Color.Red;

                    videoChannel3 = new STATUS_STRING();
                    videoChannel3.status = "No Video Connected";
                    videoChannel3.color = Color.Red;

                    videoChannel4 = new STATUS_STRING();
                    videoChannel4.status = "No Video Connected";
                    videoChannel4.color = Color.Red;

                    hotswap = new STATUS_STRING();
                    hotswap.color = Color.Red;
                    hotswap.status = "not started";

                    lprPlateProcessQueCount = new STATUS_COUNT();
                    lprPlateProcessQueCount.count = 0;
                    lprPlateProcessQueCount.color = Color.Green;
                }
            }
Ejemplo n.º 4
0
        void ParseStat(string statStr)
        {
            //System_frameGrabberJpegCompressor = (int)600,
            //   System_frameGrabberBitmapCapture,
            //   System_GPS,
            //   System_Service,
            //   System_videoChannel1,
            //   System_videoChannel2,
            //   System_videoChannel3,
            //   System_videoChannel4,
            //   System_Drive,
            //   System_Hotswap,
            //   LPRServiceVersionString

            //  LPR_ProcessQCnt.Snapshot

            STATUS_STRING stat = new STATUS_STRING();

            string[] sp1 = statStr.Split(':');

            if (sp1.Length < 1)
            {
                return;
            }

            stat.status = sp1[1];

            if (sp1[0].Contains("LPR_ProcessQCnt.Snapshot"))
            {
                STATUS_COUNT statCount = new STATUS_COUNT();

                statCount.count = 0;
                try
                {
                    statCount.count = Convert.ToInt32(sp1[1]);
                }
                catch { }

                lock (m_SystemStatusLock) { m_SystemStatus.LprPlateProcessQueCount = statCount; }
            }
            else if (sp1[0].Contains("System_frameGrabber_2"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.FrameGrabber_1 = stat; }
            }
            else if (sp1[0].Contains("System_frameGrabber_1"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.FrameGrabber_0 = stat; }
            }
            else if (sp1[0].Contains("System_GPS"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No GPS Device; No fixed position set") || sp1[1].Contains("Have GPS device; No Satellite Acquisition"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.GPS = stat; }
            }
            else if (sp1[0].Contains("System_Service"))
            {
                if (!m_ServiceRunning)
                {
                    stat.status = "Service Not Running";
                    stat.color  = Color.Red;
                }
                else
                {
                    stat.status = "Service Running";
                    stat.color  = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Service = stat; }
            }
            else if (sp1[0].Contains("System_videoChannel1"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel1 = stat; }
            }
            else if (sp1[0].Contains("System_videoChannel2"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel2 = stat; }
            }
            else if (sp1[0].Contains("System_videoChannel3"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel3 = stat; }
            }
            else if (sp1[0].Contains("System_videoChannel4"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No Video Connected"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.VideoChannel4 = stat; }
            }
            else if (sp1[0].Contains("System_Drive"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("No drive"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Drive = stat; }
            }
            else if (sp1[0].Contains("System_Hotswap"))
            {
                stat.status = sp1[1];
                if (sp1[1].Contains("Starting HotSwap"))
                {
                    stat.color = Color.Red;
                }
                else
                {
                    stat.color = Color.Green;
                }
                lock (m_SystemStatusLock) { m_SystemStatus.Hotswap = stat; }
            }
            else if (sp1[0].Contains("LPRServiceVersionString"))
            {
                stat.status = sp1[1].Replace('^', '.');

                lock (m_SystemStatusLock) { m_SystemStatus.ServiceVersion = stat; }
            }
        }