示例#1
0
 public CRLSRMControl(string strsrmno, string ipaddress, int port, SCBase scbs)//构造函数
 {
     m_serverIP   = ipaddress;
     m_serverPort = port;
     m_strSRMNo   = strsrmno;
     scb          = scbs;
     log          = new LOG.Log("--" + m_strSRMNo + "~" + port.ToString(), ".\\堆垛机报文日志\\");
     try
     {
         //订阅一个Socket收到数据的事件
         OSrmSocket.Notify += new NotifyCommandHander(OSrmSocket_Notify);
     }
     catch (Exception ex)
     {
         //log.WriteLog(m_strSRMNo + ": SRM_Notify初始化函数异常" + ex.Message);
     }
 }
示例#2
0
        public GenSongSRM(string strsrmno, string ipaddress, int port, int row, string zone)//构造函数
        {
            m_strSRMNo        = strsrmno;
            m_strport         = port.ToString();
            m_ip              = ipaddress;
            m_zone            = zone;
            aisle             = row * 2;
            scb               = new GenSongSC();
            log               = new LOG.Log(strsrmno + "-业务逻辑", ".\\堆垛机业务逻辑日志\\");
            OSRM              = new CRLSRMControl(m_strSRMNo, ipaddress, port, scb);
            OSRM.EAnlyseData += new CRLSRMControl.AnalyseMessageEventHandler(OSRM_AnalyseMessageEvent);

            CheckConnectTimer.Interval = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["CheckConnectTimer"]);
            CheckConnectTimer.Elapsed += new ElapsedEventHandler(CheckConnectTimer_Elapsed);//若连接失败则检测网络直到连接上了

            //GetSCStatusTimer.Interval = Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["GetStatusTime"]);
            //GetSCStatusTimer.Elapsed += new ElapsedEventHandler(GetSCStatusTimer_Elapsed);//获取堆垛机信息Timer事件
        }