diff --git a/dotnet/IEC61850forCSharp/Reporting.cs b/dotnet/IEC61850forCSharp/Reporting.cs index 627116fe..dfbf6d6b 100644 --- a/dotnet/IEC61850forCSharp/Reporting.cs +++ b/dotnet/IEC61850forCSharp/Reporting.cs @@ -146,6 +146,9 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr ClientReport_getRcbReference(IntPtr self); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ClientReport_getDataSetName(IntPtr self); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr ClientReport_getRptId(IntPtr self); @@ -289,6 +292,13 @@ namespace IEC61850 return Marshal.PtrToStringAnsi (rcbRef); } + public string GetDataSetName () + { + IntPtr dataSetName = ClientReport_getDataSetName (self); + + return Marshal.PtrToStringAnsi (dataSetName); + } + /// /// Gets the data reference for the specified data set element /// diff --git a/dotnet/reporting/ReportingExample.cs b/dotnet/reporting/ReportingExample.cs index 52b43b05..98571949 100644 --- a/dotnet/reporting/ReportingExample.cs +++ b/dotnet/reporting/ReportingExample.cs @@ -30,6 +30,10 @@ namespace reporting Console.WriteLine (" entryID: " + shb.ToString ()); } + if (report.HasDataSetName ()) { + Console.WriteLine (" report data set: " + report.GetDataSetName ()); + } + Console.WriteLine (" report dataset contains " + values.Size () + " elements"); for (int i = 0; i < values.Size(); i++) {