From 1e16bc883f68ab0366f4cf3d699d298bb36afaa5 Mon Sep 17 00:00:00 2001 From: Jarkko Peltonen Date: Thu, 30 Mar 2017 17:38:56 +0300 Subject: [PATCH 1/4] Added Triggering of General Interrogation --- dotnet/IEC61850forCSharp/ReportControlBlock.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dotnet/IEC61850forCSharp/ReportControlBlock.cs b/dotnet/IEC61850forCSharp/ReportControlBlock.cs index ad9f5da3..4ef71405 100644 --- a/dotnet/IEC61850forCSharp/ReportControlBlock.cs +++ b/dotnet/IEC61850forCSharp/ReportControlBlock.cs @@ -154,6 +154,9 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedConnection_uninstallReportHandler(IntPtr connection, string rcbReference); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern void IedConnection_triggerGIReport(IntPtr connection, out int error, string rcbReference); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InternalReportHandler (IntPtr parameter, IntPtr report); @@ -299,6 +302,19 @@ namespace IEC61850 throw new IedConnectionException ("getRCBValues service failed", error); } + /// + /// Trigger General Interrogation Report + /// + /// This exception is thrown if there is a connection or service error + public void TriggerGIReport() + { + int error; + IedConnection_triggerGIReport(connection, out error, objectReference); + + if (error != 0) + throw new IedConnectionException("triggerGIReport service failed", error); + } + /// /// Write changed RCB values to the server. /// From ffcfeedb9f8540a70e5267a9621184098e7e1274 Mon Sep 17 00:00:00 2001 From: Jarkko Peltonen Date: Fri, 31 Mar 2017 11:44:48 +0300 Subject: [PATCH 2/4] Revert "Added Triggering of General Interrogation" This reverts commit 1e16bc883f68ab0366f4cf3d699d298bb36afaa5. --- dotnet/IEC61850forCSharp/ReportControlBlock.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dotnet/IEC61850forCSharp/ReportControlBlock.cs b/dotnet/IEC61850forCSharp/ReportControlBlock.cs index 4ef71405..ad9f5da3 100644 --- a/dotnet/IEC61850forCSharp/ReportControlBlock.cs +++ b/dotnet/IEC61850forCSharp/ReportControlBlock.cs @@ -154,9 +154,6 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedConnection_uninstallReportHandler(IntPtr connection, string rcbReference); - [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] - static extern void IedConnection_triggerGIReport(IntPtr connection, out int error, string rcbReference); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void InternalReportHandler (IntPtr parameter, IntPtr report); @@ -302,19 +299,6 @@ namespace IEC61850 throw new IedConnectionException ("getRCBValues service failed", error); } - /// - /// Trigger General Interrogation Report - /// - /// This exception is thrown if there is a connection or service error - public void TriggerGIReport() - { - int error; - IedConnection_triggerGIReport(connection, out error, objectReference); - - if (error != 0) - throw new IedConnectionException("triggerGIReport service failed", error); - } - /// /// Write changed RCB values to the server. /// From 8572f8a21a5db4e1a990e3ec53f26ba3618d2db3 Mon Sep 17 00:00:00 2001 From: Jarkko Peltonen Date: Wed, 27 Dec 2017 12:37:38 +0200 Subject: [PATCH 3/4] DeleteFile Added DeleteFile() to .NET interface. --- dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index aef42ee1..d93da3af 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -1037,6 +1037,20 @@ namespace IEC61850 throw new IedConnectionException ("Write value failed", error); } + /// Delete file + /// The name of the file. + /// This exception is thrown if there is a connection or service error + public void DeleteFile(string fileName) + { + int error; + + IedConnection_deleteFile(connection, out error, fileName); + + if (error != 0) + throw new IedConnectionException("Deleting file " + fileName + " failed", error); + } + + /// Read the content of a file directory. /// The name of the directory. /// This exception is thrown if there is a connection or service error From c1340666453695ab23a7aa745eb674f72d13d990 Mon Sep 17 00:00:00 2001 From: Jarkko Peltonen Date: Wed, 27 Dec 2017 12:59:44 +0200 Subject: [PATCH 4/4] Corrected param name --- dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index d93da3af..de02a23a 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -1038,7 +1038,7 @@ namespace IEC61850 } /// Delete file - /// The name of the file. + /// The name of the file. /// This exception is thrown if there is a connection or service error public void DeleteFile(string fileName) {