/// <summary> /// Read list of attributes. /// </summary> public void ReadList(List <KeyValuePair <GXDLMSObject, int> > list) { byte[][] data = Client.ReadList(list); GXReplyData reply = new GXReplyData(); List <object> values = new List <object>(); foreach (byte[] it in data) { ReadDataBlock(it, reply); if (list.Count != 1 && reply.Value is object[]) { values.AddRange((object[])reply.Value); } else if (reply.Value != null) { //Value is null if data is send in multiple frames. values.Add(reply.Value); } reply.Clear(); } if (values.Count != list.Count) { throw new Exception("Invalid reply. Read items count do not match."); } Client.UpdateValues(list, values); }