diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index ab051de2..9eacc0c9 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -62,6 +62,13 @@ namespace IEC61850 [DllImport ("iec61850", CallingConvention=CallingConvention.Cdecl)] private static extern void MmsServerIdentity_destroy(IntPtr self); + [DllImport ("iec61850", CallingConvention=CallingConvention.Cdecl)] + private static extern void MmsConnection_setLocalDetail (IntPtr self, Int32 localDetail); + + [DllImport ("iec61850", CallingConvention=CallingConvention.Cdecl)] + private static extern Int32 MmsConnection_getLocalDetail (IntPtr self); + + private IntPtr self = IntPtr.Zero; private bool selfDestroy = false; @@ -100,6 +107,14 @@ namespace IEC61850 return serverIdentity; } + public void SetLocalDetail(int localDetail) { + MmsConnection_setLocalDetail (self, localDetail); + } + + public int GetLocalDetail() { + return MmsConnection_getLocalDetail (self); + } + } /// diff --git a/dotnet/example3/Main.cs b/dotnet/example3/Main.cs index 5247bd31..343efc8d 100644 --- a/dotnet/example3/Main.cs +++ b/dotnet/example3/Main.cs @@ -28,8 +28,12 @@ namespace example3 con.ConnectTimeout = 10000; + con.GetMmsConnection().SetLocalDetail(1200); + con.Connect(hostname, 102); + Console.WriteLine("Negotiated PDU size: " + con.GetMmsConnection().GetLocalDetail()); + List serverDirectory = con.GetServerDirectory(false); foreach (string entry in serverDirectory)