void LogOctets(byte[] buf, int receivedOctets) { var logBuf = new byte[receivedOctets]; Buffer.BlockCopy(buf, 0, logBuf, 0, receivedOctets); log.Debug("Transport Received:'{0}'", OctetBufferDebug.OctetsToHex(logBuf)); }
public override string ToString() { var hexString = OctetBufferDebug.OctetsToHex(data); return(string.Format("[Packet: Command={0:X}, Length={1}, Octets={2}]", Command, Length, hexString)); }