OpcDataTypeEncodingMaskAttribute Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcDataTypeEncodingMaskAttribute type exposes the following members.

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.

C#

public OpcDataTypeEncodingMaskAttribute()

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.

C#

public OpcDataTypeEncodingMaskAttribute(OpcEncodingMaskKind kind)


Parameters

kind OpcEncodingMaskKind

One of the members defined by the OpcEncodingMaskKind enumeration.

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.

C#

public OpcEncodingMaskKind Kind { get; }


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.

C#

public int Size { get; set; }


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.

C#

public int SizeInBits { get; set; }


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.

GetEncodingMask()

Retrieves the OpcEncodingMask information defined by the OpcDataTypeEncodingMaskAttribute.

C#

public OpcEncodingMask GetEncodingMask()


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.