/// <summary> /// 에러설정 이벤트 메소드 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HandleErrorStatusSetChanged(object sender, ErrorSetEventArgs e) { //tabPageControl s = (tabPageControl)sender; // Diagnostic message for demonstration purposes. Console.WriteLine("Change error check info : slaveid({0})", e.ErrorStatusSetMessage.slaveId); //workerThread.Suspend(); //if( e.ErrorStatusSetMessage.startAddress == 0x6011 ) { System.Threading.Thread.Sleep(100); this.mComport.ReadExisting(); System.Threading.Thread.Sleep(200); } //this.mComport.WriteBufferSize = e.ErrorStatusSetMessage.message.Length; //string test = this.mComport.ReadExisting(); this.mComport.Write(e.ErrorStatusSetMessage.message); //System.Threading.Thread.Sleep(100); //int size = this.mComport.ReadBufferSize; //byte[] readBuffer = new byte[size]; //int rtn = this.mComport.Read(readBuffer,0, size); //Utils util = new Utils(); //test += util.ByteArrayToHexString(readBuffer); //this.mComm.ModbusSerialAsciiWriteMultipleRegisters(this.master, e.ErrorStatusSetMessage.slaveId, e.ErrorStatusSetMessage.startAddress, e.ErrorStatusSetMessage.data); }
protected void OnShapeChanged(ErrorSetEventArgs e) { EventHandler <ErrorSetEventArgs> handler = ErrorStatusSetChanged; if (handler != null) { handler(this, e); } }