private static GXKeyValuePair <GXDLMSObject, GXDLMSCaptureObject> CreateColumn(GXDLMSObjectCollection objects, GXObisCodeCollection obisCodes, ObjectType ot, string ln, int index, DataType dt) { GXDLMSObject obj = objects.FindByLN(ot, ln); if (obj == null) { GXObisCode code = obisCodes.FindByLN(ot, ln, null); obj = GXDLMSClient.CreateObject(ot); obj.LogicalName = ln; if (code != null) { GXDLMSAttributeSettings s = code.Attributes.Find(index); if (s != null) { obj.SetDataType(index, s.Type); obj.SetUIDataType(index, s.UIType); obj.SetValues(index, s.Values); } } else { obj.SetUIDataType(index, dt); } } return(new GXKeyValuePair <GXDLMSObject, GXDLMSCaptureObject>(obj, new GXDLMSCaptureObject(index, 0))); }