From 1e16bc883f68ab0366f4cf3d699d298bb36afaa5 Mon Sep 17 00:00:00 2001 From: Jarkko Peltonen Date: Thu, 30 Mar 2017 17:38:56 +0300 Subject: [PATCH] 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. ///