From 145bab28c083e0d69a563c27f8b9dd70a958cde4 Mon Sep 17 00:00:00 2001 From: Andrew Moorcroft Date: Wed, 15 Jan 2020 14:44:52 +0000 Subject: [PATCH] Added enumerated status CDC creation method for dotnet. --- dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs index 55f1487c..cc1ad5cf 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs @@ -259,6 +259,9 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] 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_UNICODE = (1 << 3); public const int CDC_OPTION_AC_DLNDA = (1 << 4); @@ -336,6 +339,16 @@ namespace IEC61850 else 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