OPC Studio User's Guide and Reference
FromUADataValue Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Generic Namespace > UAAttributeData<TValue> Class : FromUADataValue Method
A non-generic Value/Timestamps/StatusCode object to be converted to typed generic.

The value of this parameter can be null (Nothing in Visual Basic).

Creates a typed generic UAAttributeData<TValue> from non-generic OpcLabs.EasyOpc.UA.UADataValue object.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Public Shared Function FromUADataValue( _
   ByVal dataValue As UADataValue _
) As UAAttributeData(Of TValue)
'Usage
 
Dim dataValue As UADataValue
Dim value As UAAttributeData(Of TValue)
 
value = UAAttributeData(Of TValue).FromUADataValue(dataValue)
[CanBeNull()]
public static UAAttributeData<TValue> FromUADataValue( 
   UADataValue dataValue
)
[CanBeNull()]
public:
static UAAttributeData<TValue^>^ FromUADataValue( 
   UADataValue^ dataValue
) 

Parameters

dataValue
A non-generic Value/Timestamps/StatusCode object to be converted to typed generic.

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

A typed UAAttributeData<TValue> object made from dataValue.

This method can return null (Nothing in Visual Basic).

Remarks
When dataValue is null, the return value is also null. An exception is thrown when the dataValue does not contain a type assignable to UAAttributeData<TValue>.
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