From cda2eba93b7580b55031f2ba2363bf67c1703f7d Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Tue, 30 Mar 2021 17:27:42 +0200 Subject: [PATCH] - .NET API: added LogControlBlock and SettingGroupControlBlock classed to added LCBs and setting groups to server data model --- dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs index 3dd82129..93d32b3a 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs @@ -1197,6 +1197,9 @@ namespace IEC61850 } } + /// + /// Report control block (RCB) instance for server data model + /// public class ReportControlBlock { [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] @@ -1223,6 +1226,9 @@ namespace IEC61850 } } + /// + /// GOOSE/GSE control block instance for server data model + /// public class GSEControlBlock { [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] @@ -1257,6 +1263,39 @@ namespace IEC61850 } } + /// + /// Log control block (LCB) instance for server data model + /// + public class LogControlBlock + { + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr LogControlBlock_create(string name, IntPtr parent, string dataSetName, string logRef, byte trgOps, UInt32 intPeriod, + [MarshalAs(UnmanagedType.I1)] bool logEna, [MarshalAs(UnmanagedType.I1)] bool reasonCode); + + internal IntPtr self = IntPtr.Zero; + + public LogControlBlock(string name, LogicalNode parent, string dataSet, string logRef, byte trgOps, UInt32 intPerdiod, bool logEna, bool reasonCode) + { + self = LogControlBlock_create(name, parent.self, dataSet, logRef, trgOps, intPerdiod, logEna, reasonCode); + } + } + + /// + /// Setting group control block for server data model + /// + public class SettingGroupControlBlock + { + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr SettingGroupControlBlock_create(IntPtr parent, byte actSG, byte numOfSGs); + + internal IntPtr self = IntPtr.Zero; + + public SettingGroupControlBlock(LogicalNode parent, UInt32 actSG, UInt32 numOfSGs) + { + self = SettingGroupControlBlock_create(parent.self, (byte) actSG, (byte) numOfSGs); + } + } + public class ClientConnection { [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]