/// <inheritdoc cref="IGXPacketHandler.IsTransactionComplete"/> public bool IsTransactionComplete(object sender, string command, Gurux.Communication.GXPacket packet) { if (command == "IsAllTableDataReceived") { GXDLT645Table table = sender as GXDLT645Table; List<object[]> rows = new List<object[]>(1); byte[] data = (byte[])packet.ExtractData(typeof(byte[]), 0, -1); if (Device.Parser.IsError(data)) { return true; } List<byte> reply = new List<byte>(); reply.AddRange((byte[])Device.Parser.GetValue(table.DataID + RowIndex, data, typeof(byte[]))); List<object> values = new List<object>(); int size; GXDLT645TableTemplate t = m_Items[table.DataID] as GXDLT645TableTemplate; for (int pos = 0; pos != table.Columns.Count; ++pos) { object value = GetValue(reply.ToArray(), t.Columns[pos].Type, out size); values.Add(value); reply.RemoveRange(0, size); } if (values.Count != table.Columns.Count) { throw new Exception("Table read failed. Columns count do not match."); } rows.Add(values.ToArray()); table.AddRows((int)(RowIndex - 1), rows, true); return RowIndex == RowCount; } throw new Exception("IsTransactionComplete failed. Unknown command: " + command); }