예제 #1
0
        public ProcessReceiver(object obj)
        {
            main       = (WindLidarServer)obj;
            isShutdown = true;

            waitHandle = new ManualResetEvent(false);
            stsHandle  = new ManualResetEvent(false);
            staHandle  = new ManualResetEvent(false);
            othHandle  = new ManualResetEvent(false);

            log        = new LogMessageCallback(main.logMessage);
            stsMessage = new StsMessageCallback(main.stsMessage);
            ftsMessage = new FtsMessageCallback(main.ftsMessage);
            stsDB      = new StsMessageDBCallback(main.stsDB);
            stsProcess = new StatusProcess(this);
            ftsProcess = new FileProcess(this);
            atsProcess = new FileProcess(this);
            othProcess = new FileProcess(this);
            almProcess = new AlarmProcess(this);

            server = null;
        }
예제 #2
0
        public void abort()
        {
            isShutdown = true;
            Thread.Sleep(1000);
            if (processThread != null)
            {
                processThread.Abort();
            }
            if (stsThread != null)
            {
                stsThread.Abort();
            }
            if (staThread != null)
            {
                staThread.Abort();
            }
            if (othThread != null)
            {
                othThread.Abort();
            }
            // socket
            if (server != null)
            {
                server.Close();
            }
            server        = null;
            processThread = null;
            stsThread     = null;
            staThread     = null;
            othThread     = null;

            stsProcess = null;
            ftsProcess = null;
            atsProcess = null;
            othProcess = null;
            almProcess = null;
        }