- .NET API: Added Client.ReportControlBlock.HasResvTms method

- updated CHANGELOG
pull/147/head
Michael Zillgith 7 years ago
parent e803003441
commit d7e01738eb

@ -1,3 +1,17 @@
Changes to version 1.3.3
------------------------
- IEC 61850 server: optimized report buffer handling for buffered reporting (save memory and encoding time)
- IEC 61850 client: fixed problem - IedConnection cannot be reused after IedConnection_close (github #124)
- IEC 61850 server: added support for pre configured client with ClientLN
- IEC 61850 client: added function ClientReportControlBlock_hasResvTms
- IEC 61850 server: don't clear owner when client disables BRCB (RptEna = false)
- IED Server: added ResvTms handling for BRCB
- SV publisher: fixed length calculation
- IEC 61850 server: added support for segmented reporting
- fixed bug in windows socket abstraction
- fixed client TCP keep alive problem (see github #115)
- MMS server: read service - return data access error for component access to simple variable
Changes to version 1.3.2 Changes to version 1.3.2
------------------------ ------------------------
- MMS client/server: added support for component alternate access for generic variable read requests - MMS client/server: added support for component alternate access for generic variable read requests

@ -131,6 +131,10 @@ namespace IEC61850
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern void ClientReportControlBlock_setPurgeBuf(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool purgeBuf); static extern void ClientReportControlBlock_setPurgeBuf(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool purgeBuf);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
static extern bool ClientReportControlBlock_hasResvTms(IntPtr self);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern Int16 ClientReportControlBlock_getResvTms(IntPtr self); static extern Int16 ClientReportControlBlock_getResvTms(IntPtr self);
@ -194,7 +198,8 @@ namespace IEC61850
private void internalReportHandler(IntPtr parameter, IntPtr report) private void internalReportHandler(IntPtr parameter, IntPtr report)
{ {
try { try
{
if (this.report == null) if (this.report == null)
this.report = new Report(report); this.report = new Report(report);
@ -202,7 +207,8 @@ namespace IEC61850
if (reportHandler != null) if (reportHandler != null)
reportHandler(this.report, reportHandlerParameter); reportHandler(this.report, reportHandlerParameter);
} catch (Exception e) }
catch (Exception e)
{ {
// older versions of mono 2.10 (for linux?) cause this exception // older versions of mono 2.10 (for linux?) cause this exception
Console.WriteLine(e.Message); Console.WriteLine(e.Message);
@ -213,7 +219,8 @@ namespace IEC61850
{ {
self = ClientReportControlBlock_create(objectReference); self = ClientReportControlBlock_create(objectReference);
if (self != IntPtr.Zero) { if (self != IntPtr.Zero)
{
this.iedConnection = iedConnection; this.iedConnection = iedConnection;
this.objectReference = objectReference; this.objectReference = objectReference;
} }
@ -229,8 +236,10 @@ namespace IEC61850
/// <see cref="IEC61850.Client.ReportControlBlock"/> was occupying.</remarks> /// <see cref="IEC61850.Client.ReportControlBlock"/> was occupying.</remarks>
public void Dispose() public void Dispose()
{ {
lock (this) { lock (this)
if (self != IntPtr.Zero) { {
if (self != IntPtr.Zero)
{
iedConnection.UninstallReportHandler(objectReference); iedConnection.UninstallReportHandler(objectReference);
@ -273,7 +282,8 @@ namespace IEC61850
this.reportHandlerParameter = parameter; this.reportHandlerParameter = parameter;
if (reportHandlerInstalled == false) { if (reportHandlerInstalled == false)
{
string reportId = this.GetRptId(); string reportId = this.GetRptId();
@ -380,9 +390,11 @@ namespace IEC61850
if (error != 0) if (error != 0)
throw new IedConnectionException("setRCBValues service failed", error); throw new IedConnectionException("setRCBValues service failed", error);
if (flagRptId) { if (flagRptId)
{
if (reportHandlerInstalled) { if (reportHandlerInstalled)
{
reportHandlerInstalled = false; reportHandlerInstalled = false;
InstallReportHandler(this.reportHandler, this.reportHandlerParameter); InstallReportHandler(this.reportHandler, this.reportHandlerParameter);
} }
@ -445,7 +457,8 @@ namespace IEC61850
if (entryIdRef == IntPtr.Zero) if (entryIdRef == IntPtr.Zero)
return null; return null;
else { else
{
MmsValue entryId = new MmsValue(entryIdRef); MmsValue entryId = new MmsValue(entryIdRef);
return entryId.getOctetString(); return entryId.getOctetString();
@ -714,6 +727,15 @@ namespace IEC61850
flagOptFlds = true; flagOptFlds = true;
} }
/// <summary>
/// Check if the report control block has the "ResvTms" attribute.
/// </summary>
/// <returns><c>true</c>, if ResvTms is available, <c>false</c> otherwise.</returns>
public bool HasResvTms()
{
return ClientReportControlBlock_hasResvTms(self);
}
/// <summary> /// <summary>
/// Gets the ResvTms (reservation time) value /// Gets the ResvTms (reservation time) value
/// </summary> /// </summary>
@ -759,6 +781,5 @@ namespace IEC61850
return null; return null;
} }
} }
} }
} }

Loading…
Cancel
Save