From bfef9ce5e901432507b0100f8363f6f1fa08f84e Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Sat, 7 Mar 2020 16:15:23 +0100 Subject: [PATCH] - .NET API: added IedServer:setServerIdentity method --- dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs index 8e58b129..7faf2af1 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs @@ -1098,7 +1098,10 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedServer_updateQuality(IntPtr self, IntPtr dataAttribute, ushort value); - [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern void IedServer_setServerIdentity(IntPtr self, string vendor, string model, string revision); + + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr IedServer_getAttributeValue(IntPtr self, IntPtr dataAttribute); [UnmanagedFunctionPointer(CallingConvention.Cdecl)] @@ -1372,12 +1375,27 @@ namespace IEC61850 internalConnectionHandler = null; } + /// + /// Set the identify for the MMS identify service + /// + /// the IED vendor name + /// the IED model name + /// the IED revision/version number + public void SetServerIdentity(string vendor, string model, string revision) + { + IedServer_setServerIdentity(self, vendor, model, revision); + } + + /// + /// Check if server is running (accepting client connections) + /// + /// true, if running, false otherwise. public bool IsRunning() - { - return IedServer_isRunning(self); - } + { + return IedServer_isRunning(self); + } - private ControlHandlerInfo GetControlHandlerInfo(DataObject controlObject) + private ControlHandlerInfo GetControlHandlerInfo(DataObject controlObject) { ControlHandlerInfo info;