Example #1
0
        public void Stop()
        {
            _shouldStop = true;

            if (_realTimeWatchThread != null)
            {
                _realTimeWatchThread.Join();
                _realTimeWatchThread = null;
            }

            if (_cycleWatchThread != null)
            {
                _cycleWatchThread.Join();
                _cycleWatchThread = null;
            }

            if (_errorWatchThread != null)
            {
                _errorWatchThread.Join();
                _errorWatchThread = null;
            }

            if (_machineInterface != null)
            {
                _machineInterface.UnInitMachineComm();
            }

            if (_serverComm != null)
            {
                _serverComm.Stop();
            }

            _shouldStop = false;
        }