OpcDataTypeMemberAttribute Class

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll

Declares a field or property of a custom data type, to that the member belongs on that this attribute is applied, with different Name and Type information to use when reading and writing the member. By default the Name and the Type are determined by the Name and the FieldType or PropertyType. In case there a different name or a different Type is to be used for a member use this attribute to declare them. Keep in mind to declare only different types which implement IConvertible supporting the Type specified; otherwise declare the desired type directly instead of using this attribute. Additionally its possible to derive from OpcData and use IOpcDataStore instances with properties to implement custom data convertion.

C#

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public class OpcDataTypeMemberAttribute : Attribute, _Attribute


Inheritance ObjectAttribute › OpcDataTypeMemberAttribute


Attributes AttributeUsageAttribute


Implements _Attribute

Name Description
OpcDataTypeMemberAttribute Initializes a new instance of the OpcDataTypeMemberAttribute class. Use this constructor in case you want to explicitly declare that the default Type and default Name of a data type member is used.
OpcDataTypeMemberAttribute(String) Initializes a new instance of the OpcDataTypeMemberAttribute class using an alternative name specified for the member on that the OpcDataTypeMemberAttribute has been declared.
Name Description
Description Gets or sets a human readable text that describes the member.
Name Gets the alternative name to use for the member this attribute belongs to.
Type Gets or sets the alternative Type to use for the member this attribute belongs to. Keep in mind to declare only different types which implement IConvertible supporting the Type specified; otherwise declare the desired type directly instead of using this attribute.