Skip to content

Reference

OpcDataTypeMemberSwitchAttribute Class

Declares a field or property of a custom data type, to that the member belongs on that this attribute is applied, with conditional existence of the member within the stream of its custom data type.

Reference

OpcDataTypeMemberSwitchAttribute Class ​

since v2.8

Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Members
OpcDataTypeMemberSwitchAttribute Members
Also in
Opc.UaFx.Client

Declares a field or property of a custom data type, to that the member belongs on that this attribute is applied, with conditional existence of the member within the stream of its custom data type. Use this attribute to explicitly declare a field or property as optional. Its existence within the stream of its custom data type is declared either using a bit within the encoding mask of the whole data type (see OpcDataTypeEncodingMaskAttribute) using the constructors OpcDataTypeMemberSwitchAttribute and OpcDataTypeMemberSwitchAttribute or using the value of a preceding member using the constructors OpcDataTypeMemberSwitchAttribute, OpcDataTypeMemberSwitchAttribute or OpcDataTypeMemberSwitchAttribute.

Syntax ​

csharp
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public class OpcDataTypeMemberSwitchAttribute : Attribute
vbnet
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple:=False, Inherited:=False)>
Public Class OpcDataTypeMemberSwitchAttribute
    Inherits Attribute

Inheritance ​

Object → Attribute → OpcDataTypeMemberSwitchAttribute

Constructors ​

NameDescription
OpcDataTypeMemberSwitchAttribute5 overloadsInitializes a new instance of the OpcDataTypeMemberSwitchAttribute class which declares a field or property to be optional while its existence is indicated by a single bit (the next free bit in sequence of all bits in the encoding mask used bits).

Properties ​

NameDescription
BitGets the number of the bit which indiciates whether the field or property the attribute belongs to exists in the stream of the data type.
NameGets the name of the preceding member its value is to be evaluated to indicate that the member the attribute belongs exists in the stream of the data type.
OperatorGets a value which identifies the comparison method to use to evaluate the value of member referenced by Name.
ValueGets the value the value of the member referenced by Name is compared to.

Methods ​

NameDescription
GetSwitchRetrieves the OpcMemberSwitch defined by the OpcDataTypeMemberSwitchAttribute using the bit specified.

Inherits members from Attribute.

Applies to ​

PackageVersions
Opc.UaFx.Advancedv2.8–v2.59