public void MethodRequest(GXDLMSObject target, int methodIndex, object data, string text, GXReplyData reply) { byte[][] tmp; if (data is byte[]) { tmp = client.Method(target, methodIndex, data, DataType.Array); } else { tmp = client.Method(target, methodIndex, data, GXDLMSConverter.GetDLMSDataType(data)); } int pos = 0; string str = string.Format("Method object {0}, interface {1}", target.LogicalName, target.ObjectType); foreach (byte[] it in tmp) { reply.Clear(); if (tmp.Length != 1) { ++pos; NotifyProgress(text, pos, tmp.Length); } ReadDataBlock(it, str, reply); } NotifyProgress(text, 1, 1); }
public void MethodRequest(GXDLMSObject target, int methodIndex, object data, GXReplyData reply) { lastTransaction = DateTime.Now; byte[][] tmp; if (data is byte[]) { tmp = client.Method(target, methodIndex, data, DataType.Array); } else { tmp = client.Method(target, methodIndex, data, GXDLMSConverter.GetDLMSDataType(data)); } ReadDataBlock(tmp, "", reply); }
/// <summary> /// Method attribute value. /// </summary> public void Method(GXDLMSObject it, int attributeIndex, object value, DataType type) { GXReplyData reply = new GXReplyData(); ReadDataBlock(Client.Method(it, attributeIndex, value, type), reply); }
public void MethodRequest(GXDLMSObject target, int methodIndex, object data, GXReplyData reply) { ReadDataBlock(client.Method(target, methodIndex, data, DataType.None), "", reply); }