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
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the Opc |
| Opc | Initializes a new instance of the Opckind 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.
public OpcDataTypeEncodingMaskAttribute()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.
public OpcDataTypeEncodingMaskAttribute(OpcEncodingMaskKind kind)Public Sub New(kind As OpcEncodingMaskKind)Parameters
| Name | Type | Description |
|---|---|---|
kind | Opc | One of the members defined by the Opc |
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.
public OpcEncodingMaskKind Kind { get; }Public ReadOnly Property Kind As OpcEncodingMaskKindProperty value
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.
public int Size { get; set; }Public Property Size As IntegerProperty value
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.
public int SizeInBits { get; set; }Public Property SizeInBits As IntegerProperty value
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.
public OpcEncodingMask GetEncodingMask()Public Function GetEncodingMask() As OpcEncodingMaskReturns
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.

