- .NET API: ReportControlBlock.GetOwner returns null when no owner available (#79)

pull/93/head
Michael Zillgith 7 years ago
parent c9fe177a87
commit 23208aa066

@ -742,14 +742,19 @@ namespace IEC61850
/// <summary> /// <summary>
/// Gets the current owner of the RCB /// Gets the current owner of the RCB
/// </summary> /// </summary>
/// <returns>The owner information</returns> /// <returns>The owner information, or null when no owner information is available.</returns>
public byte[] GetOwner() public byte[] GetOwner()
{ {
IntPtr mmsValuePtr = ClientReportControlBlock_getOwner(self); IntPtr mmsValuePtr = ClientReportControlBlock_getOwner(self);
if (mmsValuePtr != IntPtr.Zero)
{
MmsValue octetStringVal = new MmsValue(mmsValuePtr); MmsValue octetStringVal = new MmsValue(mmsValuePtr);
return octetStringVal.getOctetString(); return octetStringVal.getOctetString();
}
else
return null;
} }
} }

Loading…
Cancel
Save