/// <summary> /// 接收字节数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Client_DatagramReceived(object sender, TcpDatagramReceivedEventArgs <byte[]> e) { //_master.UpdateDevceBData(Name, e.Datagram); if (CRCMethod.CheckCRC(e.Datagram)) { Bdata = e.Datagram; UpDateTime = DateTime.Now; log.LOG("R:" + CRCMethod.AllByteToString(e.Datagram)); } else { log.LOG("RN:" + CRCMethod.AllByteToString(e.Datagram)); } }
/// <summary> /// 接收文本数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Client_PlaintextReceived(object sender, TcpDatagramReceivedEventArgs <string> e) { //_master.UpdateDevceSData(Name, e.Datagram); Sdata = e.Datagram; UpDateTime = DateTime.Now; }