public override bool SendKNXMessage(KNXmessage knxMsg) { if (tcpClient.Connected) { return(PrepareAndSendDataToServerIfConnected(knxMsg.toByteArray())); } return(false); }
public void WriteOut(KNXmessage Message) { if (!write) { throw new InvalidOperationException(); } try { string dtFormat = Message.Timestamp.ToString("yyyy-MM-dd HH:mm:ss.fff"); string str = string.Format("{0}; {1}", dtFormat, KNXHelpers.GetStringHex(Message.toByteArray())); if (!string.IsNullOrEmpty(str)) { fReg.WriteLine(str); fReg.Flush(); } } catch { } }