示例#1
0
        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);
        }
示例#2
0
        void comDaHua_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args)
        {
            //int exeid = 0;

            byte[] sendBytes = Encoding.ASCII.GetBytes(args.SerialData);
            ILiveDebug.Instance.WriteLine("IRACCReturnData:" + ILiveUtil.ToHexString(sendBytes));
        }
示例#3
0
 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;
 }
示例#4
0
        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));
        }