OPC Studio User's Guide and Reference
ServiceResult Property (_UAServiceException)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.ComTypes Namespace > _UAServiceException Interface : ServiceResult Property
The service result (combines the status code and diagnostic information) associated with the exception.
Syntax
'Declaration
 
<NotNullAttribute()>
ReadOnly Property ServiceResult As UAServiceResult
'Usage
 
Dim instance As _UAServiceException
Dim value As UAServiceResult
 
value = instance.ServiceResult
[NotNull()]
UAServiceResult ServiceResult {get;}
[NotNull()]
property UAServiceResult^ ServiceResult {
   UAServiceResult^ get();
}

Property Value

The value of this property cannot be null (Nothing in Visual Basic).

Because there is an implicit conversion to OpcLabs.EasyOpc.UA.UACodeBits from OpcLabs.EasyOpc.UA.UAServiceResult, you can simply use the return value in place of a OpcLabs.EasyOpc.UA.UACodeBits (representing the code bits of the status code). When the implicit conversion operators are not supported (such as with Python.NET), you can use the ToUACodeBits method instead.

Remarks

This property has the necessary information if you want to test for a specific OPC UA error. In most cases, you can use the fact that there is an implicit conversion from OpcLabs.EasyOpc.UA.UAServiceResult to System.Int32, and make a comparison of the OpcLabs.EasyOpc.UA.UAServiceException.ServiceResult with some value from the OpcLabs.EasyOpc.UA.UACodeBits class easily.

The getter method of this property is pure, i.e. it does not have observable side effects.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also