From 544b30186116fb472a1214d881ff3e637e8f1a28 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Mon, 22 Apr 2019 14:59:21 +0200 Subject: [PATCH] - .NET API: added missing native function declarations --- dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs | 5 ++++- dotnet/IEC61850forCSharp/ReportControlBlock.cs | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index 71d608a7..4f613bb9 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -393,7 +393,10 @@ namespace IEC61850 static extern IntPtr IedConnection_createWithTlsSupport(IntPtr tlsConfig); [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] - static extern void IedConnection_destroy(IntPtr self); + static extern void IedConnection_destroy(IntPtr self); + + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern int Connection_getState(IedConnection self); [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedConnection_setConnectTimeout(IntPtr self, UInt32 timeoutInMs); diff --git a/dotnet/IEC61850forCSharp/ReportControlBlock.cs b/dotnet/IEC61850forCSharp/ReportControlBlock.cs index dfdfa824..9f7b7d17 100644 --- a/dotnet/IEC61850forCSharp/ReportControlBlock.cs +++ b/dotnet/IEC61850forCSharp/ReportControlBlock.cs @@ -131,7 +131,11 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void ClientReportControlBlock_setPurgeBuf (IntPtr self, [MarshalAs(UnmanagedType.I1)] bool purgeBuf); - [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + static extern bool ClientReportControlBlock_hasResvTms(IntPtr self); + + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern Int16 ClientReportControlBlock_getResvTms (IntPtr self); [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]