Skip to content

Reference

OpcDataFieldInfo Members

Provides metadata of a field declared by a data type.

Reference

OpcDataFieldInfo Members ​

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

Properties ​

CustomAttributes ​

virtual

Gets an array of custom attributes associated with this field.

csharp
public virtual string[] CustomAttributes { get; }
vbnet
Public Overridable ReadOnly Property CustomAttributes As String()

Property value

String[]

An array of string values used by the author of this field.

Remarks

Applications are not be required to understand these attributes in order to interpret an encoded field value.

DeclaringType ​

Gets the type that declares the current OpcDataFieldInfo.

csharp
public OpcDataTypeInfo DeclaringType { get; }
vbnet
Public ReadOnly Property DeclaringType As OpcDataTypeInfo

Property value

OpcDataTypeInfo

An instance of the OpcDataTypeInfo which declares the current OpcDataFieldInfo.

Documentation ​

virtual · since v2.9

Gets any semantic information that would help a human to understand what is contained in the field.

csharp
public virtual string Documentation { get; }
vbnet
Public Overridable ReadOnly Property Documentation As String

Property value

String

A human readable text that describes what is contained in the field and that would help a human to understand what the field represented.

FieldType ​

Gets the type of value this field provides.

csharp
public OpcDataTypeInfo FieldType { get; }
vbnet
Public ReadOnly Property FieldType As OpcDataTypeInfo

Property value

OpcDataTypeInfo

The OpcDataTypeInfo representing the type of value this field provides.

IsOptional ​

Gets a value indicating whether the current field might not necessarily exist in the object defined by the DeclaringType.

csharp
public bool IsOptional { get; }
vbnet
Public ReadOnly Property IsOptional As Boolean

Property value

Boolean

The value true if the field might not always exists; otherwise the value false. Additionally see the Switch property.

Implements

IsOptional

Length ​

virtual

Gets the length of the field expressed either explicit or implicit using a different OpcDataFieldInfo.

csharp
public virtual OpcMemberLength Length { get; }
vbnet
Public Overridable ReadOnly Property Length As OpcMemberLength

Property value

OpcMemberLength

An instance of the OpcMemberLength class with the explicit length of the field or the reference to the OpcDataFieldInfo its value expresses the length of the current OpcDataFieldInfo.

Implements

Length

LengthField ​

virtual

Gets the OpcDataFieldInfo used to define the length of the current OpcDataFieldInfo.

csharp
public virtual OpcDataFieldInfo LengthField { get; }
vbnet
Public Overridable ReadOnly Property LengthField As OpcDataFieldInfo

Property value

OpcDataFieldInfo

An instance of the OpcDataFieldInfo class its value expresses the length of the current OpcDataFieldInfo or a null reference (Nothing in Visual Basic) if the Length does not refer to a different OpcDataFieldInfo used to express the length of the field.

Name ​

Gets the name of the current OpcDataFieldInfo.

csharp
public string Name { get; }
vbnet
Public ReadOnly Property Name As String

Property value

String

A string containing the name of this field.

Implements

Name

ReflectedType ​

Gets the type that was used to obtain this instance of OpcDataFieldInfo.

csharp
public OpcDataTypeInfo ReflectedType { get; }
vbnet
Public ReadOnly Property ReflectedType As OpcDataTypeInfo

Property value

OpcDataTypeInfo

An instance of the OpcDataTypeInfo used to obtain this instance.

Switch ​

virtual

Gets the switch condition which applies to the current OpcDataFieldInfo.

csharp
public virtual OpcMemberSwitch Switch { get; }
vbnet
Public Overridable ReadOnly Property Switch As OpcMemberSwitch

Property value

OpcMemberSwitch

An instance of the OpcMemberSwitch class which defines the conditions to fulfill so that the current OpcDataFieldInfo exists in an instance.

Implements

Switch

SwitchField ​

virtual

Gets the OpcDataFieldInfo used to evaluate the Switch condition which applies to the current OpcDataFieldInfo.

csharp
public virtual OpcDataFieldInfo SwitchField { get; }
vbnet
Public Overridable ReadOnly Property SwitchField As OpcDataFieldInfo

Property value

OpcDataFieldInfo

An instance of the OpcDataFieldInfo class its value is to be evaluated to determine whether the current OpcDataFieldInfo exists in an instance.

Methods ​

GetLength ​

virtual · since v2.58

Gets the maximum length of the specified dimension of the field as the definition of its data type states it.

csharp
public virtual int GetLength(int dimension)
vbnet
Public Overridable Function GetLength(dimension As Integer) As Integer

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the FieldType whose length is to be determined; its number of dimensions is stated by GetArrayRank.

Returns

Int32

The maximum length of the dimension, or 0 if it is not known. A value may hold less.

Exceptions

ExceptionCondition
IndexOutOfRangeExceptionThe FieldType is not an array, or the dimension is less than zero or equal to or greater than its number of dimensions.

Remarks

Of a field of one dimension, the length is the one stated by Length as well, if that is not given by a different field.

GetValue ​

virtual

Gets the value of the field supported by the given object instance.

csharp
public virtual object GetValue(object instance)
vbnet
Public Overridable Function GetValue(instance As Object) As Object

Parameters

NameTypeDescription
instanceObjectThe object whose field value will be returned.

Returns

Object

An object containing the value of the field reflected by this instance.

Implements

GetValue

Remarks

This method throws a NotSupportedException and have to be overridden in a derived class.

SetValue ​

virtual

Sets the value of the field supported by the given object instance.

csharp
public virtual void SetValue(object instance, object value)
vbnet
Public Overridable Sub SetValue(instance As Object, value As Object)

Parameters

NameTypeDescription
instanceObjectThe object whose field value will be set.
valueObjectThe value to assign to the field.

Implements

SetValue

Remarks

This method throws a NotSupportedException and have to be overridden in a derived class.

ToString ​

override

Returns a string representing the Name and FieldType of the current OpcDataFieldInfo.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string representing the Name and the FieldType of the current OpcDataFieldInfo.

Overrides

ToString()