private void SendData(byte[] sendbytes) { ILiveDebug.Instance.WriteLine("I3ComSendData" + ILiveUtil.ToHexString(sendbytes)); string cmd = Encoding.GetEncoding(28591).GetString(sendbytes, 0, sendbytes.Length); this.comMusicI3.Send(cmd); }
void comDaHua_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args) { //int exeid = 0; byte[] sendBytes = Encoding.ASCII.GetBytes(args.SerialData); ILiveDebug.Instance.WriteLine("IRACCReturnData:" + ILiveUtil.ToHexString(sendBytes)); }
public void YelaProcess(byte[] yeladata) { ILiveDebug.Instance.WriteLine(ILiveUtil.ToHexString(yeladata)); if (yeladata != null && yeladata.Length > 4) { if (yeladata[1] == 0x19) { if (yeladata[3] == 0x23 || yeladata[2] == 0x81) { //门已经打开 } else { //门已经关闭 } if (yeladata[2] == 0x81) { this.YelaButtonPress(yeladata[4]); // honur=receivedBytes[4]; // Admin[honur]=1; // delay(100); // Admin[honur]=0; } } } // yelaLock = null; }
private string GetCMDString(params byte[] senddata) { byte[] crc = this.Crc_16(senddata); byte[] sendBytes = this.copybyte(senddata, crc); ILiveDebug.Instance.WriteLine("IRACCSendData:" + ILiveUtil.ToHexString(sendBytes)); //label1.Text += this.ToHexString(sendBytes) + "\r\n"; // ILiveDebug.Instance.WriteLine("iracc:" + ILiveUtil.ToHexString(sendBytes)); return(Encoding.GetEncoding(28591).GetString(sendBytes, 0, sendBytes.Length)); }