OPC Studio User's Guide and Reference
ValueTypeCode Property (UAAttributePointWriteParameters)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Connectivity Namespace > UAAttributePointWriteParameters Class : ValueTypeCode Property
Specifies the type code that should be used when writing the Value attribute.
Syntax
'Declaration
 
<IgnoreDataMemberAttribute()>
<XmlIgnoreAttribute()>
Public Property ValueTypeCode As TypeCode
'Usage
 
Dim instance As UAAttributePointWriteParameters
Dim value As TypeCode
 
instance.ValueTypeCode = value
 
value = instance.ValueTypeCode
[IgnoreDataMember()]
[XmlIgnore()]
public TypeCode ValueTypeCode {get; set;}
[IgnoreDataMember()]
[XmlIgnore()]
public:
property TypeCode ValueTypeCode {
   TypeCode get();
   void set (    TypeCode value);
}

Property Value

The default value of this property is Empty (TypeCode.Empty).

The type code that should be used when writing the Value attribute.
Exceptions
ExceptionDescription

An invalid enumeration value was used.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

When the type code is System.TypeCode.Empty, and the UAAttributePoint.AttributeId is equal to OpcLabs.EasyOpc.UA.UAAttributeId.Value, it means that the component will determine the type of the Value attribute from the DataType and ValueRank attributes of the node first. This can have negative implication on the performance, and introduces a dependency of the value written on the behavior of the OPC server itself.

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