示例#1
0
 public void Send(byte[] id, params byte[] data)
 {
     if (this.client.IsConnected)
     {
         var bytesList = new List <byte>(id);
         bytesList.AddRange(data);
         var bytes = bytesList.ToArray();
         this.client.Send(bytes.ToArray());
         SignalLogs.Log($"[Sent] {SignalUtils.GetPlcSignalName(bytes)} 0x{Utils.ByteArrayToHexString(bytes)}");
     }
 }
示例#2
0
 void DataReceived(object sender, DataReceivedFromServerEventArgs e)
 {
     SignalLogs.Log($"[Recieved] {SignalUtils.GetGuiSignalName(e.Data)} 0x{Utils.ByteArrayToHexString(e.Data)}");
 }