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)}"); } }
void DataReceived(object sender, DataReceivedFromServerEventArgs e) { SignalLogs.Log($"[Recieved] {SignalUtils.GetGuiSignalName(e.Data)} 0x{Utils.ByteArrayToHexString(e.Data)}"); }