Skip to content

Reference

OpcDataTypeEncodingMaskAttribute Members

Defines the size of the mask used to encode optional field information of the custom data type represented by the Type on that this attribute is applied.

Reference

OpcDataTypeEncodingMaskAttribute Members ​

Type
OpcDataTypeEncodingMaskAttribute
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from Attribute.

Constructors ​

OpcDataTypeEncodingMaskAttribute ​

2 overloads

OverloadDescription
OpcDataTypeEncodingMaskAttribute()Initializes a new instance of the OpcDataTypeEncodingMaskAttribute class using the OpcEncodingMaskKind value Auto and the smallest number of bytes required to represent the necessary bit mask to define the existence of optional fields.
OpcDataTypeEncodingMaskAttribute(OpcEncodingMaskKind)Initializes a new instance of the OpcDataTypeEncodingMaskAttribute class using the kind specified and the smallest number of bytes required to represent the necessary bit mask to define the existence of optional fields.

OpcDataTypeEncodingMaskAttribute() ​

Initializes a new instance of the OpcDataTypeEncodingMaskAttribute class using the OpcEncodingMaskKind value Auto and the smallest number of bytes required to represent the necessary bit mask to define the existence of optional fields.

csharp
public OpcDataTypeEncodingMaskAttribute()
vbnet
Public Sub New()

OpcDataTypeEncodingMaskAttribute(OpcEncodingMaskKind) ​

Initializes a new instance of the OpcDataTypeEncodingMaskAttribute class using the kind specified and the smallest number of bytes required to represent the necessary bit mask to define the existence of optional fields.

csharp
public OpcDataTypeEncodingMaskAttribute(OpcEncodingMaskKind kind)
vbnet
Public Sub New(kind As OpcEncodingMaskKind)

Parameters

NameTypeDescription
kindOpcEncodingMaskKindOne of the members defined by the OpcEncodingMaskKind enumeration.

Properties ​

Kind ​

Gets the OpcEncodingMaskKind which is used to determine whether the mask data is controlled by the data type or is to be determined and processed inline while reading or writing the custom data type.

csharp
public OpcEncodingMaskKind Kind { get; }
vbnet
Public ReadOnly Property Kind As OpcEncodingMaskKind

Property value

OpcEncodingMaskKind

One of the members defined by the OpcEncodingMaskKind enumeration. The default value is Auto.

Size ​

Gets or sets the number of bytes used to encode the existence of optional fields in the stream of the custom data type to that this attribute has been applied.

csharp
public int Size { get; set; }
vbnet
Public Property Size As Integer

Property value

Int32

The number of bytes used to encode the existence of optional fields which can be a value between -1 and 8 (inclusive). In case there -1 is used the number of bytes is determined by the number of optional fields declared in the custom data type. This number defines the number of bits required to mask the existence of an optional field and therefore defines the number of bytes required as well (e.g. 8 bits for 0 to 7 optional fields with Size equals 1, 16 bits for 0-15 optional fields with Size equals 2 and so).

In case there a value less than -1 (the default value) is specified; -1 is used instead. In case there a value greater than 8 is specified; 8 is used instead.

SizeInBits ​

Gets or sets the number of bits to use to encode the existence of optional fields in the stream of the custom data type to that this attribute has been applied.

csharp
public int SizeInBits { get; set; }
vbnet
Public Property SizeInBits As Integer

Property value

Int32

The number of bits used to encode the existence of optional fields which can be a value between -1 and 64 (inclusive). In case there -1 is used the number of bits is determined by the number of optional fields declared in the custom data type. This number defined the number of bits required to mask the existence of an optional field and therefore defines the value of this property (e.g. 8 bits for 0 to 7 optional fields, 16 bits for 0-15 optional fields and so).

The value of this property defines the multiple of 8 using the value of the Size used (if not -1).

In case there a value less than -1 (the default value) is specified; -1 is used instead. In case there a value greater than 64 is specified; 64 is used instead.

Methods ​

GetEncodingMask ​

Retrieves the OpcEncodingMask information defined by the OpcDataTypeEncodingMaskAttribute.

csharp
public OpcEncodingMask GetEncodingMask()
vbnet
Public Function GetEncodingMask() As OpcEncodingMask

Returns

OpcEncodingMask

A new OpcEncodingMask instance which defines the information required to declare and process the mask used to encode the existence of optional fields in the stream of a custom data type.