From 56bda24641afe3f09f64087b2943dbf40e3aedbf Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Wed, 24 Mar 2021 16:13:03 +0100 Subject: [PATCH] - .NET API: Added method ReportControlBlock.SetPreconfiguredClient --- dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs index 905e600c..d5184020 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs @@ -1203,6 +1203,9 @@ namespace IEC61850 static extern IntPtr ReportControlBlock_create(string name, IntPtr parent, string rptId, [MarshalAs(UnmanagedType.I1)] bool isBuffered, string dataSetName, uint confRef, byte trgOps, byte options, uint bufTm, uint intgPd); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern void ReportControlBlock_setPreconfiguredClient(IntPtr self, byte type, [Out] byte[] buf); + public IntPtr self = IntPtr.Zero; public ReportControlBlock(string name, LogicalNode parent, string rptId, bool isBuffered, @@ -1210,6 +1213,14 @@ namespace IEC61850 { self = ReportControlBlock_create(name, parent.self, rptId, isBuffered, dataSetName, confRev, trgOps, options, bufTm, intgPd); } + + public void SetPreconfiguredClient(byte[] clientAddress) + { + if (clientAddress.Length == 4) + ReportControlBlock_setPreconfiguredClient(self, 4, clientAddress); + else if (clientAddress.Length == 6) + ReportControlBlock_setPreconfiguredClient(self, 6, clientAddress); + } } public class ClientConnection