Esempio n. 1
0
 public static RdcMethod Instance(string ip, int DataPort = 8109)
 {
     RdcMethod.ip       = ip;
     RdcMethod.DataPort = DataPort;
     Helper             = new RdcMethod();
     try
     {
         lock (ObjLock)
         {
             RdcMethod.start();
         }
     }
     catch (Exception ex)
     {
         throw new Exception("启动IOServices监听错误:" + ex.Message + ex.StackTrace);
     }
     return(Helper);
 }
Esempio n. 2
0
        public static bool AddVar(List <string> Tags)
        {
            bool rst = false;

            try
            {
                lock (ObjLock)
                {
                    if (RdcMethod.Handle == null)
                    {
                        RdcMethod.start();
                    }
                    rst = RdcMethod.addVar(Tags);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("增加监听变量错误:" + ex.Message + ex.StackTrace);
            }
            return(rst);
        }