Example #1
0
        public void Stop()
        {
            if (opcCaches == null)
            {
                return;
            }

            foreach (string key in opcCaches.Keys)
            {
                OpcDaClient opc = opcCaches[key];
                if (opc == null)
                {
                    continue;
                }
                try
                {
                    opc.Stop();
                    TraceManagerForOPC.AppendDebug(key + "已断开连接");
                }
                catch { }
            }
            opcCaches = null;
            IsRuning  = false;
        }