From 3815b9150518dafd6f517b5eb283499638d06c08 Mon Sep 17 00:00:00 2001 From: fitefis Date: Mon, 29 Apr 2019 16:16:30 +0300 Subject: [PATCH] - added setting of MMS request timeout to .NET --- dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index b17317c4..46e208fd 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -67,7 +67,10 @@ namespace IEC61850 private static extern void MmsConnection_setLocalDetail (IntPtr self, Int32 localDetail); [DllImport ("iec61850", CallingConvention=CallingConvention.Cdecl)] - private static extern Int32 MmsConnection_getLocalDetail (IntPtr self); + private static extern Int32 MmsConnection_getLocalDetail (IntPtr self); + + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + private static extern Int32 MmsConnection_setRequestTimeout(IntPtr self, UInt32 timeoutInMs); private IntPtr self = IntPtr.Zero; @@ -114,7 +117,12 @@ namespace IEC61850 public int GetLocalDetail() { return MmsConnection_getLocalDetail (self); - } + } + + public void SetRequestTimeout(uint timeoutMs) + { + MmsConnection_setRequestTimeout(self, timeoutMs); + } }