Added enumerated status CDC creation method for dotnet.

pull/201/head
Andrew Moorcroft 6 years ago
parent 0237c9b95c
commit 145bab28c0

@ -259,6 +259,9 @@ namespace IEC61850
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr CDC_DPL_create(string name, IntPtr parent, uint options); static extern IntPtr CDC_DPL_create(string name, IntPtr parent, uint options);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr CDC_ENS_create(string name, IntPtr parent, uint options);
public const int CDC_OPTION_DESC = (1 << 2); public const int CDC_OPTION_DESC = (1 << 2);
public const int CDC_OPTION_DESC_UNICODE = (1 << 3); public const int CDC_OPTION_DESC_UNICODE = (1 << 3);
public const int CDC_OPTION_AC_DLNDA = (1 << 4); public const int CDC_OPTION_AC_DLNDA = (1 << 4);
@ -336,6 +339,16 @@ namespace IEC61850
else else
return null; return null;
} }
public static DataObject Create_CDC_ENS(ModelNode parent, string name, uint options)
{
IntPtr self = CDC_ENS_create(name, parent.self, options);
if (self != IntPtr.Zero)
return new DataObject(self);
else
return null;
}
} }
public class DataObject : ModelNode public class DataObject : ModelNode

Loading…
Cancel
Save